#include <PxCooking.h>
|
virtual void | release ()=0 |
| Closes this instance of the interface. More...
|
|
virtual void | setParams (const PxCookingParams ¶ms)=0 |
| Sets cooking parameters. More...
|
|
virtual const PxCookingParams & | getParams ()=0 |
| Gets cooking parameters. More...
|
|
virtual bool | platformMismatch ()=0 |
| Checks endianness is the same between cooking & target platforms. More...
|
|
virtual bool | cookTriangleMesh (const PxTriangleMeshDesc &desc, PxOutputStream &stream)=0 |
| Cooks a triangle mesh. The results are written to the stream. More...
|
|
virtual PxTriangleMesh * | createTriangleMesh (const PxTriangleMeshDesc &desc, PxPhysicsInsertionCallback &insertionCallback)=0 |
| Cooks and creates a triangle mesh and inserts it into PxPhysics. More...
|
|
virtual bool | validateTriangleMesh (const PxTriangleMeshDesc &desc)=0 |
| Verifies if the triangle mesh is valid. Prints an error message for each inconsistency found. More...
|
|
virtual bool | cookConvexMesh (const PxConvexMeshDesc &desc, PxOutputStream &stream, PxConvexMeshCookingResult::Enum *condition=NULL)=0 |
| Cooks a convex mesh. The results are written to the stream. More...
|
|
virtual bool | computeHullPolygons (const PxSimpleTriangleMesh &mesh, PxAllocatorCallback &inCallback, PxU32 &nbVerts, PxVec3 *&vertices, PxU32 &nbIndices, PxU32 *&indices, PxU32 &nbPolygons, PxHullPolygon *&hullPolygons)=0 |
| Computed hull polygons from given vertices and triangles. Polygons are needed for PxConvexMeshDesc rather than triangles. More...
|
|
virtual bool | cookHeightField (const PxHeightFieldDesc &desc, PxOutputStream &stream)=0 |
| Cooks a heightfield. The results are written to the stream. More...
|
|
virtual PxHeightField * | createHeightField (const PxHeightFieldDesc &desc, PxPhysicsInsertionCallback &insertionCallback)=0 |
| Cooks and creates a heightfield mesh and inserts it into PxPhysics. More...
|
|
virtual PxCooking::~PxCooking |
( |
| ) |
|
|
inlineprotectedvirtual |
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] | mesh | Simple triangle mesh containing vertices and triangles used to compute polygons. |
[in] | inCallback | Memory allocator for out array allocations. |
[out] | nbVerts | Number of vertices used by polygons. |
[out] | vertices | Vertices array used by polygons. |
[out] | nbIndices | Number of indices used by polygons. |
[out] | indices | Indices array used by polygons. |
[out] | nbPolygons | Number of created polygons. |
[out] | hullPolygons | Polygons array. |
- Returns
- true on success
- See Also
- cookConvexMesh() PxConvexFlags PxConvexMeshDesc PxSimpleTriangleMesh
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.
Example
- Note
- The number of vertices and the number of convex polygons in a cooked convex mesh is limited to 256.
-
If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.
-
If the number of polygons exceed, using the PxConvexFlag::eINFLATE_CONVEX can help you to obtain a valid convex.
- Parameters
-
[in] | desc | The convex mesh descriptor to read the mesh from. |
[in] | stream | User stream to output the cooked data. |
[out] | condition | Result from convex mesh cooking. |
- Returns
- true on success
- See Also
- cookTriangleMesh() setParams() PxConvexMeshCookingResult::Enum
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] | desc | The heightfield descriptor to read the HF from. |
[in] | stream | User stream to output the cooked data. |
- Returns
- true on success
- See Also
- PxPhysics.createHeightField()
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.
Example
- Parameters
-
[in] | desc | The triangle mesh descriptor to read the mesh from. |
[in] | stream | User stream to output the cooked data. |
- Returns
- true on success
- See Also
- cookConvexMesh() setParams() PxPhysics.createTriangleMesh()
virtual bool PxCooking::platformMismatch |
( |
| ) |
|
|
pure virtual |
Checks endianness is the same between cooking & target platforms.
- Returns
- True if there is and endian mismatch.
virtual void 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.
Sets cooking parameters.
- Parameters
-
[in] | params | Cooking parameters |
- See Also
- getParams()
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.)
- Parameters
-
[in] | desc | The triangle mesh descriptor to read the mesh from. |
- Returns
- true if all the validity conditions hold, false otherwise.
- See Also
- cookTriangleMesh()
The documentation for this class was generated from the following file: