Skip to main content

ray_aabb_intersect

Function ray_aabb_intersect 

Source
pub fn ray_aabb_intersect(
    ray: &Ray,
    aabb: &Aabb,
    t_min: f64,
    t_max: f64,
) -> Option<f64>
Expand description

Test whether a ray intersects an AABB using the slab method.

Returns Some(t_near) when there is an intersection with t_near >= t_min, or None when the ray misses.