UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FMeshMeshCut Class Reference

#include <MeshMeshCut.h>

Public Member Functions

 FMeshMeshCut (FDynamicMesh3 *MeshA, FDynamicMesh3 *MeshB)
 
EOperationValidationResult Validate ()
 
GEOMETRYCORE_API bool Cut (const MeshIntersection::FIntersectionsQueryResult &Intersections)
 
void ResetOutputs ()
 

Public Attributes

FDynamicMesh3Mesh [2]
 
double SnapTolerance = FMathf::ZeroTolerance * 100.0
 
bool bMutuallyCut = true
 
bool bCutCoplanar = false
 
bool bTrackInsertedVertices = false
 
TArray< int > VertexChains [2]
 
TArray< int > SegmentToChain [2]
 

Detailed Description

Cut a mesh where it crosses a second mesh – resolving all intersections, but not deleting geometry. Optionally resolve intersections mutually for both meshes.

Constructor & Destructor Documentation

◆ FMeshMeshCut()

UE::Geometry::FMeshMeshCut::FMeshMeshCut ( FDynamicMesh3 MeshA,
FDynamicMesh3 MeshB 
)
inline

Member Function Documentation

◆ Cut()

bool FMeshMeshCut::Cut ( const MeshIntersection::FIntersectionsQueryResult Intersections)

Split mesh(es) along the provided intersections

Parameters
IntersectionsA set of mesh-mesh intersections, for example as returned by TMeshAABBTree3::FindAllIntersections

◆ ResetOutputs()

void UE::Geometry::FMeshMeshCut::ResetOutputs ( )
inline

◆ Validate()

EOperationValidationResult UE::Geometry::FMeshMeshCut::Validate ( )
inline
Returns
EOperationValidationResult::Ok if we can apply operation, or error code if we cannot

Member Data Documentation

◆ bCutCoplanar

bool UE::Geometry::FMeshMeshCut::bCutCoplanar = false

If true, detect coplanar faces and re-triangulate so that the triangulations match 1:1 (TODO: not implemented!)

◆ bMutuallyCut

bool UE::Geometry::FMeshMeshCut::bMutuallyCut = true

If true, modify both meshes to split at crossing points; otherwise only modify MeshA

◆ bTrackInsertedVertices

bool UE::Geometry::FMeshMeshCut::bTrackInsertedVertices = false

If true, record vertex insertions

◆ Mesh

FDynamicMesh3* UE::Geometry::FMeshMeshCut::Mesh[2]

Meshes to cut – note that FMeshMeshCut::Cut is destructive, so these are also outputs

◆ SegmentToChain

TArray<int> UE::Geometry::FMeshMeshCut::SegmentToChain[2]

For each intersection segment, where the corresponding elements start in VertexChains. May contain IndexConstants::InvalidIndex for some segments, in cases where cutting a segment failed

Empty if bTrackInsertedVertices == false

◆ SnapTolerance

double UE::Geometry::FMeshMeshCut::SnapTolerance = FMathf::ZeroTolerance * 100.0

Tolerance distance for considering a point to be on a vertex, edge or plane

◆ VertexChains

TArray<int> UE::Geometry::FMeshMeshCut::VertexChains[2]

Outputs Packed chains of vertex IDs, representing the vertices for each segment in the mesh Packed as the number of vertices in that chain, followed by that many vertex ids, per segment NOT 1:1 w/ segments; some segments may have failed to insert

Empty if bTrackInsertedVertices == false


The documentation for this class was generated from the following files: