OpenVDB  11.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BBox< CoordT, false > Struct Template Reference

Partial template specialization for integer coordinate types. More...

#include <nanovdb/NanoVDB.h>

Inherits BaseBBox< CoordT >.

Classes

class  Iterator
 Iterator over the domain covered by a BBox. More...
 

Public Types

using BaseT = BaseBBox< CoordT >
 

Public Member Functions

Iterator begin () const
 
Iterator end () const
 
 BBox ()
 
 BBox (const CoordT &min, const CoordT &max)
 
template<typename SplitT >
 BBox (BBox &other, const SplitT &)
 
bool is_divisible () const
 
bool empty () const
 Return true if this bounding box is empty, e.g. uninitialized. More...
 
 operator bool () const
 Convert this BBox to boolean true if it is not empty. More...
 
CoordT dim () const
 
uint64_t volume () const
 
bool isInside (const CoordT &p) const
 
bool isInside (const BBox &b) const
 Return true if the given bounding box is inside this bounding box. More...
 
bool hasOverlap (const BBox &b) const
 Return true if the given bounding box overlaps with this bounding box. More...
 
template<typename RealT = double>
BBox< Vec3< RealT > > asReal () const
 
BBox expandBy (typename CoordT::ValueType padding) const
 Return a new instance that is expanded by the specified padding. More...
 
template<typename Map >
BBox< Vec3dtransform (const Map &map) const
 transform this coordinate bounding box by the specified map More...
 
bool operator== (const BaseBBox &rhs) const
 
bool operator!= (const BaseBBox &rhs) const
 
const CoordT & operator[] (int i) const
 
CoordT & operator[] (int i)
 
CoordT & min ()
 
const CoordT & min () const
 
CoordT & max ()
 
const CoordT & max () const
 
BaseBBoxtranslate (const CoordT &xyz)
 
BaseBBoxexpand (const CoordT &xyz)
 Expand this bounding box to enclose point xyz. More...
 
BaseBBoxexpand (const BaseBBox &bbox)
 Expand this bounding box to enclose the given bounding box. More...
 
BaseBBoxintersect (const BaseBBox &bbox)
 Intersect this bounding box with the given bounding box. More...
 
bool isInside (const CoordT &xyz)
 

Static Public Member Functions

static BBox createCube (const CoordT &min, typename CoordT::ValueType dim)
 
static BBox createCube (typename CoordT::ValueType min, typename CoordT::ValueType max)
 

Public Attributes

CoordT mCoord [2]
 

Detailed Description

template<typename CoordT>
struct nanovdb::BBox< CoordT, false >

Partial template specialization for integer coordinate types.

Note
Both min and max are INCLUDED in the bbox so dim = max - min + 1. So, if min = max the bounding box contains exactly one point and dim = 1!

Member Typedef Documentation

using BaseT = BaseBBox<CoordT>

Constructor & Destructor Documentation

BBox ( )
inline
BBox ( const CoordT &  min,
const CoordT &  max 
)
inline
BBox ( BBox< CoordT, false > &  other,
const SplitT &   
)
inline

Member Function Documentation

BBox<Vec3<RealT> > asReal ( ) const
inline
Warning
This converts a CoordBBox into a floating-point bounding box which implies that max += 1 !
Iterator begin ( ) const
inline
static BBox createCube ( const CoordT &  min,
typename CoordT::ValueType  dim 
)
inlinestatic
static BBox createCube ( typename CoordT::ValueType  min,
typename CoordT::ValueType  max 
)
inlinestatic
CoordT dim ( ) const
inline
bool empty ( ) const
inline

Return true if this bounding box is empty, e.g. uninitialized.

Iterator end ( ) const
inline
BaseBBox& expand ( const CoordT &  xyz)
inlineinherited

Expand this bounding box to enclose point xyz.

BaseBBox& expand ( const BaseBBox< CoordT > &  bbox)
inlineinherited

Expand this bounding box to enclose the given bounding box.

BBox expandBy ( typename CoordT::ValueType  padding) const
inline

Return a new instance that is expanded by the specified padding.

bool hasOverlap ( const BBox< CoordT, false > &  b) const
inline

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

BaseBBox& intersect ( const BaseBBox< CoordT > &  bbox)
inlineinherited

Intersect this bounding box with the given bounding box.

bool is_divisible ( ) const
inline
bool isInside ( const CoordT &  xyz)
inlineinherited
bool isInside ( const CoordT &  p) const
inline
bool isInside ( const BBox< CoordT, false > &  b) const
inline

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

CoordT & max ( )
inlineinherited
const CoordT & max ( ) const
inlineinherited
CoordT & min ( )
inlineinherited
const CoordT & min ( ) const
inlineinherited
operator bool ( ) const
inline

Convert this BBox to boolean true if it is not empty.

bool operator!= ( const BaseBBox< CoordT > &  rhs) const
inlineinherited
bool operator== ( const BaseBBox< CoordT > &  rhs) const
inlineinherited
const CoordT & operator[] ( int  i) const
inlineinherited
CoordT & operator[] ( int  i)
inlineinherited
BBox<Vec3d> transform ( const Map map) const
inline

transform this coordinate bounding box by the specified map

Parameters
mapmapping of index to world coordinates
Returns
world bounding box
BaseBBox& translate ( const CoordT &  xyz)
inlineinherited
uint64_t volume ( ) const
inline

Member Data Documentation

CoordT mCoord[2]
inherited