class BoundingBox
Defined at line 14 of file ../../src/ui/lib/escher/geometry/bounding_box.h
Public Methods
void BoundingBox ()
Canonical representation of an empty box.
"Empty" means "no point can inhabit this box". It does not mean "zero volume" or "zero area",
which still admits a singleton point inhabitant, or point inhabitants along a line.
Defined at line 23 of file ../../src/ui/lib/escher/geometry/bounding_box.h
const vec3 & min ()
Defined at line 29 of file ../../src/ui/lib/escher/geometry/bounding_box.h
const vec3 & max ()
Defined at line 30 of file ../../src/ui/lib/escher/geometry/bounding_box.h
void BoundingBox (vec3 min, vec3 max)
Non-empty box. No error-checking; it is up to the caller to ensure that
all components of max are >= the corresponding component of min.
Defined at line 31 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
bool operator== (const BoundingBox & box)
Defined at line 32 of file ../../src/ui/lib/escher/geometry/bounding_box.h
bool operator!= (const BoundingBox & box)
Defined at line 33 of file ../../src/ui/lib/escher/geometry/bounding_box.h
float width ()
Defined at line 42 of file ../../src/ui/lib/escher/geometry/bounding_box.h
BoundingBox NewChecked (vec3 min, vec3 max, uint32_t max_degenerate_dimensions)
Return an empty box if max
<
min along any of the coordinate axes,
or if max == min along more than |max_degenerate_dimensions| of the
coordinate axes. Otherwise return a non-empty box.
Defined at line 42 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
float height ()
Defined at line 43 of file ../../src/ui/lib/escher/geometry/bounding_box.h
float depth ()
Defined at line 44 of file ../../src/ui/lib/escher/geometry/bounding_box.h
vec3 extent ()
Defined at line 46 of file ../../src/ui/lib/escher/geometry/bounding_box.h
bool Contains (const BoundingBox & box)
Return true if the other box is completely contained by this one.
Defined at line 49 of file ../../src/ui/lib/escher/geometry/bounding_box.h
BoundingBox & Join (const BoundingBox & box)
Expand this bounding box to encompass the other. Return this box.
Defined at line 55 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
bool Contains (const vec4 & point)
Defined at line 56 of file ../../src/ui/lib/escher/geometry/bounding_box.h
BoundingBox & Intersect (const BoundingBox & box)
Shrink this box to be the intersection of this with the other. If the
boxes do not intersect, this box becomes empty. Return this box.
Defined at line 66 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
bool is_empty ()
See definition of "empty box" in the default constructor.
Defined at line 67 of file ../../src/ui/lib/escher/geometry/bounding_box.h
uint32_t NumClippedCorners (const plane2 & plane, const float_t & epsilon)
Return the number of bounding box corners that are clipped by the
specified plane (between 0 and 8). Since this is a 2D plane, the z
coordinate is ignored, and only 4 corners need to be tested.
Defined at line 143 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
uint32_t NumClippedCorners (const plane3 & plane, const float_t & epsilon)
Return the number of bounding box corners that are clipped by the
specified plane (between 0 and 8).
Defined at line 153 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
std::vector<plane3> CreatePlanes ()
Defined at line 116 of file ../../src/ui/lib/escher/geometry/bounding_box.cc
mat4 CreateTransform ()
Generates a matrix based on the min/max value of the current bounding box that would,
if applied to a unit cube, scale/translate that cube to be the exact size and shape
of the existing bounding box.
Defined at line 137 of file ../../src/ui/lib/escher/geometry/bounding_box.cc