|
| | Aabb (void) |
| | Default constructor creating an empty (inverted) box.
|
| |
| | Aabb (const Vector< T, 3 > &min, const Vector< T, 3 > &max) |
| | Construct from explicit minimum and maximum corners.
|
| |
| void | include (const Vector< T, 3 > &point) noexcept |
| | Grow the box to contain a point.
|
| |
| void | include (const Aabb &other) noexcept |
| | Grow the box to contain another box (union).
|
| |
| Vector< T, 3 > | center (void) const noexcept |
| | Get the center of the box.
|
| |
| Vector< T, 3 > | extents (void) const noexcept |
| | Get the full size of the box along each axis.
|
| |
| Vector< T, 3 > | halfSize (void) const noexcept |
| | Get half the size of the box along each axis.
|
| |
| T | radius (void) const noexcept |
| | Get the radius of the bounding sphere around the box.
|
| |
| Vector< T, 3 > | positiveVertex (const Vector< T, 3 > &normal) const noexcept |
| | Get the corner farthest along a direction (the "p-vertex").
|
| |
| bool | contains (const Vector< T, 3 > &point) const noexcept |
| | Test whether a point lies inside the box (boundaries included).
|
| |
| bool | intersects (const Aabb &other) const noexcept |
| | Test whether two boxes overlap (touching counts).
|
| |
| bool | isEmpty (void) const noexcept |
| | Test whether the box is empty (inverted).
|
| |
| Vector< T, 3 > | getMin (void) const noexcept |
| | Get the minimum corner.
|
| |
| Vector< T, 3 > | getMax (void) const noexcept |
| | Get the maximum corner.
|
| |
template<CanBeVectorComponent T>
class utility::math::Aabb< T >
Axis-aligned bounding box (AABB) in 3D space.
Stores the two opposite corners of a box whose faces are aligned with the coordinate axes. The default-constructed box is "empty" (inverted, min > max on at least one axis) so that it can be grown with include(); consumers must check isEmpty() before treating an instance as a valid bound.
- Template Parameters
-
| T | Floating-point component type (e.g. float or double). |
Definition at line 53 of file aabb.hpp.
template<CanBeVectorComponent T>
template<std::input_iterator Iterator, std::sentinel_for< Iterator > Sentinel>
Build the tightest box containing a range of 3D points.
If the range is empty, the resulting box is empty (isEmpty()).
- Template Parameters
-
| Iterator | Input iterator type. |
| Sentinel | Sentinel type matching Iterator. |
- Parameters
-
| first | Iterator to the first point. |
| last | Sentinel marking the end of the range. |
- Returns
- The bounding box of all points in the range.
Definition at line 95 of file aabb.hpp.
template<CanBeVectorComponent T>
Build the tightest box containing a contiguous range of points.
Accepts any contiguous range implicitly convertible to std::span<const Vector<T, 3>> (e.g. std::vector, std::array). If the range is empty, the resulting box is empty.
- Parameters
-
| points | The points to bound. |
- Returns
- The bounding box of all points.
Definition at line 114 of file aabb.hpp.