|
| AABB2D () |
| Create a 2D axis-aligned bounding box with no extent centered about the origin. More...
|
|
| AABB2D (T newMin, T newMax) |
| Create a 2D axis-aligned bounding box with the specified minimum and maximum coodinates for both axes. More...
|
|
| AABB2D (T newXMin, T newXMax, T newYMin, T newYMax) |
| Create a 2D axis-aligned bounding box with the specified minimum and maximum coodinates. More...
|
|
| AABB2D (const VectorND< T, 2 > ¢er) |
| Create a 2D axis-aligned bounding box with the minimum and maximum coordinates equal to the specified vector. More...
|
|
| AABB2D (const VectorND< T, 2 > &newMin, const VectorND< T, 2 > &newMax) |
| Create a 2D axis-aligned bounding box with the specified minimum and maximum coodinates. More...
|
|
| AABB2D (const VectorND< T, 2 > *points, Size numPoints) |
| Create a 2D axis-aligned bounding box for the specified array of points. More...
|
|
template<typename U > |
| operator AABB2D< U > () const |
| Cast this bounding box to a bounding box with a different underlying primitive type. More...
|
|
Bool | contains (const AABB2D &bounds) const |
| Return whether or not this bounding box completely contains another. More...
|
|
Bool | contains (const VectorND< T, 2 > &coordinate) const |
| Return whether or not this bounding box contains the specified coordinate. More...
|
|
Bool | intersects (const AABB2D &bounds) const |
| Return whether or not this bounding box intersects another. More...
|
|
void | set (T newXMin, T newXMax, T newYMin, T newYMax) |
| Set the minimum and maximum coordinates of the axis-aligned bounding box. More...
|
|
T | getWidth () const |
| Return the difference between the maximum and minimum X coordinates. More...
|
|
T | getHeight () const |
| Return the difference between the maximum and minimum Y coordinates. More...
|
|
VectorND< T, 2 > | getSize () const |
| Return a vector indicating the axial distances between the minimum and maximum coordinate. More...
|
|
VectorND< T, 2 > | getDiagonal () const |
| Return the vector from the minimum coordinate to the maximum. More...
|
|
T | getRadius () const |
| Return the distance from the center to the farthest corner of the box. More...
|
|
VectorND< T, 2 > | getCenter () const |
| Return the center of the bounding box. More...
|
|
T | getArea () const |
| Return the area in square units enclosed by this 3D range. More...
|
|
const VectorND< T, 2 > & | getMinMax (Index i) const |
| Return either the minimal or maximal vertex of this AABB. More...
|
|
AABB1D< T > | getX () const |
| Return a 1D AABB for the X coordinate range of this AABB. More...
|
|
AABB1D< T > | getY () const |
| Return a 1D AABB for the Y coordinate range of this AABB. More...
|
|
void | enlargeFor (const VectorND< T, 2 > &point) |
| Modify the current bounding box such that it encloses the specified point. More...
|
|
void | enlargeFor (const AABB2D &bounds) |
| Modify the current bounding box such that it encloses the specified box. More...
|
|
AABB2D< T > & | operator|= (const VectorND< T, 2 > &point) |
| Modify the current bounding box such that it encloses the specified point. More...
|
|
AABB2D< T > | operator| (const VectorND< T, 2 > &point) const |
| Return the bounding box necessary to enclose a point and the current bounding box. More...
|
|
AABB2D< T > | getUnion (const AABB2D< T > &bounds) const |
| Return the union of this bounding box and another. More...
|
|
AABB2D< T > & | operator|= (const AABB2D< T > &bounds) |
| Modify this bounding box such that it contains the specified bounding box. More...
|
|
AABB2D< T > | operator| (const AABB2D< T > &bounds) const |
| Return the union of this bounding box and another. More...
|
|
AABB2D< T > | getIntersection (const AABB2D< T > &bounds) const |
| Return the intersection of this bounding box and another. More...
|
|
AABB2D< T > & | operator&= (const AABB2D< T > &bounds) |
| Return the intersection of this bounding box and another. More...
|
|
AABB2D< T > | operator& (const AABB2D< T > &bounds) const |
| Return the intersection of this bounding box and another. More...
|
|
Bool | operator== (const AABB2D< T > &other) const |
| Return whether or not this bounding box is exactly the same as another. More...
|
|
Bool | operator!= (const AABB2D< T > &other) const |
| Return whether or not this bounding box is different than another. More...
|
|
AABB2D< T > | operator* (T scale) const |
| Multiply the minimum and maximum coordinates of this bounding box by the specified scale factor. More...
|
|
AABB2D< T > | operator* (const VectorND< T, 2 > &scale) const |
| Multiply the minimum and maximum coordinates of this bounding box by the specified 2D scale factor. More...
|
|
AABB2D< T > | operator/ (T scale) const |
| Divide the minimum and maximum coordinates of this bounding box by the specified scale factor. More...
|
|
AABB2D< T > | operator/ (const VectorND< T, 2 > &scale) const |
| Divide the minimum and maximum coordinates of this bounding box by the specified 2D scale factor. More...
|
|
data::String | toString () const |
| Convert this 2D range into a human-readable string representation. More...
|
|
| operator data::String () const |
| Convert this 2D range into a human-readable string representation. More...
|
|
template<typename T>
class om::math::AABB2D< T >
A class that represents a range of values in 2D space.
This class contains two data members: min and max. These indicate the minimum and maximum coordinates that this axis-aligned bounding box represents. The class invariant is that min is less than max (on at least one dimension), though this is not enforced. The class supports union, containment, and intersection operations.