#include <IFabricCooker.h>
|  | 
|  | AZ_RTTI (IFabricCooker, "{32E97A6F-A32C-42D2-8BA9-83896E57FA72}") | 
|  | 
| virtual AZStd::optional< FabricCookedData > | CookFabric (const AZStd::vector< SimParticleFormat > &particles, const AZStd::vector< SimIndexType > &indices, const AZ::Vector3 &fabricGravity=AZ::Vector3(0.0f, 0.0f, -9.81f), bool useGeodesicTether=true)=0 | 
|  | 
| virtual void | SimplifyMesh (const AZStd::vector< SimParticleFormat > &particles, const AZStd::vector< SimIndexType > &indices, AZStd::vector< SimParticleFormat > &simplifiedParticles, AZStd::vector< SimIndexType > &simplifiedIndices, AZStd::vector< int > &remappedVertices, bool removeStaticTriangles=true)=0 | 
|  | 
Interface to cook particles into fabric.
- Note
- Use AZ::Interface<IFabricCooker>::Get() to call the interface, which is available at both runtime and asset processing time (asset builders). 
◆ CookFabric()
  
  | 
        
          | virtual AZStd::optional< FabricCookedData > NvCloth::IFabricCooker::CookFabric | ( | const AZStd::vector< SimParticleFormat > & | particles, |  
          |  |  | const AZStd::vector< SimIndexType > & | indices, |  
          |  |  | const AZ::Vector3 & | fabricGravity = AZ::Vector3(0.0f, 0.0f, -9.81f), |  
          |  |  | bool | useGeodesicTether = true |  
          |  | ) |  |  |  | pure virtual | 
 
Generates fabric cooked data from particles information, this data will be used to create cloths instances. Cooking a fabric can be computationally expensive when using many particles and indices. When possible, cook at asset processing time (asset builders) to have it ready at runtime.
- Parameters
- 
  
    | particles | List of particles, which are composed of positions and inverse masses. |  | indices | List of triangles' indices. |  | fabricGravity | Gravity value to use to cook the fabric. |  | useGeodesicTether | Whether use geodesic distance (using triangle adjacencies) or vertex distance when calculating tether constraints. Using geodesic distance is more expensive during the cooking process, but it results in a more realistic cloth behavior when applying tether constraints. |  
 
- Returns
- The fabric cooked data or nullopt if cooking process failed. 
 
 
◆ SimplifyMesh()
  
  | 
        
          | virtual void NvCloth::IFabricCooker::SimplifyMesh | ( | const AZStd::vector< SimParticleFormat > & | particles, |  
          |  |  | const AZStd::vector< SimIndexType > & | indices, |  
          |  |  | AZStd::vector< SimParticleFormat > & | simplifiedParticles, |  
          |  |  | AZStd::vector< SimIndexType > & | simplifiedIndices, |  
          |  |  | AZStd::vector< int > & | remappedVertices, |  
          |  |  | bool | removeStaticTriangles = true |  
          |  | ) |  |  |  | pure virtual | 
 
Simplifies a list of particles by welding vertices that are in the same location. Graphical meshes often have duplicated vertices for texture rendering, this is not suitable for a physically simulated mesh where the mesh topology is essential.
- Parameters
- 
  
    | particles | List of particles, which are composed of positions and inverse masses. |  | indices | List of triangles' indices. |  | simplifiedParticles | New simplified list of particles. |  | simplifiedIndices | New simplified list of triangles' indices. |  | remappedVertices | Mapping of vertices between the mesh and the simplified mesh. A negative element means the vertex has been removed. |  | removeStaticTriangles | When true it removes triangles whose particles are all static. |  
 
 
 
The documentation for this class was generated from the following file:
- Gems/NvCloth/Code/Include/NvCloth/IFabricCooker.h