RavEngine
Loading...
Searching...
No Matches
physx::PxCooking Class Referenceabstract

Provides methods to cook (where cooking means to prepare the data and convert it to the right format potentially including the construction of acceleration structures and other support data) all kind of simulation data. More...

#include <PxCooking.h>

Inheritance diagram for physx::PxCooking:
[legend]

Public Member Functions

virtual void release ()=0
 Closes this instance of the interface.
 
virtual void setParams (const PxCookingParams &params)=0
 Sets cooking parameters.
 
virtual const PxCookingParams & getParams () const =0
 Gets cooking parameters.
 
virtual bool platformMismatch () const =0
 Checks endianness is the same between cooking & target platforms.
 
virtual bool cookTriangleMesh (const PxTriangleMeshDesc &desc, PxOutputStream &stream, PxTriangleMeshCookingResult::Enum *condition=NULL) const =0
 Cooks a triangle mesh. The results are written to the stream.
 
virtual PxTriangleMesh * createTriangleMesh (const PxTriangleMeshDesc &desc, PxInsertionCallback &insertionCallback, PxTriangleMeshCookingResult::Enum *condition=NULL) const =0
 Cooks and creates a triangle mesh without going through a stream.
 
PX_FORCE_INLINE PxTriangleMesh * createTriangleMesh (const PxTriangleMeshDesc &desc) const
 Cooks and creates a triangle mesh without going through a stream. Convenience function for standalone objects.
 
virtual bool validateTriangleMesh (const PxTriangleMeshDesc &desc) const =0
 Verifies if the triangle mesh is valid. Prints an error message for each inconsistency found.
 
virtual bool cookSoftBodyMesh (const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc, PxOutputStream &stream) const =0
 Cooks a softbody mesh. The results are written to the stream.
 
virtual PxSoftBodyMesh * createSoftBodyMesh (const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc, PxInsertionCallback &insertionCallback) const =0
 Cooks and creates a softbody mesh without going through a stream.
 
PX_FORCE_INLINE PxSoftBodyMesh * createSoftBodyMesh (const PxTetrahedronMeshDesc &simulationMeshDesc, const PxTetrahedronMeshDesc &collisionMeshDesc, const PxSoftBodySimulationDataDesc &softbodyDataDesc) const
 Cooks and creates a softbody mesh without going through a stream. Convenience function for standalone objects.
 
virtual bool cookTetrahedronMesh (const PxTetrahedronMeshDesc &meshDesc, PxOutputStream &stream) const =0
 Cooks a tetrahedron mesh. The results are written to the stream.
 
virtual PxTetrahedronMesh * createTetrahedronMesh (const PxTetrahedronMeshDesc &meshDesc, PxInsertionCallback &insertionCallback) const =0
 Cooks and creates a tetrahedron mesh without going through a stream.
 
PX_FORCE_INLINE PxTetrahedronMesh * createTetrahedronMesh (const PxTetrahedronMeshDesc &meshDesc) const
 Cooks and creates a tetrahedron mesh without going through a stream. Convenience function for standalone objects.
 
virtual PxCollisionMeshMappingData * computeModelsMapping (PxTetrahedronMeshData &simulationMesh, const PxTetrahedronMeshData &collisionMesh, const PxSoftBodyCollisionData &collisionData, const PxBoundedData *vertexToTet=NULL) const =0
 Computes the mapping between collision and simulation mesh.
 
virtual PxCollisionTetrahedronMeshData * computeCollisionData (const PxTetrahedronMeshDesc &collisionMeshDesc) const =0
 Computes data to accelerate collision detection of tetrahedral meshes.
 
virtual PxSimulationTetrahedronMeshData * computeSimulationData (const PxTetrahedronMeshDesc &simulationMeshDesc) const =0
 Computes data to accelerate collision detection of tetrahedral meshes.
 
virtual PxSoftBodyMesh * assembleSoftBodyMesh (PxTetrahedronMeshData &simulationMesh, PxSoftBodySimulationData &simulationData, PxTetrahedronMeshData &collisionMesh, PxSoftBodyCollisionData &collisionData, PxCollisionMeshMappingData &mappingData, PxInsertionCallback &insertionCallback) const =0
 Bundles all data required for softbody simulation.
 
