FClothPhysicalMeshData

Spatial simulation data for a mesh.

Choose your operating system:

Windows

macOS

Linux

References

Module

ClothingSystemRuntimeCommon

Header

/Engine/Source/Runtime/ClothingSystemRuntimeCommon/Public/ClothPhysicalMeshData.h

Include

#include "ClothPhysicalMeshData.h"

Syntax

struct FClothPhysicalMeshData

Remarks

Spatial simulation data for a mesh.

Variables

Name Description

Public variable

TArray< FClothV...

 

BoneData

Indices and weights for each vertex, used to skin the mesh to create the reference pose.

Public variable

FClothTetherDat...

 

EuclideanTethers

Long range attachment tethers, using euclidean (beeline) distance to find the closest attachment.

Public variable

FClothTetherDat...

 

GeodesicTethers

Long range attachment tethers, using geodesic (surface) distance to find the closest attachment.

Public variable

TArray< uint32 ...

 

Indices

Indices of the simulation mesh triangles.

Public variable

TArray< float >

 

InverseMasses

Inverse mass for each vertex in the physical mesh.

Public variable

int32

 

MaxBoneWeights

Maximum number of bone weights of any vetex.

Public variable

TArray< FVector...

 

Normals

Normal at each vertex.

Public variable

int32

 

NumFixedVerts

Number of fixed verts in the simulation mesh (fixed verts are just skinned and do not simulate)

Public variable

TArray< uint32 ...

 

SelfCollisionIndices

Valid indices to use for self collisions (reduced set of Indices)

Public variable

TArray< FColor ...

 

VertexColors

Color at each vertex.

Public variable

TArray< FVector...

 

Vertices

Positions of each simulation vertex.

Public variable

TMap< uint32, F...

 

WeightMaps

The weight maps, or masks, used by this mesh, sorted by their target id.

Constructors

Name Description

Public function

FClothPhysicalMeshData()

Construct an empty cloth physical mesh with default common targets.

Functions

Name Description

Public function

FPointWeight...

 

AddWeightMap

(
    const T Target
)

Retrieve a pointer to a registered vertex weight array by unique

Public function

void

 

BuildSelfCollisionData

(
    float SelfCollisionRadius
)

Build the self collision indices with the specified radius.

Public function

void

 

CalculateInverseMasses()

Recalculate the node inverse masses.

Public function

void

 

CalculateNumInfluences()

Recalculate the number of influences for the bone data.

Public function

void

 

CalculateTethers

(
    bool bUseEuclideanDistance,
    bool bUseGeodesicDistance
)

Recalculate the long range attachment tethers.

Public function

void

 

ClearWeightMaps()

Clear out any default weight maps and delete any other ones.

Public function

FPointWeight...

 

FindOrAddWeightMap

(
    const T Target
)

Retrieve a pointer to a registered vertex weight array by unique

Public function Const

const FPoint...

 

FindWeightMap

(
    const T Target
)

Retrieve a pointer to a registered vertex weight array by unique

Public function

FPointWeight...

 

FindWeightMap

(
    const T Target
)

Retrieve a pointer to a registered vertex weight array by unique

Public function

FPointWeight...

 

GetWeightMap

(
    const T Target
)

Retrieve a registered vertex weight array by unique

Public function Const

const FPoint...

 

GetWeightMap

(
    const T Target
)

Retrieve a registered vertex weight array by unique

Public function Const

bool

 

HasWeightMap

(
    const T Target
)

Retrieve whether a vertex weight array has already been registered.

Public function

void

 

MigrateFrom

(
    FClothPhysicalMeshData& ClothPhysi...
)

Migrate from same, used to migrate LOD data from the UClothLODDataCommon_Legacy.

Public function

void

 

MigrateFrom

Migrate from the legacy physical mesh data class, used to migrate LOD data from the UClothLODDataCommon_Legacy.

Public function

void

 

Reset

(
    const int32 InNumVerts,
    const int32 InNumIndices
)

Reset the default common targets for this cloth physical mesh.

Deprecated Variables

Name Description

Public variable

TArray< float >

 

AnimDriveMultipliers_DEPRECATED

Public variable

TArray< float >

 

BackstopDistances_DEPRECATED

Public variable

TArray< float >

 

BackstopRadiuses_DEPRECATED

Public variable

TArray< float >

 

MaxDistances_DEPRECATED

  1. Use WeightMaps instead.

Deprecated Functions

Name Description

Public function

void

 

BuildSelfCollisionData

(
    const TMap< FName, TObjectPtr< UClo...
)

Use BuildSelfCollisionData(float SelfCollisionRadius) instead.

Public function Const

void

 

ComputeFaceAveragedVertexNormals

(
    TArray< FVector3f >& OutNormals
)

This function is no longer part of this API and will soon be removed.