OpenVDB 11.0.0
Loading...
Searching...
No Matches
LeafBuffer< bool, Log2Dim > Class Template Reference

#include <openvdb/tree/LeafBuffer.h>

Public Types

using NodeMaskType = util::NodeMask<Log2Dim>
 
using WordType = typename NodeMaskType::Word
 
using ValueType = bool
 
using StorageType = WordType
 

Public Member Functions

 LeafBuffer ()
 
 LeafBuffer (bool on)
 
 LeafBuffer (const NodeMaskType &other)
 
 LeafBuffer (const LeafBuffer &other)
 
 ~LeafBuffer ()
 
void fill (bool val)
 
LeafBufferoperator= (const LeafBuffer &b)
 
const bool & getValue (Index i) const
 
const bool & operator[] (Index i) const
 
bool operator== (const LeafBuffer &other) const
 
bool operator!= (const LeafBuffer &other) const
 
void setValue (Index i, bool val)
 
void swap (LeafBuffer &other)
 
Index memUsage () const
 
Index memUsageIfLoaded () const
 
WordTypedata ()
 Return a pointer to the C-style array of words encoding the bits.
 
const WordTypedata () const
 Return a const pointer to the C-style array of words encoding the bits.
 

Static Public Member Functions

static Index size ()
 

Static Public Attributes

static const Index WORD_COUNT = NodeMaskType::WORD_COUNT
 
static const Index SIZE = 1 << 3 * Log2Dim
 
static const bool sOn = true
 
static const bool sOff = false
 

Friends

template<typename , Index >
class LeafNode
 

Member Typedef Documentation

◆ NodeMaskType

template<Index Log2Dim>
using NodeMaskType = util::NodeMask<Log2Dim>

◆ StorageType

template<Index Log2Dim>
using StorageType = WordType

◆ ValueType

template<Index Log2Dim>
using ValueType = bool

◆ WordType

template<Index Log2Dim>
using WordType = typename NodeMaskType::Word

Constructor & Destructor Documentation

◆ LeafBuffer() [1/4]

template<Index Log2Dim>
LeafBuffer ( )
inline

◆ LeafBuffer() [2/4]

template<Index Log2Dim>
LeafBuffer ( bool on)
inline

◆ LeafBuffer() [3/4]

template<Index Log2Dim>
LeafBuffer ( const NodeMaskType & other)
inline

◆ LeafBuffer() [4/4]

template<Index Log2Dim>
LeafBuffer ( const LeafBuffer< bool, Log2Dim > & other)
inline

◆ ~LeafBuffer()

template<Index Log2Dim>
~LeafBuffer ( )
inline

Member Function Documentation

◆ data() [1/2]

template<Index Log2Dim>
WordType * data ( )
inline

Return a pointer to the C-style array of words encoding the bits.

Warning
This method should only be used by experts seeking low-level optimizations.

◆ data() [2/2]

template<Index Log2Dim>
const WordType * data ( ) const
inline

Return a const pointer to the C-style array of words encoding the bits.

Warning
This method should only be used by experts seeking low-level optimizations.

◆ fill()

template<Index Log2Dim>
void fill ( bool val)
inline

◆ getValue()

template<Index Log2Dim>
const bool & getValue ( Index i) const
inline

◆ memUsage()

template<Index Log2Dim>
Index memUsage ( ) const
inline

◆ memUsageIfLoaded()

template<Index Log2Dim>
Index memUsageIfLoaded ( ) const
inline

◆ operator!=()

template<Index Log2Dim>
bool operator!= ( const LeafBuffer< bool, Log2Dim > & other) const
inline

◆ operator=()

template<Index Log2Dim>
LeafBuffer & operator= ( const LeafBuffer< bool, Log2Dim > & b)
inline

◆ operator==()

template<Index Log2Dim>
bool operator== ( const LeafBuffer< bool, Log2Dim > & other) const
inline

◆ operator[]()

template<Index Log2Dim>
const bool & operator[] ( Index i) const
inline

◆ setValue()

template<Index Log2Dim>
void setValue ( Index i,
bool val )
inline

◆ size()

template<Index Log2Dim>
static Index size ( )
inlinestatic

◆ swap()

template<Index Log2Dim>
void swap ( LeafBuffer< bool, Log2Dim > & other)
inline

Friends And Related Symbol Documentation

◆ LeafNode

template<Index Log2Dim>
template<typename , Index >
friend class LeafNode
friend

Member Data Documentation

◆ SIZE

template<Index Log2Dim>
const Index SIZE = 1 << 3 * Log2Dim
static

◆ sOff

template<Index Log2Dim>
const bool sOff = false
inlinestatic

◆ sOn

template<Index Log2Dim>
const bool sOn = true
inlinestatic

◆ WORD_COUNT

template<Index Log2Dim>
const Index WORD_COUNT = NodeMaskType::WORD_COUNT
static