OpenVDB  0.104.0
Public Types | Public Member Functions | List of all members
BBox< _VectorType > Class Template Reference

Axis-aligned bounding box. More...

#include <BBox.h>

Public Types

typedef _VectorType VectorType
 
typedef _VectorType ValueType
 
typedef _VectorType::ValueType ElementType
 

Public Member Functions

 BBox ()
 
 BBox (const VectorType &xyzMin, const VectorType &xyzMax)
 
 BBox (const VectorType &xyzMin, const VectorType &xyzMax, bool sorted)
 
 BBox (const VectorType &xyzMin, const ElementType &length)
 Contruct a cubical BBox from a minimum coordinate and a single edge length. More...
 
 BBox (const ElementType *xyz, bool sorted=true)
 
 BBox (const BBox &other)
 
void sort ()
 
const VectorTypemin () const
 
const VectorTypemax () const
 
VectorTypemin ()
 
VectorTypemax ()
 
bool operator== (const BBox &rhs) const
 
bool operator!= (const BBox &rhs) const
 
bool empty () const
 
bool hasVolume () const
 
 operator bool () const
 
bool isSorted () const
 
Vec3d getCenter () const
 
VectorType extents () const
 
ElementType volume () const
 
size_t maxExtent () const
 Return the index (0, 1 or 2) of the longest axis. More...
 
bool isInside (const VectorType &xyz) const
 Return true if point (x, y, z) is inside this bounding box. More...
 
bool isInside (const BBox &) const
 Return true if the given bounding box is inside this bounding box. More...
 
bool hasOverlap (const BBox &) const
 Return true if the given bounding box overlaps with this bounding box. More...
 
void expand (ElementType padding)
 Pad this bounding box. More...
 
void expand (const VectorType &xyz)
 Expand this bounding box to enclose point (x, y, z). More...
 
void expand (const BBox &)
 Union this bounding box with the given bounding box. More...
 
void expand (const VectorType &xyzMin, const ElementType &length)
 
void translate (const VectorType &t)
 Translate this bounding box by $(t_x, t_y, t_z)$. More...
 
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...
 

Detailed Description

template<class _VectorType>
class openvdb::v0_104_0::math::BBox< _VectorType >

Axis-aligned bounding box.

Member Typedef Documentation

typedef _VectorType::ValueType ElementType
typedef _VectorType ValueType
typedef _VectorType VectorType

Constructor & Destructor Documentation

BBox ( )
inline
BBox ( const VectorType xyzMin,
const VectorType xyzMax 
)
inline
BBox ( const VectorType xyzMin,
const VectorType xyzMax,
bool  sorted 
)
inline
BBox ( const VectorType xyzMin,
const ElementType length 
)
inline

Contruct a cubical BBox from a minimum coordinate and a single edge length.

Note
inclusive for integral ElementTypes
BBox ( const ElementType xyz,
bool  sorted = true 
)
inlineexplicit
BBox ( const BBox< _VectorType > &  other)
inline

Member Function Documentation

bool empty ( ) const
inline
void expand ( ElementType  padding)
inline

Pad this bounding box.

void expand ( const VectorType xyz)
inline

Expand this bounding box to enclose point (x, y, z).

void expand ( const BBox< _VectorType > &  b)
inline

Union this bounding box with the given bounding box.

void expand ( const VectorType xyzMin,
const ElementType length 
)
inline
Note
inclusive for integral ElementTypes
VectorType extents ( ) const
inline
Note
inclusive for integral ElementTypes
Vec3d getCenter ( ) const
inline
bool hasOverlap ( const BBox< _VectorType > &  b) const
inline

Return true if the given bounding box overlaps with this bounding box.

bool hasVolume ( ) const
inline
bool isInside ( const VectorType xyz) const
inline

Return true if point (x, y, z) is inside this bounding box.

bool isInside ( const BBox< _VectorType > &  b) const
inline

Return true if the given bounding box is inside this bounding box.

bool isSorted ( ) const
inline
const VectorType& max ( ) const
inline
VectorType& max ( )
inline
size_t maxExtent ( ) const
inline

Return the index (0, 1 or 2) of the longest axis.

const VectorType& min ( ) const
inline
VectorType& min ( )
inline
operator bool ( ) const
inline
bool operator!= ( const BBox< _VectorType > &  rhs) const
inline
bool operator== ( const BBox< _VectorType > &  rhs) const
inline
void read ( std::istream &  is)
inline

Unserialize this bounding box from the given stream.

void sort ( )
inline
void translate ( const VectorType t)
inline

Translate this bounding box by $(t_x, t_y, t_z)$.

ElementType volume ( ) const
inline
void write ( std::ostream &  os) const
inline

Serialize this bounding box to the given stream.


The documentation for this class was generated from the following file: