OpenVDB 11.0.0
 
Loading...
Searching...
No Matches
LeafNode< ValueMask > Struct 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
 
using BuildType
 
using ValueType
 
using LeafNodeType
 
using NodeMaskType
 
using MaskIterT
 
using NanoLeafT
 

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)
 
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
 
auto get (const Coord &ijk, ArgsT &&... args) const
 
auto set (const Coord &ijk, ArgsT &&... args)
 
const ValueTypegetValueAndCache (const Coord &ijk, const AccT &) const
 
void setValueAndCache (const Coord &ijk, const ValueType &value, const AccT &)
 
void setValueOnAndCache (const Coord &ijk, const 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)
 
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)
 
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
 
union nanovdb::build::LeafNode< ValueMask >:: { ... }  
 
Coord mOrigin
 
Mask< LOG2DIMmValueMask
 
ValueType mValues [SIZE]
 
NanoLeafTmDstNode
 
uint64_t mDstOffset
 
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)
 
static constexpr uint32_t LOG2DIM
 
static constexpr uint32_t TOTAL
 
static constexpr uint32_t DIM
 
static constexpr uint32_t SIZE
 
static constexpr uint32_t MASK
 
static constexpr uint32_t LEVEL
 
static constexpr uint64_t NUM_VALUES
 

Member Typedef Documentation

◆ BuildType [1/2]

using BuildType

◆ BuildType [2/2]

◆ LeafNodeType [1/2]

using LeafNodeType

◆ LeafNodeType [2/2]

◆ MaskIterT [1/2]

using MaskIterT

◆ MaskIterT [2/2]

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

◆ NanoLeafT [1/2]

using NanoLeafT

◆ NanoLeafT [2/2]

using NanoLeafT = typename NanoNode<BuildType, 0>::Type

◆ NodeMaskType [1/2]

using NodeMaskType

◆ NodeMaskType [2/2]

◆ ValueType [1/2]

using ValueType

◆ ValueType [2/2]

using ValueType = bool

Constructor & Destructor Documentation

◆ LeafNode() [1/6]

LeafNode ( const Coord & ijk,
const ValueType & ,
bool state )
inline

◆ LeafNode() [2/6]

LeafNode ( const LeafNode< ValueMask > & )
delete

◆ LeafNode() [3/6]

LeafNode ( LeafNode< ValueMask > && )
delete

◆ ~LeafNode() [1/2]

~LeafNode ( )
default

◆ LeafNode() [4/6]

LeafNode ( const Coord & ijk,
const ValueType & value,
bool state )
inline

◆ LeafNode() [5/6]

LeafNode ( const LeafNode< ValueMask > & )
delete

◆ LeafNode() [6/6]

LeafNode ( LeafNode< ValueMask > && )
delete

◆ ~LeafNode() [2/2]

~LeafNode ( )
default

Member Function Documentation

◆ beginValue() [1/2]

ValueIterator beginValue ( )
inline

◆ beginValue() [2/2]

ValueIterator beginValue ( )
inline

◆ beginValueOff() [1/2]

ValueOffIterator beginValueOff ( )
inline

◆ beginValueOff() [2/2]

ValueOffIterator beginValueOff ( )
inline

◆ beginValueOn() [1/2]

ValueOnIterator beginValueOn ( )
inline

◆ beginValueOn() [2/2]

ValueOnIterator beginValueOn ( )
inline

◆ cbeginValueAll() [1/2]

ValueIterator cbeginValueAll ( ) const
inline

◆ cbeginValueAll() [2/2]

ValueIterator cbeginValueAll ( ) const
inline

◆ cbeginValueOff() [1/2]

ValueOffIterator cbeginValueOff ( ) const
inline

◆ cbeginValueOff() [2/2]

ValueOffIterator cbeginValueOff ( ) const
inline

◆ cbeginValueOn() [1/2]

ValueOnIterator cbeginValueOn ( ) const
inline

◆ cbeginValueOn() [2/2]

ValueOnIterator cbeginValueOn ( ) const
inline

◆ CoordToOffset() [1/2]

