PlayRho  2.0.0
An interactive physics engine & library.
AABB.hpp File Reference

Declaration of the AABB class and free functions that return instances of it. More...

#include <algorithm>
#include <cstddef>
#include <functional>
#include <ostream>
#include <type_traits>
#include <playrho/Intervals.hpp>
#include <playrho/NonNegative.hpp>
#include <playrho/Real.hpp>
#include <playrho/Units.hpp>
#include <playrho/Vector.hpp>
Include dependency graph for AABB.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  playrho::detail::AABB< N >
 N-dimensional Axis Aligned Bounding Box. More...
 

Namespaces

 playrho
 
 playrho::detail
 

Functions

template<std::size_t N>
constexpr bool playrho::detail::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 > & playrho::detail::Fatten (AABB< N > &var, const NonNegative< Length > amount) noexcept
 Fattens an AABB by the given amount.
 
template<std::size_t N>
constexpr Vector< Length, N > playrho::detail::GetCenter (const AABB< N > &aabb) noexcept
 Gets the center of the AABB.
 
template<std::size_t N>
constexpr Vector< Length, N > playrho::detail::GetDimensions (const AABB< N > &aabb) noexcept
 Gets dimensions of the given AABB.
 
template<std::size_t N>
constexpr AABB< N > playrho::detail::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 > playrho::detail::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 > playrho::detail::GetExtents (const AABB< N > &aabb) noexcept
 Gets the extents of the AABB (half-widths).
 
template<std::size_t N>
constexpr AABB< N > playrho::detail::GetFattenedAABB (AABB< N > aabb, const Length amount)
 Gets the fattened AABB result.
 
template<std::size_t N>
constexpr AABB< N > playrho::detail::GetIntersectingAABB (const AABB< N > &a, const AABB< N > &b) noexcept
 Gets the intersecting AABB of the two given AABBs'.
 
template<std::size_t N>
constexpr Vector< Length, N > playrho::detail::GetLowerBound (const AABB< N > &aabb) noexcept
 Gets the lower bound.
 
template<std::size_t N>
constexpr AABB< N > playrho::detail::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 Vector< Length, N > playrho::detail::GetUpperBound (const AABB< N > &aabb) noexcept
 Gets the upper bound.
 
template<std::size_t N>
constexpr AABB< N > & playrho::detail::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 > & playrho::detail::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 > & playrho::detail::Move (AABB< N > &var, const Vector< Length, N > value) noexcept
 Moves the given AABB by the given value.
 
template<std::size_t N>
constexpr bool playrho::detail::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 playrho::detail::operator< (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Less-than operator.
 
template<std::size_t N>
inline ::std::ostream & playrho::detail::operator<< (::std::ostream &os, const AABB< N > &value)
 Output stream operator.
 
template<std::size_t N>
bool playrho::detail::operator<= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Less-than or equal-to operator.
 
template<std::size_t N>
constexpr bool playrho::detail::operator== (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Gets whether the two AABB objects are equal. More...
 
template<std::size_t N>
bool playrho::detail::operator> (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Greater-than operator.
 
template<std::size_t N>
bool playrho::detail::operator>= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Greater-than or equal-to operator.
 
template<std::size_t N>
constexpr bool playrho::detail::TestOverlap (const AABB< N > &a, const AABB< N > &b) noexcept
 Tests for overlap between two axis aligned bounding boxes. More...
 

Detailed Description

Declaration of the AABB class and free functions that return instances of it.