OpenVDB  9.0.1
Public Member Functions | List of all members
NodeManager< GridT > Class Template Reference

NodeNanager maintains separate linear arrays of the three nodes types. More...

#include <nanovdb/util/NodeManager.h>

Public Member Functions

 NodeManager ()
 Empty constructor. More...
 
 NodeManager (GridT &grid)
 Construction from a grid. More...
 
 NodeManager (const NodeManager &)=delete
 Disallow copy construction. More...
 
 NodeManager (NodeManager &&)
 Move constructor. More...
 
 ~NodeManager ()
 Destructor. More...
 
NodeManageroperator= (const NodeManager &)=delete
 Disallow copy assignment operator. More...
 
NodeManageroperator= (NodeManager &&)
 Move assignment operator. More...
 
bool empty () const
 Return true of this instance is uninitialized. More...
 
size_t memUsage () const
 Return the memory footprint in bytes of this instance. More...
 
GridT * grid ()
 Return a pointer to the grid, or NULL if it is uninitialized. More...
 
TreeT * tree ()
 Return a pointer to the tree, or NULL if it is uninitialized. More...
 
RootT * root ()
 Return a pointer to the root, or NULL if it is uninitialized. More...
 
uint64_t nodeCount (int level) const
 Return the number of tree nodes at the specified level. More...
 
Node0 * leaf (uint32_t i) const
 Return the i'th leaf node. More...
 
Node1 * lower (uint32_t i) const
 Return the i'th lower internal node. More...
 
Node2 * upper (uint32_t i) const
 Return the i'th upper internal node. More...
 

Detailed Description

template<typename GridT>
class nanovdb::NodeManager< GridT >

NodeNanager maintains separate linear arrays of the three nodes types.

This host class allows for sequential access to nodes in a NanoVDB tree.

Nodes are stored breadth first to allow for sequential access of nodes at a particular level.

Constructor & Destructor Documentation

Empty constructor.

NodeManager ( GridT &  grid)

Construction from a grid.

NodeManager ( const NodeManager< GridT > &  )
delete

Disallow copy construction.

NodeManager ( NodeManager< GridT > &&  other)

Move constructor.

~NodeManager ( )
inline

Destructor.

Member Function Documentation

bool empty ( ) const
inline

Return true of this instance is uninitialized.

GridT* grid ( )
inline

Return a pointer to the grid, or NULL if it is uninitialized.

Node0* leaf ( uint32_t  i) const
inline

Return the i'th leaf node.

Warning
Never call this method is the NodeManager is un-initialized
Node1* lower ( uint32_t  i) const
inline

Return the i'th lower internal node.

Warning
Never call this method is the NodeManager is un-initialized
size_t memUsage ( ) const
inline

Return the memory footprint in bytes of this instance.

uint64_t nodeCount ( int  level) const
inline

Return the number of tree nodes at the specified level.

NodeManager& operator= ( const NodeManager< GridT > &  )
delete

Disallow copy assignment operator.

NodeManager< GridT > & operator= ( NodeManager< GridT > &&  other)

Move assignment operator.

RootT* root ( )
inline

Return a pointer to the root, or NULL if it is uninitialized.

TreeT* tree ( )
inline

Return a pointer to the tree, or NULL if it is uninitialized.

Node2* upper ( uint32_t  i) const
inline

Return the i'th upper internal node.

Warning
Never call this method is the NodeManager is un-initialized