standard 3D axis-aligned rectangle (also called axis-aligned bounding box, AABB) More...
#include <geometry_3d.h>
Public Types | |
enum | eConstants { eMaxCorners = 8, eMaxEdges = 12 } |
Public Member Functions | |
void | clear (void) throw () |
void | dump (IN const char *title) const throw () |
bool | isValid (void) const throw () |
void | validate (IN const char *msg=NULL) const throw () |
bool | containsPoint (IN const point3d_t &p) const throw () |
bool | intersectsRect (IN const rect3d_t &r) const throw () |
bool | containsRect (IN const rect3d_t &r) const throw () |
void | expand (IN const rect3d_t &r) throw () |
void | inflate (IN float r) throw () |
void | setToPoint (IN const point3d_t &p) throw () |
void | includePoint (IN const point3d_t &p) throw () |
void | getBoundingRectForSphere (IN const point3d_t ¢er, IN float radius) throw () |
point3d_t | getMidpoint (void) const throw () |
float | getDiagonal (void) const throw () |
void | restrictPoint (IO point3d_t &p) const throw () |
restricts the given point to be within the rectangle | |
point3d_t | getCorner (IN int index) const throw () |
given an index 0 <= index <= eMaxCorners, returns the corner point | |
void | getEdge (IN int index, OUT point3d_t &p0, OUT point3d_t &p1) const throw () |
given an index 0 <= index <= eMaxEdges, returns the two edge endpoints | |
void | translate (IN const point3d_t &delta) throw () |
Public Attributes | |
float | x0 |
float | y0 |
float | z0 |
float | x1 |
float | y1 |
float | z1 |
standard 3D axis-aligned rectangle (also called axis-aligned bounding box, AABB)
Definition at line 172 of file geometry_3d.h.
enum rect3d_t::eConstants |
Definition at line 174 of file geometry_3d.h.
void rect3d_t::clear | ( | void | ) | throw () [inline] |
Definition at line 180 of file geometry_3d.h.
void rect3d_t::dump | ( | IN const char * | title | ) | const throw () [inline] |
Definition at line 184 of file geometry_3d.h.
bool rect3d_t::isValid | ( | void | ) | const throw () [inline] |
Definition at line 189 of file geometry_3d.h.
void rect3d_t::validate | ( | IN const char * | msg = NULL |
) | const throw () [inline] |
Definition at line 193 of file geometry_3d.h.
bool rect3d_t::containsPoint | ( | IN const point3d_t & | p | ) | const throw () [inline] |
Definition at line 200 of file geometry_3d.h.
bool rect3d_t::intersectsRect | ( | IN const rect3d_t & | r | ) | const throw () [inline] |
Definition at line 206 of file geometry_3d.h.
bool rect3d_t::containsRect | ( | IN const rect3d_t & | r | ) | const throw () [inline] |
Definition at line 217 of file geometry_3d.h.
void rect3d_t::expand | ( | IN const rect3d_t & | r | ) | throw () [inline] |
Definition at line 226 of file geometry_3d.h.
void rect3d_t::inflate | ( | IN float | r | ) | throw () [inline] |
Definition at line 244 of file geometry_3d.h.
void rect3d_t::setToPoint | ( | IN const point3d_t & | p | ) | throw () [inline] |
Definition at line 250 of file geometry_3d.h.
void rect3d_t::includePoint | ( | IN const point3d_t & | p | ) | throw () [inline] |
Definition at line 256 of file geometry_3d.h.
void rect3d_t::getBoundingRectForSphere | ( | IN const point3d_t & | center, | |
IN float | radius | |||
) | throw () [inline] |
Definition at line 271 of file geometry_3d.h.
point3d_t rect3d_t::getMidpoint | ( | void | ) | const throw () [inline] |
Definition at line 282 of file geometry_3d.h.
float rect3d_t::getDiagonal | ( | void | ) | const throw () [inline] |
Definition at line 288 of file geometry_3d.h.
void rect3d_t::restrictPoint | ( | IO point3d_t & | p | ) | const throw () [inline] |
restricts the given point to be within the rectangle
Definition at line 297 of file geometry_3d.h.
point3d_t rect3d_t::getCorner | ( | IN int | index | ) | const throw () |
given an index 0 <= index <= eMaxCorners, returns the corner point
Definition at line 122 of file geometry_3d.cpp.
given an index 0 <= index <= eMaxEdges, returns the two edge endpoints
Definition at line 145 of file geometry_3d.cpp.
void rect3d_t::translate | ( | IN const point3d_t & | delta | ) | throw () [inline] |
Definition at line 322 of file geometry_3d.h.
float rect3d_t::x0 |
Definition at line 332 of file geometry_3d.h.
float rect3d_t::y0 |
Definition at line 333 of file geometry_3d.h.
float rect3d_t::z0 |
Definition at line 334 of file geometry_3d.h.
float rect3d_t::x1 |
Definition at line 335 of file geometry_3d.h.
float rect3d_t::y1 |
Definition at line 336 of file geometry_3d.h.
float rect3d_t::z1 |
Definition at line 337 of file geometry_3d.h.