OpenVDB 11.0.0
Loading...
Searching...
No Matches
LeafNode< BuildT > 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 BuildType = BuildT
 
using ValueType = typename BuildToValueMap<BuildT>::type
 
using LeafNodeType = LeafNode<BuildT>
 
using NodeMaskType = Mask<LOG2DIM>
 
template<bool ON>
using MaskIterT = typename Mask<LOG2DIM>::template Iterator<ON>
 
using NanoLeafT = typename NanoNode<BuildT, 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 &value, bool state)
 
 LeafNode (const LeafNode &)=delete
 
 LeafNode (LeafNode &&)=delete
 
LeafNodeoperator= (const LeafNode &)=delete
 
LeafNodeoperator= (LeafNode &&)=delete
 
 ~LeafNode ()=default
 
const Mask< LOG2DIM > & getValueMask () const
 
const Mask< LOG2DIM > & valueMask () const
 
const Coordorigin () const
 
void localToGlobalCoord (Coord &ijk) const
 
Coord offsetToGlobalCoord (uint32_t n) const
 
ValueType getFirstValue () const
 
ValueType getLastValue () const
 
const ValueTypegetValue (uint32_t i) const
 
const ValueTypegetValue (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 >
const ValueTypegetValueAndCache (const Coord &ijk, const AccT &) const
 
template<typename AccT >
void setValueAndCache (const Coord &ijk, const ValueType &value, 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, const ValueType &value)
 
void setValue (const Coord &ijk, const ValueType &value)
 
void merge (LeafNode &other)
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type signedFloodFill (T outside)
 

Static Public Member Functions

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

Public Attributes

Coord mOrigin
 
Mask< LOG2DIMmValueMask
 
ValueType mValues [SIZE]
 
union { 
 
   NanoLeafT *   mDstNode 
 
   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

◆ BuildType

template<typename BuildT >
using BuildType = BuildT

◆ LeafNodeType

template<typename BuildT >
using LeafNodeType = LeafNode<BuildT>

◆ MaskIterT

template<typename BuildT >
template<bool ON>
using MaskIterT = typename Mask<LOG2DIM>::template Iterator<ON>

◆ NanoLeafT

template<typename BuildT >
using NanoLeafT = typename NanoNode<BuildT, 0>::Type

◆ NodeMaskType

template<typename BuildT >
using NodeMaskType = Mask<LOG2DIM>

◆ ValueType

template<typename BuildT >
using ValueType = typename BuildToValueMap<BuildT>::type

Constructor & Destructor Documentation

◆ LeafNode() [1/3]

template<typename BuildT >
LeafNode ( const Coord & ijk,
const ValueType & value,
bool state )
inline

◆ LeafNode() [2/3]

template<typename BuildT >
LeafNode ( const LeafNode< BuildT > & )
delete

◆ LeafNode() [3/3]

template<typename BuildT >
LeafNode ( LeafNode< BuildT > && )
delete

◆ ~LeafNode()

template<typename BuildT >
~LeafNode ( )
default

Member Function Documentation

◆ beginValue()

template<typename BuildT >
ValueIterator beginValue ( )
inline

◆ beginValueOff()

template<typename BuildT >
ValueOffIterator beginValueOff ( )
inline

◆ beginValueOn()

template<typename BuildT >
ValueOnIterator beginValueOn ( )
inline

◆ cbeginValueAll()

template<typename BuildT >
ValueIterator cbeginValueAll ( ) const
inline

◆ cbeginValueOff()

template<typename BuildT >
ValueOffIterator cbeginValueOff ( ) const
inline

◆ cbeginValueOn()

template<typename BuildT >
ValueOnIterator cbeginValueOn ( ) const
inline

◆ CoordToOffset()

template<typename BuildT >
static uint32_t CoordToOffset ( const Coord & ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

◆ get()

template<typename BuildT >
template<typename OpT , typename... ArgsT>
auto get ( const Coord & ijk,
ArgsT &&... args ) const
inline

◆ getFirstValue()

template<typename BuildT >
ValueType getFirstValue ( ) const
inline

◆ getLastValue()

template<typename BuildT >
ValueType getLastValue ( ) const
inline

◆ getValue() [1/2]

template<typename BuildT >
const ValueType & getValue ( const Coord & ijk) const
inline

◆ getValue() [2/2]

template<typename BuildT >
const ValueType & getValue ( uint32_t i) const
inline

◆ getValueAndCache()

template<typename BuildT >
template<typename AccT >
const ValueType & getValueAndCache ( const Coord & ijk,
const AccT &  ) const
inline

◆ getValueMask()

template<typename BuildT >
const Mask< LOG2DIM > & getValueMask ( ) const
inline

◆ isActiveAndCache()

template<typename BuildT >
template<typename AccT >
bool isActiveAndCache ( const Coord & ijk,
const AccT &  ) const
inline

◆ localToGlobalCoord()

template<typename BuildT >
void localToGlobalCoord ( Coord & ijk) const
inline

◆ merge()

template<typename BuildT >
void merge ( LeafNode< BuildT > & other)
inline

◆ offsetToGlobalCoord()

template<typename BuildT >
Coord offsetToGlobalCoord ( uint32_t n) const
inline

◆ OffsetToLocalCoord()

template<typename BuildT >
static Coord OffsetToLocalCoord ( uint32_t n)
inlinestatic

◆ operator=() [1/2]

template<typename BuildT >
LeafNode & operator= ( const LeafNode< BuildT > & )
delete

◆ operator=() [2/2]

template<typename BuildT >
LeafNode & operator= ( LeafNode< BuildT > && )
delete

◆ origin()

template<typename BuildT >
const Coord & origin ( ) const
inline

◆ set()

template<typename BuildT >
template<typename OpT , typename... ArgsT>
auto set ( const Coord & ijk,
ArgsT &&... args )
inline

◆ setValue() [1/2]

template<typename BuildT >
void setValue ( const Coord & ijk,
const ValueType & value )
inline

◆ setValue() [2/2]

template<typename BuildT >
void setValue ( uint32_t n,
const ValueType & value )
inline

◆ setValueAndCache()

template<typename BuildT >
template<typename AccT >
void setValueAndCache ( const Coord & ijk,
const ValueType & value,
const AccT &  )
inline

◆ setValueOnAndCache()

template<typename BuildT >
template<typename AccT >
void setValueOnAndCache ( const Coord & ijk,
const AccT &  )
inline

◆ signedFloodFill()

template<typename BuildT >
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type signedFloodFill ( T outside)
inline

◆ valueMask()

template<typename BuildT >
const Mask< LOG2DIM > & valueMask ( ) const
inline

Member Data Documentation

◆ [union]

union { ... }

◆ DIM

template<typename BuildT >
uint32_t DIM = 1u << TOTAL
staticconstexpr

◆ LEVEL

template<typename BuildT >
uint32_t LEVEL = 0
staticconstexpr

◆ LOG2DIM

template<typename BuildT >
uint32_t LOG2DIM = 3
staticconstexpr

◆ MASK

template<typename BuildT >
uint32_t MASK = DIM - 1
staticconstexpr

◆ mDstNode

template<typename BuildT >
NanoLeafT* mDstNode

◆ mDstOffset

template<typename BuildT >
uint64_t mDstOffset

◆ mOrigin

template<typename BuildT >
Coord mOrigin

◆ mValueMask

template<typename BuildT >
Mask<LOG2DIM> mValueMask

◆ mValues

template<typename BuildT >
ValueType mValues[SIZE]

◆ NUM_VALUES

template<typename BuildT >
uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
staticconstexpr

◆ SIZE

template<typename BuildT >
uint32_t SIZE = 1u << 3 * LOG2DIM
staticconstexpr

◆ TOTAL

template<typename BuildT >
uint32_t TOTAL = LOG2DIM
staticconstexpr