PxComputeHullPolygons
Defined in include/cooking/PxCooking.h
-
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.
See also
PxCookConvexMesh() PxConvexFlags PxConvexMeshDesc PxSimpleTriangleMesh
- 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