HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::Tree< RootT > Class Template Reference

VDB Tree, which is a thin wrapper around a RootNode. More...

#include <NanoVDB.h>

+ Inheritance diagram for nanovdb::Tree< RootT >:

Public Types

using DataType = TreeData
 
using RootType = RootT
 
using RootNodeType = RootT
 
using UpperNodeType = typename RootNodeType::ChildNodeType
 
using LowerNodeType = typename UpperNodeType::ChildNodeType
 
using LeafNodeType = typename RootType::LeafNodeType
 
using ValueType = typename RootT::ValueType
 
using BuildType = typename RootT::BuildType
 
using CoordType = typename RootT::CoordType
 
using AccessorType = DefaultReadAccessor< BuildType >
 
using Node3 = RootT
 
using Node2 = typename RootT::ChildNodeType
 
using Node1 = typename Node2::ChildNodeType
 
using Node0 = LeafNodeType
 

Public Member Functions

 Tree ()=delete
 This class cannot be constructed or deleted. More...
 
 Tree (const Tree &)=delete
 
Treeoperator= (const Tree &)=delete
 
 ~Tree ()=delete
 
__hostdev__ DataTypedata ()
 
__hostdev__ const DataTypedata () const
 
__hostdev__ RootT & root ()
 
__hostdev__ const RootT & root () const
 
__hostdev__ AccessorType getAccessor () const
 
__hostdev__ ValueType getValue (const CoordType &ijk) const
 Return the value of the given voxel (regardless of state or location in the tree.) More...
 
__hostdev__ ValueType getValue (int i, int j, int k) const
 
__hostdev__ bool isActive (const CoordType &ijk) const
 Return the active state of the given voxel (regardless of state or location in the tree.) More...
 
__hostdev__ bool probeValue (const CoordType &ijk, ValueType &v) const
 Return true if this tree is empty, i.e. contains no values or nodes. More...
 
__hostdev__ const ValueTypebackground () const
 Return a const reference to the background value. More...
 
__hostdev__ void extrema (ValueType &min, ValueType &max) const
 Sets the extrema values of all the active values in this tree, i.e. in all nodes of the tree. More...
 
__hostdev__ uint64_t activeVoxelCount () const
 Return a const reference to the index bounding box of all the active values in this tree, i.e. in all nodes of the tree. More...
 
__hostdev__ const uint32_t & activeTileCount (uint32_t level) const
 Return the total number of active tiles at the specified level of the tree. More...
 
template<typename NodeT >
__hostdev__ uint32_t nodeCount () const
 
__hostdev__ uint32_t nodeCount (int level) const
 
__hostdev__ uint32_t totalNodeCount () const
 
template<typename NodeT >
__hostdev__ NodeT * getFirstNode ()
 return a pointer to the first node of the specified type More...
 
template<typename NodeT >
__hostdev__ const NodeT * getFirstNode () const
 return a const pointer to the first node of the specified type More...
 
template<int LEVEL>
__hostdev__ NodeTrait< RootT,
LEVEL >::type
getFirstNode ()
 return a pointer to the first node at the specified level More...
 
template<int LEVEL>
__hostdev__ const NodeTrait
< RootT, LEVEL >::type
getFirstNode () const
 return a const pointer to the first node of the specified level More...
 
__hostdev__ LeafNodeTypegetFirstLeaf ()
 Template specializations of getFirstNode. More...
 
__hostdev__ const LeafNodeTypegetFirstLeaf () const
 
__hostdev__ NodeTrait< RootT, 1 >
::type
getFirstLower ()
 
__hostdev__ const NodeTrait
< RootT, 1 >::type
getFirstLower () const
 
__hostdev__ NodeTrait< RootT, 2 >
::type
getFirstUpper ()
 
