use crate::bounding_volume;
use crate::bounding_volume::Aabb;
use crate::math::{Isometry, Real};
use crate::shape::Segment;
#[cfg(feature = "dim3")]
use crate::shape::{Cone, Cylinder};
#[cfg(feature = "dim3")]
impl Cone {
#[inline]
pub fn aabb(&self, pos: &Isometry<Real>) -> Aabb {
bounding_volume::details::support_map_aabb(pos, self)
}
#[inline]
pub fn local_aabb(&self) -> Aabb {
bounding_volume::details::local_support_map_aabb(self)
}
}
#[cfg(feature = "dim3")]
impl Cylinder {
#[inline]
pub fn aabb(&self, pos: &Isometry<Real>) -> Aabb {
bounding_volume::details::support_map_aabb(pos, self)
}
#[inline]
pub fn local_aabb(&self) -> Aabb {
bounding_volume::details::local_support_map_aabb(self)
}
}
impl Segment {
#[inline]
pub fn aabb(&self, pos: &Isometry<Real>) -> Aabb {
self.transformed(pos).local_aabb()
}
#[inline]
pub fn local_aabb(&self) -> Aabb {
bounding_volume::details::local_support_map_aabb(self)
}
}