|
My Project
|
This structure implements the boundary nodes of an axis-aligned bounding box. More...
#include <CCollisionAABBBox.h>
Public Member Functions | |
| cCollisionAABBBox () | |
| Default constructor of cCollisionAABBBox. | |
| cCollisionAABBBox (const cVector3d &a_min, const cVector3d &a_max) | |
| Constructor of cCollisionAABBBox. | |
| virtual | ~cCollisionAABBBox () |
| Destructor of cCollisionAABBBox. | |
| cVector3d | getCenter () const |
| This method returns the center of the boundary box. | |
| cVector3d | getExtent () const |
| This method returns the extent (half the width) of the boundary box. | |
| void | setCenter (const cVector3d &a_center) |
| This method sets the center of the boundary box. | |
| void | setExtent (const cVector3d &a_extent) |
| This method sets the extent (half the width) of the boundary box. | |
| void | setValue (const cVector3d &a_min, const cVector3d &a_max) |
| This method initializes the boundary box by passing a minimum and maximum point. | |
| bool | intersect (const cCollisionAABBBox &a_box) const |
| This method determines whether this box and an input box passed as argument intersect each other. | |
| bool | intersect (const cVector3d &a_segmentPointA, const cVector3d &a_segmentPointB) const |
| This method determines whether the given ray intersects the boundary box. | |
| bool | contains (const cVector3d &a_point) const |
| This method tests whether this box contains a point passed as argument. | |
| void | enclose (const cCollisionAABBBox &a_boxA, const cCollisionAABBBox &a_boxB) |
| This method initializes the boundary box to bound two given boundary boxes passed as argument. | |
| void | enclose (const cVector3d &a_point) |
| This method resizes the boundary box to bound a new point passed as argument. | |
| void | enclose (const cCollisionAABBBox &a_box) |
| This method resizes the boundary box to bound a new point passed as argument. | |
| void | setEmpty () |
| This method empties this boundary box. | |
| double | getLowerX () const |
| This method returns the smallest coordinate along X axis. | |
| double | getUpperX () const |
| This method returns the largest coordinate along X axis. | |
| double | getLowerY () const |
| This method returns the smallest coordinate along Y axis. | |
| double | getUpperY () const |
| This method returns the largest coordinate along Y axis. | |
| double | getLowerZ () const |
| This returns the smallest coordinate along Z axis. | |
| double | getUpperZ () const |
| This method return the largest coordinate along Z axis. | |
| int | getLongestAxis () const |
| This method returns the index of the longest axis of the boundary box. | |
| void | render () |
| This method renders graphically the edges of the boundary box. | |
Public Attributes | |
| cVector3d | m_center |
| The center of the boundary box. | |
| cVector3d | m_extent |
| The extent (half the width) of the boundary box. | |
| cVector3d | m_min |
| The minimum point (along each axis) of the boundary box. | |
| cVector3d | m_max |
| The maximum point (along each axis) of the boundary box. | |
This structure implements the data variables and methods necessary to model an axis-aligned bounding box. These methods are used by the general AABB collision detection algorithm (See class cCollisionAABB).
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
This method returns the center of the boundary box.
|
inline |
This method returns the extent (half the width) of the boundary box.
|
inline |
This method sets the center of the boundary box.
| a_center | Center of boundary box. |
|
inline |
This method sets the extent (half the width) of the boundary box.
| a_extent | Boundary box extent. |
|
inline |
This method initializes the boundary box by passing a minimum and maximum point passed as arguments.
| a_min | Minimum point of boundary box. |
| a_max | Maximum point of boundary box. |
|
inline |
This method determines whether this box and an input box passed as argument intersect each other.
| a_box | Input box. |
|
inline |
This method determines whether the given ray intersects the boundary box. Based on code by Andrew Woo from "Graphics Gems", Academic Press, 1990.
| a_segmentPointA | Initial point of segment. |
| a_segmentPointB | End point of segment. |
|
inline |
This method tests whether this box contains a point a_point passed as argument.
| a_point | Point to be tested. |
|
inline |
This method initializes the boundary box to bound two given boundary boxes passed as argument.
| a_boxA | The first boundary box to be enclosed. |
| a_boxB | The second boundary box to be enclosed. |
|
inline |
This method resizes the boundary box to bound a new point a_point passed as argument.
| a_point | Point to be enclosed. |
|
inline |
This method resizes the boundary box to bound a new point passed as argument.
| a_box | Box to be enclosed in this boundary box. |
|
inline |
This method empties this boundary box.
|
inline |
This method returns the smallest coordinate along X axis.
|
inline |
This method returns the largest coordinate along X axis.
|
inline |
This method returns the smallest coordinate along Y axis.
|
inline |
This method returns the largest coordinate along Y axis.
|
inline |
This returns the smallest coordinate along Z axis.
|
inline |
This method return the largest coordinate along Z axis.
|
inline |
This method returns the index of the longest axis of the boundary box.
|
inline |
This method renders graphically using OpenGL the edges of the boundary box.
| cVector3d chai3d::cCollisionAABBBox::m_center |
| cVector3d chai3d::cCollisionAABBBox::m_extent |
| cVector3d chai3d::cCollisionAABBBox::m_min |
| cVector3d chai3d::cCollisionAABBBox::m_max |