Graphite
Version 3
An experimental 3D geometry processing program
|
A 2d axis aligned box. More...
#include <OGF/basic/math/geometry.h>
Public Member Functions | |
Box2d () | |
Constructs a new uninitialized Box2d. | |
void | add_point (const vec2 &p) |
Adds a point to this Box2d. More... | |
void | add_box (const Box2d &B) |
Adds a box to this Box2d. More... | |
double | width () const |
Gets the width of this box. More... | |
double | height () const |
Gets the height of this box. More... | |
double | x_min () const |
Gets the minimum x coordinate in this box. More... | |
double | x_max () const |
Gets the maximum x coordinate in this box. More... | |
double | y_min () const |
Gets the minimum y coordinate in this box. More... | |
double | y_max () const |
Gets the maximum y coordinate in this box. More... | |
bool | initialized () const |
Tests whether the box is initialized. More... | |
void | clear () |
Clears the box. | |
A 2d axis aligned box.
Definition at line 107 of file geometry.h.
|
inline |
Adds a box to this Box2d.
On exit, this box is replaced with the union of its previous value and B
.
[in] | B | a const reference to the box to be added. |
Definition at line 140 of file geometry.h.
|
inline |
Adds a point to this Box2d.
[in] | p | a const reference to the point to be added. |
Definition at line 120 of file geometry.h.
|
inline |
Gets the height of this box.
Definition at line 159 of file geometry.h.
|
inline |
Tests whether the box is initialized.
At creation, a box is uninitialized. It becomes initialized whenever a add_xxx() function is called.
Definition at line 213 of file geometry.h.
|
inline |
Gets the width of this box.
Definition at line 151 of file geometry.h.
|
inline |
Gets the maximum x coordinate in this box.
Result is undetermined if the box is not initialized.
Definition at line 181 of file geometry.h.
|
inline |
Gets the minimum x coordinate in this box.
Result is undetermined if the box is not initialized.
Definition at line 170 of file geometry.h.
|
inline |
Gets the maximum y coordinate in this box.
Result is undetermined if the box is not initialized.
Definition at line 203 of file geometry.h.
|
inline |
Gets the minimum y coordinate in this box.
Result is undetermined if the box is not initialized.
Definition at line 192 of file geometry.h.