static uint32_t CoordToOffset ( const Coord & ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

◆ CoordToOffset() [2/2]

static uint32_t CoordToOffset ( const Coord & ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

◆ get() [1/2]

auto get ( const Coord & ijk,
ArgsT &&... args ) const
inline

◆ get() [2/2]

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

◆ getFirstValue() [1/2]

ValueType getFirstValue ( ) const
inline

◆ getFirstValue() [2/2]

bool getFirstValue ( ) const
inline

◆ getLastValue() [1/2]

ValueType getLastValue ( ) const
inline

◆ getLastValue() [2/2]

bool getLastValue ( ) const
inline

◆ getValue() [1/4]

const ValueType & getValue ( const Coord & ijk) const
inline

◆ getValue() [2/4]

bool getValue ( const Coord & ijk) const
inline

◆ getValue() [3/4]

const ValueType & getValue ( uint32_t i) const
inline

◆ getValue() [4/4]

bool getValue ( uint32_t i) const
inline

◆ getValueAndCache() [1/2]

const ValueType & getValueAndCache ( const Coord & ijk,
const AccT &  ) const
inline

◆ getValueAndCache() [2/2]

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

◆ getValueMask() [1/2]

const Mask< LOG2DIM > & getValueMask ( ) const
inline

◆ getValueMask() [2/2]

const Mask< LOG2DIM > & getValueMask ( ) const
inline

◆ isActiveAndCache() [1/2]

bool isActiveAndCache ( const Coord & ijk,
const AccT &  ) const
inline

◆ isActiveAndCache() [2/2]

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

◆ localToGlobalCoord() [1/2]

void localToGlobalCoord ( Coord & ijk) const
inline

◆ localToGlobalCoord() [2/2]

void localToGlobalCoord ( Coord & ijk) const
inline

◆ merge() [1/2]

void merge ( LeafNode< ValueMask > & other)
inline

◆ merge() [2/2]

void merge ( LeafNode< ValueMask > & other)
inline

◆ offsetToGlobalCoord() [1/2]

Coord offsetToGlobalCoord ( uint32_t n) const
inline

◆ offsetToGlobalCoord() [2/2]

Coord offsetToGlobalCoord ( uint32_t n) const
inline

◆ OffsetToLocalCoord() [1/2]

static Coord OffsetToLocalCoord ( uint32_t n)
inlinestatic

◆ OffsetToLocalCoord() [2/2]

static Coord OffsetToLocalCoord ( uint32_t n)
inlinestatic

◆ operator=() [1/4]

LeafNode & operator= ( const LeafNode< ValueMask > & )
delete

◆ operator=() [2/4]

LeafNode & operator= ( const LeafNode< ValueMask > & )
delete

◆ operator=() [3/4]

LeafNode & operator= ( LeafNode< ValueMask > && )
delete

◆ operator=() [4/4]

LeafNode & operator= ( LeafNode< ValueMask > && )
delete

◆ origin() [1/2]

const Coord & origin ( ) const
inline

◆ origin() [2/2]

const Coord & origin ( ) const
inline

◆ set() [1/2]

auto set ( const Coord & ijk,
ArgsT &&... args )
inline

◆ set() [2/2]

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

◆ setValue() [1/4]

void setValue ( const Coord & ijk)
inline

◆ setValue() [2/4]

void setValue ( const Coord & ijk,
const ValueType & value )
inline

◆ setValue() [3/4]

void setValue ( uint32_t n,
bool  )
inline

◆ setValue() [4/4]

void setValue ( uint32_t n,
const ValueType & value )
inline

◆ setValueAndCache() [1/2]

template<typename AccT>
void setValueAndCache ( const Coord & ijk,
bool ,
const AccT &  )
inline

◆ setValueAndCache() [2/2]

void setValueAndCache ( const Coord & ijk,
const ValueType & value,
const AccT &  )
inline

◆ setValueOnAndCache() [1/2]

void setValueOnAndCache ( const Coord & ijk,
const AccT &  )
inline

◆ setValueOnAndCache() [2/2]

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

◆ signedFloodFill()

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

◆ valueMask() [1/2]

const Mask< LOG2DIM > & valueMask ( ) const
inline

◆ valueMask() [2/2]

const Mask< LOG2DIM > & valueMask ( ) const
inline

Member Data Documentation

◆ []

union nanovdb::build::LeafNode< ValueMask > { ... }

◆ [union]

union { ... }

◆ DIM [1/2]

uint32_t DIM
staticconstexpr

◆ DIM [2/2]

uint32_t DIM = 1u << TOTAL
staticconstexpr

◆ LEVEL [1/2]

uint32_t LEVEL
staticconstexpr

◆ LEVEL [2/2]

uint32_t LEVEL = 0
staticconstexpr

◆ LOG2DIM [1/2]

uint32_t LOG2DIM
staticconstexpr

◆ LOG2DIM [2/2]

uint32_t LOG2DIM = 3
staticconstexpr

◆ MASK [1/2]

uint32_t MASK
staticconstexpr

◆ MASK [2/2]

uint32_t MASK = DIM - 1
staticconstexpr

◆ mDstNode [1/2]

NanoLeafT* mDstNode

◆ mDstNode [2/2]

NanoLeafT* mDstNode

◆ mDstOffset [1/2]

uint64_t mDstOffset

◆ mDstOffset [2/2]

uint64_t mDstOffset

◆ mOrigin [1/2]

Coord mOrigin

◆ mOrigin [2/2]

Coord mOrigin

◆ mValueMask [1/2]

Mask<LOG2DIM> mValueMask

◆ mValueMask [2/2]

Mask<LOG2DIM> mValueMask

◆ mValues

ValueType mValues[SIZE]

◆ NUM_VALUES [1/2]

uint64_t NUM_VALUES
staticconstexpr

◆ NUM_VALUES [2/2]

uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
staticconstexpr

◆ SIZE [1/2]

uint32_t SIZE
staticconstexpr

◆ SIZE [2/2]

uint32_t SIZE = 1u << 3 * LOG2DIM
staticconstexpr

◆ TOTAL [1/2]

uint32_t TOTAL
staticconstexpr

◆ TOTAL [2/2]

uint32_t TOTAL = LOG2DIM
staticconstexpr