|
| Aabb3 () |
| Constructs invalid axes-aligned bounding-box. More...
|
|
template<typename SrcT > |
| Aabb3 (const Vector3< SrcT > &point) |
| Constructs axes-aligned bound-box containing one point point. More...
|
|
template<typename SrcT > |
| Aabb3 (SrcT x0, SrcT y0, SrcT z0, SrcT x1, SrcT y1, SrcT z1) |
| Constructs axes-aligned bounding-box form two corner points (x0, y0, z0) and (x1, y1, z1) More...
|
|
template<typename SrcT > |
| Aabb3 (SrcT x, SrcT y, SrcT z) |
| Constructs axes-aligned bounding-box containing point (x, y, z) More...
|
|
template<typename SrcT > |
| Aabb3 (const Aabb3< SrcT > &src) |
| Creates copy of axis-aligned bounding-box. More...
|
|
template<typename SrcT > |
Aabb3< T > & | operator= (const Aabb3< SrcT > &rhs) |
| Assign operator. More...
|
|
bool | valid () const |
| Checks if bounding-box is valid. More...
|
|
void | invalidate () |
| Makes this bounding-box invalid. More...
|
|
template<typename SrcT > |
void | extend (const Vector3< SrcT > &point) |
| Extends this bounding-box by a point point. More...
|
|
template<typename SrcT > |
void | extend (const Aabb3< SrcT > &box) |
| Extends this bounding-box by a box box. More...
|
|
template<typename SrcT > |
Aabb3< T > | extended (const Vector3< SrcT > &point) const |
| Gets a copy of this bounding-box extend by a point point. More...
|
|
template<typename SrcT > |
Aabb3< T > | extended (const Aabb3< SrcT > &box) const |
| Gets a copy of this bounding-box extnended by box box. More...
|
|
template<typename SrcT > |
bool | intersects (const Vector3< SrcT > &point) const |
| Tests if the point point is within this bounding-box. More...
|
|
template<typename SrcT > |
bool | intersects (const Aabb3< SrcT > &box) const |
| Tests if other bounding-box box intersects (even partially) with this bouding-box. More...
|
|
template<typename SrcT > |
Aabb3< T > | intersection (const Aabb3< SrcT > &other) const |
| Gets result of intersection of this bounding-box with other bounding-box. More...
|
|
Vector3< T > | center () const |
| Gets center point of bounding-box. More...
|
|
Vector3< T > | extent () const |
| Gets extent of bounding-box. More...
|
|
Vector3< T > | size () const |
| Gets diagonal size of bounding-box. More...
|
|
Vector3< T > | point (size_t i) const |
| Gets all 8 corner-points of bounding box. More...
|
|
Aabb3< T > | transformed (const Matrix4< T > &t) const |
| Gets transformed bounding-box by transform t. More...
|
|
template<typename RhsT > |
bool | operator== (const Aabb3< RhsT > &rhs) const |
| Tests if rhs is equal to this bounding-box. More...
|
|
template<typename RhsT > |
bool | operator!= (const Aabb3< RhsT > &rhs) const |
| Tests if rhs is not equal to this bounding-box. More...
|
|
Aabb3< T > | operator* (const Matrix4< T > &rhs) const |
| Gets transformed bounding-box by transform rhs. More...
|
|
Aabb3< T > & | operator*= (const Matrix4< T > &rhs) |
| Apply transform rhs to this bounding-box. More...
|
|
template<typename SrcT > |
Aabb3< T > & | operator<< (const Vector3< SrcT > &rhs) |
| Extends this bounding-box by point rhs. More...
|
|
template<typename SrcT > |
Aabb3< T > & | operator<< (const Aabb3< SrcT > &rhs) |
| Extends this bounding-box by box rhs. More...
|
|
template<typename RhsT > |
Aabb3< T > | operator| (const Aabb3< RhsT > &rhs) const |
| Union of this and rhs bounding-boxes. More...
|
|
template<typename RhsT > |
Aabb3< T > | operator & (const Aabb3< RhsT > &rhs) const |
| Intersection of this and rhs bounding-boxed. More...
|
|
template<typename T>
class Aabb3< T >
Axes-aligned bounding-box (aka AABB) class.
This class provides functionality for:
- creating AABB from point, or other AABB,
- testing if point of other AABB intersects with,
- getting result of intersection with other AABB,
- transforming AABB with 4x4 matrix.
There are also overloaded couple of operators to shorten common operation. For instance you can use operator<<
on AABB to extend it with passed point or other AABB.