fj_core/algorithms/bounding_volume/mod.rs
1//! Compute a bounding volume for an object
2
3mod cycle;
4mod edge;
5mod face;
6mod shell;
7mod solid;
8
9use fj_math::Aabb;
10
11use crate::geometry::Geometry;
12
13/// Compute a bounding volume for an object
14pub trait BoundingVolume<const D: usize> {
15 /// Compute an axis-aligned bounding box (AABB)
16 ///
17 /// Return `None`, if no AABB can be computed (if the object is empty).
18 fn aabb(&self, geometry: &Geometry) -> Option<Aabb<D>>;
19}