use na::Transform; use bounding_volume::{BoundingSphere, HasBoundingVolume}; use bounding_volume; use shape::{BaseMesh, BaseMeshElement, TriMesh, Polyline}; use math::Point; impl HasBoundingVolume> for BaseMesh where P: Point, M: Transform

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

{ let (center, radius) = bounding_volume::point_cloud_bounding_sphere(&self.vertices()[..]); BoundingSphere::new(m.transform(¢er), radius) } } impl HasBoundingVolume> for TriMesh

where P: Point, M: Transform

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

{ self.base_mesh().bounding_volume(m) } } impl HasBoundingVolume> for Polyline

where P: Point, M: Transform

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

{ self.base_mesh().bounding_volume(m) } }