vmmlib  1.9.0
Templatized C++ vector and matrix math library
vmml::AABB< T > Class Template Reference

An axis-aligned bounding box. More...

#include <aabb.hpp>

+ Collaboration diagram for vmml::AABB< T >:

Public Member Functions

 AABB ()
 Create an empty bounding box. More...
 
 AABB (const vector< 3, T > &pMin, const vector< 3, T > &pMax)
 
 AABB (const vector< 4, T > &sphere)
 
 AABB (T cx, T cy, T cz, T size)
 
bool isIn (const vector< 3, T > &pos)
 
bool isIn2d (const vector< 3, T > &pos)
 
bool isIn (const vector< 4, T > &sphere)
 
void set (const vector< 3, T > &pMin, const vector< 3, T > &pMax)
 
void set (T cx, T cy, T cz, T size)
 
void setMin (const vector< 3, T > &pMin)
 
void setMax (const vector< 3, T > &pMax)
 
const vector< 3, T > & getMin () const
 
const vector< 3, T > & getMax () const
 
vector< 3, T > & getMin ()
 
vector< 3, T > & getMax ()
 
void merge (const AABB< T > &aabb)
 
void merge (const vector< 3, T > &point)
 
void setEmpty ()
 
bool isEmpty () const
 
AABB operator* (const T value) const
 
AABB operator/ (const T value) const
 
AABB operator+ (const T value) const
 
AABB operator- (const T value) const
 
void operator*= (const T value)
 
void operator/= (const T value)
 
void operator+= (const T value)
 
void operator-= (const T value)
 
template<class U >
bool operator== (const AABB< U > &other) const
 
template<class U >
bool operator!= (const AABB< U > &other) const
 
vector< 3, T > getCenter () const
 
vector< 3, T > getDimension () const
 

Static Public Member Functions

static AABB< T > makeUnitBox ()
 

Protected Attributes

vector< 3, T > _min
 
vector< 3, T > _max
 

Detailed Description

template<typename T>
class vmml::AABB< T >

An axis-aligned bounding box.

An empty bounding box has undefined, implementation-specific values. Read operations (getMin(), getMax(), getDimension(), isIn(), etc.) have undefined semantics on an empty bounding box. set() and merge() operations will define the bounding box correctly.

Definition at line 48 of file aabb.hpp.

Constructor & Destructor Documentation

template<typename T >
vmml::AABB< T >::AABB ( )

Create an empty bounding box.

Definition at line 115 of file aabb.hpp.


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