#include <nCine/Primitives/AABB.h>
template<class S>
AABB class
Axis-Aligned Bounding Box in a two dimensional space.
Public static functions
Constructors, destructors, conversion operators
Public functions
-
template<class U>auto As() -> AABB<U> constexpr
- auto GetWidth() const -> S constexpr
- auto GetHeight() const -> S constexpr
- auto GetCenter() const -> Vector2<S>
- Calculates the center of the rectangle.
- auto GetExtents() const -> Vector2<S>
- Returns extents.
- auto GetPerimeter() const -> S
- Returns perimeter.
- auto Contains(S px, S py) const -> bool
- Returns
true
if the point is inside this rectangle. - auto Contains(const Vector2<S>& p) const -> bool
- Returns
true
if the point vector is inside this rectangle. - auto Contains(const AABB<S>& aabb) const -> bool
- Returns
true
if the other rectangle is contained inside this one. - auto Overlaps(const AABB<S>& aabb) const -> bool
- Returns
true
if this rect does overlap the other rectangle in any way. - auto operator==(const AABB& aabb) const -> bool
- Eqality operator.
- auto operator!=(const AABB& aabb) const -> bool
- auto operator+=(const Vector2<S>& v) -> AABB&
- auto operator-=(const Vector2<S>& v) -> AABB&
- auto operator+(const Vector2<S>& v) const -> AABB
- auto operator-(const Vector2<S>& v) const -> AABB
-
auto Contains(std::
int32_t px, std:: int32_t py) const -> bool