OpenVDB 9.0.0
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

◆ NodeManager() [1/4]

Empty constructor.

◆ NodeManager() [2/4]

NodeManager ( GridT &  grid)

Construction from a grid.

◆ NodeManager() [3/4]

NodeManager ( const NodeManager< GridT > &  )
delete

Disallow copy construction.

◆ NodeManager() [4/4]

NodeManager ( NodeManager< GridT > &&  other)

Move constructor.

◆ ~NodeManager()

~NodeManager ( )
inline

Destructor.

Member Function Documentation

◆ empty()

bool empty ( ) const
inline

Return true of this instance is uninitialized.

◆ grid()

GridT * grid ( )
inline

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

◆ leaf()

Node0 * leaf ( uint32_t  i) const
inline

Return the i'th leaf node.

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

◆ lower()

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

◆ memUsage()

size_t memUsage
inline

Return the memory footprint in bytes of this instance.

◆ nodeCount()

uint64_t nodeCount ( int  level) const
inline

Return the number of tree nodes at the specified level.

◆ operator=() [1/2]

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

Disallow copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ root()

RootT * root ( )
inline

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

◆ tree()

TreeT * tree ( )
inline

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

◆ upper()

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