Navigation
API > API/Plugins > API/Plugins/ChaosClothAsset > API/Plugins/ChaosClothAsset/FClothGeometryTools
Description
Build (or add to) a ClothCollection Sim Mesh from the given 2D and 3D mesh data. Uses a Polygroup Attribute Layer to specify Pattern topology.
| Name | BuildSimMeshFromDynamicMeshes |
| Type | function |
| Header File | /Engine/Plugins/ChaosClothAsset/Source/ChaosClothAsset/Public/ChaosClothAsset/ClothGeometryTools.h |
| Include Path | #include "ChaosClothAsset/ClothGeometryTools.h" |
| Source | /Engine/Plugins/ChaosClothAsset/Source/ChaosClothAsset/Private/ChaosClothAsset/ClothGeometryTools.cpp |
static void BuildSimMeshFromDynamicMeshes
(
const TSharedRef < FManagedArrayCollection > & ClothCollection,
const UE::Geometry::FDynamicMesh3 & Mesh2D,
const UE::Geometry::FDynamicMesh3 & Mesh3D,
int32 PatternIndexLayerId,
bool bTransferWeightMaps,
bool bTransferSimSkinningData,
bool bAppend,
TMap < int, int32 > & OutDynamicMeshToClothVertexMap
)
Parameters
| Name | Remarks |
|---|---|
| ClothCollection | The cloth collection whose sim mesh (2D and 3D) will be modified |
| Mesh2D | Input 2D sim mesh data |
| Mesh3D | Input 3D sim mesh data |
| PatternIndexLayerId | Specifies which PolyGroup layer on Mesh2D contains pattern index per triangle information |
| bTransferWeightMaps | Copy any weight map layers from Mesh2D into the ClothCollection sim mesh |
| bTransferSimSkinningData | Copy any skinning weight data from Mesh2D into the ClothCollection sim mesh |
| bAppend | Whether to add the new mesh data to the existing sim mesh, or crete new sim mesh in the collection |
| OutDynamicMeshToClothVertexMap | (Output) Computed map of vertex indices in the input Meshes to vertex indices in the output ClothCollection |