virtual PxSoftBodyMesh * assembleSoftBodyMesh (PxSimulationTetrahedronMeshData &simulationMesh, PxCollisionTetrahedronMeshData &collisionMesh, PxCollisionMeshMappingData &mappingData, PxInsertionCallback &insertionCallback) const =0
 Bundles all data required for softbody simulation.
 
virtual bool cookConvexMesh (const PxConvexMeshDesc &desc, PxOutputStream &stream, PxConvexMeshCookingResult::Enum *condition=NULL) const =0
 Cooks a convex mesh. The results are written to the stream.
 
virtual PxConvexMesh * createConvexMesh (const PxConvexMeshDesc &desc, PxInsertionCallback &insertionCallback, PxConvexMeshCookingResult::Enum *condition=NULL) const =0
 Cooks and creates a convex mesh without going through a stream.
 
PX_FORCE_INLINE PxConvexMesh * createConvexMesh (const PxConvexMeshDesc &desc) const
 Cooks and creates a convex mesh without going through a stream. Convenience function for standalone objects.
 
virtual bool validateConvexMesh (const PxConvexMeshDesc &desc) const =0
 Verifies if the convex mesh is valid. Prints an error message for each inconsistency found.
 
virtual bool computeHullPolygons (const PxSimpleTriangleMesh &mesh, PxAllocatorCallback &inCallback, PxU32 &nbVerts, PxVec3 *&vertices, PxU32 &nbIndices, PxU32 *&indices, PxU32 &nbPolygons, PxHullPolygon *&hullPolygons) const =0
 Computed hull polygons from given vertices and triangles. Polygons are needed for PxConvexMeshDesc rather than triangles.
 
virtual bool cookHeightField (const PxHeightFieldDesc &desc, PxOutputStream &stream) const =0
 Cooks a heightfield. The results are written to the stream.
 
virtual PxHeightField * createHeightField (const PxHeightFieldDesc &desc, PxInsertionCallback &insertionCallback) const =0
 Cooks and creates a heightfield mesh and inserts it into PxPhysics.
 
PX_FORCE_INLINE PxHeightField * createHeightField (const PxHeightFieldDesc &desc) const
 Cooks and creates a heightfield mesh and inserts it into PxPhysics. Convenience function for standalone objects.
 
virtual bool cookBVH (const PxBVHDesc &desc, PxOutputStream &stream) const =0
 Cooks a bounding volume hierarchy. The results are written to the stream.
 
PX_DEPRECATED PX_FORCE_INLINE bool cookBVHStructure (const PxBVHStructureDesc &desc, PxOutputStream &stream) const
 Backward compatibility helper. Cooks a bounding volume hierarchy. The results are written to the stream.
 
virtual PxBVH * createBVH (const PxBVHDesc &desc, PxInsertionCallback &insertionCallback) const =0
 Cooks and creates a bounding volume hierarchy without going through a stream.
 
PX_FORCE_INLINE PxBVH * createBVH (const PxBVHDesc &desc) const
 Cooks and creates a bounding volume hierarchy without going through a stream. Convenience function for standalone objects.
 
PX_DEPRECATED PX_FORCE_INLINE PxBVHStructure * createBVHStructure (const PxBVHStructureDesc &desc, PxInsertionCallback &insertionCallback) const
 Backward compatibility helper. Cooks and creates a bounding volume hierarchy without going through a stream.
 
virtual PxInsertionCallback & getStandaloneInsertionCallback ()=0
 Gets standalone object insertion interface.
 

Detailed Description

Provides methods to cook (where cooking means to prepare the data and convert it to the right format potentially including the construction of acceleration structures and other support data) all kind of simulation data.

Deprecated:

Member Function Documentation

◆ assembleSoftBodyMesh() [1/2]

