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

#include <SplitAttributeWelder.h>

Public Member Functions

 FSplitAttributeWelder ()
 
GEOMETRYCORE_API void WeldSplitElements (FDynamicMesh3 &ParentMesh, const int32 ParentVID)
 
GEOMETRYCORE_API void WeldSplitElements (FDynamicMesh3 &ParentMesh)
 

Static Public Member Functions

static GEOMETRYCORE_API void WeldSplitUVs (const int32 ParentVID, FDynamicMeshUVOverlay &UVOverlay, float UVDistSqrdThreshold)
 
static GEOMETRYCORE_API void WeldSplitUnitVectors (const int32 ParentVID, FDynamicMeshNormalOverlay &NormalOverlay, float DotThreshold, bool bMergeZeroVectors=true)
 
static GEOMETRYCORE_API void WeldSplitColors (const int32 ParentVID, FDynamicMeshColorOverlay &ColorOverlay, float ColorDistSqrdThreshold)
 

Public Attributes

float UVDistSqrdThreshold = 0.f
 
float ColorDistSqrdThreshold = 0.f
 
float NormalVecDotThreshold = 0.f
 
float TangentVecDotThreshold = 0.f
 

Detailed Description

FSplitAttributeWelder can be used to weld split-attributes that share the same vertex in the parent mesh (e.g. split normals)

Constructor & Destructor Documentation

◆ FSplitAttributeWelder()

UE::Geometry::FSplitAttributeWelder::FSplitAttributeWelder ( )
inline

Member Function Documentation

◆ WeldSplitColors()

void FSplitAttributeWelder::WeldSplitColors ( const int32  ParentVID,
FDynamicMeshColorOverlay ColorOverlay,
float  ColorDistSqrdThreshold 
)
static

Welds split colors shared by the ParentVID vertex in the ParentMesh.

Parameters
ParentVIDdefines a vertex in the Parent Mesh
ColorOverlaycontains potentially split colors associated with the ParentVID. Assumed to be an overlay of the ParentMesh.
ColorDistSqrdThresholdprovides a threshold applied to the sum of the square differences between to colors. Used to determine if a weld should be preformed.

◆ WeldSplitElements() [1/2]

void FSplitAttributeWelder::WeldSplitElements ( FDynamicMesh3 ParentMesh)

Weld split-elements across the entire mesh.

◆ WeldSplitElements() [2/2]

void FSplitAttributeWelder::WeldSplitElements ( FDynamicMesh3 ParentMesh,
const int32  ParentVID 
)

Weld split-elements at the ParentVID in each overlay that are "close enough" as defined by the appropriate threshold.

◆ WeldSplitUnitVectors()

void FSplitAttributeWelder::WeldSplitUnitVectors ( const int32  ParentVID,
FDynamicMeshNormalOverlay NormalOverlay,
float  DotThreshold,
bool  bMergeZeroVectors = true 
)
static

Welds split Normals / Tangents shared by the ParentVID vertex in the ParentMesh based on the angled between the vectors.

Parameters
ParentVIDdefines a vertex in the Parent Mesh
NormalOverlaycontains potentially split vectors associated with the ParentVID. Assumed to be an overlay of the ParentMesh.
DotThresholdprovides a threshold for the dot product between two vectors that should be welded.
bMergeZeroVectorswill weld vectors that are too small to normalize.

◆ WeldSplitUVs()

void FSplitAttributeWelder::WeldSplitUVs ( const int32  ParentVID,
FDynamicMeshUVOverlay UVOverlay,
float  UVDistSqrdThreshold 
)
static

Welds split UVs shared by the ParentVID vertex in the ParentMesh.

Parameters
ParentVIDdefines a vertex in the parent mesh.
UVOverlaycontains potentially split UVs associated with the ParentVID. Assumed to be an overlay of the ParentMesh.
UVDistSqrdThresholdprovides a threshold in distance squared UV space between split UVs that should be welded.

Member Data Documentation

◆ ColorDistSqrdThreshold

float UE::Geometry::FSplitAttributeWelder::ColorDistSqrdThreshold = 0.f

Merge threshold used to compare Color Overlay elements Applied as (ColorA - ColorB).SizeSquared() <= ColorDistSqrdThreshold

◆ NormalVecDotThreshold

float UE::Geometry::FSplitAttributeWelder::NormalVecDotThreshold = 0.f

Merge threshold used to compare Normal Overlay vectors. Applied as Abs(1 - VecA.dot.VecB) <= NormalVecDotThreshold.

◆ TangentVecDotThreshold

float UE::Geometry::FSplitAttributeWelder::TangentVecDotThreshold = 0.f

Merge threshold used to compare Tangent (and BiTangent) Overlay vectors. Applied as Abs(1 - VecA.dot.VecB) <= TangentVecDotThreshold.

◆ UVDistSqrdThreshold

float UE::Geometry::FSplitAttributeWelder::UVDistSqrdThreshold = 0.f

Merge threshold used to compare UV Overlay elements. Applied as FVector2f::DistSquared(UVA , UVB) <= UVDisSqrdThreshold


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