OpenVDB  11.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
LeafNode< ValueMask > Struct Template Reference

#include <nanovdb/util/GridBuilder.h>

Classes

class  ValueIterator
 Visits all values in a leaf node, i.e. both active and inactive values. More...
 
class  ValueOffIterator
 Visits all inactive values in a leaf node. More...
 
class  ValueOnIterator
 Visits all active values in a leaf node. More...
 

Public Types

using ValueType = bool
 
using BuildType = ValueMask
 
using LeafNodeType = LeafNode< BuildType >
 
using NodeMaskType = Mask< LOG2DIM >
 
template<bool ON>
using MaskIterT = typename Mask< LOG2DIM >::template Iterator< ON >
 
using NanoLeafT = typename NanoNode< BuildType, 0 >::Type
 

Public Member Functions

ValueOnIterator beginValueOn ()
 
ValueOnIterator cbeginValueOn () const
 
ValueOffIterator beginValueOff ()
 
ValueOffIterator cbeginValueOff () const
 
ValueIterator beginValue ()
 
ValueIterator cbeginValueAll () const
 
 LeafNode (const Coord &ijk, const ValueType &, bool state)
 
 LeafNode (const LeafNode &)=delete
 
 LeafNode (LeafNode &&)=delete
 
LeafNodeoperator= (const LeafNode &)=delete
 
LeafNodeoperator= (LeafNode &&)=delete
 
 ~LeafNode ()=default
 
const Mask< LOG2DIM > & valueMask () const
 
const Mask< LOG2DIM > & getValueMask () const
 
const Coordorigin () const
 
void localToGlobalCoord (Coord &ijk) const
 
Coord offsetToGlobalCoord (uint32_t n) const
 
bool getFirstValue () const
 
bool getLastValue () const
 
bool getValue (uint32_t i) const
 
bool getValue (const Coord &ijk) const
 
template<typename OpT , typename... ArgsT>
auto get (const Coord &ijk, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
auto set (const Coord &ijk, ArgsT &&...args)
 
template<typename AccT >
bool getValueAndCache (const Coord &ijk, const AccT &) const
 
template<typename AccT >
void setValueAndCache (const Coord &ijk, bool, const AccT &)
 
template<typename AccT >
void setValueOnAndCache (const Coord &ijk, const AccT &)
 
template<typename AccT >
bool isActiveAndCache (const Coord &ijk, const AccT &) const
 
void setValue (uint32_t n, bool)
 
void setValue (const Coord &ijk)
 
void merge (LeafNode &other)
 

Static Public Member Functions

static uint32_t CoordToOffset (const Coord &ijk)
 Return the linear offset corresponding to the given coordinate. More...
 
static Coord OffsetToLocalCoord (uint32_t n)
 

Public Attributes

Coord mOrigin
 
Mask< LOG2DIMmValueMask
 
union nanovdb::build::LeafNode< ValueMask >:: { ... }  
 
NanoLeafTmDstNode
 
uint64_t mDstOffset
 

Static Public Attributes

static constexpr uint32_t LOG2DIM = 3
 
static constexpr uint32_t TOTAL = LOG2DIM
 
static constexpr uint32_t DIM = 1u << TOTAL
 
static constexpr uint32_t SIZE = 1u << 3 * LOG2DIM
 
static constexpr uint32_t MASK = DIM - 1
 
static constexpr uint32_t LEVEL = 0
 
static constexpr uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
 

Member Typedef Documentation

using MaskIterT = typename Mask<LOG2DIM>::template Iterator<ON>
using NanoLeafT = typename NanoNode<BuildType, 0>::Type
using ValueType = bool

Constructor & Destructor Documentation

LeafNode ( const Coord ijk,
const ValueType ,
bool  state 
)
inline
LeafNode ( const LeafNode< ValueMask > &  )
delete
LeafNode ( LeafNode< ValueMask > &&  )
delete
~LeafNode ( )
default

Member Function Documentation

ValueIterator beginValue ( )
inline
ValueOffIterator beginValueOff ( )
inline
ValueOnIterator beginValueOn ( )
inline
ValueIterator cbeginValueAll ( ) const
inline
ValueOffIterator cbeginValueOff ( ) const
inline
ValueOnIterator cbeginValueOn ( ) const
inline
static uint32_t CoordToOffset ( const Coord ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

auto get ( const Coord ijk,
ArgsT &&...  args 
) const
inline
bool getFirstValue ( ) const
inline
bool getLastValue ( ) const
inline
bool getValue ( uint32_t  i) const
inline
bool getValue ( const Coord ijk) const
inline
bool getValueAndCache ( const Coord ijk,
const AccT &   
) const
inline
const Mask<LOG2DIM>& getValueMask ( ) const
inline
bool isActiveAndCache ( const Coord ijk,
const AccT &   
) const
inline
void localToGlobalCoord ( Coord ijk) const
inline
void merge ( LeafNode< ValueMask > &  other)
inline
Coord offsetToGlobalCoord ( uint32_t  n) const
inline
static Coord OffsetToLocalCoord ( uint32_t  n)
inlinestatic
LeafNode& operator= ( const LeafNode< ValueMask > &  )
delete
LeafNode& operator= ( LeafNode< ValueMask > &&  )
delete
const Coord& origin ( ) const
inline
auto set ( const Coord ijk,
ArgsT &&...  args 
)
inline
void setValue ( uint32_t  n,
bool   
)
inline
void setValue ( const Coord ijk)
inline
void setValueAndCache ( const Coord ijk,
bool  ,
const AccT &   
)
inline
void setValueOnAndCache ( const Coord ijk,
const AccT &   
)
inline
const Mask<LOG2DIM>& valueMask ( ) const
inline

Member Data Documentation

union { ... }
constexpr uint32_t DIM = 1u << TOTAL
static
constexpr uint32_t LEVEL = 0
static
constexpr uint32_t LOG2DIM = 3
static
constexpr uint32_t MASK = DIM - 1
static
NanoLeafT* mDstNode
uint64_t mDstOffset
Coord mOrigin
Mask<LOG2DIM> mValueMask
constexpr uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
static
constexpr uint32_t SIZE = 1u << 3 * LOG2DIM
static
constexpr uint32_t TOTAL = LOG2DIM
static