5#ifndef SAPPHIRE_MATHS_AABB2D_GUARD
6#define SAPPHIRE_MATHS_AABB2D_GUARD
89 constexpr
bool Equals(const
AABB2D& _other, T _epsilon = std::numeric_limits<T>::epsilon()) const noexcept;
99 constexpr
bool operator==(const
AABB2D& _rhs) const noexcept;
108 constexpr
bool operator!=(const
AABB2D& _rhs) const noexcept;
203 template <
typename T>
204 std::string ToString(
const AABB2D<T>& _aabb);
224#include <SA/Maths/Geometry/AABB2D.inl>
Vector 2 type implementation.
AABB 2D Sapphire's class.
Definition AABB2D.hpp:32
AABB2D(const AABB3D< T > &_aabb3D) noexcept
Constructor from AABB3D.
bool IsColliding(const AABB2D &_other) const
Perform collision test on every axis.
Vec2< T > max
Max box component.
Definition AABB2D.hpp:37
bool IsCollidingY(const AABB2D &_other) const
Perform collision test on Y axis only.
float Area() const
Compute area from min and max.
Vec2< T > min
Min box component.
Definition AABB2D.hpp:34
bool IsValid() const noexcept
Wether this AABB has valid values (ie min < max);.
AABB2D(const AABB2D &_first, const AABB2D &_second)
Merge 2 AABB box.
bool IsCollidingX(const AABB2D &_other) const
Perform collision test on X axis only.
AABB2D(const Vec2< T > &_min, const Vec2< T > &_max)
Value constructor from min and max.
float Height() const
Compute height (Y axis) from min and max.
constexpr bool Equals(const AABB2D &_other, T _epsilon=std::numeric_limits< T >::epsilon()) const noexcept
Compare 2 AABB2D.
Vec2< T > Center() const
Compute center from min and max.
static AABB2D Merge(const AABB2D &_first, const AABB2D &_second)
Merge 2 AABB2D box to create a big AABB2D which wrap both boxes.
AABB2D()=default
Default constructor.
float Width() const
Compute width (X axis) from min and max.
AABB 3D Sapphire's class.
Definition AABB3D.hpp:31
Vector 2 Sapphire's class.
Definition Vector2.hpp:41