CutMultipleWithPlanarCells

Cut multiple Geometry groups inside a GeometryCollection with PlanarCells, and add each cut cell back to the GeometryCollection as a new child of their source Geometry.

Windows
MacOS
Linux

References

Module

PlanarCut

Header

/Engine/Plugins/Experimental/PlanarCutPlugin/Source/PlanarCut/Public/PlanarCut.h

Include

#include "PlanarCut.h"

Source

/Engine/Plugins/Experimental/PlanarCutPlugin/Source/PlanarCut/Private/PlanarCut.cpp

Syntax

int32 CutMultipleWithPlanarCells
(
    FPlanarCells & Cells,
    FGeometryCollection & Collection,
    const TArrayView< const int32 > & TransformIndices,
    const TOptional< FTransform > & TransformCells,
    bool bIncludeOutsideCellInOutput,
    float CheckDistanceAcrossOutsideCellForProximity,
    bool bSetDefaultInternalMaterialsFromCollection,
    TFunction< void &, int32, const FGeometryCollection &, int32, float, int32, FGeometryCollection &)> VertexInterpolate
)

Remarks

Cut multiple Geometry groups inside a GeometryCollection with PlanarCells, and add each cut cell back to the GeometryCollection as a new child of their source Geometry. For geometries that would not be cut, nothing is added.

Returns

index of first new geometry in the Output GeometryCollection, or -1 if no geometry was added

Parameters

Parameter

Description

Cells

Defines the cutting planes and division of space

Collection

The collection to be cut

TransformIndices

Which transform groups inside the collection to cut

TransformCells

Optional transform of the planar cut; if unset, defaults to Identity

bIncludeOutsideCellInOutput

If true, geometry that was not inside any of the cells (e.g. was outside of the bounds of all cutting geometry) will still be included in the output; if false, it will be discarded.

CheckDistanceAcrossOutsideCellForProximity

If > 0, when a plane is neighboring the "outside" cell, instead of setting proximity to the outside cell, the algo will sample a point this far outside the cell in the normal direction of the plane to see if there is actually a non-outside cell there. (Useful for bricks w/out mortar)

VertexInterpolate

Function that interpolates vertex properties (UVs, normals, etc); a default that handles all the normal vertex properties is provided, should only need to replace this if you have custom attributes

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss