![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshSelfUnion.h>
Public Member Functions | |
| FMeshSelfUnion (FDynamicMesh3 *MeshIn) | |
| virtual | ~FMeshSelfUnion () |
| EOperationValidationResult | Validate () |
| GEOMETRYCORE_API bool | Compute () |
Public Attributes | |
| bool | bCollapseDegenerateEdgesOnCut = true |
| double | DegenerateEdgeTolFactor = 1.5 |
| double | SnapTolerance = FMathf::ZeroTolerance * 1.0 |
| double | NormalOffset = FMathf::ZeroTolerance * 1.0 |
| double | WindingThreshold = .5 |
| bool | bTrimFlaps = false |
| bool | bWeldSharedEdges = true |
| bool | bTrackAllNewEdges = false |
| FProgressCancel * | Progress = nullptr |
| bool | bSimplifyAlongNewEdges = false |
| double | SimplificationAngleTolerance = .1 |
| double | TryToImproveTriQualityThreshold = .25 |
| bool | bPreserveTriangleGroups = true |
| bool | bPreserveVertexUVs = true |
| bool | bPreserveOverlayUVs = true |
| float | UVDistortTolerance = FMathf::ZeroTolerance |
| bool | bPreserveVertexNormals = true |
| float | NormalDistortTolerance = .01f |
| FDynamicMesh3 * | Mesh |
| TArray< int > | CreatedBoundaryEdges |
| TSet< int32 > | AllNewEdges |
Protected Member Functions | |
| virtual bool | Cancelled () |
MeshSelfUnion – perform a "Mesh Boolean" style union of a mesh on itself, resolving any self intersections and welding the new boundaries as needed
|
inline |
|
inlinevirtual |
If this returns true, abort computation.
| bool FMeshSelfUnion::Compute | ( | ) |
Compute the plane cut by splitting mesh edges that cross the cut plane, and then deleting any triangles on the positive side of the cutting plane.
|
inline |
| TSet<int32> UE::Geometry::FMeshSelfUnion::AllNewEdges |
All edges created by mesh boolean algorithm. Only populated if bTrackAllNewEdges = true
Whether to do additional processing to try to remove degenerate edges
Prevent simplification from distorting overlay UVs
Prevent simplification from distorting triangle groups
Prevent simplification from distorting vertex normals
Prevent simplification from distorting vertex UVs
Control whether we attempt to auto-simplify the small planar triangles that the boolean operation tends to generate
Control whether new edges should be tracked
Weld newly-created cut edges where the mesh is unioned with itself. If false, newly joined surfaces remain topologically disconnected.
| TArray<int> UE::Geometry::FMeshSelfUnion::CreatedBoundaryEdges |
Boundary edges created by the mesh boolean algorithm failing to cleanly weld (doesn't include boundaries that already existed in source mesh)
| double UE::Geometry::FMeshSelfUnion::DegenerateEdgeTolFactor = 1.5 |
Tolerance factor (multiplied by SnapTolerance) for removing short edges created by the cutting process; should be no more than 2
| FDynamicMesh3* UE::Geometry::FMeshSelfUnion::Mesh |
| float UE::Geometry::FMeshSelfUnion::NormalDistortTolerance = .01f |
When preserving normals, sets maximum allowed change in normals from collapsing an edge, measured at the removed vertex in degrees
| double UE::Geometry::FMeshSelfUnion::NormalOffset = FMathf::ZeroTolerance * 1.0 |
Amount we nudge samples off the surface when evaluating winding number, to avoid numerical issues
| FProgressCancel* UE::Geometry::FMeshSelfUnion::Progress = nullptr |
Set this to be able to cancel running operation
| double UE::Geometry::FMeshSelfUnion::SimplificationAngleTolerance = .1 |
Degrees of deviation from coplanar that we will still simplify
| double UE::Geometry::FMeshSelfUnion::SnapTolerance = FMathf::ZeroTolerance * 1.0 |
Tolerance distance for considering a point to be on a vertex or edge, especially during mesh-mesh cutting
| double UE::Geometry::FMeshSelfUnion::TryToImproveTriQualityThreshold = .25 |
If triangle quality (aspect ratio) is worse than this threshold, only simplify in ways that improve quality. If <= 0, triangle quality is ignored. Note: For aspect ratio we use definition: 4*TriArea / (sqrt(3)*MaxEdgeLen^2), ref: https://people.eecs.berkeley.edu/~jrs/papers/elemj.pdf p.53 Equilateral triangles have value 1; Smaller values -> lower quality
| float UE::Geometry::FMeshSelfUnion::UVDistortTolerance = FMathf::ZeroTolerance |
When preserving UVs, sets maximum allowed change in UV coordinates from collapsing an edge, measured at the removed vertex
| double UE::Geometry::FMeshSelfUnion::WindingThreshold = .5 |
Threshold to determine whether triangle in one mesh is inside or outside of the other