pub fn intersect(
        &self,
        r: &Ray,
        inv_d: f32x4,
        inv_dir_neg_mask: f32x4,
        t0: f32,
        t1: f32,
    ) -> bool {
        let origin = f32x4::from(*r.origin.as_array());
        let min = inv_dir_neg_mask.blend(
            f32x4::from(*self.maximum.as_array()),
            f32x4::from(*self.minimum.as_array()),
        );
        let max = inv_dir_neg_mask.blend(
            f32x4::from(*self.minimum.as_array()),
            f32x4::from(*self.maximum.as_array()),
        );
        let t_near = (min - origin) * inv_d;
        let t_far = (max - origin) * inv_d * (1. + 2. * gamma_eb(3));
        let t_near: [f32; 4] = t_near.into();
        let t_far: [f32; 4] = t_far.into();
        let t0 = t_near[0].max(t_near[1]).max(t_near[2]).max(t0);
        let t1 = t_far[0].min(t_far[1]).min(t_far[2]).min(t1);
        t0 <= t1
    }
/// Intersect returns true if a ray conservatively intersects the AABB.
///
/// This implementation is essentially copied from [pbrt]. See also the
/// section on [conservative intersections].
///
/// [pbrt]: http://www.pbr-book.org/3ed-2018/Shapes/Basic_Shape_Interface.html#RayndashBoundsIntersections
/// [conservative intersections]: http://www.pbr-book.org/3ed-2018/Shapes/Managing_Rounding_Error.html#ConservativeRayndashBoundsIntersections

Intersect returns true if a ray conservatively intersects the AABB.
This implementation is essentially copied from [pbrt]. See also the
section on [conservative intersections].


Intersect returns true if a ray conservatively intersects the AABB . This implementation is essentially copied from [ pbrt ] . See also the section on [ conservative intersections ] .
pub fn intersect(
        &self,
        r: &Ray,
        inv_d: f32x4,
        inv_dir_neg_mask: f32x4,
        t0: f32,
        t1: f32,
    ) -> bool {
        let origin = f32x4::from(*r.origin.as_array());
        let min = inv_dir_neg_mask.blend(
            f32x4::from(*self.maximum.as_array()),
            f32x4::from(*self.minimum.as_array()),
        );
        let max = inv_dir_neg_mask.blend(
            f32x4::from(*self.minimum.as_array()),
            f32x4::from(*self.maximum.as_array()),
        );
        let t_near = (min - origin) * inv_d;
        let t_far = (max - origin) * inv_d * (1. + 2. * gamma_eb(3));
        let t_near: [f32; 4] = t_near.into();
        let t_far: [f32; 4] = t_far.into();
        let t0 = t_near[0].max(t_near[1]).max(t_near[2]).max(t0);
        let t1 = t_far[0].min(t_far[1]).min(t_far[2]).min(t1);
        t0 <= t1
    }
pub fn intersect ( & self , r : & Ray , inv_d : f32x4 , inv_dir_neg_mask : f32x4 , t0 : f32 , t1 : f32 , ) -> bool { let origin = f32x4 :: from ( * r . origin . as_array ( ) ) ; let min = inv_dir_neg_mask . blend ( f32x4 :: from ( * self . maximum . as_array ( ) ) , f32x4 :: from ( * self . minimum . as_array ( ) ) , ) ; let max = inv_dir_neg_mask . blend ( f32x4 :: from ( * self . minimum . as_array ( ) ) , f32x4 :: from ( * self . maximum . as_array ( ) ) , ) ; let t_near = ( min - origin ) * inv_d ; let t_far = ( max - origin ) * inv_d * ( 1. + 2. * gamma_eb ( 3 ) ) ; let t_near : [ f32 ; 4 ] = t_near . into ( ) ; let t_far : [ f32 ; 4 ] = t_far . into ( ) ; let t0 = t_near [ 0 ] . max ( t_near [ 1 ] ) . max ( t_near [ 2 ] ) . max ( t0 ) ; let t1 = t_far [ 0 ] . min ( t_far [ 1 ] ) . min ( t_far [ 2 ] ) . min ( t1 ) ; t0 <= t1 }
Intersect returns true if a ray conservatively intersects the AABB.
Intersect returns true if a ray conservatively intersects the AABB .
&self
r
&Ray
inv_d
f32x4
inv_dir_neg_mask
f32x4
t0
f32
t1
f32
&self
r
&Ray
inv_d
f32x4
inv_dir_neg_mask
f32x4
t0
f32
t1
f32