pub(crate) fn leading_corner_trailing_box(
        &self,
        direction: Vector3<FreeCoordinate>,
    ) -> (Vector3<FreeCoordinate>, Aab) {
        let mut leading_corner = Vector3::zero();
        let mut trailing_box_lower = Point3::origin();
        let mut trailing_box_upper = Point3::origin();
        for axis in 0..3 {
            if direction[axis] >= 0.0 {
                leading_corner[axis] = self.upper_bounds[axis];
                trailing_box_lower[axis] = -self.sizes[axis];
                trailing_box_upper[axis] = -0.;
            } else {
                leading_corner[axis] = self.lower_bounds[axis];
                trailing_box_lower[axis] = 0.;
                trailing_box_upper[axis] = self.sizes[axis];
            }
        }
        (
            leading_corner,
            Aab::from_lower_upper(trailing_box_lower, trailing_box_upper),
        )
    }
// Not public because this is an odd interface that primarily helps with collision.
Not public because this is an odd interface that primarily helps with collision.
Not public because this is an odd interface that primarily helps with collision .
pub(crate) fn leading_corner_trailing_box(
        &self,
        direction: Vector3<FreeCoordinate>,
    ) -> (Vector3<FreeCoordinate>, Aab) {
        let mut leading_corner = Vector3::zero();
        let mut trailing_box_lower = Point3::origin();
        let mut trailing_box_upper = Point3::origin();
        for axis in 0..3 {
            if direction[axis] >= 0.0 {
                leading_corner[axis] = self.upper_bounds[axis];
                trailing_box_lower[axis] = -self.sizes[axis];
                trailing_box_upper[axis] = -0.;
            } else {
                leading_corner[axis] = self.lower_bounds[axis];
                trailing_box_lower[axis] = 0.;
                trailing_box_upper[axis] = self.sizes[axis];
            }
        }
        (
            leading_corner,
            Aab::from_lower_upper(trailing_box_lower, trailing_box_upper),
        )
    }
pub ( crate ) fn leading_corner_trailing_box ( & self , direction : Vector3 < FreeCoordinate > , ) -> ( Vector3 < FreeCoordinate > , Aab ) { let mut leading_corner = Vector3 :: zero ( ) ; let mut trailing_box_lower = Point3 :: origin ( ) ; let mut trailing_box_upper = Point3 :: origin ( ) ; for axis in 0 .. 3 { if direction [ axis ] >= 0.0 { leading_corner [ axis ] = self . upper_bounds [ axis ] ; trailing_box_lower [ axis ] = - self . sizes [ axis ] ; trailing_box_upper [ axis ] = - 0. ; } else { leading_corner [ axis ] = self . lower_bounds [ axis ] ; trailing_box_lower [ axis ] = 0. ; trailing_box_upper [ axis ] = self . sizes [ axis ] ; } } ( leading_corner , Aab :: from_lower_upper ( trailing_box_lower , trailing_box_upper ) , ) }
Not public because this is an odd interface that primarily helps with collision.
Not public because this is an odd interface that primarily helps with collision .
&self
direction
Vector3<FreeCoordinate>