parry3d/bounding_volume/
aabb_heightfield.rs

1use crate::bounding_volume::Aabb;
2use crate::math::{Isometry, Real};
3use crate::shape::HeightField;
4
5impl HeightField {
6    /// Computes the world-space [`Aabb`] of this heightfield, transformed by `pos`.
7    #[inline]
8    pub fn aabb(&self, pos: &Isometry<Real>) -> Aabb {
9        self.root_aabb().transform_by(pos)
10    }
11
12    /// Computes the local-space [`Aabb`] of this heightfield.
13    #[inline]
14    pub fn local_aabb(&self) -> Aabb {
15        *self.root_aabb()
16    }
17}