virtual PxSoftBodyMesh * physx::PxCooking::assembleSoftBodyMesh ( PxSimulationTetrahedronMeshData &  simulationMesh,
PxCollisionTetrahedronMeshData &  collisionMesh,
PxCollisionMeshMappingData &  mappingData,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Bundles all data required for softbody simulation.

Creates a container that provides everything to create a PxSoftBody

Parameters
[in]simulationMeshContainer that provides all information about the simulation mesh (geometry, mass distribution etc.)
[in]collisionMeshContainer that provides all information about the collision mesh (geometry, surface information, acceleration structures etc.)
[in]mappingDataMapping that describes how the collision mesh's vertices are embedded into the simulation mesh
[in]insertionCallbackThe insertion interface from PxPhysics.
Returns
PxSoftBodyMesh pointer that represents a softbody mesh bundling all data (simulation mesh, collision mesh etc.)
See also
PxSoftBody createSoftBody()

Implemented in physx::Cooking.

◆ assembleSoftBodyMesh() [2/2]

virtual PxSoftBodyMesh * physx::PxCooking::assembleSoftBodyMesh ( PxTetrahedronMeshData &  simulationMesh,
PxSoftBodySimulationData &  simulationData,
PxTetrahedronMeshData &  collisionMesh,
PxSoftBodyCollisionData &  collisionData,
PxCollisionMeshMappingData &  mappingData,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Bundles all data required for softbody simulation.

Creates a container that provides everything to create a PxSoftBody

Parameters
[in]simulationMeshThe geometry (tetrahedral mesh) to be used as simulation mesh
[in]simulationDataAdditional non-tetmesh data that contains mass information etc. for the simulation mesh
[in]collisionMeshThe geometry (tetrahedral mesh) to be used for collision detection
[in]collisionDataAdditional non-tetmesh data that contains surface information, acceleration structures etc. for the simulation mesh
[in]mappingDataMapping that describes how the collision mesh's vertices are embedded into the simulation mesh
[in]insertionCallbackThe insertion interface from PxPhysics.
Returns
PxSoftBodyMesh pointer that represents a softbody mesh bundling all data (simulation mesh, collision mesh etc.)
See also
PxSoftBody createSoftBody()

Implemented in physx::Cooking.

◆ computeCollisionData()

virtual PxCollisionTetrahedronMeshData * physx::PxCooking::computeCollisionData ( const PxTetrahedronMeshDesc &  collisionMeshDesc) const
pure virtual

Computes data to accelerate collision detection of tetrahedral meshes.

Computes data structures to speed up collision detection with tetrahedral meshes.

Parameters
[in]collisionMeshDescRaw tetrahedral mesh descriptor wich will be used for collision detection
Returns
PxCollisionTetrahedronMeshData pointer that describes the collision mesh

Implemented in physx::Cooking.

◆ computeHullPolygons()

virtual bool physx::PxCooking::computeHullPolygons ( const PxSimpleTriangleMesh &  mesh,
PxAllocatorCallback &  inCallback,
PxU32 &  nbVerts,
PxVec3 *&  vertices,
PxU32 &  nbIndices,
PxU32 *&  indices,
PxU32 &  nbPolygons,
PxHullPolygon *&  hullPolygons 
) const
pure virtual

Computed 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 array's. It is the user responsibility to deallocated those array's.

Parameters
[in]meshSimple triangle mesh containing vertices and triangles used to compute polygons.
[in]inCallbackMemory allocator for out array allocations.
[out]nbVertsNumber of vertices used by polygons.
[out]verticesVertices array used by polygons.
[out]nbIndicesNumber of indices used by polygons.
[out]indicesIndices array used by polygons.
[out]nbPolygonsNumber of created polygons.
[out]hullPolygonsPolygons array.
Returns
true on success
See also
cookConvexMesh() PxConvexFlags PxConvexMeshDesc PxSimpleTriangleMesh

Implemented in physx::Cooking.

◆ computeModelsMapping()

virtual PxCollisionMeshMappingData * physx::PxCooking::computeModelsMapping ( PxTetrahedronMeshData &  simulationMesh,
const PxTetrahedronMeshData &  collisionMesh,
const PxSoftBodyCollisionData &  collisionData,
const PxBoundedData *  vertexToTet = NULL 
) const
pure virtual

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
[in]simulationMeshA tetrahedral mesh that defines the shape of the simulation mesh which is used to compute the body's deformation
[in]collisionMeshA tetrahedral mesh that defines the shape of the collision mesh which is used for collision detection
[in]collisionDataA data container that contains acceleration structures and surface information of the collision mesh
[in]vertexToTetOptional 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
See also
PxTetMaker::createVoxelTetrahedronMesh

Implemented in physx::Cooking.

◆ computeSimulationData()

virtual PxSimulationTetrahedronMeshData * physx::PxCooking::computeSimulationData ( const PxTetrahedronMeshDesc &  simulationMeshDesc) const
pure virtual

Computes data to accelerate collision detection of tetrahedral meshes.

Computes data to compute and store a softbody's deformation using FEM.

Parameters
[in]simulationMeshDescRaw tetrahedral mesh descriptor wich will be used for FEM simulation
Returns
PxSimulationTetrahedronMeshData pointer that describes the simulation mesh

Implemented in physx::Cooking.

◆ cookBVH()

virtual bool physx::PxCooking::cookBVH ( const PxBVHDesc &  desc,
PxOutputStream &  stream 
) const
pure virtual

Cooks a bounding volume hierarchy. The results are written to the stream.

cookBVH() allows a BVH description to be cooked into a binary stream suitable for loading and performing BVH detection at runtime.

Parameters
[in]descThe BVH descriptor.
[in]streamUser stream to output the cooked data.
Returns
true on success.
See also
PxBVH PxRigidActorExt::getRigidActorShapeLocalBoundsList

Implemented in physx::Cooking.

◆ cookBVHStructure()

PX_DEPRECATED PX_FORCE_INLINE bool physx::PxCooking::cookBVHStructure ( const PxBVHStructureDesc &  desc,
PxOutputStream &  stream 
) const
inline

Backward compatibility helper. Cooks a bounding volume hierarchy. The results are written to the stream.

Parameters
[in]descThe BVH descriptor.
[in]streamUser stream to output the cooked data.
Returns
true on success.
Deprecated:

◆ cookConvexMesh()

virtual bool physx::PxCooking::cookConvexMesh ( const PxConvexMeshDesc &  desc,
PxOutputStream &  stream,
PxConvexMeshCookingResult::Enum *  condition = NULL 
) const
pure virtual

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.

cookConvexMesh() 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.
If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.
Parameters
[in]descThe convex mesh descriptor to read the mesh from.
[in]streamUser stream to output the cooked data.
[out]conditionResult from convex mesh cooking.
Returns
true on success.
See also
cookTriangleMesh() setParams() PxConvexMeshCookingResult::Enum

Implemented in physx::Cooking.

◆ cookHeightField()

virtual bool physx::PxCooking::cookHeightField ( const PxHeightFieldDesc &  desc,
PxOutputStream &  stream 
) const
pure virtual

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.

cookHeightField() allows a heightfield description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Parameters
[in]descThe heightfield descriptor to read the HF from.
[in]streamUser stream to output the cooked data.
Returns
true on success
See also
PxPhysics.createHeightField()

Implemented in physx::Cooking.

◆ cookSoftBodyMesh()

virtual bool physx::PxCooking::cookSoftBodyMesh ( const PxTetrahedronMeshDesc &  simulationMeshDesc,
const PxTetrahedronMeshDesc &  collisionMeshDesc,
const PxSoftBodySimulationDataDesc &  softbodyDataDesc,
PxOutputStream &  stream 
) const
pure virtual

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.

cookSoftBodyMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Example

Parameters
[in]simulationMeshDescThe tetrahedron mesh descriptor to read the simulation mesh from.
[in]collisionMeshDescThe tetrahedron mesh descriptor to read the collision mesh from.
[in]softbodyDataDescThe softbody data descriptor to read mapping information from.
[in]streamUser stream to output the cooked data.
Returns
true on success
See also
cookConvexMesh() setParams() PxPhysics.createTriangleMesh() PxTriangleMeshCookingResult::Enum

Implemented in physx::Cooking.

◆ cookTetrahedronMesh()

virtual bool physx::PxCooking::cookTetrahedronMesh ( const PxTetrahedronMeshDesc &  meshDesc,
PxOutputStream &  stream 
) const
pure virtual

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.

cookTriangleMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Example

Parameters
[in]meshDescThe tetrahedron mesh descriptor to read the mesh from.
[in]streamUser stream to output the cooked data.
Returns
true on success
See also
cookConvexMesh() setParams() PxPhysics.createTetrahedronMesh()

Implemented in physx::Cooking.

◆ cookTriangleMesh()

virtual bool physx::PxCooking::cookTriangleMesh ( const PxTriangleMeshDesc &  desc,
PxOutputStream &  stream,
PxTriangleMeshCookingResult::Enum *  condition = NULL 
) const
pure virtual

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.

cookTriangleMesh() allows a mesh description to be cooked into a binary stream suitable for loading and performing collision detection at runtime.

Parameters
[in]descThe triangle mesh descriptor to read the mesh from.
[in]streamUser stream to output the cooked data.
[out]conditionResult from triangle mesh cooking.
Returns
true on success
See also
cookConvexMesh() setParams() PxPhysics.createTriangleMesh() PxTriangleMeshCookingResult::Enum

Implemented in physx::Cooking.

◆ createBVH() [1/2]

PX_FORCE_INLINE PxBVH * physx::PxCooking::createBVH ( const PxBVHDesc &  desc) const
inline

Cooks and creates a bounding volume hierarchy without going through a stream. Convenience function for standalone objects.

Note
This method does the same as cookBVH, 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
[in]descThe BVH descriptor.
Returns
PxBVH pointer on success
See also
cookBVH() PxInsertionCallback

◆ createBVH() [2/2]

virtual PxBVH * physx::PxCooking::createBVH ( const PxBVHDesc &  desc,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Cooks and creates a bounding volume hierarchy without going through a stream.

Note
This method does the same as cookBVH, 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.
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxCooking::getStandaloneInsertionCallback().
Parameters
[in]descThe BVH descriptor.
[in]insertionCallbackThe insertion interface.
Returns
PxBVH pointer on success
See also
cookBVH() PxInsertionCallback

Implemented in physx::Cooking.

◆ createBVHStructure()

PX_DEPRECATED PX_FORCE_INLINE PxBVHStructure * physx::PxCooking::createBVHStructure ( const PxBVHStructureDesc &  desc,
PxInsertionCallback &  insertionCallback 
) const
inline

Backward compatibility helper. Cooks and creates a bounding volume hierarchy without going through a stream.

Parameters
[in]descThe BVH descriptor.
[in]insertionCallbackThe insertion interface.
Returns
PxBVH pointer on success
Deprecated:

◆ createConvexMesh() [1/2]

PX_FORCE_INLINE PxConvexMesh * physx::PxCooking::createConvexMesh ( const PxConvexMeshDesc &  desc) const
inline

Cooks and creates a convex mesh without going through a stream. Convenience function for standalone objects.

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
[in]descThe convex mesh descriptor to read the mesh from.
Returns
PxConvexMesh pointer on success
See also
cookConvexMesh() PxInsertionCallback

◆ createConvexMesh() [2/2]

virtual PxConvexMesh * physx::PxCooking::createConvexMesh ( const PxConvexMeshDesc &  desc,
PxInsertionCallback &  insertionCallback,
PxConvexMeshCookingResult::Enum *  condition = NULL 
) const
pure virtual

Cooks and creates a convex mesh without going through a stream.

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.
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxCooking::getStandaloneInsertionCallback().
Parameters
[in]descThe convex mesh descriptor to read the mesh from.
[in]insertionCallbackThe insertion interface from PxPhysics.
[out]conditionResult from convex mesh cooking.
Returns
PxConvexMesh pointer on success
See also
cookConvexMesh() setParams() PxInsertionCallback

Implemented in physx::Cooking.

◆ createHeightField() [1/2]

PX_FORCE_INLINE PxHeightField * physx::PxCooking::createHeightField ( const PxHeightFieldDesc &  desc) const
inline

Cooks and creates a heightfield mesh and inserts it into PxPhysics. Convenience function for standalone objects.

Parameters
[in]descThe heightfield descriptor to read the HF from.
Returns
PxHeightField pointer on success
See also
cookConvexMesh() PxPhysics.createTriangleMesh() PxInsertionCallback

◆ createHeightField() [2/2]

virtual PxHeightField * physx::PxCooking::createHeightField ( const PxHeightFieldDesc &  desc,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Cooks and creates a heightfield mesh and inserts it into PxPhysics.

Parameters
[in]descThe heightfield descriptor to read the HF from.
[in]insertionCallbackThe insertion interface from PxPhysics.
Returns
PxHeightField pointer on success
See also
cookConvexMesh() setParams() PxPhysics.createTriangleMesh() PxInsertionCallback

Implemented in physx::Cooking.

◆ createSoftBodyMesh() [1/2]

PX_FORCE_INLINE PxSoftBodyMesh * physx::PxCooking::createSoftBodyMesh ( const PxTetrahedronMeshDesc &  simulationMeshDesc,
const PxTetrahedronMeshDesc &  collisionMeshDesc,
const PxSoftBodySimulationDataDesc &  softbodyDataDesc 
) const
inline

Cooks and creates a softbody mesh without going through a stream. Convenience function for standalone objects.

Note
This method does the same as cookSoftBodyMesh, 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
[in]simulationMeshDescThe tetrahedron mesh descriptor to read the simulation mesh from.
[in]collisionMeshDescThe tetrahedron mesh descriptor to read the collision mesh from.
[in]softbodyDataDescThe softbody data descriptor to read mapping information from.
Returns
PxSoftBodyMesh pointer on success.
See also
cookTriangleMesh() PxPhysics.createTriangleMesh() PxInsertionCallback

◆ createSoftBodyMesh() [2/2]

virtual PxSoftBodyMesh * physx::PxCooking::createSoftBodyMesh ( const PxTetrahedronMeshDesc &  simulationMeshDesc,
const PxTetrahedronMeshDesc &  collisionMeshDesc,
const PxSoftBodySimulationDataDesc &  softbodyDataDesc,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Cooks and creates a softbody mesh without going through a stream.

Note
This method does the same as cookSoftBodyMesh, 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.
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxCooking::getStandaloneInsertionCallback().
Parameters
[in]simulationMeshDescThe tetrahedron mesh descriptor to read the simulation mesh from.
[in]collisionMeshDescThe tetrahedron mesh descriptor to read the collision mesh from.
[in]softbodyDataDescThe softbody data descriptor to read mapping information from.
[in]insertionCallbackThe insertion interface from PxPhysics.
Returns
PxSoftBodyMesh pointer on success.
See also
cookTriangleMesh() setParams() PxPhysics.createTriangleMesh() PxInsertionCallback

Implemented in physx::Cooking.

◆ createTetrahedronMesh() [1/2]

PX_FORCE_INLINE PxTetrahedronMesh * physx::PxCooking::createTetrahedronMesh ( const PxTetrahedronMeshDesc &  meshDesc) const
inline

Cooks and creates a tetrahedron mesh without going through a stream. Convenience function for standalone objects.

Note
This method does the same as cookTetrahedronMesh, 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
[in]meshDescThe tetrahedron mesh descriptor to read the mesh from.
Returns
PxTetrahedronMesh pointer on success.
See also
cookTetrahedronMesh() PxInsertionCallback

◆ createTetrahedronMesh() [2/2]

virtual PxTetrahedronMesh * physx::PxCooking::createTetrahedronMesh ( const PxTetrahedronMeshDesc &  meshDesc,
PxInsertionCallback &  insertionCallback 
) const
pure virtual

Cooks and creates a tetrahedron mesh without going through a stream.

Note
This method does the same as cookTetrahedronMesh, 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.
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxCooking::getStandaloneInsertionCallback().
Parameters
[in]meshDescThe tetrahedron mesh descriptor to read the mesh from.
[in]insertionCallbackThe insertion interface from PxPhysics.
Returns
PxTetrahedronMesh pointer on success.
See also
cookTetrahedronMesh() setParams() PxInsertionCallback

Implemented in physx::Cooking.

◆ createTriangleMesh() [1/2]

PX_FORCE_INLINE PxTriangleMesh * physx::PxCooking::createTriangleMesh ( const PxTriangleMeshDesc &  desc) const
inline

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.
Returns
PxTriangleMesh pointer on success.
Parameters
[in]descThe triangle mesh descriptor to read the mesh from.
See also
cookTriangleMesh() PxPhysics.createTriangleMesh() PxInsertionCallback

◆ createTriangleMesh() [2/2]

virtual PxTriangleMesh * physx::PxCooking::createTriangleMesh ( const PxTriangleMeshDesc &  desc,
PxInsertionCallback &  insertionCallback,
PxTriangleMeshCookingResult::Enum *  condition = NULL 
) const
pure virtual

Cooks and creates a triangle mesh without going through a stream.

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.
PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback() or PxCooking::getStandaloneInsertionCallback().
Parameters
[in]descThe triangle mesh descriptor to read the mesh from.
[in]insertionCallbackThe insertion interface from PxPhysics.
[out]conditionResult from triangle mesh cooking.
Returns
PxTriangleMesh pointer on success.
See also
cookTriangleMesh() setParams() PxPhysics.createTriangleMesh() PxInsertionCallback

Implemented in physx::Cooking.

◆ getParams()

virtual const PxCookingParams & physx::PxCooking::getParams ( ) const
pure virtual

Gets cooking parameters.

Returns
Current cooking parameters.
See also
PxCookingParams setParams()

Implemented in physx::Cooking.

◆ getStandaloneInsertionCallback()

virtual PxInsertionCallback & physx::PxCooking::getStandaloneInsertionCallback ( )
pure virtual

Gets standalone object insertion interface.

This interface allows the creation of standalone objects that can exist without a PxPhysics or PxScene object.

See also
PxCooking::createTriangleMesh PxCooking::createHeightfield PxCooking::createTetrahedronMesh PxCooking::createBVH

Implemented in physx::Cooking.

◆ platformMismatch()

virtual bool physx::PxCooking::platformMismatch ( ) const
pure virtual

Checks endianness is the same between cooking & target platforms.

Returns
True if there is and endian mismatch.

Implemented in physx::Cooking.

◆ release()

virtual void physx::PxCooking::release ( )
pure virtual

Closes this instance of the interface.

This function should be called to cleanly shut down the Cooking library before application exit.

Note
This function is required to be called to release foundation usage.

Implemented in physx::Cooking.

◆ setParams()

virtual void physx::PxCooking::setParams ( const PxCookingParams &  params)
pure virtual

Sets cooking parameters.

Parameters
[in]paramsCooking parameters
See also
getParams()

Implemented in physx::Cooking.

◆ validateConvexMesh()

virtual bool physx::PxCooking::validateConvexMesh ( const PxConvexMeshDesc &  desc) const
pure virtual

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.

Note
This function should be used if PxConvexFlag::eDISABLE_MESH_VALIDATION is planned to be used in release builds.
Parameters
[in]descThe convex mesh descriptor to read the mesh from.
Returns
true if all the validity conditions hold, false otherwise.
See also
cookConvexMesh()

Implemented in physx::Cooking.

◆ validateTriangleMesh()

virtual bool physx::PxCooking::validateTriangleMesh ( const PxTriangleMeshDesc &  desc) const
pure virtual

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:

  1. There are no duplicate vertices (within specified vertexWeldTolerance. See PxCookingParams::meshWeldTolerance)
  2. There are no large triangles (within specified PxTolerancesScale.)
Parameters
[in]descThe triangle mesh descriptor to read the mesh from.
Returns
true if all the validity conditions hold, false otherwise.
See also
cookTriangleMesh()

Implemented in physx::Cooking.


The documentation for this class was generated from the following file: