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

#include <MergeCoincidentMeshEdges.h>

Public Member Functions

 FMergeCoincidentMeshEdges (FDynamicMesh3 *mesh)
 
virtual GEOMETRYCORE_API bool Apply ()
 

Public Attributes

FDynamicMesh3Mesh
 
double MergeVertexTolerance = DEFAULT_TOLERANCE
 
bool OnlyUniquePairs = false
 
double MergeSearchTolerance = 0
 
int32 InitialNumBoundaryEdges = 0
 
int32 FinalNumBoundaryEdges = 0
 
bool bWeldAttrsOnMergedEdges = false
 
FSplitAttributeWelder SplitAttributeWelder
 
TSet< int32 > * EdgesToMerge = nullptr
 

Static Public Attributes

static GEOMETRYCORE_API const double DEFAULT_TOLERANCE = FMathf::ZeroTolerance
 

Protected Member Functions

bool IsSameEdge (const FVector3d &a, const FVector3d &b, const FVector3d &c, const FVector3d &d) const
 

Protected Attributes

double MergeVtxDistSqr
 

Detailed Description

FMergeCoincidentMeshEdges finds pairs of boundary edges of the mesh that are identical (ie have endpoint vertices at the same locations) and merges the pair into a single edge. This is similar to welding vertices but safer because it prevents bowties from being formed.

Currently if the two edges have the same "orientation" (ie from their respective triangles) they cannot be merged.

Constructor & Destructor Documentation

◆ FMergeCoincidentMeshEdges()

UE::Geometry::FMergeCoincidentMeshEdges::FMergeCoincidentMeshEdges ( FDynamicMesh3 mesh)
inline

Member Function Documentation

◆ Apply()

bool FMergeCoincidentMeshEdges::Apply ( )
virtual

Run the merge operation and modify .Mesh

Returns
true if the algorithm succeeds

◆ IsSameEdge()

bool UE::Geometry::FMergeCoincidentMeshEdges::IsSameEdge ( const FVector3d a,
const FVector3d b,
const FVector3d c,
const FVector3d d 
) const
inlineprotected

Member Data Documentation

◆ bWeldAttrsOnMergedEdges

bool UE::Geometry::FMergeCoincidentMeshEdges::bWeldAttrsOnMergedEdges = false

Enable / Disable attribute welding along merged mesh edges

◆ DEFAULT_TOLERANCE

const double FMergeCoincidentMeshEdges::DEFAULT_TOLERANCE = FMathf::ZeroTolerance
static

default tolerance is float ZeroTolerance

◆ EdgesToMerge

TSet<int32>* UE::Geometry::FMergeCoincidentMeshEdges::EdgesToMerge = nullptr

Set of EdgesIds to merge. If null, perform merge operation across entire mesh

◆ FinalNumBoundaryEdges

int32 UE::Geometry::FMergeCoincidentMeshEdges::FinalNumBoundaryEdges = 0

Number of mesh boundary edges after merging

◆ InitialNumBoundaryEdges

int32 UE::Geometry::FMergeCoincidentMeshEdges::InitialNumBoundaryEdges = 0

Number of mesh boundary edges before merging

◆ MergeSearchTolerance

double UE::Geometry::FMergeCoincidentMeshEdges::MergeSearchTolerance = 0

Edges are considered as potentially the same if their midpoints are within this distance. Due to floating-point roundoff this should be larger than MergeVertexTolerance. If zero, we set to MergeVertexTolerance*2

◆ MergeVertexTolerance

double UE::Geometry::FMergeCoincidentMeshEdges::MergeVertexTolerance = DEFAULT_TOLERANCE

Edges are coincident if both pairs of endpoint vertices are closer than this distance

◆ MergeVtxDistSqr

double UE::Geometry::FMergeCoincidentMeshEdges::MergeVtxDistSqr
protected

◆ Mesh

FDynamicMesh3* UE::Geometry::FMergeCoincidentMeshEdges::Mesh

The mesh that we are modifying

◆ OnlyUniquePairs

bool UE::Geometry::FMergeCoincidentMeshEdges::OnlyUniquePairs = false

Only merge unambiguous pairs that have unique duplicate-edge matches

◆ SplitAttributeWelder

FSplitAttributeWelder UE::Geometry::FMergeCoincidentMeshEdges::SplitAttributeWelder

Used to weld attributes at the merged edges


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