Skip to main content

refit_bvh

Function refit_bvh 

Source
pub fn refit_bvh(nodes: &mut Vec<BvhGpuNode>)
Expand description

Refit BVH bounding boxes bottom-up after leaf AABBs have changed.

For each internal node, recomputes its AABB as the union of its children. Assumes a flat node array where children always have higher indices (which is guaranteed by build_bvh_recursive).