AABB.hpp File Reference
#include <PlayRho/Common/Intervals.hpp>
#include <PlayRho/Common/Vector2.hpp>
#include <PlayRho/Common/Templates.hpp>
#include <array>
#include <algorithm>
#include <functional>

Go to the source code of this file.

Classes

struct  playrho::detail::RayCastInput< N >
 Ray-cast input data for N-dimensions. More...
 
struct  playrho::detail::AABB< N >
 N-dimensional Axis Aligned Bounding Box. More...
 

Namespaces

 playrho
 
 playrho::detail
 
 playrho::d2
 

Typedefs

using playrho::d2::AABB = detail::AABB< 2 >
 2-Dimensional Axis Aligned Bounding Box. More...
 

Functions

template<std::size_t N>
PLAYRHO_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>
PLAYRHO_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. More...
 
template<std::size_t N>
bool playrho::detail::operator<= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Less-than or equal-to operator. More...
 
template<std::size_t N>
bool playrho::detail::operator> (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Greater-than operator. More...
 
template<std::size_t N>
bool playrho::detail::operator>= (const AABB< N > &lhs, const AABB< N > &rhs) noexcept
 Greater-than or equal-to operator. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR bool playrho::detail::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>
PLAYRHO_CONSTEXPR AABB< N > playrho::detail::GetIntersectingAABB (const AABB< N > &a, const AABB< N > &b) noexcept
 Gets the intersecting AABB of the two given AABBs'. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR Vector< Length, N > playrho::detail::GetCenter (const AABB< N > &aabb) noexcept
 Gets the center of the AABB. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR Vector< Length, N > playrho::detail::GetDimensions (const AABB< N > &aabb) noexcept
 Gets dimensions of the given AABB. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR Vector< Length, N > playrho::detail::GetExtents (const AABB< N > &aabb) noexcept
 Gets the extents of the AABB (half-widths). More...
 
template<std::size_t N>
PLAYRHO_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>
PLAYRHO_CONSTEXPR AABB< N > & playrho::detail::Include (AABB< N > &var, const Vector< Length, N > &value) noexcept
 Includes the given location into the given AABB. More...
 
template<std::size_t N>
PLAYRHO_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>
PLAYRHO_CONSTEXPR AABB< N > & playrho::detail::Move (AABB< N > &var, const Vector< Length, N > value) noexcept
 Moves the given AABB by the given value. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR AABB< N > & playrho::detail::Fatten (AABB< N > &var, const NonNegative< Length > amount) noexcept
 Fattens an AABB by the given amount. More...
 
template<std::size_t N>
PLAYRHO_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. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR AABB< N > playrho::detail::GetFattenedAABB (AABB< N > aabb, const Length amount)
 Gets the fattened AABB result. More...
 
template<std::size_t N>
PLAYRHO_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. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR AABB< N > playrho::detail::GetEnclosingAABB (AABB< N > a, const AABB< N > &b)
 Gets the AABB that minimally encloses the given AABBs. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR Vector< Length, N > playrho::detail::GetLowerBound (const AABB< N > &aabb) noexcept
 Gets the lower bound. More...
 
template<std::size_t N>
PLAYRHO_CONSTEXPR Vector< Length, N > playrho::detail::GetUpperBound (const AABB< N > &aabb) noexcept
 Gets the upper bound. More...
 
template<std::size_t N>
inline ::std::ostream & playrho::detail::operator<< (::std::ostream &os, const AABB< N > &value)
 Output stream operator. More...
 
PLAYRHO_CONSTEXPR Length playrho::d2::GetPerimeter (const AABB &aabb) noexcept
 Gets the perimeter length of the 2-dimensional AABB. More...
 
AABB playrho::d2::ComputeAABB (const DistanceProxy &proxy, const Transformation &xf) noexcept
 Computes the AABB. More...
 
AABB playrho::d2::ComputeAABB (const DistanceProxy &proxy, const Transformation &xfm0, const Transformation &xfm1) noexcept
 Computes the AABB. More...
 
AABB playrho::d2::ComputeAABB (const Shape &shape, const Transformation &xf) noexcept
 Computes the AABB for the given shape with the given transformation. More...
 
AABB playrho::d2::ComputeAABB (const Fixture &fixture) noexcept
 Computes the AABB for the given fixture. More...
 
AABB playrho::d2::ComputeAABB (const Body &body)
 Computes the AABB for the given body. More...
 
AABB playrho::d2::ComputeIntersectingAABB (const Fixture &fA, ChildCounter iA, const Fixture &fB, ChildCounter iB) noexcept
 Computes the intersecting AABB for the given pair of fixtures and indexes. More...
 
AABB playrho::d2::ComputeIntersectingAABB (const Contact &contact)
 Computes the intersecting AABB for the given contact. More...
 
AABB playrho::d2::GetAABB (const playrho::detail::RayCastInput< 2 > &input) noexcept
 Gets the AABB for the given ray cast input data. More...
 
template<>
PLAYRHO_CONSTEXPR d2::AABB playrho::GetInvalid () noexcept
 Gets an invalid AABB value. More...
 

Detailed Description

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

Definition in file AABB.hpp.