#include <AABB.h>
Public Member Functions | |
| AABB (void) | |
| ~AABB (void) | |
| AABB (const AABB &rhs) | |
| AABB & | operator= (const AABB &rhs) |
| AABB (const ml7::Vector2 ¢er, const ml7::Vector2 &half_width) | |
| ml7::Vector2 | get_min () const |
| ml7::Vector2 | get_max () const |
| bool | overlaps (const AABB &aabb) const |
| bool | overlaps (const BoundingSphere &bs) const |
| bool | contains (const ml7::Vector2 &v) const |
| bool | contains (const AABB &aabb) const |
| bool | contains (const BoundingSphere &bs) const |
| BoundingVolume & | include (const ml7::Vector2 &v) |
| BoundingVolume & | include (const AABB &aabb) |
| BoundingVolume & | include (const BoundingSphere &bs) |
An axis-aligned bounding box (AABB) is a non-rotatable rectangle always aligned to the axis. It is defined by a center point and a half-width vector representing the extent of each of the axes. Its main purpose is to encapsulate another geometry object, preferably a rotatable one of higher complexity.
| bl7::geometry2::AABB::AABB | ( | void | ) | [inline] |
Default constructor.
| bl7::geometry2::AABB::~AABB | ( | void | ) | [inline] |
Destructor.
| bl7::geometry2::AABB::AABB | ( | const AABB & | rhs | ) | [inline] |
Copy constructor.
| bl7::geometry2::AABB::AABB | ( | const ml7::Vector2 & | center, | |
| const ml7::Vector2 & | half_width | |||
| ) | [inline] |
Explicit constructor: box from center point and the half-width vector.
| bool bl7::geometry2::AABB::contains | ( | const BoundingSphere & | bs | ) | const [virtual] |
Checks whether this AABB contains a given bounding sphere.
Implements bl7::geometry2::BoundingVolume.
| bool bl7::geometry2::AABB::contains | ( | const AABB & | aabb | ) | const |
| bool bl7::geometry2::AABB::contains | ( | const ml7::Vector2 & | v | ) | const [virtual] |
Checks whether this AABB contains a given point.
Implements bl7::geometry2::BoundingVolume.
| ml7::Vector2 bl7::geometry2::AABB::get_max | ( | ) | const [inline] |
Returns the maximum components of each axes (the AABB should be normalized).
| ml7::Vector2 bl7::geometry2::AABB::get_min | ( | ) | const [inline] |
Returns the minimum components of each axes (the AABB should be normalized).
| BoundingVolume & bl7::geometry2::AABB::include | ( | const BoundingSphere & | bs | ) | [virtual] |
Updates this AABB so that it contains a given bounding sphere.
Implements bl7::geometry2::BoundingVolume.
| BoundingVolume & bl7::geometry2::AABB::include | ( | const AABB & | aabb | ) |
| BoundingVolume & bl7::geometry2::AABB::include | ( | const ml7::Vector2 & | v | ) | [virtual] |
Updates this AABB so that it contains a given point.
Implements bl7::geometry2::BoundingVolume.
Copy assignment operator.
Reimplemented from bl7::geometry2::Box.
| bool bl7::geometry2::AABB::overlaps | ( | const BoundingSphere & | bs | ) | const [virtual] |
Checks whether a given bounding sphere and this AABB overlap.
Implements bl7::geometry2::BoundingVolume.
| bool bl7::geometry2::AABB::overlaps | ( | const AABB & | aabb | ) | const |
Checks whether a given AABB and this overlap.
1.6.1