OpenVDB
1.1.0
|
Axis-aligned bounding box of signed integer coordinates. More...
#include <Coord.h>
Public Types | |
typedef Coord::ValueType | ValueType |
Public Member Functions | |
CoordBBox () | |
CoordBBox (const Coord &min, const Coord &max) | |
const Coord & | min () const |
const Coord & | max () const |
Coord & | min () |
Coord & | max () |
void | reset (const Coord &min, const Coord &max) |
void | resetToCube (const Coord &min, ValueType dim) |
Coord | getStart () const |
Coord | getEnd () const |
bool | operator== (const CoordBBox &rhs) const |
bool | operator!= (const CoordBBox &rhs) const |
bool | empty () const |
operator bool () const | |
bool | hasVolume () const |
Return true if this bbox is not empty. More... | |
ValueType | volume () const |
Return the integer volume of coordinates spanned by this bbox. More... | |
Vec3d | getCenter () const |
Return the floating-point position of the center of this bbox. More... | |
Coord | dim () const |
Return the dimensions of the coordinates spanned by this bbox. More... | |
Coord | extents () const |
size_t | maxExtent () const |
Return the index (0, 1 or 2) of the longest axis. More... | |
bool | isInside (const Coord &xyz) const |
Return true if point (x, y, z) is inside this bounding box. More... | |
bool | isInside (const CoordBBox &b) const |
Return true if the given bounding box is inside this bounding box. More... | |
bool | hasOverlap (const CoordBBox &b) const |
Return true if the given bounding box overlaps with this bounding box. More... | |
void | expand (ValueType padding) |
Pad this bounding box with the specified padding. More... | |
void | expand (const Coord &xyz) |
Expand this bounding box to enclose point (x, y, z). More... | |
void | expand (const CoordBBox &bbox) |
Union this bounding box with the given bounding box. More... | |
void | expand (const Coord &min, Coord::ValueType dim) |
void | translate (const Coord &t) |
Translate this bounding box by ![]() | |
void | read (std::istream &is) |
Unserialize this bounding box from the given stream. More... | |
void | write (std::ostream &os) const |
Serialize this bounding box to the given stream. More... | |
Static Public Member Functions | |
static CoordBBox | createCube (const Coord &min, ValueType dim) |
static const CoordBBox & | inf () |
Axis-aligned bounding box of signed integer coordinates.
typedef Coord::ValueType ValueType |
|
inline |
|
inline |
Return the dimensions of the coordinates spanned by this bbox.
|
inline |
|
inline |
Pad this bounding box with the specified padding.
|
inline |
Expand this bounding box to enclose point (x, y, z).
|
inline |
Union this bounding box with the given bounding box.
|
inline |
|
inline |
|
inline |
Return the floating-point position of the center of this bbox.
|
inline |
|
inline |
|
inline |
Return true
if the given bounding box overlaps with this bounding box.
|
inline |
Return true
if this bbox is not empty.
|
inlinestatic |
|
inline |
Return true
if point (x, y, z) is inside this bounding box.
|
inline |
Return true
if the given bounding box is inside this bounding box.
|
inline |
|
inline |
|
inline |
Return the index (0, 1 or 2) of the longest axis.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Unserialize this bounding box from the given stream.
|
inline |
Translate this bounding box by .
|
inline |
Return the integer volume of coordinates spanned by this bbox.
|
inline |
Serialize this bounding box to the given stream.