use na::Translate; use na; use bounding_volume::{HasBoundingVolume, BoundingSphere}; use shape::Capsule; use math::{Point, Vector}; impl HasBoundingVolume> for Capsule<::Scalar> where P: Point, M: Translate

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

{ let center = m.translate(&na::origin()); let radius = self.radius() + self.half_height(); BoundingSphere::new(center, radius) } }