Class for working with an axis aligned bounding box.
More...
|
typedef comms::Bounds< float, 3 > | bounds_t |
|
|
| AABB () |
| Constructor for building an empty box. More...
|
|
const About & | about () const |
|
bool | operator== (const AABB &) const |
| Comparison. More...
|
|
Vec3 | min () const |
| Returns a corner with a minimal coord.
|
|
Vec3 | max () const |
| Returns a corner with a maximal coord.
|
|
Vec3 | size () const |
| Returns a size of box.
|
|
bool | empty () const |
| TRUE when box is empty.
|
|
bool | contains (const Vec3 &) const |
| Returns TRUE when point lies in this box. More...
|
|
bool | add (const Vec3 &) |
| Extends this box by point. Returns TRUE when box was extended. More...
|
|
AABB & | transform (const Mat4 &) |
| Transform box by matrix 4 x 4. More...
|
|
AABB | transformCopy (const Mat4 &) const |
|
Class for working with an axis aligned bounding box.
- Since
- 4.5.32
coat::scripto::AABB::AABB |
( |
| ) |
|
|
inline |
Constructor for building an empty box.
- See Also
- empty()
bool coat::scripto::AABB::operator== |
( |
const AABB & |
| ) |
const |
bool coat::scripto::AABB::contains |
( |
const Vec3 & |
| ) |
const |
Returns TRUE
when point lies in this box.
Vec3 p( 1, 3, 9 );
...
if ( a.contains( p ) ) { ... }
bool coat::scripto::AABB::add |
( |
const Vec3 & |
| ) |
|
Extends this box by point. Returns TRUE
when box was extended.
a.add( Vec3( -10, -30, -90 ) );
a.add( Vec3( 90, 30, 10 ) );
a.add( Vec3( 9, 3, 1 ) );
AABB& coat::scripto::AABB::transform |
( |
const Mat4 & |
| ) |
|
Transform box by matrix 4 x 4.
Mat4 m;
...
a.transform( m );