pub unsafe extern "C" fn PxGeometryQuery_computePenetration(
    direction: *mut PxVec3,
    depth: *mut f32,
    geom0: *const PxGeometry,
    pose0: *const PxTransform,
    geom1: *const PxGeometry,
    pose1: *const PxTransform,
    queryFlags: PxGeometryQueryFlags
) -> bool
Expand description

Compute minimum translational distance (MTD) between two geometry objects.

All combinations of geom objects are supported except:

  • plane/plane
  • plane/mesh
  • plane/heightfield
  • mesh/mesh
  • mesh/heightfield
  • heightfield/heightfield
  • anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry or PxHairSystemGeometry

The function returns a unit vector (‘direction’) and a penetration depth (‘depth’).

The depenetration vector D = direction * depth should be applied to the first object, to get out of the second object.

Returned depth should always be positive or null.

If objects do not overlap, the function can not compute the MTD and returns false.

True if the MTD has successfully been computed, i.e. if objects do overlap.