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