use bounding_volume::{BoundingSphere, HasBoundingVolume}; use bounding_volume; use shape::{BaseMesh, BaseMeshElement, Polyline, TriMesh}; use math::{Isometry, Point}; impl
HasBoundingVolume
where
P: Point,
M: Isometry ,
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_point(¢er), radius)
}
}
impl {
#[inline]
fn bounding_volume(&self, m: &M) -> BoundingSphere {
self.base_mesh().bounding_volume(m)
}
}
impl {
#[inline]
fn bounding_volume(&self, m: &M) -> BoundingSphere {
self.base_mesh().bounding_volume(m)
}
}