CutWithPlanarCells

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.

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 CutWithPlanarCells
(
    FPlanarCells & Cells,
    FGeometryCollection & Collection,
    int32 TransformIdx,
    double Grout,
    double CollisionSampleSpacing,
    const TOptional< FTransform > & TransformCollection,
    bool bIncludeOutsideCellInOutput,
    float CheckDistanceAcrossOutsideCellForProximity,
    bool bSetDefaultInternalMaterialsFromCollection
)

Remarks

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.

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

TransformIdx

Which transform inside the collection to cut

Grout

Separation to leave between cutting cells

CollisionSampleSpacing

Target spacing between collision sample vertices

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.

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)

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