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

#include <nanovdb/util/GridBuilder.h>

Classes

class  ChildIterator
 
struct  Tile
 
class  TileIterator
 
class  ValueIterator
 
class  ValueOnIterator
 

Public Types

using ValueType = typename ChildT::ValueType
 
using BuildType = typename ChildT::BuildType
 
using ChildNodeType = ChildT
 
using LeafNodeType = typename ChildT::LeafNodeType
 
using MapT = std::map< Coord, Tile >
 

Public Member Functions

TileprobeTile (const Coord &ijk)
 
const TileprobeTile (const Coord &ijk) const
 
ChildIterator cbeginChild () const
 
ChildIterator cbeginChildOn () const
 
ValueIterator beginValue ()
 
ValueIterator cbeginValueAll () const
 
ValueOnIterator beginValueOn ()
 
ValueOnIterator cbeginValueOn () const
 
TileIterator beginTile ()
 
TileIterator cbeginChildAll () const
 
 RootNode (const ValueType &background)
 
 RootNode (const RootNode &)=delete
 
 RootNode (RootNode &&)=default
 
RootNodeoperator= (const RootNode &)=delete
 
RootNodeoperator= (RootNode &&)=default
 
 ~RootNode ()
 
uint32_t tileCount () const
 
uint32_t getTableSize () const
 
const ValueTypebackground () const
 
void nodeCount (std::array< size_t, 3 > &count) const
 
bool empty () const
 
void clear ()
 
ValueType getValue (const Coord &ijk) const
 
ValueType getValue (int i, int j, int k) const
 
void setValue (const Coord &ijk, const ValueType &value)
 
template<typename AccT >
bool isActiveAndCache (const Coord &ijk, AccT &acc) const
 
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 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 (RootNode &other)
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type signedFloodFill (T outside)
 

Static Public Member Functions

static Coord CoordToKey (const Coord &ijk)
 

Public Attributes

MapT mTable
 
ValueType mBackground
 

Static Public Attributes

static constexpr uint32_t LEVEL = 1 + ChildT::LEVEL
 

Member Typedef Documentation

◆ BuildType

using BuildType = typename ChildT::BuildType

◆ ChildNodeType

using ChildNodeType = ChildT

◆ LeafNodeType

using LeafNodeType = typename ChildT::LeafNodeType

◆ MapT

using MapT = std::map<Coord, Tile>

◆ ValueType

using ValueType = typename ChildT::ValueType

Constructor & Destructor Documentation

◆ RootNode() [1/3]

RootNode ( const ValueType background)
inline

◆ RootNode() [2/3]

RootNode ( const RootNode< ChildT > &  )
delete

◆ RootNode() [3/3]

RootNode ( RootNode< ChildT > &&  )
default

◆ ~RootNode()

~RootNode ( )
inline

Member Function Documentation

◆ addChild()

void addChild ( ChildT *&  child)
inline

◆ addNode()

void addNode ( NodeT *&  node)
inline

◆ addTile()

void 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, 2 or 3.
Parameters
ijkIndex coordinate that map to the tile being inserted
valueValue of the tile
stateBinary state of the tile

◆ background()

const ValueType& background ( ) const
inline

◆ beginTile()

TileIterator beginTile ( )
inline

◆ beginValue()

ValueIterator beginValue ( )
inline

◆ beginValueOn()

ValueOnIterator beginValueOn ( )
inline

◆ cbeginChild()

ChildIterator cbeginChild ( ) const
inline

◆ cbeginChildAll()

TileIterator cbeginChildAll ( ) const
inline

◆ cbeginChildOn()

ChildIterator cbeginChildOn ( ) const
inline

◆ cbeginValueAll()

ValueIterator cbeginValueAll ( ) const
inline

◆ cbeginValueOn()

ValueOnIterator cbeginValueOn ( ) const
inline

◆ clear()

void clear ( )
inline

◆ CoordToKey()

static Coord CoordToKey ( const Coord ijk)
inlinestatic

◆ empty()

bool empty ( ) const
inline

◆ getNodes()

void getNodes ( std::vector< NodeT * > &  array)
inline

◆ getTableSize()

uint32_t getTableSize ( ) const
inline

◆ getValue() [1/2]

ValueType getValue ( const Coord ijk) const
inline

◆ getValue() [2/2]

ValueType getValue ( int  i,
int  j,
int  k 
) const
inline

◆ getValueAndCache()

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

◆ isActiveAndCache()

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

◆ merge()

void merge ( RootNode< ChildT > &  other)
inline

◆ nodeCount() [1/2]

uint32_t nodeCount ( ) const
inline

◆ nodeCount() [2/2]

void nodeCount ( std::array< size_t, 3 > &  count) const
inline

◆ operator=() [1/2]

RootNode& operator= ( const RootNode< ChildT > &  )
delete

◆ operator=() [2/2]

RootNode& operator= ( RootNode< ChildT > &&  )
default

◆ probeTile() [1/2]

Tile* probeTile ( const Coord ijk)
inline

◆ probeTile() [2/2]

const Tile* probeTile ( const Coord ijk) const
inline

◆ setValue()

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

◆ setValueAndCache()

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

◆ setValueOnAndCache()

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

◆ signedFloodFill()

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

◆ tileCount()

uint32_t tileCount ( ) const
inline

◆ touchLeafAndCache()

void touchLeafAndCache ( const Coord ijk,
AccT &  acc 
)
inline

Member Data Documentation

◆ LEVEL

constexpr uint32_t LEVEL = 1 + ChildT::LEVEL
staticconstexpr

◆ mBackground

ValueType mBackground

◆ mTable

MapT mTable