Cooking
Classes
PxConvexMeshDesc: Descriptor class for PxConvexMesh .
PxMidphaseDesc: Structure describing parameters affecting midphase mesh structure.
PxSDFDesc: A structure describing signed distance field for mesh.
PxSdfBitsPerSubgridPixel: Defines the number of bits per subgrid pixel.
PxTetrahedronMeshDesc: Descriptor class for PxTetrahedronMesh (contains only pure geometric data).
PxTriangleMeshDesc: Descriptor class for PxTriangleMesh .
Functions
PxAssembleSoftBodyMesh(physx::PxTetrahedronMeshData &simulationMesh, physx::PxSoftBodySimulationData &simulationData, physx::PxTetrahedronMeshData &collisionMesh, physx::PxSoftBodyCollisionData &collisionData, physx::PxCollisionMeshMappingData &mappingData, physx::PxInsertionCallback &insertionCallback): Bundles all data required for softbody simulation.
PxAssembleSoftBodyMesh_Sim(physx::PxSimulationTetrahedronMeshData &simulationMesh, physx::PxCollisionTetrahedronMeshData &collisionMesh, physx::PxCollisionMeshMappingData &mappingData, physx::PxInsertionCallback &insertionCallback): Bundles all data required for softbody simulation.
PxBVHDesc::isValid() const: Returns true if the descriptor is valid.
PxBVHDesc::setToDefault(): Initialize the BVH descriptor.
PxComputeCollisionData(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &collisionMeshDesc): Computes data to accelerate collision detection of tetrahedral meshes.
PxComputeHullPolygons(const physx::PxCookingParams ¶ms, const physx::PxSimpleTriangleMesh &mesh, physx::PxAllocatorCallback &inCallback, physx::PxU32 &nbVerts, physx::PxVec3 *&vertices, physx::PxU32 &nbIndices, physx::PxU32 *&indices, physx::PxU32 &nbPolygons, physx::PxHullPolygon *&hullPolygons): Compute hull polygons from given vertices and triangles.
PxComputeModelsMapping(const physx::PxCookingParams ¶ms, physx::PxTetrahedronMeshData &simulationMesh, const physx::PxTetrahedronMeshData &collisionMesh, const physx::PxSoftBodyCollisionData &collisionData, const physx::PxBoundedData *vertexToTet=NULL): Computes the mapping between collision and simulation mesh.
PxComputeSimulationData(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc): Computes data to accelerate collision detection of tetrahedral meshes.
PxConvexMeshDesc::PxConvexMeshDesc(): constructor sets to default.
PxConvexMeshDesc::isValid() const: Returns true if the descriptor is valid.
PxConvexMeshDesc::setToDefault(): (re)sets the structure to the default.
PxCookBVH(const physx::PxBVHDesc &desc, physx::PxOutputStream &stream): Cooks a bounding volume hierarchy.
PxCookConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc, physx::PxOutputStream &stream, physx::PxConvexMeshCookingResult::Enum *condition=NULL): Cooks a convex mesh.
PxCookHeightField(const physx::PxHeightFieldDesc &desc, physx::PxOutputStream &stream): Cooks a heightfield.
PxCookTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc, physx::PxOutputStream &stream): Cooks a tetrahedron mesh.
PxCookTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc, physx::PxOutputStream &stream, physx::PxTriangleMeshCookingResult::Enum *condition=NULL): Cooks a triangle mesh.
PxCreateBVH(const physx::PxBVHDesc &desc, physx::PxInsertionCallback &insertionCallback): Cooks and creates a bounding volume hierarchy without going through a stream.
PxCreateBVH(const physx::PxBVHDesc &desc): Cooks and creates a bounding volume hierarchy without going through a stream.
PxCreateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc): Cooks and creates a convex mesh without going through a stream.
PxCreateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc, physx::PxInsertionCallback &insertionCallback, physx::PxConvexMeshCookingResult::Enum *condition=NULL): Cooks and creates a convex mesh without going through a stream.
PxCreateHeightField(const physx::PxHeightFieldDesc &desc, physx::PxInsertionCallback &insertionCallback): Cooks and creates a heightfield mesh and inserts it into PxPhysics .
PxCreateHeightField(const physx::PxHeightFieldDesc &desc): Cooks and creates a heightfield mesh and inserts it into PxPhysics .
PxCreateSoftBodyMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc, const physx::PxTetrahedronMeshDesc &collisionMeshDesc, const physx::PxSoftBodySimulationDataDesc &softbodyDataDesc): Cooks and creates a softbody mesh without going through a stream.
PxCreateSoftBodyMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc, const physx::PxTetrahedronMeshDesc &collisionMeshDesc, const physx::PxSoftBodySimulationDataDesc &softbodyDataDesc, physx::PxInsertionCallback &insertionCallback): Cooks and creates a softbody mesh without going through a stream.
PxCreateTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc, physx::PxInsertionCallback &insertionCallback): Cooks and creates a tetrahedron mesh without going through a stream.
PxCreateTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc): Cooks and creates a tetrahedron mesh without going through a stream.
PxCreateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc): Cooks and creates a triangle mesh without going through a stream.
PxCreateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc, physx::PxInsertionCallback &insertionCallback, physx::PxTriangleMeshCookingResult::Enum *condition=NULL): Cooks and creates a triangle mesh without going through a stream.
PxCreateTriangleMeshInternal(const physx::PxTriangleMeshInternalData &data)
PxGetStandaloneInsertionCallback(): Gets standalone object insertion interface.
PxSDFDesc::PxSDFDesc(): Constructor.
PxSDFDesc::isValid() const: Returns true if the descriptor is valid.
PxTriangleMeshDesc::PxTriangleMeshDesc(): Constructor sets to default.
PxTriangleMeshDesc::isValid() const: Returns true if the descriptor is valid.
PxTriangleMeshDesc::setToDefault(): (re)sets the structure to the default.
PxValidateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc): Verifies if the convex mesh is valid.
PxValidateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc): Verifies if the triangle mesh is valid.
Structs
PxBVH33MidphaseDesc: Structure describing parameters affecting BVH33 midphase mesh structure.
PxBVH34BuildStrategy: Desired build strategy for PxMeshMidPhase::eBVH34 .
PxBVH34MidphaseDesc: Structure describing parameters affecting BVH34 midphase mesh structure.
PxConvexFlag: Flags which describe the format and behavior of a convex mesh.
PxConvexMeshCookingResult: Result from convex cooking.
PxConvexMeshCookingType: Enumeration for convex mesh cooking algorithms.
PxCookingParams: Structure describing parameters affecting mesh cooking.
PxDim3: A helper structure to define dimensions in 3D.
PxMeshCookingHint: Enumeration for mesh cooking hints.
PxMeshPreprocessingFlag: Enum for the set of mesh pre-processing parameters.
PxTriangleMeshCookingResult: Result from triangle mesh cooking.
Typedefs
PxConvexFlags: collection of set bits defined in PxConvexFlag .
Functions
-
physx::PxSoftBodyMesh *PxAssembleSoftBodyMesh(physx::PxTetrahedronMeshData &simulationMesh, physx::PxSoftBodySimulationData &simulationData, physx::PxTetrahedronMeshData &collisionMesh, physx::PxSoftBodyCollisionData &collisionData, physx::PxCollisionMeshMappingData &mappingData, physx::PxInsertionCallback &insertionCallback)
Bundles all data required for softbody simulation.
Creates a container that provides everything to create a PxSoftBody
See also
PxSoftBody createSoftBody()
- Parameters
simulationMesh – [in] The geometry (tetrahedral mesh) to be used as simulation mesh
simulationData – [in] Additional non-tetmesh data that contains mass information etc. for the simulation mesh
collisionMesh – [in] The geometry (tetrahedral mesh) to be used for collision detection
collisionData – [in] Additional non-tetmesh data that contains surface information, acceleration structures etc. for the simulation mesh
mappingData – [in] Mapping that describes how the collision mesh’s vertices are embedded into the simulation mesh
insertionCallback – [in] The insertion interface from PxPhysics.
- Returns
PxSoftBodyMesh pointer that represents a softbody mesh bundling all data (simulation mesh, collision mesh etc.)
-
physx::PxSoftBodyMesh *PxAssembleSoftBodyMesh_Sim(physx::PxSimulationTetrahedronMeshData &simulationMesh, physx::PxCollisionTetrahedronMeshData &collisionMesh, physx::PxCollisionMeshMappingData &mappingData, physx::PxInsertionCallback &insertionCallback)
Bundles all data required for softbody simulation.
Creates a container that provides everything to create a PxSoftBody
See also
PxSoftBody createSoftBody()
- Parameters
simulationMesh – [in] Container that provides all information about the simulation mesh (geometry, mass distribution etc.)
collisionMesh – [in] Container that provides all information about the collision mesh (geometry, surface information, acceleration structures etc.)
mappingData – [in] Mapping that describes how the collision mesh’s vertices are embedded into the simulation mesh
insertionCallback – [in] The insertion interface from PxPhysics.
- Returns
PxSoftBodyMesh pointer that represents a softbody mesh bundling all data (simulation mesh, collision mesh etc.)
-
physx::PxCollisionTetrahedronMeshData *PxComputeCollisionData(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &collisionMeshDesc)
Computes data to accelerate collision detection of tetrahedral meshes.
Computes data structures to speed up collision detection with tetrahedral meshes.
- Parameters
params – [in] The cooking parameters
collisionMeshDesc – [in] Raw tetrahedral mesh descriptor wich will be used for collision detection
- Returns
PxCollisionTetrahedronMeshData pointer that describes the collision mesh
-
bool PxComputeHullPolygons(const physx::PxCookingParams ¶ms, const physx::PxSimpleTriangleMesh &mesh, physx::PxAllocatorCallback &inCallback, physx::PxU32 &nbVerts, physx::PxVec3 *&vertices, physx::PxU32 &nbIndices, physx::PxU32 *&indices, physx::PxU32 &nbPolygons, physx::PxHullPolygon *&hullPolygons)
Compute hull polygons from given vertices and triangles.
Polygons are needed for PxConvexMeshDesc rather than triangles.
Please note that the resulting polygons may have different number of vertices. Some vertices may be removed. The output vertices, indices and polygons must be used to construct a hull.
The provided PxAllocatorCallback does allocate the out arrays. It is the user responsibility to deallocated those arrays.
- Parameters
params – [in] The cooking parameters
mesh – [in] Simple triangle mesh containing vertices and triangles used to compute polygons.
inCallback – [in] Memory allocator for out array allocations.
nbVerts – [out] Number of vertices used by polygons.
vertices – [out] Vertices array used by polygons.
nbIndices – [out] Number of indices used by polygons.
indices – [out] Indices array used by polygons.
nbPolygons – [out] Number of created polygons.
hullPolygons – [out] Polygons array.
- Returns
true on success
-
physx::PxCollisionMeshMappingData *PxComputeModelsMapping(const physx::PxCookingParams ¶ms, physx::PxTetrahedronMeshData &simulationMesh, const physx::PxTetrahedronMeshData &collisionMesh, const physx::PxSoftBodyCollisionData &collisionData, const physx::PxBoundedData *vertexToTet = NULL)
Computes the mapping between collision and simulation mesh.
The softbody 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.
- 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
-
physx::PxSimulationTetrahedronMeshData *PxComputeSimulationData(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc)
Computes data to accelerate collision detection of tetrahedral meshes.
Computes data to compute and store a softbody’s deformation using FEM.
- Parameters
params – [in] The cooking parameters
simulationMeshDesc – [in] Raw tetrahedral mesh descriptor wich will be used for FEM simulation
- Returns
PxSimulationTetrahedronMeshData pointer that describes the simulation mesh
-
bool PxCookBVH(const physx::PxBVHDesc &desc, physx::PxOutputStream &stream)
Cooks a bounding volume hierarchy.
The results are written to the stream.
PxCookBVH() allows a BVH description to be cooked into a binary stream suitable for loading and performing BVH detection at runtime.
- Parameters
desc – [in] The BVH descriptor.
stream – [in] User stream to output the cooked data.
- Returns
true on success.
-
bool PxCookConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc, physx::PxOutputStream &stream, physx::PxConvexMeshCookingResult::Enum *condition = NULL)
Cooks a convex mesh.
The results are written to the stream.
To create a triangle mesh object it is necessary to first ‘cook’ the mesh data into a form which allows the SDK to perform efficient collision detection.
PxCookConvexMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.
Note
The number of vertices and the number of convex polygons in a cooked convex mesh is limited to 255.
Note
If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.
- Parameters
params – [in] The cooking parameters
desc – [in] The convex mesh descriptor to read the mesh from.
stream – [in] User stream to output the cooked data.
condition – [out] Result from convex mesh cooking.
- Returns
true on success.
-
bool PxCookHeightField(const physx::PxHeightFieldDesc &desc, physx::PxOutputStream &stream)
Cooks a heightfield.
The results are written to the stream.
To create a heightfield object there is an option to precompute some of calculations done while loading the heightfield data.
PxCookHeightField() allows a heightfield description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.
See also
- Parameters
desc – [in] The heightfield descriptor to read the HF from.
stream – [in] User stream to output the cooked data.
- Returns
true on success
-
bool PxCookSoftBodyMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc, const physx::PxTetrahedronMeshDesc &collisionMeshDesc, const physx::PxSoftBodySimulationDataDesc &softbodyDataDesc, physx::PxOutputStream &stream)
Cooks a softbody mesh.
The results are written to the stream.
To create a softbody mesh object it is necessary to first ‘cook’ the mesh data into a form which allows the SDK to perform efficient collision detection and to store data used during the FEM calculations.
PxCookSoftBodyMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.
- Parameters
params – [in] The cooking parameters
simulationMeshDesc – [in] The tetrahedron mesh descriptor to read the simulation mesh from.
collisionMeshDesc – [in] The tetrahedron mesh descriptor to read the collision mesh from.
softbodyDataDesc – [in] The softbody data descriptor to read mapping information from.
stream – [in] User stream to output the cooked data.
- Returns
true on success
-
bool PxCookTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc, physx::PxOutputStream &stream)
Cooks a tetrahedron mesh.
The results are written to the stream.
To create a tetrahedron mesh object it is necessary to first ‘cook’ the mesh data into a form which allows the SDK to perform efficient collision detection.
PxCookTetrahedronMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.
- Parameters
params – [in] The cooking parameters
meshDesc – [in] The tetrahedron mesh descriptor to read the mesh from.
stream – [in] User stream to output the cooked data.
- Returns
true on success
-
bool PxCookTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc, physx::PxOutputStream &stream, physx::PxTriangleMeshCookingResult::Enum *condition = NULL)
Cooks a triangle mesh.
The results are written to the stream.
To create a triangle mesh object it is necessary to first ‘cook’ the mesh data into a form which allows the SDK to perform efficient collision detection.
PxCookTriangleMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.
- Parameters
params – [in] The cooking parameters
desc – [in] The triangle mesh descriptor to read the mesh from.
stream – [in] User stream to output the cooked data.
condition – [out] Result from triangle mesh cooking.
- Returns
true on success
-
physx::PxBVH *PxCreateBVH(const physx::PxBVHDesc &desc, physx::PxInsertionCallback &insertionCallback)
Cooks and creates a bounding volume hierarchy without going through a stream.
See also
Note
This method does the same as PxCookBVH, but the produced BVH is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
Note
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxGetStandaloneInsertionCallback().
- Parameters
desc – [in] The BVH descriptor.
insertionCallback – [in] The insertion interface.
- Returns
PxBVH pointer on success
-
inline physx::PxBVH *PxCreateBVH(const physx::PxBVHDesc &desc)
Cooks and creates a bounding volume hierarchy without going through a stream.
Convenience function for standalone objects.
See also
Note
This method does the same as PxCookBVH, but the produced BVH is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
- Parameters
desc – [in] The BVH descriptor.
- Returns
PxBVH pointer on success
-
inline physx::PxConvexMesh *PxCreateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc)
Cooks and creates a convex mesh without going through a stream.
Convenience function for standalone objects.
See also
Note
This method does the same as cookConvexMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
- Parameters
params – [in] The cooking parameters
desc – [in] The convex mesh descriptor to read the mesh from.
- Returns
PxConvexMesh pointer on success
-
physx::PxConvexMesh *PxCreateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc, physx::PxInsertionCallback &insertionCallback, physx::PxConvexMeshCookingResult::Enum *condition = NULL)
Cooks and creates a convex mesh without going through a stream.
See also
Note
This method does the same as PxCookConvexMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
Note
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxGetStandaloneInsertionCallback().
- Parameters
params – [in] The cooking parameters
desc – [in] The convex mesh descriptor to read the mesh from.
insertionCallback – [in] The insertion interface from PxPhysics.
condition – [out] Result from convex mesh cooking.
- Returns
PxConvexMesh pointer on success
-
physx::PxHeightField *PxCreateHeightField(const physx::PxHeightFieldDesc &desc, physx::PxInsertionCallback &insertionCallback)
Cooks and creates a heightfield mesh and inserts it into PxPhysics.
- Parameters
desc – [in] The heightfield descriptor to read the HF from.
insertionCallback – [in] The insertion interface from PxPhysics.
- Returns
PxHeightField pointer on success
-
inline physx::PxHeightField *PxCreateHeightField(const physx::PxHeightFieldDesc &desc)
Cooks and creates a heightfield mesh and inserts it into PxPhysics.
Convenience function for standalone objects.
- Parameters
desc – [in] The heightfield descriptor to read the HF from.
- Returns
PxHeightField pointer on success
-
inline physx::PxSoftBodyMesh *PxCreateSoftBodyMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc, const physx::PxTetrahedronMeshDesc &collisionMeshDesc, const physx::PxSoftBodySimulationDataDesc &softbodyDataDesc)
Cooks and creates a softbody mesh without going through a stream.
Convenience function for standalone objects.
Note
This method does the same as PxCookSoftBodyMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
- Parameters
params – [in] The cooking parameters
simulationMeshDesc – [in] The tetrahedron mesh descriptor to read the simulation mesh from.
collisionMeshDesc – [in] The tetrahedron mesh descriptor to read the collision mesh from.
softbodyDataDesc – [in] The softbody data descriptor to read mapping information from.
- Returns
PxSoftBodyMesh pointer on success.
-
physx::PxSoftBodyMesh *PxCreateSoftBodyMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &simulationMeshDesc, const physx::PxTetrahedronMeshDesc &collisionMeshDesc, const physx::PxSoftBodySimulationDataDesc &softbodyDataDesc, physx::PxInsertionCallback &insertionCallback)
Cooks and creates a softbody mesh without going through a stream.
Note
This method does the same as PxCookSoftBodyMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
Note
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxGetStandaloneInsertionCallback().
- Parameters
params – [in] The cooking parameters
simulationMeshDesc – [in] The tetrahedron mesh descriptor to read the simulation mesh from.
collisionMeshDesc – [in] The tetrahedron mesh descriptor to read the collision mesh from.
softbodyDataDesc – [in] The softbody data descriptor to read mapping information from.
insertionCallback – [in] The insertion interface from PxPhysics.
- Returns
PxSoftBodyMesh pointer on success.
-
physx::PxTetrahedronMesh *PxCreateTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc, physx::PxInsertionCallback &insertionCallback)
Cooks and creates a tetrahedron mesh without going through a stream.
Note
This method does the same as PxCookTetrahedronMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
Note
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxGetStandaloneInsertionCallback().
- Parameters
params – [in] The cooking parameters
meshDesc – [in] The tetrahedron mesh descriptor to read the mesh from.
insertionCallback – [in] The insertion interface from PxPhysics.
- Returns
PxTetrahedronMesh pointer on success.
-
inline physx::PxTetrahedronMesh *PxCreateTetrahedronMesh(const physx::PxCookingParams ¶ms, const physx::PxTetrahedronMeshDesc &meshDesc)
Cooks and creates a tetrahedron mesh without going through a stream.
Convenience function for standalone objects.
Note
This method does the same as PxCookTetrahedronMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
- Parameters
params – [in] The cooking parameters
meshDesc – [in] The tetrahedron mesh descriptor to read the mesh from.
- Returns
PxTetrahedronMesh pointer on success.
-
inline physx::PxTriangleMesh *PxCreateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc)
Cooks and creates a triangle mesh without going through a stream.
Convenience function for standalone objects.
Note
This method does the same as cookTriangleMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
- Parameters
params – [in] The cooking parameters
desc – [in] The triangle mesh descriptor to read the mesh from.
- Returns
PxTriangleMesh pointer on success.
-
physx::PxTriangleMesh *PxCreateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc, physx::PxInsertionCallback &insertionCallback, physx::PxTriangleMeshCookingResult::Enum *condition = NULL)
Cooks and creates a triangle mesh without going through a stream.
Note
This method does the same as PxCookTriangleMesh, but the produced mesh is not stored into a stream but is either directly inserted in PxPhysics, or created as a standalone object. Use this method if you are unable to cook offline.
Note
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxGetStandaloneInsertionCallback().
- Parameters
params – [in] The cooking parameters
desc – [in] The triangle mesh descriptor to read the mesh from.
insertionCallback – [in] The insertion interface from PxPhysics.
condition – [out] Result from triangle mesh cooking.
- Returns
PxTriangleMesh pointer on success.
-
physx::PxInsertionCallback *PxGetStandaloneInsertionCallback()
Gets standalone object insertion interface.
This interface allows the creation of standalone objects that can exist without a PxPhysics or PxScene object.
See also
PxCreateTriangleMesh PxCreateHeightfield PxCreateTetrahedronMesh PxCreateBVH
-
bool PxValidateConvexMesh(const physx::PxCookingParams ¶ms, const physx::PxConvexMeshDesc &desc)
Verifies if the convex mesh is valid.
Prints an error message for each inconsistency found.
The convex mesh descriptor must contain an already created convex mesh - the vertices, indices and polygons must be provided.
See also
Note
This function should be used if PxConvexFlag::eDISABLE_MESH_VALIDATION is planned to be used in release builds.
- Parameters
params – [in] The cooking parameters
desc – [in] The convex mesh descriptor to read the mesh from.
- Returns
true if all the validity conditions hold, false otherwise.
-
bool PxValidateTriangleMesh(const physx::PxCookingParams ¶ms, const physx::PxTriangleMeshDesc &desc)
Verifies if the triangle mesh is valid.
Prints an error message for each inconsistency found.
The following conditions are true for a valid triangle mesh:
There are no duplicate vertices (within specified vertexWeldTolerance. See PxCookingParams::meshWeldTolerance)
There are no large triangles (within specified PxTolerancesScale.)
See also
- Parameters
params – [in] The cooking parameters
desc – [in] The triangle mesh descriptor to read the mesh from.
- Returns
true if all the validity conditions hold, false otherwise.
Typedefs
-
typedef PxFlags<PxConvexFlag::Enum, PxU16> PxConvexFlags
collection of set bits defined in PxConvexFlag.
See also
-
typedef PxFlags<PxMeshPreprocessingFlag::Enum, PxU32> PxMeshPreprocessingFlags