PxCreateTriangleMeshSampler#

Defined in include/extensions/PxSamplingExt.h

PxTriangleMeshPoissonSampler *PxCreateTriangleMeshSampler(
const PxU32 *triangles,
PxU32 numTriangles,
const PxVec3 *vertices,
PxU32 numVertices,
PxReal initialSamplingRadius,
PxI32 numSampleAttemptsAroundPoint = 30,
)#

Creates a triangle mesh sampler.

Parameters:
  • triangles – [in] The triangle indices of the mesh

  • numTriangles – [in] The total number of triangles

  • vertices – [in] The vertices of the mesh

  • numVertices – [in] The total number of vertices

  • initialSamplingRadius – [in] The closest distance two surface samples are allowed to have

  • numSampleAttemptsAroundPoint – [in] Number of repetitions the underlying algorithm performs to find a new valid sample that matches all criteria like minimal distance to existing samples etc.

Returns:

Returns the sampler