pub unsafe extern "C" fn PxTriangleMesh_refitBVH_mut(
    self_: *mut PxTriangleMesh
) -> PxBounds3
Expand description

Refits BVH for mesh vertices.

This function will refit the mesh BVH to correctly enclose the new positions updated by getVerticesForModification. Mesh BVH will not be reoptimized by this function so significantly different new positions will cause significantly reduced performance.

New bounds for the entire mesh.

For PxMeshMidPhase::eBVH34 trees the refit operation is only available on non-quantized trees (see PxBVH34MidphaseDesc::quantized)

PhysX does not keep a mapping from the mesh to mesh shapes that reference it.

Call PxShape::setGeometry on each shape which references the mesh, to ensure that internal data structures are updated to reflect the new geometry.

PxShape::setGeometry does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.

It is also recommended to make sure that a call to validateTriangleMesh returns true if mesh cleaning is disabled.

Active edges information will be lost during refit, the rigid body mesh contact generation might not perform as expected.