PxFindFaceIndex

Defined in include/extensions/PxConvexMeshExt.h

PxU32 PxFindFaceIndex(const PxConvexMeshGeometry &convexGeom, const PxTransform &geomPose, const PxVec3 &impactPos, const PxVec3 &unitDir)

Computes closest polygon of the convex hull geometry for a given impact point and impact direction.

When doing sweeps against a scene, one might want to delay the rather expensive computation of the hit face index for convexes until it is clear the information is really needed and then use this method to get the corresponding face index.

See also

PxTransform PxConvexMeshGeometry

Parameters
  • convexGeom[in] The convex mesh geometry.

  • geomPose[in] Pose for the geometry object.

  • impactPos[in] Impact position.

  • unitDir[in] Normalized impact direction.

Returns

Closest face index of the convex geometry.