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