HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
AABB Class Reference

Axis-Aligned Bounding Box for collision detection. Defined by a Minimum and Maximum point in 3D space. More...

#include <src/physics/AABB.h>

Collaboration diagram for AABB:
Collaboration graph

Public Member Functions

 AABB (const Core::Vec3 &ObjMinPt, const Core::Vec3 &ObjMaxPt)
 Constructs an AABB from two points.
 
bool CheckCollision (const AABB &Other) const
 Checks intersection with another AABB.
 
Core::Vec3 GetCenter () const
 
Core::Vec3 GetHalfExtents () const
 
void Translate (const Core::Vec3 &offset)
 

Public Attributes

Core::Vec3 m_objMinPt
 
Core::Vec3 m_objMaxPt
 

Detailed Description

Axis-Aligned Bounding Box for collision detection. Defined by a Minimum and Maximum point in 3D space.

Constructor & Destructor Documentation

◆ AABB()

AABB::AABB ( const Core::Vec3 ObjMinPt,
const Core::Vec3 ObjMaxPt 
)
inline

Constructs an AABB from two points.

Note
Enforces that Min <= Max. If this triggers, check your RigidBody size!

Member Function Documentation

◆ CheckCollision()

bool AABB::CheckCollision ( const AABB Other) const
inline

Checks intersection with another AABB.

Returns
True if overlapping, False otherwise.

◆ GetCenter()

Core::Vec3 AABB::GetCenter ( ) const
inline
Here is the caller graph for this function:

◆ GetHalfExtents()

Core::Vec3 AABB::GetHalfExtents ( ) const
inline
Here is the caller graph for this function:

◆ Translate()

void AABB::Translate ( const Core::Vec3 offset)
inline

Member Data Documentation

◆ m_objMaxPt

Core::Vec3 AABB::m_objMaxPt

◆ m_objMinPt

Core::Vec3 AABB::m_objMinPt

The documentation for this class was generated from the following file: