Open 3D Engine NvCloth Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <ICloth.h>
Inherited by NvCloth::Cloth.
Public Types | |
using | PreSimulationEvent = AZ::Event< ClothId, float > |
using | PostSimulationEvent = AZ::Event< ClothId, float, const AZStd::vector< SimParticleFormat > & > |
Public Member Functions | |
AZ_RTTI (ICloth, "{78817F38-E4A5-4B94-BCD8-3E3B73F66B5A}") | |
virtual ClothId | GetId () const =0 |
Returns the cloth identifier. | |
virtual const AZStd::vector< SimParticleFormat > & | GetInitialParticles () const =0 |
Returns the list of particles (positions and inverse mass) used when the cloth was created. | |
virtual const AZStd::vector< SimIndexType > & | GetInitialIndices () const =0 |
Returns the list of triangles' indices used when the cloth's fabric was created. | |
virtual const AZStd::vector< SimParticleFormat > & | GetParticles () const =0 |
Returns the current list of particles (positions and inverse mass) of cloth. | |
virtual void | SetParticles (const AZStd::vector< SimParticleFormat > &particles)=0 |
virtual void | SetParticles (AZStd::vector< SimParticleFormat > &&particles)=0 |
virtual void | DiscardParticleDelta ()=0 |
virtual const FabricCookedData & | GetFabricCookedData () const =0 |
Returns the FabricCookedData used when the cloth was created. | |
virtual IClothConfigurator * | GetClothConfigurator ()=0 |
void | ConnectPreSimulationEventHandler (PreSimulationEvent::Handler &handler) |
void | ConnectPostSimulationEventHandler (PostSimulationEvent::Handler &handler) |
Protected Attributes | |
PreSimulationEvent | m_preSimulationEvent |
PostSimulationEvent | m_postSimulationEvent |
Interface to a cloth in the system. A cloth is formed of particles that are simulated with a series of constraints specified by a fabric. A cloth must be added to a solver to be simulated.
using NvCloth::ICloth::PostSimulationEvent = AZ::Event<ClothId, float, const AZStd::vector<SimParticleFormat>&> |
Event signaled after running simulation.
(Unnamed) | The cloth identifier. |
(Unnamed) | Delta time. |
(Unnamed) | New particles (positions and inverse masses) result of running the simulation. |
using NvCloth::ICloth::PreSimulationEvent = AZ::Event<ClothId, float> |
Event signaled before running simulation.
(Unnamed) | The cloth identifier. |
(Unnamed) | Delta time |
|
inline |
Connects a handler to the PostSimulationEvent. Note that the events can be triggered from multiple threads at the same time. Please make sure the handler is reentrant and thread-safe.
|
inline |
Connects a handler to the PreSimulationEvent. Note that the events can be triggered from multiple threads at the same time. Please make sure the handler is reentrant and thread-safe.
|
pure virtual |
Makes current and previous particles the same, the next simulation will not have any effect since delta positions will be zero.
Implemented in NvCloth::Cloth.
|
pure virtual |
Returns the interface to IClothConfigurator to set all cloth parameters that define its behavior during simulation.
Implemented in NvCloth::Cloth.
|
pure virtual |
Sets the current particles (positions and inverse mass) for cloth.
particles | List of particles to set (rvalue overload). |
Implemented in NvCloth::Cloth.
|
pure virtual |
Sets the current particles (positions and inverse mass) for cloth.
particles | List of particles to set. |
Implemented in NvCloth::Cloth.