UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ClothingMeshUtils Namespace Reference

Classes

class  ClothMeshDesc
 
struct  FMeshToMeshFilterSet
 
class  FVertexParameterMapper
 

Functions

void SkinPhysicsMesh (const TArray< int32 > &InBoneMap, const FClothPhysicalMeshData &InMesh, const FTransform &PostTransform, const FMatrix44f *InBoneMatrices, const int32 InNumBoneMatrices, TArray< FVector3f > &OutPositions, TArray< FVector3f > &OutNormals)
 
void GenerateMeshToMeshVertData (TArray< FMeshToMeshVertData > &OutMeshToMeshVertData, const ClothMeshDesc &TargetMesh, const ClothMeshDesc &SourceMesh, const FPointWeightMap *MaxDistances, bool bUseSmoothTransitions, bool bUseMultipleInfluences, float KernelMaxDistance, const TArray< FMeshToMeshFilterSet > &FilterSets)
 
FVector4f GetPointBaryAndDist (const FVector3f &A, const FVector3f &B, const FVector3f &C, const FVector3f &Point)
 
double TripleProduct (const FVector3f &A, const FVector3f &B, const FVector3f &C)
 
int32 QuadraticRoots (double A, double B, double Result[])
 
int32 CubicRoots (double A, double B, double C, double Result[])
 
FVector4f GetPointBaryAndDistWithNormals (const FVector3f &A, const FVector3f &B, const FVector3f &C, const FVector3f &InputNA, const FVector3f &InputNB, const FVector3f &InputNC, const FVector3f &Point)
 
void ComputeVertexContributions (TArray< FMeshToMeshVertData > &InOutSkinningData, const FPointWeightMap *const InMaxDistances, const bool bInSmoothTransition, const bool bInUseMultipleInfluences)
 

Variables

constexpr int MaxNumRootsAndExtrema = 5
 

Function Documentation

◆ ComputeVertexContributions()

void CLOTHINGSYSTEMRUNTIMECOMMON_API ClothingMeshUtils::ComputeVertexContributions ( TArray< FMeshToMeshVertData > &  InOutSkinningData,
const FPointWeightMap *const  InMaxDistances,
const bool  bInSmoothTransition,
const bool  bInUseMultipleInfluences = false 
)

Computes how much each vertex contributes to the final mesh. The final mesh is a blend between the cloth and the skinned mesh.

◆ CubicRoots()

int32 ClothingMeshUtils::CubicRoots ( double  A,
double  B,
double  C,
double  Result[] 
)

◆ GenerateMeshToMeshVertData()

void CLOTHINGSYSTEMRUNTIMECOMMON_API ClothingMeshUtils::GenerateMeshToMeshVertData ( TArray< FMeshToMeshVertData > &  OutMeshToMeshVertData,
const ClothMeshDesc TargetMesh,
const ClothMeshDesc SourceMesh,
const FPointWeightMap MaxDistances,
bool  bUseSmoothTransitions,
bool  bUseMultipleInfluences,
float  KernelMaxDistance,
const TArray< FMeshToMeshFilterSet > &  FilterSets = TArrayFMeshToMeshFilterSet >() 
)

Given mesh information for two meshes, generate a list of skinning data to embed TargetMesh in SourceMesh

Parameters
OutMeshToMeshVertData- Final skinning data
TargetMesh- Mesh data for the mesh we are embedding
SourceMesh- Mesh data for the mesh we are embedding into
MaxDistances- Fixed positions mask used to update the vertex contributions, or null if the update is not required
bUseSmoothTransitions- Set blend weight to smoothen transitions between the fixed and deformed vertices when updating the vertex contributions
bUseMultipleInfluences- Whether to take a weighted average of influences from multiple source triangles
KernelMaxDistance- Max distance parameter for weighting kernel for when using multiple influences
FilterSets- A set of source triangle indices to filter the search from, will use all source triangles if empty

◆ GetPointBaryAndDist()

FVector4f ClothingMeshUtils::GetPointBaryAndDist ( const FVector3f A,
const FVector3f B,
const FVector3f C,
const FVector3f Point 
)

Given a triangle ABC with normals at each vertex NA, NB and NC, get a barycentric coordinate and corresponding distance from the triangle encoded in an FVector4 where the components are (BaryX, BaryY, BaryZ, Dist)

Parameters
A- Position of triangle vertex A
B- Position of triangle vertex B
C- Position of triangle vertex C
NA- Normal at vertex A
NB- Normal at vertex B
NC- Normal at vertex C
Point- Point to calculate Bary+Dist for

◆ GetPointBaryAndDistWithNormals()

FVector4f ClothingMeshUtils::GetPointBaryAndDistWithNormals ( const FVector3f A,
const FVector3f B,
const FVector3f C,
const FVector3f NA,
const FVector3f NB,
const FVector3f NC,
const FVector3f Point 
)

Given a triangle ABC with normals at each vertex NA, NB and NC, get a barycentric coordinate and corresponding distance from the triangle encoded in an FVector4 where the components are (BaryX, BaryY, BaryZ, Dist)

Parameters
A- Position of triangle vertex A
B- Position of triangle vertex B
C- Position of triangle vertex C
NA- Normal at vertex A
NB- Normal at vertex B
NC- Normal at vertex C
Point- Point to calculate Bary+Dist for

◆ QuadraticRoots()

int32 ClothingMeshUtils::QuadraticRoots ( double  A,
double  B,
double  Result[] 
)

◆ SkinPhysicsMesh()

void CLOTHINGSYSTEMRUNTIMECOMMON_API ClothingMeshUtils::SkinPhysicsMesh ( const TArray< int32 > &  BoneMap,
const FClothPhysicalMeshData InMesh,
const FTransform PostTransform,
const FMatrix44f InBoneMatrices,
const int32  InNumBoneMatrices,
TArray< FVector3f > &  OutPositions,
TArray< FVector3f > &  OutNormals 
)

Static method for calculating a skinned mesh result from source data

◆ TripleProduct()

double ClothingMeshUtils::TripleProduct ( const FVector3f A,
const FVector3f B,
const FVector3f C 
)

Variable Documentation

◆ MaxNumRootsAndExtrema

constexpr int ClothingMeshUtils::MaxNumRootsAndExtrema = 5
constexpr