PxComputeModelsMapping
Defined in include/cooking/PxCooking.h
-
physx::PxCollisionMeshMappingData *PxComputeModelsMapping(const physx::PxCookingParams ¶ms, physx::PxTetrahedronMeshData &simulationMesh, const physx::PxTetrahedronMeshData &collisionMesh, const physx::PxDeformableVolumeCollisionData &collisionData, const physx::PxBoundedData *vertexToTet = NULL)
Computes the mapping between collision and simulation mesh.
The deformable volume deformation is computed on the simulation mesh. To deform the collision mesh accordingly it needs to be specified how its vertices need to be placed and updated inside the deformation mesh. This method computes that embedding information.
See also
PxTetMaker::createVoxelTetrahedronMesh
- Parameters
params – [in] The cooking parameters
simulationMesh – [in] A tetrahedral mesh that defines the shape of the simulation mesh which is used to compute the body’s deformation
collisionMesh – [in] A tetrahedral mesh that defines the shape of the collision mesh which is used for collision detection
collisionData – [in] A data container that contains acceleration structures and surface information of the collision mesh
vertexToTet – [in] Optional indices (array of integers) that specifies the index of the tetrahedron in the simulation mesh that contains a collision mesh vertex. If not provided, the embedding will be computed internally. If the simulation mesh is obtained from PxTetMaker::createVoxelTetrahedronMesh, then the vertexToTet map createVoxelTetrahedronMesh returned should be used here.
- Returns
PxCollisionMeshMappingData pointer that describes how the collision mesh is embedded into the simulation mesh