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

#include <GridBuilder.h>

Classes

class  ChildIterator
 Visits child nodes of this node only. More...
 
class  DenseIterator
 Visits all tile values and child nodes of this node. More...
 
struct  Tile
 
class  ValueIterator
 Visits all tile values in this node, i.e. both inactive and active tiles. More...
 
class  ValueOnIterator
 Visits active tile values of this node only. More...
 

Public Types

using ValueType = typename ChildT::ValueType
 
using BuildType = typename ChildT::BuildType
 
using ChildNodeType = ChildT
 
using LeafNodeType = typename ChildT::LeafNodeType
 
using MaskT = Mask< LOG2DIM >
 
template<bool On>
using MaskIterT = typename MaskT::template Iterator< On >
 
using NanoNodeT = typename NanoNode< BuildType, LEVEL >::Type
 

Public Member Functions

ChildIterator beginChild ()
 
ChildIterator cbeginChildOn () const
 
ValueIterator beginValue ()
 
ValueIterator cbeginValueAll () const
 
ValueOnIterator beginValueOn ()
 
ValueOnIterator cbeginValueOn () const
 
DenseIterator beginDense ()
 
DenseIterator cbeginChildAll () const
 
 InternalNode (const Coord &origin, const ValueType &value, bool state)
 
 InternalNode (const InternalNode &)=delete
 
 InternalNode (InternalNode &&)=delete
 
InternalNodeoperator= (const InternalNode &)=delete
 
InternalNodeoperator= (InternalNode &&)=delete
 
 ~InternalNode ()
 
const MaskTgetValueMask () const
 
const MaskTvalueMask () const
 
const MaskTgetChildMask () const
 
const MaskTchildMask () const
 
const Coordorigin () const
 
void nodeCount (std::array< size_t, 3 > &count) const
 
void localToGlobalCoord (Coord &ijk) const
 
Coord offsetToGlobalCoord (uint32_t n) const
 
ValueType getFirstValue () const
 
ValueType getLastValue () 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 OpT , typename AccT , typename... ArgsT>
auto getAndCache (const Coord &ijk, const AccT &acc, ArgsT &&...args) const
 
template<typename OpT , typename AccT , typename... ArgsT>
auto setAndCache (const Coord &ijk, const AccT &acc, ArgsT &&...args)
 
ValueType getValue (const Coord &ijk) const
 
void setValue (const Coord &ijk, const ValueType &value)
 
template<typename AccT >
ValueType getValueAndCache (const Coord &ijk, AccT &acc) const
 
template<typename AccT >
void setValueAndCache (const Coord &ijk, const ValueType &value, AccT &acc)
 
template<typename AccT >
void setValueOnAndCache (const Coord &ijk, AccT &acc)
 
template<typename AccT >
void touchLeafAndCache (const Coord &ijk, AccT &acc)
 
template<typename AccT >
bool isActiveAndCache (const Coord &ijk, AccT &acc) const
 
template<typename NodeT >
uint32_t nodeCount () const
 
template<typename NodeT >
void getNodes (std::vector< NodeT * > &array)
 
void addChild (ChildT *&child)
 
template<uint32_t level>
void addTile (const Coord &ijk, const ValueType &value, bool state)
 Add a tile containing voxel (i, j, k) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z). More...
 
template<typename NodeT >
void addNode (NodeT *&node)
 
void merge (InternalNode &other)
 
template<typename T >
std::enable_if
< std::is_floating_point< T >
::value >::type 
signedFloodFill (T outside)
 
template<typename AccessorT >
ChildT::LeafNodeType * touchLeafAndCache (const Coord &xyz, AccessorT &acc)
 
template<typename AccessorT >
const ChildT::ValueType & getValueAndCache (const Coord &xyz, AccessorT &acc) const
 

Static Public Member Functions

static uint32_t CoordToOffset (const Coord &ijk)
 
static Coord OffsetToLocalCoord (uint32_t n)
 

Public Attributes

Coord mOrigin
 
MaskT mValueMask
 
MaskT mChildMask
 
Tile mTable [SIZE]
 
union {
   NanoNodeT *   mDstNode
 
   uint64_t   mDstOffset
 
}; 
 

