tinybvh_rs/traversal.rs
1use crate::Ray;
2
3/// Intersector for BVH and nodes intersection.
4pub trait Intersector {
5 /// Intersect this instance with a ray.
6 ///
7 /// [`Ray::hit`] is mutated with the intersection data.
8 ///
9 /// Returns the number of steps (A.K.A intersections) performed.
10 fn intersect(&self, ray: &mut Ray) -> u32;
11}