pub fn flatten(bvh: &Bvh) -> (Vec<FlatBvhNode>, Vec<usize>)Expand description
Flatten a Bvh into a Vec<FlatBvhNode> (DFS pre-order) together with
a reordered primitive-index slice.
Returns (flat_nodes, prim_indices) where prim_indices[i] is an index
into bvh.primitives.