11 #ifndef _CS237_AABB_HXX_
12 #define _CS237_AABB_HXX_
15 # error "c237-aabb.hxx should not be included directly"
28 AABB () : _min(), _max(), _empty(true) {}
29 AABB (
AABB const & bbox) : _min(bbox._min), _max(bbox._max), _empty(bbox._empty) {}
30 AABB (
vec3<T> const &pt) : _min(pt), _max(pt), _empty(false) {}
87 std::ostream& operator<< (std::ostream& s, __detail::AABB<T>
const &bb);
T minX() const
minimum X-coordinate of the box
Definition: cs237-aabb.inl:100
bool _empty
Definition: cs237-aabb.hxx:26
T maxZ() const
maximum Z-coordinate of the box
Definition: cs237-aabb.inl:135
T maxY() const
maximum Y-coordinate of the box
Definition: cs237-aabb.inl:128
__detail::AABB< double > AABBd
Double-precision axis-aligned bounding boxes.
Definition: cs237-aabb.hxx:94
bool isEmpty() const
is the box empty
Definition: cs237-aabb.inl:23
vec3< T > corner(int i) const
Definition: cs237-aabb.inl:144
Axis-Aligned Bounding Box.
Definition: cs237-aabb.hxx:24
vec3< T > const & max() const
maximum extents of the box
Definition: cs237-aabb.inl:93
void addPt(vec3< T > const &pt)
extend this box as necessary to include the point
Definition: cs237-aabb.inl:62
AABB()
Definition: cs237-aabb.hxx:28
bool includesPt(vec3< T > const &pt) const
is a point inside the box?
Definition: cs237-aabb.inl:36
T minY() const
minimum Y-coordinate of the box
Definition: cs237-aabb.inl:107
vec3< T > const & min() const
minimum extents of the box
Definition: cs237-aabb.inl:86
T distanceToPt(vec3< T > const &pt) const
distance to a point; will be 0.0 if the point is inside the box
Definition: cs237-aabb.inl:45
AABB & operator+=(AABB const &bb)
Definition: cs237-aabb.inl:181
void clear()
clear the box (i.e., make it empty)
Definition: cs237-aabb.inl:30
T minZ() const
minimum Z-coordinate of the box
Definition: cs237-aabb.inl:114
Definition: cs237-aabb.hxx:18
template class for three-element vectors
Definition: cs237-types.hxx:26
T maxX() const
maximum X-coordinate of the box
Definition: cs237-aabb.inl:121
AABB(AABB const &bbox)
Definition: cs237-aabb.hxx:29
AABB(vec3< T > const &min, vec3< T > const &max)
Definition: cs237-aabb.hxx:31
vec3< T > _max
Definition: cs237-aabb.hxx:25
AABB(vec3< T > const &pt)
Definition: cs237-aabb.hxx:30
vec3< T > _min
Definition: cs237-aabb.hxx:25
vec3< T > center() const
center of the box
Definition: cs237-aabb.inl:79
__detail::AABB< float > AABBf
Single-precision axis-aligned bounding boxes.
Definition: cs237-aabb.hxx:92