pub unsafe extern "C" fn PxMeshQuery_getTriangle_1(
    hfGeom: *const PxHeightFieldGeometry,
    transform: *const PxTransform,
    triangleIndex: u32,
    triangle: *mut PxTriangle,
    vertexIndices: *mut u32,
    adjacencyIndices: *mut u32
)
Expand description

Retrieves triangle data from a triangle ID.

This function can be used together with findOverlapHeightField to retrieve triangle properties.

This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.

TriangleIndex is an index used in internal format, which does have an index out of the bounds in last row. To traverse all tri indices in the HF, the following code can be applied: for (PxU32 row = 0; row < (nbRows - 1); row++) { for (PxU32 col = 0; col < (nbCols - 1); col++) { for (PxU32 k = 0; k < 2; k++) { const PxU32 triIndex = 2 * (row*nbCols + col) + k; …. } } }