__hostdev__ const NodeTrait
< RootT, 2 >::type
getFirstUpper () const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto get (const CoordType &ijk, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto set (const CoordType &ijk, ArgsT &&...args)
 

Static Public Member Functions

static __hostdev__ uint64_t memUsage ()
 return memory usage in bytes for the class More...
 

Detailed Description

template<typename RootT>
class nanovdb::Tree< RootT >

VDB Tree, which is a thin wrapper around a RootNode.

Definition at line 3976 of file NanoVDB.h.

Member Typedef Documentation

template<typename RootT>
using nanovdb::Tree< RootT >::AccessorType = DefaultReadAccessor<BuildType>

Definition at line 3993 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::BuildType = typename RootT::BuildType

Definition at line 3991 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::CoordType = typename RootT::CoordType

Definition at line 3992 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::DataType = TreeData

Definition at line 3984 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::LeafNodeType = typename RootType::LeafNodeType

Definition at line 3989 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::LowerNodeType = typename UpperNodeType::ChildNodeType

Definition at line 3988 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::Node0 = LeafNodeType

Definition at line 3998 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::Node1 = typename Node2::ChildNodeType

Definition at line 3997 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::Node2 = typename RootT::ChildNodeType

Definition at line 3996 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::Node3 = RootT

Definition at line 3995 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::RootNodeType = RootT

Definition at line 3986 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::RootType = RootT

Definition at line 3985 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::UpperNodeType = typename RootNodeType::ChildNodeType

Definition at line 3987 of file NanoVDB.h.

template<typename RootT>
using nanovdb::Tree< RootT >::ValueType = typename RootT::ValueType

Definition at line 3990 of file NanoVDB.h.

Constructor & Destructor Documentation

template<typename RootT>
nanovdb::Tree< RootT >::Tree ( )
delete

This class cannot be constructed or deleted.

template<typename RootT>
nanovdb::Tree< RootT >::Tree ( const Tree< RootT > &  )
delete
template<typename RootT>
nanovdb::Tree< RootT >::~Tree ( )
delete

Member Function Documentation

template<typename RootT>
__hostdev__ const uint32_t& nanovdb::Tree< RootT >::activeTileCount ( uint32_t  level) const
inline

Return the total number of active tiles at the specified level of the tree.

level = 1,2,3 corresponds to active tile count in lower internal nodes, upper internal nodes, and the root level. Note active values at the leaf level are referred to as active voxels (see activeVoxelCount defined above).

Definition at line 4059 of file NanoVDB.h.

template<typename RootT>
__hostdev__ uint64_t nanovdb::Tree< RootT >::activeVoxelCount ( ) const
inline

Return a const reference to the index bounding box of all the active values in this tree, i.e. in all nodes of the tree.

Return the total number of active voxels in this tree.

Definition at line 4052 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const ValueType& nanovdb::Tree< RootT >::background ( ) const
inline

Return a const reference to the background value.

Definition at line 4043 of file NanoVDB.h.

template<typename RootT>
__hostdev__ DataType* nanovdb::Tree< RootT >::data ( )
inline

Definition at line 4006 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const DataType* nanovdb::Tree< RootT >::data ( ) const
inline

Definition at line 4008 of file NanoVDB.h.

template<typename RootT >
__hostdev__ void nanovdb::Tree< RootT >::extrema ( ValueType min,
ValueType max 
) const

Sets the extrema values of all the active values in this tree, i.e. in all nodes of the tree.

Definition at line 4149 of file NanoVDB.h.

template<typename RootT>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::Tree< RootT >::get ( const CoordType ijk,
ArgsT &&...  args 
) const
inline

Definition at line 4132 of file NanoVDB.h.

template<typename RootT>
__hostdev__ AccessorType nanovdb::Tree< RootT >::getAccessor ( ) const
inline

Definition at line 4027 of file NanoVDB.h.

template<typename RootT>
__hostdev__ LeafNodeType* nanovdb::Tree< RootT >::getFirstLeaf ( )
inline

Template specializations of getFirstNode.

Definition at line 4124 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const LeafNodeType* nanovdb::Tree< RootT >::getFirstLeaf ( ) const
inline

Definition at line 4125 of file NanoVDB.h.

template<typename RootT>
__hostdev__ NodeTrait<RootT, 1>::type* nanovdb::Tree< RootT >::getFirstLower ( )
inline

Definition at line 4126 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const NodeTrait<RootT, 1>::type* nanovdb::Tree< RootT >::getFirstLower ( ) const
inline

Definition at line 4127 of file NanoVDB.h.

template<typename RootT>
template<typename NodeT >
__hostdev__ NodeT* nanovdb::Tree< RootT >::getFirstNode ( )
inline

return a pointer to the first node of the specified type

Warning
Note it may return NULL if no nodes exist

Definition at line 4087 of file NanoVDB.h.

template<typename RootT>
template<typename NodeT >
__hostdev__ const NodeT* nanovdb::Tree< RootT >::getFirstNode ( ) const
inline

return a const pointer to the first node of the specified type

Warning
Note it may return NULL if no nodes exist

Definition at line 4097 of file NanoVDB.h.

template<typename RootT>
template<int LEVEL>
__hostdev__ NodeTrait<RootT, LEVEL>::type* nanovdb::Tree< RootT >::getFirstNode ( )
inline

return a pointer to the first node at the specified level

Warning
Note it may return NULL if no nodes exist

Definition at line 4108 of file NanoVDB.h.

template<typename RootT>
template<int LEVEL>
__hostdev__ const NodeTrait<RootT, LEVEL>::type* nanovdb::Tree< RootT >::getFirstNode ( ) const
inline

return a const pointer to the first node of the specified level

Warning
Note it may return NULL if no nodes exist

Definition at line 4118 of file NanoVDB.h.

template<typename RootT>
__hostdev__ NodeTrait<RootT, 2>::type* nanovdb::Tree< RootT >::getFirstUpper ( )
inline

Definition at line 4128 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const NodeTrait<RootT, 2>::type* nanovdb::Tree< RootT >::getFirstUpper ( ) const
inline

Definition at line 4129 of file NanoVDB.h.

template<typename RootT>
__hostdev__ ValueType nanovdb::Tree< RootT >::getValue ( const CoordType ijk) const
inline

Return the value of the given voxel (regardless of state or location in the tree.)

Definition at line 4030 of file NanoVDB.h.

template<typename RootT>
__hostdev__ ValueType nanovdb::Tree< RootT >::getValue ( int  i,
int  j,
int  k 
) const
inline

Definition at line 4031 of file NanoVDB.h.

template<typename RootT>
__hostdev__ bool nanovdb::Tree< RootT >::isActive ( const CoordType ijk) const
inline

Return the active state of the given voxel (regardless of state or location in the tree.)

Definition at line 4034 of file NanoVDB.h.

template<typename RootT>
static __hostdev__ uint64_t nanovdb::Tree< RootT >::memUsage ( )
inlinestatic

return memory usage in bytes for the class

Definition at line 4011 of file NanoVDB.h.

template<typename RootT>
template<typename NodeT >
__hostdev__ uint32_t nanovdb::Tree< RootT >::nodeCount ( ) const
inline

Definition at line 4066 of file NanoVDB.h.

template<typename RootT>
__hostdev__ uint32_t nanovdb::Tree< RootT >::nodeCount ( int  level) const
inline

Definition at line 4072 of file NanoVDB.h.

template<typename RootT>
Tree& nanovdb::Tree< RootT >::operator= ( const Tree< RootT > &  )
delete
template<typename RootT>
__hostdev__ bool nanovdb::Tree< RootT >::probeValue ( const CoordType ijk,
ValueType v 
) const
inline

Return true if this tree is empty, i.e. contains no values or nodes.

Combines the previous two methods in a single call

Definition at line 4040 of file NanoVDB.h.

template<typename RootT>
__hostdev__ RootT& nanovdb::Tree< RootT >::root ( )
inline

Definition at line 4013 of file NanoVDB.h.

template<typename RootT>
__hostdev__ const RootT& nanovdb::Tree< RootT >::root ( ) const
inline

Definition at line 4020 of file NanoVDB.h.

template<typename RootT>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::Tree< RootT >::set ( const CoordType ijk,
ArgsT &&...  args 
)
inline

Definition at line 4138 of file NanoVDB.h.

template<typename RootT>
__hostdev__ uint32_t nanovdb::Tree< RootT >::totalNodeCount ( ) const
inline

Definition at line 4078 of file NanoVDB.h.


The documentation for this class was generated from the following file: