|
(Note that these are not member functions.)
|
template<std::size_t N> |
constexpr bool | operator== (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Gets whether the two AABB objects are equal. More...
|
|
template<std::size_t N> |
constexpr bool | operator!= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Gets whether the two AABB objects are not equal. More...
|
|
template<std::size_t N> |
bool | operator< (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Less-than operator.
|
|
template<std::size_t N> |
bool | operator<= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Less-than or equal-to operator.
|
|
template<std::size_t N> |
bool | operator> (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Greater-than operator.
|
|
template<std::size_t N> |
bool | operator>= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept |
| Greater-than or equal-to operator.
|
|
template<std::size_t N> |
constexpr bool | TestOverlap (const AABB< N > &a, const AABB< N > &b) noexcept |
| Tests for overlap between two axis aligned bounding boxes. More...
|
|
template<std::size_t N> |
constexpr Vector< Length, N > | GetCenter (const AABB< N > &aabb) noexcept |
| Gets the center of the AABB.
|
|
template<std::size_t N> |
constexpr Vector< Length, N > | GetDimensions (const AABB< N > &aabb) noexcept |
| Gets dimensions of the given AABB.
|
|
template<std::size_t N> |
constexpr Vector< Length, N > | GetExtents (const AABB< N > &aabb) noexcept |
| Gets the extents of the AABB (half-widths).
|
|
template<std::size_t N> |
constexpr bool | Contains (const AABB< N > &a, const AABB< N > &b) noexcept |
| Checks whether the first AABB fully contains the second AABB. More...
|
|
template<std::size_t N> |
constexpr AABB< N > & | Include (AABB< N > &var, const Vector< Length, N > &value) noexcept |
| Includes the given location into the given AABB.
|
|
template<std::size_t N> |
constexpr AABB< N > & | Include (AABB< N > &var, const AABB< N > &val) noexcept |
| Includes the second AABB into the first one. More...
|
|
template<std::size_t N> |
constexpr AABB< N > & | Fatten (AABB< N > &var, const NonNegative< Length > amount) noexcept |
| Fattens an AABB by the given amount.
|
|
template<std::size_t N> |
constexpr AABB< N > | GetDisplacedAABB (AABB< N > aabb, const Vector< Length, N > displacement) |
| Gets the AABB that the result of displacing the given AABB by the given displacement amount.
|
|
template<std::size_t N> |
constexpr AABB< N > | GetFattenedAABB (AABB< N > aabb, const Length amount) |
| Gets the fattened AABB result.
|
|
template<std::size_t N> |
constexpr AABB< N > | GetMovedAABB (AABB< N > aabb, const Vector< Length, N > value) noexcept |
| Gets the result of moving the given AABB by the given value.
|
|
template<std::size_t N> |
constexpr AABB< N > | GetEnclosingAABB (AABB< N > a, const AABB< N > &b) |
| Gets the AABB that minimally encloses the given AABBs.
|
|
template<std::size_t N> |
constexpr Vector< Length, N > | GetLowerBound (const AABB< N > &aabb) noexcept |
| Gets the lower bound.
|
|
template<std::size_t N> |
constexpr Vector< Length, N > | GetUpperBound (const AABB< N > &aabb) noexcept |
| Gets the upper bound.
|
|
constexpr Length | GetPerimeter (const AABB &aabb) noexcept |
| Gets the perimeter length of the 2-dimensional AABB. More...
|
|
template<> |
constexpr d2::AABB | GetInvalid () noexcept |
| Gets an invalid AABB value.
|
|
template<std::size_t N>
struct playrho::detail::AABB< N >
N-dimensional Axis Aligned Bounding Box.
This is a concrete value class template for an N-dimensional axis aligned bounding box (AABB) which is a type of bounding volume.
- Note
- This class satisfies at least the following named requirement: all the basic named requirements,
EqualityComparable
, and Swappable
.
-
This class is composed of — as in contains and owns — N
LengthInterval
variables.
-
Non-defaulted methods of this class are marked
noexcept
and expect that the Length type doesn't throw.
- See also
- https://en.wikipedia.org/wiki/Bounding_volume
-
https://en.cppreference.com/w/cpp/named_req