Static Public Attributes

static constexpr uint32_t LOG2DIM = ChildT::LOG2DIM + 1
 
static constexpr uint32_t TOTAL = LOG2DIM + ChildT::TOTAL
 
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 = 1 + ChildT::LEVEL
 
static constexpr uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
 

Detailed Description

template<typename ChildT>
struct nanovdb::build::InternalNode< ChildT >

Definition at line 611 of file GridBuilder.h.

Member Typedef Documentation

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::BuildType = typename ChildT::BuildType

Definition at line 614 of file GridBuilder.h.

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::ChildNodeType = ChildT

Definition at line 615 of file GridBuilder.h.

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::LeafNodeType = typename ChildT::LeafNodeType

Definition at line 616 of file GridBuilder.h.

template<typename ChildT >
template<bool On>
using nanovdb::build::InternalNode< ChildT >::MaskIterT = typename MaskT::template Iterator<On>

Definition at line 626 of file GridBuilder.h.

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::MaskT = Mask<LOG2DIM>

Definition at line 624 of file GridBuilder.h.

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::NanoNodeT = typename NanoNode<BuildType, LEVEL>::Type

Definition at line 627 of file GridBuilder.h.

template<typename ChildT >
using nanovdb::build::InternalNode< ChildT >::ValueType = typename ChildT::ValueType

Definition at line 613 of file GridBuilder.h.

Constructor & Destructor Documentation

template<typename ChildT >
nanovdb::build::InternalNode< ChildT >::InternalNode ( const Coord origin,
const ValueType value,
bool  state 
)
inline

Definition at line 723 of file GridBuilder.h.

template<typename ChildT >
nanovdb::build::InternalNode< ChildT >::InternalNode ( const InternalNode< ChildT > &  )
delete
template<typename ChildT >
nanovdb::build::InternalNode< ChildT >::InternalNode ( InternalNode< ChildT > &&  )
delete
template<typename ChildT >
nanovdb::build::InternalNode< ChildT >::~InternalNode ( )
inline

Definition at line 735 of file GridBuilder.h.

Member Function Documentation

template<typename ChildT >
void nanovdb::build::InternalNode< ChildT >::addChild ( ChildT *&  child)
inline

Definition at line 970 of file GridBuilder.h.

template<typename ChildT >
template<typename NodeT >
void nanovdb::build::InternalNode< ChildT >::addNode ( NodeT *&  node)
inline

Definition at line 1017 of file GridBuilder.h.

template<typename ChildT >
template<uint32_t level>
void nanovdb::build::InternalNode< ChildT >::addTile ( const Coord ijk,
const ValueType value,
bool  state 
)
inline

Add a tile containing voxel (i, j, k) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z).

Template Parameters
leveltree level at which the tile is inserted. Must be 1 or 2.
Parameters
ijkIndex coordinate that map to the tile being inserted
valueValue of the tile
stateBinary state of the tile

Definition at line 991 of file GridBuilder.h.

template<typename ChildT >
ChildIterator nanovdb::build::InternalNode< ChildT >::beginChild ( )
inline

Definition at line 661 of file GridBuilder.h.

template<typename ChildT >
DenseIterator nanovdb::build::InternalNode< ChildT >::beginDense ( )
inline

Definition at line 720 of file GridBuilder.h.

template<typename ChildT >
ValueIterator nanovdb::build::InternalNode< ChildT >::beginValue ( )
inline

Definition at line 678 of file GridBuilder.h.

template<typename ChildT >
ValueOnIterator nanovdb::build::InternalNode< ChildT >::beginValueOn ( )
inline

Definition at line 694 of file GridBuilder.h.

template<typename ChildT >
DenseIterator nanovdb::build::InternalNode< ChildT >::cbeginChildAll ( ) const
inline

Definition at line 721 of file GridBuilder.h.

template<typename ChildT >
ChildIterator nanovdb::build::InternalNode< ChildT >::cbeginChildOn ( ) const
inline

Definition at line 662 of file GridBuilder.h.

template<typename ChildT >
ValueIterator nanovdb::build::InternalNode< ChildT >::cbeginValueAll ( ) const
inline

