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. |
Detailed Description
A clothing asset. It contains all the static and shared data for a given piece of clothing.
Member Function Documentation
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.
- Note:
- This call has the side effect of merging the immediate map into the mesh skinning map. This might affect skinning performance done by APEX.
- Parameters:
-
[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.
- Note:
- This call has the side effect of merging the immediate map into the mesh skinning map. This might affect skinning performance done by APEX.
- Returns:
- Number of entries in the map
virtual const RenderMeshAsset* nvidia::apex::ClothingAsset::getRenderMeshAsset | ( | uint32_t | lodLevel | ) | const [pure virtual] |
Gets the RenderMeshAsset associated with this asset.
- Parameters:
-
[in] lodLevel The LoD level of the render mesh asset
- Returns:
- NULL if lodLevel is not valid
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.
- Parameters:
-
[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
- Returns:
- Number of vertices for which the distance to the next originalPosition was larger than epsilon
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
- Note:
- must be called after asset is deserialized. Changing this any later, especially after the first ClothingActor::updateState call will lead to ill-defined behavior.
The documentation for this class was generated from the following file:
Generated on Fri Dec 15 2017 13:58:20
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.