ncollide3d/bounding_volume/
bounding_sphere_shape.rs
1use crate::bounding_volume::{BoundingSphere, HasBoundingVolume};
2use crate::math::Isometry;
3use crate::shape::Shape;
4use na::RealField;
5
6impl<N: RealField + Copy> HasBoundingVolume<N, BoundingSphere<N>> for dyn Shape<N> {
7 #[inline]
8 fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N> {
9 self.bounding_sphere(m)
10 }
11
12 #[inline]
13 fn local_bounding_volume(&self) -> BoundingSphere<N> {
14 self.local_bounding_sphere()
15 }
16}