pub fn query_overlap(
nodes: &[BvhNode],
primitives: &[Aabb],
prim_indices: &[u32],
root: usize,
node_count: usize,
query_bbox: &Aabb,
out_indices: &mut [u32],
stack: &mut [u32],
) -> Result<usize, BvhError>Expand description
Query the BVH for all primitives whose AABB overlaps query_bbox.
out_indices receives the primitive indices. Returns the count found.
stack is scratch space (needs MAX_BVH_DEPTH entries).
Zero-heap. Deterministic (traversal order is left-to-right).