///
/// Transforms the bounding box by the given transformation.
///
/// **Note:** Use [new_with_transformed_positions](crate::AxisAlignedBoundingBox::new_with_transformed_positions) instead of
/// [new_with_positions](crate::AxisAlignedBoundingBox::new_with_positions) followed by this method to create a more tight bounding box.
///
Transforms the bounding box by the given transformation.
Transforms the bounding box by the given transformation .
pub fn transform(&mut self, transformation: &Mat4) {
        let aabb = Self::new_with_transformed_positions(
            &[
                self.min,
                Vec3::new(self.max.x, self.min.y, self.min.z),
                Vec3::new(self.min.x, self.max.y, self.min.z),
                Vec3::new(self.min.x, self.min.y, self.max.z),
                Vec3::new(self.min.x, self.max.y, self.max.z),
                Vec3::new(self.max.x, self.min.y, self.max.z),
                Vec3::new(self.max.x, self.max.y, self.min.z),
                self.max,
            ],
            transformation,
        );
        self.min = aabb.min;
        self.max = aabb.max;
    }
pub fn transform ( & mut self , transformation : & Mat4 ) { let aabb = Self :: new_with_transformed_positions ( & [ self . min , Vec3 :: new ( self . max . x , self . min . y , self . min . z ) , Vec3 :: new ( self . min . x , self . max . y , self . min . z ) , Vec3 :: new ( self . min . x , self . min . y , self . max . z ) , Vec3 :: new ( self . min . x , self . max . y , self . max . z ) , Vec3 :: new ( self . max . x , self . min . y , self . max . z ) , Vec3 :: new ( self . max . x , self . max . y , self . min . z ) , self . max , ] , transformation , ) ; self . min = aabb . min ; self . max = aabb . max ; }
Transforms the bounding box by the given transformation.
Transforms the bounding box by the given transformation .
&mut self
transformation
&Mat4