Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::BoundingBox Class Reference

#include <BoundingBox.h>

Public Member Functions

 BoundingBox ()
 
 BoundingBox (const BoundingBox &aabb)
 
void Calculate (const Vector3D *v, const int numPoints)
 
void Expand (const float amt)
 
void Translate (const Vector3D &v)
 
bool CollisionCheck (const BoundingBox &aabb)
 
bool CollisionCheck (const Vector3D &v)
 
BoundingBoxoperator= (const BoundingBox &b)
 

Public Attributes

Vector3D mMin
 
Vector3D mMax
 
Vector3D mCenter
 

Detailed Description

Axis-aligned bounding box.

Constructor & Destructor Documentation

◆ BoundingBox() [1/2]

Ult::BoundingBox::BoundingBox ( )

BoundingBox default constructor.

◆ BoundingBox() [2/2]

Ult::BoundingBox::BoundingBox ( const BoundingBox & aabb)

BoundingBox copy constructor.

Member Function Documentation

◆ Calculate()

void Ult::BoundingBox::Calculate ( const Vector3D * v,
const int numPoints )

Initialize this bounding box to encapuslate all of the given input points.

◆ CollisionCheck() [1/2]

bool Ult::BoundingBox::CollisionCheck ( const BoundingBox & aabb)

Returns true if this box overlaps with the input bo.x

◆ CollisionCheck() [2/2]

bool Ult::BoundingBox::CollisionCheck ( const Vector3D & v)

Returns true if the input point is within this box.

◆ Expand()

void Ult::BoundingBox::Expand ( const float amt)

Increase the size of the bounding box by amt.

◆ operator=()

BoundingBox & Ult::BoundingBox::operator= ( const BoundingBox & b)
inline

Set this box's values equal to another box's

◆ Translate()

void Ult::BoundingBox::Translate ( const Vector3D & v)

Change the position of the min/max points by v.

Member Data Documentation

◆ mCenter

Vector3D Ult::BoundingBox::mCenter

The center point of this box.

◆ mMax

Vector3D Ult::BoundingBox::mMax

The maximum corner point of this box.

◆ mMin

Vector3D Ult::BoundingBox::mMin

The minimum corner point of this box.


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