HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::build::LeafNode< ValueMask > Struct Template Reference

#include <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)
 

Detailed Description

template<>
struct nanovdb::build::LeafNode< ValueMask >

Definition at line 1288 of file GridBuilder.h.

Member Typedef Documentation

Definition at line 1291 of file GridBuilder.h.

template<bool ON>
using nanovdb::build::LeafNode< ValueMask >::MaskIterT = typename Mask<LOG2DIM>::template Iterator<ON>

Definition at line 1302 of file GridBuilder.h.

Definition at line 1303 of file GridBuilder.h.

Definition at line 1300 of file GridBuilder.h.

Definition at line 1290 of file GridBuilder.h.

Constructor & Destructor Documentation

nanovdb::build::LeafNode< ValueMask >::LeafNode ( const Coord ijk,
const ValueType ,
bool  state 
)
inline

Definition at line 1369 of file GridBuilder.h.

Member Function Documentation

ValueIterator nanovdb::build::LeafNode< ValueMask >::beginValue ( )
inline

Definition at line 1366 of file GridBuilder.h.

ValueOffIterator nanovdb::build::LeafNode< ValueMask >::beginValueOff ( )
inline

Definition at line 1341 of file GridBuilder.h.

ValueOnIterator nanovdb::build::LeafNode< ValueMask >::beginValueOn ( )
inline

Definition at line 1325 of file GridBuilder.h.

ValueIterator nanovdb::build::LeafNode< ValueMask >::cbeginValueAll ( ) const
inline

Definition at line 1367 of file GridBuilder.h.

ValueOffIterator nanovdb::build::LeafNode< ValueMask >::cbeginValueOff ( ) const
inline

Definition at line 1342 of file GridBuilder.h.

ValueOnIterator nanovdb::build::LeafNode< ValueMask >::cbeginValueOn ( ) const
inline

Definition at line 1326 of file GridBuilder.h.

static uint32_t nanovdb::build::LeafNode< ValueMask >::CoordToOffset ( const Coord ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

Definition at line 1386 of file GridBuilder.h.

template<typename OpT , typename... ArgsT>
auto nanovdb::build::LeafNode< ValueMask >::get ( const Coord ijk,
ArgsT &&...  args 
) const
inline

Definition at line 1415 of file GridBuilder.h.

bool nanovdb::build::LeafNode< ValueMask >::getFirstValue ( ) const
inline

Definition at line 1409 of file GridBuilder.h.

bool nanovdb::build::LeafNode< ValueMask >::getLastValue ( ) const
inline

Definition at line 1410 of file GridBuilder.h.

bool nanovdb::build::LeafNode< ValueMask >::getValue ( uint32_t  i) const
inline

Definition at line 1411 of file GridBuilder.h.

bool nanovdb::build::LeafNode< ValueMask >::getValue ( const Coord ijk) const
inline

Definition at line 1412 of file GridBuilder.h.

template<typename AccT >
bool nanovdb::build::LeafNode< ValueMask >::getValueAndCache ( const Coord ijk,
const AccT &   
) const
inline

Definition at line 1422 of file GridBuilder.h.

const Mask<LOG2DIM>& nanovdb::build::LeafNode< ValueMask >::getValueMask ( ) const
inline

Definition at line 1382 of file GridBuilder.h.

template<typename AccT >
bool nanovdb::build::LeafNode< ValueMask >::isActiveAndCache ( const Coord ijk,
const AccT &   
) const
inline

Definition at line 1442 of file GridBuilder.h.

void nanovdb::build::LeafNode< ValueMask >::localToGlobalCoord ( Coord ijk) const
inline

Definition at line 1400 of file GridBuilder.h.

void nanovdb::build::LeafNode< ValueMask >::merge ( LeafNode< ValueMask > &  other)
inline

Definition at line 1451 of file GridBuilder.h.

Coord nanovdb::build::LeafNode< ValueMask >::offsetToGlobalCoord ( uint32_t  n) const
inline

Definition at line 1402 of file GridBuilder.h.

static Coord nanovdb::build::LeafNode< ValueMask >::OffsetToLocalCoord ( uint32_t  n)
inlinestatic

Definition at line 1393 of file GridBuilder.h.

LeafNode& nanovdb::build::LeafNode< ValueMask >::operator= ( const LeafNode< ValueMask > &  )
delete
LeafNode& nanovdb::build::LeafNode< ValueMask >::operator= ( LeafNode< ValueMask > &&  )
delete
const Coord& nanovdb::build::LeafNode< ValueMask >::origin ( ) const
inline

Definition at line 1383 of file GridBuilder.h.

template<typename OpT , typename... ArgsT>
auto nanovdb::build::LeafNode< ValueMask >::set ( const Coord ijk,
ArgsT &&...  args 
)
inline

Definition at line 1418 of file GridBuilder.h.

void nanovdb::build::LeafNode< ValueMask >::setValue ( uint32_t  n,
bool   
)
inline

Definition at line 1448 of file GridBuilder.h.

void nanovdb::build::LeafNode< ValueMask >::setValue ( const Coord ijk)
inline

Definition at line 1449 of file GridBuilder.h.

template<typename AccT >
void nanovdb::build::LeafNode< ValueMask >::setValueAndCache ( const Coord ijk,
bool  ,
const AccT &   
)
inline

Definition at line 1428 of file GridBuilder.h.

template<typename AccT >
void nanovdb::build::LeafNode< ValueMask >::setValueOnAndCache ( const Coord ijk,
const AccT &   
)
inline

Definition at line 1435 of file GridBuilder.h.

const Mask<LOG2DIM>& nanovdb::build::LeafNode< ValueMask >::valueMask ( ) const
inline

Definition at line 1381 of file GridBuilder.h.

Member Data Documentation

union { ... }
constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::DIM = 1u << TOTAL
static

Definition at line 1295 of file GridBuilder.h.

constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::LEVEL = 0
static

Definition at line 1298 of file GridBuilder.h.

constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::LOG2DIM = 3
static

Definition at line 1293 of file GridBuilder.h.

constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::MASK = DIM - 1
static

Definition at line 1297 of file GridBuilder.h.

Definition at line 1308 of file GridBuilder.h.

uint64_t nanovdb::build::LeafNode< ValueMask >::mDstOffset

Definition at line 1309 of file GridBuilder.h.

Definition at line 1305 of file GridBuilder.h.

Definition at line 1306 of file GridBuilder.h.

constexpr uint64_t nanovdb::build::LeafNode< ValueMask >::NUM_VALUES = uint64_t(1) << (3 * TOTAL)
static

Definition at line 1299 of file GridBuilder.h.

constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::SIZE = 1u << 3 * LOG2DIM
static

Definition at line 1296 of file GridBuilder.h.

constexpr uint32_t nanovdb::build::LeafNode< ValueMask >::TOTAL = LOG2DIM
static

Definition at line 1294 of file GridBuilder.h.


The documentation for this struct was generated from the following file: