Navigation
API > API/Plugins > API/Plugins/PlanarCut
Description
Cut a Geometry inside a GeometryCollection with PlanarCells, and add each cut cell back to the GeometryCollection as a new child of the input Geometry. For geometries that would not be cut, nothing is added.
| Name | CutWithPlanarCells |
| Type | function |
| Header File | /Engine/Plugins/Experimental/PlanarCutPlugin/Source/PlanarCut/Public/PlanarCut.h |
| Include Path | #include "PlanarCut.h" |
| Source | /Engine/Plugins/Experimental/PlanarCutPlugin/Source/PlanarCut/Private/PlanarCut.cpp |
int32 CutWithPlanarCells
(
FPlanarCells & Cells,
FGeometryCollection & Collection,
int32 TransformIdx,
double Grout,
double CollisionSampleSpacing,
int32 RandomSeed,
const TOptional < FTransform > & TransformCollection,
bool bIncludeOutsideCellInOutput,
bool bSetDefaultInternalMaterialsFromCollection,
FProgressCancel * Progress,
FVector CellsOrigin,
bool bSplitIslands
)
index of first new geometry in the Output GeometryCollection, or -1 if no geometry was added
Parameters
| Name | Remarks |
|---|---|
| Cells | Defines the cutting planes and division of space |
| Collection | The collection to be cut |
| TransformIdx | Which transform inside the collection to cut |
| Grout | Separation to leave between cutting cells |
| CollisionSampleSpacing | Target spacing between collision sample vertices |
| RandomSeed | Seed to be used for random noise displacement |
| TransformCollection | Optional transform of the whole geometry collection; 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. |
| Progress | Optionally tracks progress and supports early-cancel |
| CellsOrigin | Optionally provide a local origin of the cutting Cells |
| bSplitIslands | Whether to detect connected components and split them apart after the cut |