Function physx_sys::PxBVH_refit_mut

source ·
pub unsafe extern "C" fn PxBVH_refit_mut(self_: *mut PxBVH)
Expand description

Refit the BVH.

This function “refits” the tree, i.e. takes the new (leaf) bounding boxes into account and recomputes all the BVH bounds accordingly. This is an O(n) operation with n = number of bounds in the BVH.

This works best with minor bounds modifications, i.e. when the bounds remain close to their initial values. With large modifications the tree quality degrades more and more, and subsequent query performance suffers. It might be a better strategy to create a brand new BVH if bounds change drastically.

This function refits the whole tree after an arbitrary number of bounds have potentially been modified by users (via getBoundsForModification()). If you only have a small number of bounds to update, it might be more efficient to use setBounds() and partialRefit() instead.