use bounding_volume::{BoundingSphere, HasBoundingVolume}; use bounding_volume; use shape::Triangle; use math::{Isometry, Point}; impl> HasBoundingVolume> for Triangle

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

{ let pts = [*self.a(), *self.b(), *self.c()]; let (center, radius) = bounding_volume::point_cloud_bounding_sphere(&pts[..]); BoundingSphere::new(m.transform_point(¢er), radius) } }