Claire's Game Engine
Full C++ Engine using OpenGL
|
Represents an axis-aligned bounding box (AABB) in 3D space. Used primarily for collision detection and spatial calculations. More...
#include <Box.h>
Public Member Functions | |
Vector3 | GetSize () const |
Calculates the size (width, height, depth) of the box. | |
Vector3 | GetCenter () const |
Calculates the center point of the box. | |
Static Public Member Functions | |
static bool | Collision (const Box &a, const Box &b) |
Checks if two AABBs intersect (collide). | |
Public Attributes | |
Vector3 | min = Vector3::One * -1.0f |
Minimum corner of the box in 3D space. Defaults to (-1, -1, -1). | |
Vector3 | max = Vector3::One |
Maximum corner of the box in 3D space. Defaults to (1, 1, 1). | |
Represents an axis-aligned bounding box (AABB) in 3D space. Used primarily for collision detection and spatial calculations.
Checks if two AABBs intersect (collide).
a | The first box. |
b | The second box. |
Vector3 Box::GetCenter | ( | ) | const |
Calculates the center point of the box.
Vector3 Box::GetSize | ( | ) | const |
Calculates the size (width, height, depth) of the box.
Vector3 Box::max = Vector3::One |
Maximum corner of the box in 3D space. Defaults to (1, 1, 1).
Vector3 Box::min = Vector3::One * -1.0f |
Minimum corner of the box in 3D space. Defaults to (-1, -1, -1).