#include <OgreAxisAlignedBox.h>
Public Member Functions | |
AxisAlignedBox () | |
AxisAlignedBox (const Vector3 &min, const Vector3 &max) | |
AxisAlignedBox (Real mx, Real my, Real mz, Real Mx, Real My, Real Mz) | |
const Vector3 & | getMinimum (void) const |
Gets the minimum corner of the box. | |
const Vector3 & | getMaximum (void) const |
Gets the maximum corner of the box. | |
void | setMinimum (const Vector3 &vec) |
Sets the minimum corner of the box. | |
void | setMinimum (Real x, Real y, Real z) |
void | setMaximum (const Vector3 &vec) |
Sets the maximum corner of the box. | |
void | setMaximum (Real x, Real y, Real z) |
void | setExtents (const Vector3 &min, const Vector3 &max) |
Sets both minimum and maximum extents at once. | |
void | setExtents (Real mx, Real my, Real mz, Real Mx, Real My, Real Mz) |
const Vector3 * | getAllCorners (void) const |
Returns a pointer to an array of 8 corner points, useful for collision vs. | |
void | merge (const AxisAlignedBox &rhs) |
Merges the passed in box into the current box. | |
void | merge (const Vector3 &point) |
Extends the box to encompass the specified point (if needed). | |
void | transform (const Matrix4 &matrix) |
Transforms the box according to the matrix supplied. | |
void | setNull () |
Sets the box to a 'null' value i.e. | |
bool | isNull (void) const |
Returns true if the box is null i.e. | |
bool | intersects (const AxisAlignedBox &b2) const |
Returns whether or not this box intersects another. | |
AxisAlignedBox | intersection (const AxisAlignedBox &b2) const |
Calculate the area of intersection of this box and another. | |
Real | volume (void) const |
Calculate the volume of this box. | |
void | scale (const Vector3 &s) |
Scales the AABB by the vector given. | |
bool | intersects (const Sphere &s) const |
Tests whether this box intersects a sphere. | |
bool | intersects (const Plane &p) const |
Tests whether this box intersects a plane. | |
bool | intersects (const Vector3 &v) const |
Tests whether the vector point is within this box. | |
Vector3 | getCenter (void) const |
Gets the centre of the box. | |
Protected Member Functions | |
void | updateCorners (void) |
Internal method for updating corner points. | |
Protected Attributes | |
Vector3 | mMinimum |
Vector3 | mMaximum |
bool | mNull |
Vector3 | mCorners [8] |
Friends | |
std::ostream & | operator<< (std::ostream &o, AxisAlignedBox aab) |
Definition at line 45 of file OgreAxisAlignedBox.h.
|
Definition at line 75 of file OgreAxisAlignedBox.h. |
|
Definition at line 83 of file OgreAxisAlignedBox.h. |
|
Definition at line 88 of file OgreAxisAlignedBox.h. References Ogre::Real. |
|
Returns a pointer to an array of 8 corner points, useful for collision vs. non-aligned objects.
Definition at line 195 of file OgreAxisAlignedBox.h. Referenced by Ogre::PlaneBoundedVolume::intersects(). |
|
Gets the centre of the box.
Definition at line 427 of file OgreAxisAlignedBox.h. |
|
Gets the maximum corner of the box.
Definition at line 104 of file OgreAxisAlignedBox.h. Referenced by intersection(). |
|
Gets the minimum corner of the box.
Definition at line 97 of file OgreAxisAlignedBox.h. Referenced by intersection(). |
|
Calculate the area of intersection of this box and another.
Definition at line 344 of file OgreAxisAlignedBox.h. References getMaximum(), getMinimum(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Tests whether the vector point is within this box.
Definition at line 420 of file OgreAxisAlignedBox.h. References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Tests whether this box intersects a plane.
Definition at line 415 of file OgreAxisAlignedBox.h. |
|
Tests whether this box intersects a sphere.
Definition at line 410 of file OgreAxisAlignedBox.h. |
|
Returns whether or not this box intersects another.
Definition at line 317 of file OgreAxisAlignedBox.h. References isNull(), mMaximum, mMinimum, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Returns true if the box is null i.e. empty. Definition at line 311 of file OgreAxisAlignedBox.h. Referenced by Ogre::PlaneBoundedVolume::intersects(), and intersects(). |
|
Extends the box to encompass the specified point (if needed).
Definition at line 248 of file OgreAxisAlignedBox.h. |
|
Merges the passed in box into the current box. The result is the box which encompasses both. Definition at line 221 of file OgreAxisAlignedBox.h. References Ogre::Vector3::makeCeil(), Ogre::Vector3::makeFloor(), mMaximum, mMinimum, and mNull. |
|
Scales the AABB by the vector given.
Definition at line 401 of file OgreAxisAlignedBox.h. |
|
Definition at line 155 of file OgreAxisAlignedBox.h. References Ogre::Real. |
|
Sets both minimum and maximum extents at once.
Definition at line 147 of file OgreAxisAlignedBox.h. |
|
Definition at line 136 of file OgreAxisAlignedBox.h. References Ogre::Real. |
|
Sets the maximum corner of the box.
Definition at line 129 of file OgreAxisAlignedBox.h. |
|
Definition at line 118 of file OgreAxisAlignedBox.h. References Ogre::Real. |
|
Sets the minimum corner of the box.
Definition at line 111 of file OgreAxisAlignedBox.h. |
|
Sets the box to a 'null' value i.e. not a box. Definition at line 304 of file OgreAxisAlignedBox.h. |
|
Transforms the box according to the matrix supplied.
Definition at line 268 of file OgreAxisAlignedBox.h. References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Internal method for updating corner points.
Definition at line 56 of file OgreAxisAlignedBox.h. |
|
Calculate the volume of this box.
Definition at line 386 of file OgreAxisAlignedBox.h. References Ogre::Real, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Definition at line 201 of file OgreAxisAlignedBox.h. |
|
Definition at line 52 of file OgreAxisAlignedBox.h. |
|
Definition at line 49 of file OgreAxisAlignedBox.h. Referenced by intersects(), and merge(). |
|
Definition at line 48 of file OgreAxisAlignedBox.h. Referenced by intersects(), and merge(). |
|
Definition at line 50 of file OgreAxisAlignedBox.h. Referenced by merge(). |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:38:07 2006