use na::{AbsoluteRotate, Translate}; use na; use bounding_volume::{HasBoundingVolume, AABB}; use shape::Cuboid; use math::Point; impl HasBoundingVolume> for Cuboid where P: Point, M: Translate

+ AbsoluteRotate { #[inline] fn bounding_volume(&self, m: &M) -> AABB

{ let center = m.translate(&na::origin()); let ws_half_extents = m.absolute_rotate(self.half_extents()); AABB::new(center + -ws_half_extents.clone(), center + ws_half_extents) } }