Skip to main content

ray_aabb_intersect

Function ray_aabb_intersect 

Source
pub fn ray_aabb_intersect(
    origin: [f32; 3],
    inv_dir: [f32; 3],
    aabb: &Aabb,
    max_t: f32,
) -> bool
Expand description

Test whether a ray defined by origin + t * direction intersects aabb within [0, max_t].

inv_dir must be the component-wise reciprocal of the ray direction.