parry3d/bounding_volume/aabb_convex_polyhedron.rs
1use crate::bounding_volume::Aabb;
2use crate::math::{Isometry, Real};
3use crate::shape::ConvexPolyhedron;
4
5impl ConvexPolyhedron {
6 /// Computes the world-space [`Aabb`] of this convex polyhedron, transformed by `pos`.
7 #[inline]
8 pub fn aabb(&self, pos: &Isometry<Real>) -> Aabb {
9 super::details::point_cloud_aabb_ref(pos, self.points())
10 }
11
12 /// Computes the local-space [`Aabb`] of this convex polyhedron.
13 #[inline]
14 pub fn local_aabb(&self) -> Aabb {
15 super::details::local_point_cloud_aabb_ref(self.points())
16 }
17}