SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Physics::AABB Struct Reference

#include <Colliders.hpp>

Public Member Functions

 AABB ()
 AABB (const Vector3D &min, const Vector3D &max)
bool Contains (const Vector3D &point) const
AABB Fatten (float margin) const
Vector3D GetCenter () const
Vector3D GetExtents () const
float GetSurfaceArea () const
AABB Merge (const AABB &other) const
bool Overlaps (const AABB &other) const

Static Public Member Functions

static AABB FromVertices (const float *positions, size_t count, size_t stride)
 Computes a tight AABB over raw interleaved vertex positions.

Public Attributes

Vector3D max
Vector3D min

Detailed Description

Axis-aligned bounding box; the workhorse broadphase and collision shape.

Definition at line 20 of file Colliders.hpp.

Constructor & Destructor Documentation

◆ AABB() [1/2]

Sleak::Physics::AABB::AABB ( )
inline

Definition at line 24 of file Colliders.hpp.

◆ AABB() [2/2]

Sleak::Physics::AABB::AABB ( const Vector3D & min,
const Vector3D & max )
inline

Definition at line 25 of file Colliders.hpp.

Member Function Documentation

◆ Contains()

bool Sleak::Physics::AABB::Contains ( const Vector3D & point) const
inline

Definition at line 40 of file Colliders.hpp.

◆ Fatten()

AABB Sleak::Physics::AABB::Fatten ( float margin) const
inline

Definition at line 64 of file Colliders.hpp.

◆ FromVertices()

AABB Sleak::Physics::AABB::FromVertices ( const float * positions,
size_t count,
size_t stride )
inlinestatic

Computes a tight AABB over raw interleaved vertex positions.

Definition at line 72 of file Colliders.hpp.

◆ GetCenter()

Vector3D Sleak::Physics::AABB::GetCenter ( ) const
inline

Definition at line 27 of file Colliders.hpp.

◆ GetExtents()

Vector3D Sleak::Physics::AABB::GetExtents ( ) const
inline

Definition at line 31 of file Colliders.hpp.

◆ GetSurfaceArea()

float Sleak::Physics::AABB::GetSurfaceArea ( ) const
inline

Definition at line 35 of file Colliders.hpp.

◆ Merge()

AABB Sleak::Physics::AABB::Merge ( const AABB & other) const
inline

Definition at line 53 of file Colliders.hpp.

◆ Overlaps()

bool Sleak::Physics::AABB::Overlaps ( const AABB & other) const
inline

Definition at line 46 of file Colliders.hpp.

Member Data Documentation

◆ max

Vector3D Sleak::Physics::AABB::max

Definition at line 22 of file Colliders.hpp.

◆ min

Vector3D Sleak::Physics::AABB::min

Definition at line 21 of file Colliders.hpp.