Open 3D Engine NvCloth Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
NvCloth::Fabric Class Reference

#include <Fabric.h>

Public Member Functions

 Fabric (const FabricCookedData &cookedData, NvFabricUniquePtr nvFabric)
 
const AZStd::vector< int32_t > & GetPhaseTypes () const
 

Public Attributes

FabricId m_id
 
NvFabricUniquePtr m_nvFabric
 NvCloth fabric object.
 
FabricCookedData m_cookedData
 Fabric cooked data used to construct this fabric.
 
int m_numClothsUsingFabric = 0
 Counter of Cloth instances created with this fabric.
 

Detailed Description

Fabric objects are the instances of FabricCookedData. There will be only one Fabric created per FabricCookedData, hold by SystemComponent and identified by FabricId.

It has a counter of how many Cloth instances have been created using this fabric, the moment the counter is zero (when the last cloth using this fabric has been destroyed) th fabric will be automatically destroyed.

Member Function Documentation

◆ GetPhaseTypes()

const AZStd::vector< int32_t > & NvCloth::Fabric::GetPhaseTypes ( ) const
inline

Returns the list of phase types (horizontal, vertical, bending or shearing) created for the fabric when it was cooked.

Member Data Documentation

◆ m_id

FabricId NvCloth::Fabric::m_id

Fabric unique id.

Note
It is the same id from its FabricCookedData.

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