vmmlib
1.8.0
Templatized C++ vector and matrix math library
|
An axis-aligned bounding box. More...
#include <aabb.hpp>
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 |
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.
vmml::AABB< T >::AABB | ( | ) |