OpenVDB  11.0.0
Public Types | Public Member Functions | Protected Attributes | List of all members
NodeManager< GridT > Class Template Reference

#include <nanovdb/util/GridBuilder.h>

Public Types

using ValueType = typename GridT::ValueType
 
using BuildType = typename GridT::BuildType
 
using GridType = GridT
 
using TreeType = typename GridT::TreeType
 
using RootNodeType = typename TreeType::RootNodeType
 
using Node2 = typename RootNodeType::ChildNodeType
 
using Node1 = typename Node2::ChildNodeType
 
using Node0 = typename Node1::ChildNodeType
 

Public Member Functions

 NodeManager (GridT &grid)
 
void init ()
 
uint64_t nodeCount (int level) const
 Return the number of tree nodes at the specified level. More...
 
template<int LEVEL>
enable_if< LEVEL==0, Node0 & >::type node (int i)
 
template<int LEVEL>
enable_if< LEVEL==0, const Node0 & >::type node (int i) const
 
template<int LEVEL>
enable_if< LEVEL==1, Node1 & >::type node (int i)
 
template<int LEVEL>
enable_if< LEVEL==1, const Node1 & >::type node (int i) const
 
template<int LEVEL>
enable_if< LEVEL==2, Node2 & >::type node (int i)
 
template<int LEVEL>
enable_if< LEVEL==2, const Node2 & >::type node (int i) const
 
const Node0leaf (uint32_t i) const
 Return the i'th leaf node with respect to breadth-first ordering. More...
 
Node0leaf (uint32_t i)
 
uint64_t leafCount () const
 
const Node1lower (uint32_t i) const
 Return the i'th lower internal node with respect to breadth-first ordering. More...
 
Node1lower (uint32_t i)
 
uint64_t lowerCount () const
 
const Node2upper (uint32_t i) const
 Return the i'th upper internal node with respect to breadth-first ordering. More...
 
Node2upper (uint32_t i)
 
uint64_t upperCount () const
 
RootNodeTyperoot ()
 
const RootNodeTyperoot () const
 
TreeTypetree ()
 
const TreeTypetree () const
 
GridTypegrid ()
 
const GridTypegrid () const
 

Protected Attributes

GridT & mGrid
 
std::vector< Node0 * > mArray0
 
std::vector< Node1 * > mArray1
 
std::vector< Node2 * > mArray2
 

Member Typedef Documentation

using BuildType = typename GridT::BuildType
using GridType = GridT
using Node0 = typename Node1::ChildNodeType
using Node1 = typename Node2::ChildNodeType
using Node2 = typename RootNodeType::ChildNodeType
using RootNodeType = typename TreeType::RootNodeType
using TreeType = typename GridT::TreeType
using ValueType = typename GridT::ValueType

Constructor & Destructor Documentation

NodeManager ( GridT &  grid)
inline

Member Function Documentation

GridType& grid ( )
inline
const GridType& grid ( ) const
inline
void init ( )
inline
const Node0& leaf ( uint32_t  i) const
inline

Return the i'th leaf node with respect to breadth-first ordering.

Node0& leaf ( uint32_t  i)
inline
uint64_t leafCount ( ) const
inline
const Node1& lower ( uint32_t  i) const
inline

Return the i'th lower internal node with respect to breadth-first ordering.

Node1& lower ( uint32_t  i)
inline
uint64_t lowerCount ( ) const
inline
enable_if<LEVEL==0, Node0&>::type node ( int  i)
inline
enable_if<LEVEL==0, const Node0&>::type node ( int  i) const
inline
enable_if<LEVEL==1, Node1&>::type node ( int  i)
inline
enable_if<LEVEL==1, const Node1&>::type node ( int  i) const
inline
enable_if<LEVEL==2, Node2&>::type node ( int  i)
inline
enable_if<LEVEL==2, const Node2&>::type node ( int  i) const
inline
uint64_t nodeCount ( int  level) const
inline

Return the number of tree nodes at the specified level.

0 is leaf, 1 is lower internal, and 2 is upper internal level

RootNodeType& root ( )
inline
const RootNodeType& root ( ) const
inline
TreeType& tree ( )
inline
const TreeType& tree ( ) const
inline
const Node2& upper ( uint32_t  i) const
inline

Return the i'th upper internal node with respect to breadth-first ordering.

Node2& upper ( uint32_t  i)
inline
uint64_t upperCount ( ) const
inline

Member Data Documentation

std::vector<Node0*> mArray0
protected
std::vector<Node1*> mArray1
protected
std::vector<Node2*> mArray2
protected
GridT& mGrid
protected