template<typename T>
OrbitEngine::Math::AABB struct

Axis-aligned bounding box.

Constructors, destructors, conversion operators

AABB()
AABB(T x, T y, T halfWidth, T halfHeight)
AABB(const Vec2<T>& position, const Vec2<T>& halfSize)

Public functions

auto bounds() const -> Bounds<T>
Get the boundaries.
auto contains(const Vec2<T>& p) const -> bool
Check if a point is inside the bounding box.
auto intersects(const AABB& other) const -> bool
Check if the bounding box intersects another.

Public variables

T x
X position.
T y
Y position.
T hw
Half width.
T hh
Half height.