Definition at line 679 of file GridBuilder.h.

template<typename ChildT >
ValueOnIterator nanovdb::build::InternalNode< ChildT >::cbeginValueOn ( ) const
inline

Definition at line 695 of file GridBuilder.h.

template<typename ChildT >
const MaskT& nanovdb::build::InternalNode< ChildT >::childMask ( ) const
inline

Definition at line 744 of file GridBuilder.h.

template<typename ChildT >
static uint32_t nanovdb::build::InternalNode< ChildT >::CoordToOffset ( const Coord ijk)
inlinestatic

Definition at line 755 of file GridBuilder.h.

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

Definition at line 786 of file GridBuilder.h.

template<typename ChildT >
template<typename OpT , typename AccT , typename... ArgsT>
auto nanovdb::build::InternalNode< ChildT >::getAndCache ( const Coord ijk,
const AccT &  acc,
ArgsT &&...  args 
) const
inline

Definition at line 810 of file GridBuilder.h.

template<typename ChildT >
const MaskT& nanovdb::build::InternalNode< ChildT >::getChildMask ( ) const
inline

Definition at line 743 of file GridBuilder.h.

template<typename ChildT >
ValueType nanovdb::build::InternalNode< ChildT >::getFirstValue ( ) const
inline

Definition at line 782 of file GridBuilder.h.

template<typename ChildT >
ValueType nanovdb::build::InternalNode< ChildT >::getLastValue ( ) const
inline

Definition at line 783 of file GridBuilder.h.

template<typename ChildT >
template<typename NodeT >
void nanovdb::build::InternalNode< ChildT >::getNodes ( std::vector< NodeT * > &  array)
inline

Definition at line 957 of file GridBuilder.h.

template<typename ChildT >
ValueType nanovdb::build::InternalNode< ChildT >::getValue ( const Coord ijk) const
inline

Definition at line 848 of file GridBuilder.h.

template<typename ChildT >
template<typename AccT >
ValueType nanovdb::build::InternalNode< ChildT >::getValueAndCache ( const Coord ijk,
AccT &  acc 
) const
inline

Definition at line 871 of file GridBuilder.h.

template<typename ChildT >
template<typename AccessorT >
const ChildT::ValueType& nanovdb::build::InternalNode< ChildT >::getValueAndCache ( const Coord xyz,
AccessorT &  acc 
) const
inline

Definition at line 1580 of file InternalNode.h.

template<typename ChildT >
const MaskT& nanovdb::build::InternalNode< ChildT >::getValueMask ( ) const
inline

Definition at line 741 of file GridBuilder.h.

template<typename ChildT >
template<typename AccT >
bool nanovdb::build::InternalNode< ChildT >::isActiveAndCache ( const Coord ijk,
AccT &  acc 
) const
inline

Definition at line 929 of file GridBuilder.h.

template<typename ChildT >
void nanovdb::build::InternalNode< ChildT >::localToGlobalCoord ( Coord ijk) const
inline

Definition at line 769 of file GridBuilder.h.

template<typename ChildT >
void nanovdb::build::InternalNode< ChildT >::merge ( InternalNode< ChildT > &  other)
inline

Definition at line 1035 of file GridBuilder.h.

template<typename ChildT >
void nanovdb::build::InternalNode< ChildT >::nodeCount ( std::array< size_t, 3 > &  count) const
inline

Definition at line 747 of file GridBuilder.h.

template<typename ChildT >
template<typename NodeT >
uint32_t nanovdb::build::InternalNode< ChildT >::nodeCount ( ) const
inline

Definition at line 941 of file GridBuilder.h.

template<typename ChildT >
Coord nanovdb::build::InternalNode< ChildT >::offsetToGlobalCoord ( uint32_t  n) const
inline

Definition at line 775 of file GridBuilder.h.

template<typename ChildT >
static Coord nanovdb::build::InternalNode< ChildT >::OffsetToLocalCoord ( uint32_t  n)
inlinestatic

Definition at line 762 of file GridBuilder.h.

