Easy3D 2.5.3
|
GenericBox represents the bounding box of shapes. More...
#include <easy3d/core/box.h>
Public Types | |
typedef Vec< DIM, FT > | Point |
typedef Vec< DIM, FT > | Vector |
typedef GenericBox< DIM, FT > | thisclass |
Public Member Functions | |
GenericBox () | |
GenericBox (const Point &pmin, const Point &pmax) | |
GenericBox (const Point &c, FT r) | |
bool | is_valid () const |
void | clear () |
const Point & | min_point () const |
Point & | min_point () |
const Point & | max_point () const |
Point & | max_point () |
FT | min_coord (unsigned int axis) const |
FT | max_coord (unsigned int axis) const |
FT | range (unsigned int axis) const |
FT | max_range () const |
FT | min_range () const |
unsigned int | max_range_axis () const |
unsigned int | min_range_axis () const |
Point | center () const |
Vector | diagonal_vector () const |
FT | diagonal_length () const |
FT | radius () const |
FT | surface_area () const |
void | grow (const Point &p) |
void | grow (const thisclass &b) |
thisclass | operator+ (const thisclass &b) const |
thisclass & | operator+= (const thisclass &b) |
bool | contains (Point const &p) const |
bool | contains (thisclass const &b) const |
bool | intersects (thisclass const &b) const |
GenericBox represents the bounding box of shapes.
DIM | The dimension (i.e., 2 or 3). |
FT | The type of the floating point number (i.e., float or double). |
|
inline |
Construct a box uninitialized (which is invalid).
|
inline |
Construct a box from its diagonal corners.
|
inline |
Construct a box from its center and radius.
|
inline |
Return the center of the box.
|
inline |
Invalidate the box.
|
inline |
Does this box contain a point p
.
|
inline |
Does this box contain another box b
.
|
inline |
Return the length of the diagonal of the box.
|
inline |
Return the diagonal vector of the box.
|
inline |
Add a point to this box. This will compute its new extent.
|
inline |
Add a box to this box. This will compute its new extent.
|
inline |
Does this box intersect another box b
.
|
inline |
Is the box valid.
|
inline |
Return a component of the coordinates of the max corner. axis
must be in [0, DIM).
|
inline |
Return the coordinates of the max corner.
|
inline |
Return the coordinates of the max corner.
|
inline |
Return the max range.
|
inline |
Return the axis index of the max range of the box.
|
inline |
Return a component of the coordinates of the min corner. axis
must be in [0, DIM).
|
inline |
Return the coordinates of the min corner.
|
inline |
Return the coordinates of the min corner.
|
inline |
Return the min range.
|
inline |
Return the axis index of the min range of the box.
Return the bounding box of 'this' and another box b
.
|
inline |
Return the radius of the box (i.e., half of its diagonal length).
|
inline |
Return the range of the box along the axis. axis
must be in [0, DIM).
|
inline |
Return the surface area of the box.