#include <OgreAxisAlignedBox.h>
Public Types | |
| enum | Extent { EXTENT_NULL, EXTENT_FINITE, EXTENT_INFINITE } |
| enum | CornerEnum { FAR_LEFT_BOTTOM = 0, FAR_LEFT_TOP = 1, FAR_RIGHT_TOP = 2, FAR_RIGHT_BOTTOM = 3, NEAR_RIGHT_BOTTOM = 7, NEAR_LEFT_BOTTOM = 6, NEAR_LEFT_TOP = 5, NEAR_RIGHT_TOP = 4 } |
Public Member Functions | |
| AxisAlignedBox () | |
| AxisAlignedBox (Extent e) | |
| AxisAlignedBox (const AxisAlignedBox &rkBox) | |
| AxisAlignedBox (const Vector3 &min, const Vector3 &max) | |
| AxisAlignedBox (Real mx, Real my, Real mz, Real Mx, Real My, Real Mz) | |
| AxisAlignedBox & | operator= (const AxisAlignedBox &rhs) |
| ~AxisAlignedBox () | |
| const Vector3 & | getMinimum (void) const |
| Gets the minimum corner of the box. | |
| Vector3 & | getMinimum (void) |
| Gets a modifiable version of the minimum corner of the box. | |
| const Vector3 & | getMaximum (void) const |
| Gets the maximum corner of the box. | |
| Vector3 & | getMaximum (void) |
| Gets a modifiable version of 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 | setMinimumX (Real x) |
| Changes one of the components of the minimum corner of the box used to resize only one dimension of the box. | |
| void | setMinimumY (Real y) |
| void | setMinimumZ (Real z) |
| void | setMaximum (const Vector3 &vec) |
| Sets the maximum corner of the box. | |
| void | setMaximum (Real x, Real y, Real z) |
| void | setMaximumX (Real x) |
| Changes one of the components of the maximum corner of the box used to resize only one dimension of the box. | |
| void | setMaximumY (Real y) |
| void | setMaximumZ (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. | |
| Vector3 | getCorner (CornerEnum cornerToGet) const |
| gets the position of one of the corners | |
| 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 | transformAffine (const Matrix4 &m) |
| Transforms the box according to the affine 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 | isFinite (void) const |
| Returns true if the box is finite. | |
| void | setInfinite () |
| Sets the box to 'infinite'. | |
| bool | isInfinite (void) const |
| Returns true if the box is infinite. | |
| 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. | |
| Vector3 | getSize (void) const |
| Gets the size of the box. | |
| Vector3 | getHalfSize (void) const |
| Gets the half-size of the box. | |
| bool | contains (const Vector3 &v) const |
| Tests whether the given point contained by this box. | |
| bool | contains (const AxisAlignedBox &other) const |
| Tests whether another box contained by this box. | |
| bool | operator== (const AxisAlignedBox &rhs) const |
| Tests 2 boxes for equality. | |
| bool | operator!= (const AxisAlignedBox &rhs) const |
| Tests 2 boxes for inequality. | |
Static Public Attributes | |
| static const AxisAlignedBox | BOX_NULL |
| static const AxisAlignedBox | BOX_INFINITE |
Protected Attributes | |
| Vector3 | mMinimum |
| Vector3 | mMaximum |
| Extent | mExtent |
| Vector3 * | mpCorners |
Friends | |
| _OgreExport friend std::ostream & | operator<< (std::ostream &o, const AxisAlignedBox aab) |
Definition at line 49 of file OgreAxisAlignedBox.h.
|
|
Definition at line 76 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 52 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 86 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 93 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 100 of file OgreAxisAlignedBox.h. References isInfinite(), isNull(), mMaximum, and mMinimum. |
|
||||||||||||
|
Definition at line 110 of file OgreAxisAlignedBox.h. |
|
||||||||||||||||||||||||||||
|
Definition at line 115 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 135 of file OgreAxisAlignedBox.h. References Ogre::MEMCATEGORY_SCENE_CONTROL, and OGRE_FREE. |
|
|
Tests whether another box contained by this box.
Definition at line 759 of file OgreAxisAlignedBox.h. References isInfinite(), isNull(), mMaximum, mMinimum, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Tests whether the given point contained by this box.
Definition at line 745 of file OgreAxisAlignedBox.h. References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Returns a pointer to an array of 8 corner points, useful for collision vs. non-aligned objects.
Definition at line 296 of file OgreAxisAlignedBox.h. References Ogre::MEMCATEGORY_SCENE_CONTROL, and OGRE_ALLOC_T. |
|
|
Gets the centre of the box.
Definition at line 689 of file OgreAxisAlignedBox.h. Referenced by Ogre::PlaneBoundedVolume::intersects(). |
|
|
gets the position of one of the corners
Definition at line 324 of file OgreAxisAlignedBox.h. |
|
|
Gets the half-size of the box.
Definition at line 721 of file OgreAxisAlignedBox.h. References Ogre::Math::POS_INFINITY, and Ogre::Vector3::ZERO. Referenced by Ogre::PlaneBoundedVolume::intersects(). |
|
|
Gets a modifiable version of the maximum corner of the box.
Definition at line 167 of file OgreAxisAlignedBox.h. |
|
|
Gets the maximum corner of the box.
Definition at line 159 of file OgreAxisAlignedBox.h. Referenced by intersection(). |
|
|
Gets a modifiable version of the minimum corner of the box.
Definition at line 152 of file OgreAxisAlignedBox.h. |
|
|
Gets the minimum corner of the box.
Definition at line 144 of file OgreAxisAlignedBox.h. Referenced by intersection(). |
|
|
Gets the size of the box.
Definition at line 699 of file OgreAxisAlignedBox.h. References Ogre::Math::POS_INFINITY, and Ogre::Vector3::ZERO. |
|
|
Calculate the area of intersection of this box and another.
Definition at line 589 of file OgreAxisAlignedBox.h. References getMaximum(), getMinimum(), isInfinite(), isNull(), Ogre::Vector3::makeCeil(), Ogre::Vector3::makeFloor(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Tests whether the vector point is within this box.
Definition at line 668 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 663 of file OgreAxisAlignedBox.h. References Ogre::Math::intersects(). |
|
|
Tests whether this box intersects a sphere.
Definition at line 658 of file OgreAxisAlignedBox.h. References Ogre::Math::intersects(). |
|
|
Returns whether or not this box intersects another.
Definition at line 558 of file OgreAxisAlignedBox.h. |
|
|
Returns true if the box is finite.
Definition at line 538 of file OgreAxisAlignedBox.h. |
|
|
Returns true if the box is infinite.
Definition at line 552 of file OgreAxisAlignedBox.h. Referenced by AxisAlignedBox(), contains(), intersection(), Ogre::PlaneBoundedVolume::intersects(), and operator=(). |
|
|
Returns true if the box is null i.e. empty. Definition at line 531 of file OgreAxisAlignedBox.h. Referenced by AxisAlignedBox(), contains(), intersection(), Ogre::PlaneBoundedVolume::intersects(), and operator=(). |
|
|
Extends the box to encompass the specified point (if needed).
Definition at line 406 of file OgreAxisAlignedBox.h. |
|
|
Merges the passed in box into the current box. The result is the box which encompasses both. Definition at line 374 of file OgreAxisAlignedBox.h. References Ogre::Vector3::makeCeil(), Ogre::Vector3::makeFloor(), mExtent, mMaximum, and mMinimum. Referenced by Ogre::VisibleObjectsBoundsInfo::merge(). |
|
|
Tests 2 boxes for inequality.
Definition at line 791 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 122 of file OgreAxisAlignedBox.h. References isInfinite(), isNull(), mMaximum, and mMinimum. |
|
|
Tests 2 boxes for equality.
Definition at line 777 of file OgreAxisAlignedBox.h. |
|
|
Scales the AABB by the vector given.
Definition at line 645 of file OgreAxisAlignedBox.h. |
|
||||||||||||||||||||||||||||
|
Definition at line 253 of file OgreAxisAlignedBox.h. |
|
||||||||||||
|
Sets both minimum and maximum extents at once.
Definition at line 243 of file OgreAxisAlignedBox.h. References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Sets the box to 'infinite'.
Definition at line 545 of file OgreAxisAlignedBox.h. |
|
||||||||||||||||
|
Definition at line 215 of file OgreAxisAlignedBox.h. |
|
|
Sets the maximum corner of the box.
Definition at line 209 of file OgreAxisAlignedBox.h. |
|
|
Changes one of the components of the maximum corner of the box used to resize only one dimension of the box.
Definition at line 226 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 231 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 236 of file OgreAxisAlignedBox.h. |
|
||||||||||||||||
|
Definition at line 181 of file OgreAxisAlignedBox.h. |
|
|
Sets the minimum corner of the box.
Definition at line 175 of file OgreAxisAlignedBox.h. |
|
|
Changes one of the components of the minimum corner of the box used to resize only one dimension of the box.
Definition at line 192 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 197 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 202 of file OgreAxisAlignedBox.h. |
|
|
Sets the box to a 'null' value i.e. not a box. Definition at line 524 of file OgreAxisAlignedBox.h. Referenced by Ogre::VisibleObjectsBoundsInfo::reset(). |
|
|
Transforms the box according to the matrix supplied.
Definition at line 435 of file OgreAxisAlignedBox.h. References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Transforms the box according to the affine matrix supplied.
Definition at line 502 of file OgreAxisAlignedBox.h. References Ogre::Math::Abs(), Ogre::Matrix4::isAffine(), Ogre::Matrix4::transformAffine(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
|
Calculate the volume of this box.
Definition at line 622 of file OgreAxisAlignedBox.h. References Ogre::Math::POS_INFINITY, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
||||||||||||
|
Definition at line 349 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 798 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 797 of file OgreAxisAlignedBox.h. |
|
|
Definition at line 62 of file OgreAxisAlignedBox.h. Referenced by merge(), and operator==(). |
|
|
Definition at line 61 of file OgreAxisAlignedBox.h. Referenced by AxisAlignedBox(), contains(), merge(), operator=(), and operator==(). |
|
|
Definition at line 60 of file OgreAxisAlignedBox.h. Referenced by AxisAlignedBox(), contains(), merge(), operator=(), and operator==(). |
|
|
Definition at line 63 of file OgreAxisAlignedBox.h. |
Copyright © 2008 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat Apr 11 13:46:58 2009