use alga::general::Real; use bounding_volume::{BoundingSphere, HasBoundingVolume}; use shape::Cone; use math::{Isometry, Point}; impl> HasBoundingVolume> for Cone { #[inline] fn bounding_volume(&self, m: &M) -> BoundingSphere

{ let center = m.translate_point(&P::origin()); let radius = (self.radius() * self.radius() + self.half_height() * self.half_height()).sqrt(); BoundingSphere::new(center, radius) } }