![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
Axis-Aligned Bounding Box parameterized over the scalar type. More...
#include <aabb.hpp>
Public Types | |
| using | vec3 = glm::vec<3, T, glm::defaultp> |
Public Member Functions | |
| AABB () | |
| AABB (AABB const &bbox) | |
| AABB (vec3 const &pt) | |
| AABB (vec3 const &min, vec3 const &max) | |
| bool | isEmpty () const |
| is the box empty | |
| void | clear () |
| clear the box (i.e., make it empty) | |
| bool | includesPt (vec3 const &pt) const |
| is a point inside the box? | |
| T | distanceToPt (vec3 const &pt) const |
| distance to a point; will be 0.0 if the point is inside the box | |
| void | addPt (vec3 const &pt) |
| extend this box as necessary to include the point | |
| AABB & | operator+= (AABB const &bb) |
| AABB & | operator+= (vec3 const &pt) |
| vec3 const & | min () const |
| minimum extents of the box | |
| vec3 const & | max () const |
| maximum extents of the box | |
| vec3 | center () const |
| center of the box | |
| T | minX () const |
| minimum X-coordinate of the box | |
| T | minY () const |
| minimum Y-coordinate of the box | |
| T | minZ () const |
| minimum Z-coordinate of the box | |
| T | maxX () const |
| maximum X-coordinate of the box | |
| T | maxY () const |
| maximum Y-coordinate of the box | |
| T | maxZ () const |
| maximum Z-coordinate of the box | |
| vec3 | corner (int i) const |
| std::array< vec3, 8 > | corners () const |
| return an array of the corners of the box | |
Public Attributes | |
| vec3 | _min |
| vec3 | _max |
| bool | _empty |
Axis-Aligned Bounding Box parameterized over the scalar type.
| using cs237::__detail::AABB< T >::vec3 = glm::vec<3, T, glm::defaultp> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
extend this box as necessary to include the point
|
inline |
center of the box
|
inline |
clear the box (i.e., make it empty)
|
inline |
return the coordinates of the i'th corner of the box, where _min is corner 0 and _max is corner 7.
|
inline |
return an array of the corners of the box
|
inline |
distance to a point; will be 0.0 if the point is inside the box
|
inline |
is a point inside the box?
|
inline |
is the box empty
|
inline |
maximum extents of the box
|
inline |
maximum X-coordinate of the box
|
inline |
maximum Y-coordinate of the box
|
inline |
maximum Z-coordinate of the box
|
inline |
minimum extents of the box
|
inline |
minimum X-coordinate of the box
|
inline |
minimum Y-coordinate of the box
|
inline |
minimum Z-coordinate of the box
|
inline |
merge the bounding box into this bounding box
| bb | the bounding box to merge into this box |
|
inline |
extend this box as necessary to include the point
| pt | the point to include in this box |
| bool cs237::__detail::AABB< T >::_empty |
| vec3 cs237::__detail::AABB< T >::_max |
| vec3 cs237::__detail::AABB< T >::_min |