|
Graphite Version 3
An experimental 3D geometry processing program
|
Axis-aligned bounding box. More...
#include <geogram/basic/geometry.h>
Public Member Functions | |
| Box () | |
| Constructs an uninitialized box. | |
| Box (double x1, double y1, double z1, double x2, double y2, double z2) | |
| Constructs a box from lower and upper bounds. | |
| Box (const vec3 &lo, const vec3 &hi) | |
| Constructs a box from lower and upper bounds. | |
| vec3 | lo () const |
| Gets the lower bounds. | |
| vec3 | hi () const |
| Gets the higher bounds. | |
| bool | contains (const vec3 &b) const |
| Tests whether a box contains a point. | |
| void | enlarge (double d) |
| Enlarges the box. | |
| void | clear () |
| Makes this box empty. | |
| void | add (const vec3 &p) |
| Adds a point to this box. | |
Public Attributes | |
| double | xyz_min [3] |
| double | xyz_max [3] |
Axis-aligned bounding box.
Definition at line 689 of file geometry.h.
|
inline |
Constructs an uninitialized box.
Please note that the box is uninitialized. One may call clear() to get an initialized empty box.
Definition at line 699 of file geometry.h.
|
inline |
Constructs a box from lower and upper bounds.
| [in] | x1,y1,z1 | the lower bounds |
| [in] | x2,y2,z2 | the upper bounds |
Definition at line 707 of file geometry.h.
Constructs a box from lower and upper bounds.
Definition at line 721 of file geometry.h.
|
inline |
Adds a point to this box.
| [in] | p | a const reference to the point to be added |
The box is the smallest axis-aligned box enclosing all added points
Definition at line 796 of file geometry.h.
|
inline |
Makes this box empty.
Initializes the lower bounds to the greatest floating point number and the higher bounds to minus the greatest floating point number
Definition at line 783 of file geometry.h.
|
inline |
Tests whether a box contains a point.
| [in] | b | the point |
b, false otherwise Definition at line 751 of file geometry.h.
|
inline |
Enlarges the box.
| [in] | d | the amount that should be subtracted from the lower bounds and added to the upper bounds |
Definition at line 768 of file geometry.h.
|
inline |
Gets the higher bounds.
Definition at line 742 of file geometry.h.
|
inline |
| double GEO::Box::xyz_max[3] |
Definition at line 692 of file geometry.h.
| double GEO::Box::xyz_min[3] |
Definition at line 691 of file geometry.h.