Skip to main content

build_bvh

Function build_bvh 

Source
pub fn build_bvh(aabbs: &[AabbGpu]) -> Vec<BvhGpuNode>
Expand description

Build a BVH using a simple midpoint-split heuristic.

Returns a flat VecBvhGpuNode` with node 0 as the root. Internal nodes reference their children by index into this vec.