A clothing asset. It contains all the static and shared data for a given piece of clothing. More...
#include <ClothingAsset.h>
Public Member Functions | |
virtual uint32_t | getNumActors () const =0 |
Returns the number of ClothingActors this asset has created. | |
virtual ClothingActor * | getActor (uint32_t index)=0 |
Returns the index'th ClothingActor. | |
virtual PxBounds3 | getBoundingBox () const =0 |
Returns the bounding box for the asset. | |
virtual uint32_t | getNumGraphicalLodLevels () const =0 |
returns the number of LOD levels present in this asset | |
virtual uint32_t | getGraphicalLodValue (uint32_t lodLevel) const =0 |
returns the actual LOD value of any particular level, normally this is just the identity map | |
virtual float | getBiggestMaxDistance () const =0 |
returns the biggest max distance of any vertex in any physical mesh | |
virtual ClothSolverMode::Enum | getClothSolverMode () const =0 |
returns for which solver the asset has been cooked for. | |
virtual bool | remapBoneIndex (const char *name, uint32_t newIndex)=0 |
remaps bone with given name to a new index for updateState calls | |
virtual uint32_t | getNumBones () const =0 |
Returns the number of bones. | |
virtual uint32_t | getNumUsedBones () const =0 |
Returns the number of bones that are actually used. They are the first ones internally. | |
virtual const char * | getBoneName (uint32_t internalIndex) const =0 |
Returns the name of the bone at the given internal index. | |
virtual bool | getBoneBasePose (uint32_t internalIndex, PxMat44 &result) const =0 |
Returns the bind pose transform for this bone. | |
virtual void | getBoneMapping (uint32_t *internal2externalMap) const =0 |
returns the mapping from internal to external indices for a given asset. | |
virtual const RenderMeshAsset * | getRenderMeshAsset (uint32_t lodLevel) const =0 |
Gets the RenderMeshAsset associated with this asset. | |
virtual uint32_t | prepareMorphTargetMapping (const PxVec3 *originalPositions, uint32_t numPositions, float epsilon)=0 |
Prepares the asset for use with morph target. | |
virtual uint32_t | getMeshSkinningMapSize (uint32_t lod)=0 |
Returns the size of the mesh skinning map. | |
virtual void | getMeshSkinningMap (uint32_t lod, ClothingMeshSkinningMap *map)=0 |
Provides the mesh to mesh skinning map. | |
virtual bool | releaseGraphicalData ()=0 |
Releases all data needed to compute render data in apex clothing. |
A clothing asset. It contains all the static and shared data for a given piece of clothing.
virtual void nvidia::apex::ClothingAsset::getBoneMapping | ( | uint32_t * | internal2externalMap | ) | const [pure virtual] |
returns the mapping from internal to external indices for a given asset.
Use this map to transform all the boneIndices returned from the ClothingPhysicalMesh into the order you specified initially
virtual void nvidia::apex::ClothingAsset::getMeshSkinningMap | ( | uint32_t | lod, |
ClothingMeshSkinningMap * | map | ||
) | [pure virtual] |
Provides the mesh to mesh skinning map.
This map stores for each graphics mesh vertex the corresponding triangle indices of the physics mesh and barycentric coordinates to skin the vertex position, normal and tangent.
[in] | lod | lod for which the map is requested |
[out] | map | Skinning map |
virtual uint32_t nvidia::apex::ClothingAsset::getMeshSkinningMapSize | ( | uint32_t | lod | ) | [pure virtual] |
Returns the size of the mesh skinning map.
virtual const RenderMeshAsset* nvidia::apex::ClothingAsset::getRenderMeshAsset | ( | uint32_t | lodLevel | ) | const [pure virtual] |
Gets the RenderMeshAsset associated with this asset.
[in] | lodLevel | The LoD level of the render mesh asset |
virtual uint32_t nvidia::apex::ClothingAsset::prepareMorphTargetMapping | ( | const PxVec3 * | originalPositions, |
uint32_t | numPositions, | ||
float | epsilon | ||
) | [pure virtual] |
Prepares the asset for use with morph target.
When setting morph target displacements, the asset needs to create a mapping of external to internal vertex order. These positions will be matched with the internal mesh positions with a smallest distance criterion.
[in] | originalPositions | Array of positions before the morphing is applied. |
[in] | numPositions | Length of the Array |
[in] | epsilon | Difference two vertices can have before being reported |
virtual bool nvidia::apex::ClothingAsset::remapBoneIndex | ( | const char * | name, |
uint32_t | newIndex | ||
) | [pure virtual] |
remaps bone with given name to a new index for updateState calls
This is needed when the order of bones differs from authoring tool to runtime