PxValidateTriangleMesh

Defined in include/cooking/PxCooking.h

bool PxValidateTriangleMesh(const physx::PxCookingParams &params, 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:

  1. There are no duplicate vertices (within specified vertexWeldTolerance. See PxCookingParams::meshWeldTolerance)

  2. There are no large triangles (within specified PxTolerancesScale.)

See also

PxCookTriangleMesh()

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.