OpenVDB
1.1.0
|
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation. More...
#include <NodeMasks.h>
Public Types | |
typedef Index64 | Word |
typedef OnMaskIterator< NodeMask > | OnIterator |
typedef OffMaskIterator< NodeMask > | OffIterator |
typedef DenseMaskIterator < NodeMask > | DenseIterator |
Public Member Functions | |
BOOST_STATIC_ASSERT (Log2Dim >2) | |
NodeMask () | |
Default constructor sets all bits off. More... | |
NodeMask (bool on) | |
All bits are set to the specified state. More... | |
NodeMask (const NodeMask &other) | |
Copy constructor. More... | |
~NodeMask () | |
Destructor. More... | |
void | operator= (const NodeMask &other) |
Assignment operator. More... | |
OnIterator | beginOn () const |
OnIterator | endOn () const |
OffIterator | beginOff () const |
OffIterator | endOff () const |
DenseIterator | beginDense () const |
DenseIterator | endDense () const |
bool | operator== (const NodeMask &other) const |
bool | operator!= (const NodeMask &other) const |
NodeMask | operator! () const |
const NodeMask & | operator&= (const NodeMask &other) |
const NodeMask & | operator|= (const NodeMask &other) |
const NodeMask & | operator^= (const NodeMask &other) |
NodeMask | operator& (const NodeMask &other) const |
NodeMask | operator| (const NodeMask &other) const |
NodeMask | operator^ (const NodeMask &other) const |
OPENVDB_DEPRECATED Index32 | getMemUsage () const |
Return the byte size of this NodeMask. More... | |
Index32 | countOn () const |
Return the total number of on bits. More... | |
Index32 | countOff () const |
Return the total number of on bits. More... | |
void | setOn (Index32 n) |
Set the nth bit on. More... | |
void | setOff (Index32 n) |
Set the nth bit off. More... | |
void | set (Index32 n, bool On) |
Set the nth bit to the specified state. More... | |
void | set (bool on) |
Set all bits to the specified state. More... | |
void | setOn () |
Set all bits on. More... | |
void | setOff () |
Set all bits off. More... | |
void | toggle (Index32 n) |
Toggle the state of the nth bit. More... | |
void | toggle () |
Toggle the state of all bits in the mask. More... | |
void | setFirstOn () |
Set the first bit on. More... | |
void | setLastOn () |
Set the last bit on. More... | |
void | setFirstOff () |
Set the first bit off. More... | |
void | setLastOff () |
Set the last bit off. More... | |
bool | isOn (Index32 n) const |
Return true if the nth bit is on. More... | |
bool | isOff (Index32 n) const |
Return true if the nth bit is off. More... | |
bool | isOn () const |
Return true if all the bits are on. More... | |
bool | isOff () const |
Return true if all the bits are off. More... | |
Index32 | findFirstOn () const |
Index32 | findFirstOff () const |
void | save (std::ostream &os) const |
void | load (std::istream &is) |
void | printInfo (std::ostream &os=std::cout) const |
simple print method for debugging More... | |
void | printBits (std::ostream &os=std::cout, Index32 max_out=80u) const |
void | printAll (std::ostream &os=std::cout, Index32 max_out=80u) const |
Index32 | findNextOn (Index32 start) const |
Index32 | findNextOff (Index32 start) const |
template<typename WordT > | |
WordT | getWord (Index n) const |
Return the nth word of the bit mask, for a word of arbitrary size. More... | |
template<typename WordT > | |
WordT & | getWord (Index n) |
Return the nth word of the bit mask, for a word of arbitrary size. More... | |
Static Public Member Functions | |
static Index32 | memUsage () |
Return the byte size of this NodeMask. More... | |
Static Public Attributes | |
static const Index32 | LOG2DIM = Log2Dim |
static const Index32 | DIM = 1<<Log2Dim |
static const Index32 | SIZE = 1<<3*Log2Dim |
static const Index32 | WORD_COUNT = SIZE >> 6 |
Bit mask for the internal and leaf nodes of VDB. This is a 64-bit implementation.
typedef DenseMaskIterator<NodeMask> DenseIterator |
typedef OffMaskIterator<NodeMask> OffIterator |
typedef OnMaskIterator<NodeMask> OnIterator |
|
inline |
Default constructor sets all bits off.
|
inline |
All bits are set to the specified state.
|
inline |
Destructor.
|
inline |
|
inline |
|
inline |
BOOST_STATIC_ASSERT | ( | Log2Dim | , |
2 | |||
) |
|
inline |
Return the total number of on bits.
|
inline |
Return the total number of on bits.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the byte size of this NodeMask.
|
inline |
Return the nth word of the bit mask, for a word of arbitrary size.
|
inline |
Return the nth word of the bit mask, for a word of arbitrary size.
|
inline |
Return true
if the nth bit is off.
|
inline |
Return true
if all the bits are off.
|
inline |
Return true
if the nth bit is on.
|
inline |
Return true
if all the bits are on.
|
inline |
|
inline |
|
inline |
Assignment operator.
|
inline |
|
inline |
|
inline |
|
inline |
simple print method for debugging
|
inline |
|
inline |
Set the nth bit to the specified state.
|
inline |
Set all bits to the specified state.
|
inline |
Set the first bit off.
|
inline |
Set the first bit on.
|
inline |
Set the last bit off.
|
inline |
Set the last bit on.
|
inline |
Set the nth bit off.
|
inline |
Set all bits off.
|
inline |
Set the nth bit on.
|
inline |
Set all bits on.
|
inline |
Toggle the state of the nth bit.
|
inline |
Toggle the state of all bits in the mask.
|
static |
|
static |
|
static |