template<typename ChildT >
InternalNode& nanovdb::build::InternalNode< ChildT >::operator= ( const InternalNode< ChildT > &  )
delete
template<typename ChildT >
InternalNode& nanovdb::build::InternalNode< ChildT >::operator= ( InternalNode< ChildT > &&  )
delete
template<typename ChildT >
const Coord& nanovdb::build::InternalNode< ChildT >::origin ( ) const
inline

Definition at line 745 of file GridBuilder.h.

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

Definition at line 794 of file GridBuilder.h.

template<typename ChildT >
template<typename OpT , typename AccT , typename... ArgsT>
auto nanovdb::build::InternalNode< ChildT >::setAndCache ( const Coord ijk,
const AccT &  acc,
ArgsT &&...  args 
)
inline

Definition at line 824 of file GridBuilder.h.

template<typename ChildT >
void nanovdb::build::InternalNode< ChildT >::setValue ( const Coord ijk,
const ValueType value 
)
inline

Definition at line 856 of file GridBuilder.h.

template<typename ChildT >
template<typename AccT >
void nanovdb::build::InternalNode< ChildT >::setValueAndCache ( const Coord ijk,
const ValueType value,
AccT &  acc 
)
inline

Definition at line 882 of file GridBuilder.h.

template<typename ChildT >
template<typename AccT >
void nanovdb::build::InternalNode< ChildT >::setValueOnAndCache ( const Coord ijk,
AccT &  acc 
)
inline

Definition at line 898 of file GridBuilder.h.

template<typename ChildT >
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type nanovdb::build::InternalNode< ChildT >::signedFloodFill ( outside)
inline

Definition at line 1060 of file GridBuilder.h.

template<typename ChildT >
template<typename AccT >
void nanovdb::build::InternalNode< ChildT >::touchLeafAndCache ( const Coord ijk,
AccT &  acc 
)
inline

Definition at line 914 of file GridBuilder.h.

template<typename ChildT >
template<typename AccessorT >
ChildT::LeafNodeType* nanovdb::build::InternalNode< ChildT >::touchLeafAndCache ( const Coord xyz,
AccessorT &  acc 
)
inline

Definition at line 1471 of file InternalNode.h.

template<typename ChildT >
const MaskT& nanovdb::build::InternalNode< ChildT >::valueMask ( ) const
inline

Definition at line 742 of file GridBuilder.h.

Member Data Documentation

union { ... }
template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::DIM = 1u << TOTAL
static

Definition at line 619 of file GridBuilder.h.

template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::LEVEL = 1 + ChildT::LEVEL
static

Definition at line 622 of file GridBuilder.h.

template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::LOG2DIM = ChildT::LOG2DIM + 1
static

Definition at line 617 of file GridBuilder.h.

template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::MASK = DIM - 1
static

Definition at line 621 of file GridBuilder.h.

template<typename ChildT >
MaskT nanovdb::build::InternalNode< ChildT >::mChildMask

Definition at line 639 of file GridBuilder.h.

template<typename ChildT >
NanoNodeT* nanovdb::build::InternalNode< ChildT >::mDstNode

Definition at line 643 of file GridBuilder.h.

template<typename ChildT >
uint64_t nanovdb::build::InternalNode< ChildT >::mDstOffset

Definition at line 644 of file GridBuilder.h.

template<typename ChildT >
Coord nanovdb::build::InternalNode< ChildT >::mOrigin

Definition at line 637 of file GridBuilder.h.

template<typename ChildT >
Tile nanovdb::build::InternalNode< ChildT >::mTable[SIZE]

Definition at line 640 of file GridBuilder.h.

template<typename ChildT >
MaskT nanovdb::build::InternalNode< ChildT >::mValueMask

Definition at line 638 of file GridBuilder.h.

template<typename ChildT >
constexpr uint64_t nanovdb::build::InternalNode< ChildT >::NUM_VALUES = uint64_t(1) << (3 * TOTAL)
static

Definition at line 623 of file GridBuilder.h.

template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::SIZE = 1u << (3 * LOG2DIM)
static

Definition at line 620 of file GridBuilder.h.

template<typename ChildT >
constexpr uint32_t nanovdb::build::InternalNode< ChildT >::TOTAL = LOG2DIM + ChildT::TOTAL
static

Definition at line 618 of file GridBuilder.h.


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