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

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

Constructor & Destructor Documentation

RootNode ( const ValueType background)
inline
RootNode ( const RootNode< ChildT > &  )
delete
RootNode ( RootNode< ChildT > &&  )
default
~RootNode ( )
inline

Member Function Documentation

void addChild ( ChildT *&  child)
inline
void addNode ( NodeT *&  node)
inline
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
const ValueType& background ( ) const
inline
TileIterator beginTile ( )
inline
ValueIterator beginValue ( )
inline
ValueOnIterator beginValueOn ( )
inline
ChildIterator cbeginChild ( ) const
inline
TileIterator cbeginChildAll ( ) const
inline
ChildIterator cbeginChildOn ( ) const
inline
ValueIterator cbeginValueAll ( ) const
inline
ValueOnIterator cbeginValueOn ( ) const
inline
void clear ( )
inline
static Coord CoordToKey ( const Coord ijk)
inlinestatic
bool empty ( ) const
inline
void getNodes ( std::vector< NodeT * > &  array)
inline
uint32_t getTableSize ( ) const
inline
ValueType getValue ( const Coord ijk) const
inline
ValueType getValue ( int  i,
int  j,
int  k 
) const
inline
ValueType getValueAndCache ( const Coord ijk,
AccT &  acc 
) const
inline
bool isActiveAndCache ( const Coord ijk,
AccT &  acc 
) const
inline
void merge ( RootNode< ChildT > &  other)
inline
void nodeCount ( std::array< size_t, 3 > &  count) const
inline
uint32_t nodeCount ( ) const
inline
RootNode& operator= ( const RootNode< ChildT > &  )
delete
RootNode& operator= ( RootNode< ChildT > &&  )
default
Tile* probeTile ( const Coord ijk)
inline
const Tile* probeTile ( const Coord ijk) const
inline
void setValue ( const Coord ijk,
const ValueType value 
)
inline
void setValueAndCache ( const Coord ijk,
const ValueType value,
AccT &  acc 
)
inline
void setValueOnAndCache ( const Coord ijk,
AccT &  acc 
)
inline
std::enable_if< std::is_floating_point< T >::value >::type signedFloodFill ( outside)
inline
uint32_t tileCount ( ) const
inline
void touchLeafAndCache ( const Coord ijk,
AccT &  acc 
)
inline

Member Data Documentation

constexpr uint32_t LEVEL = 1 + ChildT::LEVEL
static
ValueType mBackground
MapT mTable