OpenVDB  10.0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
RootNode< ChildT > Class Template Reference

Top-most node of the VDB tree structure. More...

#include <nanovdb/NanoVDB.h>

Inherits RootData< ChildT >.

Classes

class  ChildIterator
 
class  ValueIterator
 
class  ValueOnIterator
 

Public Types

using DataType = RootData< ChildT >
 
using LeafNodeType = typename ChildT::LeafNodeType
 
using ChildNodeType = ChildT
 
using RootType = RootNode< ChildT >
 
using ValueType = typename DataType::ValueT
 
using FloatType = typename DataType::StatsT
 
using BuildType = typename DataType::BuildT
 
using CoordType = typename ChildT::CoordType
 
using BBoxType = BBox< CoordType >
 
using AccessorType = DefaultReadAccessor< BuildType >
 
using Tile = typename DataType::Tile
 

Public Member Functions

ChildIterator beginChild () const
 
ValueIterator beginValue () const
 
ValueOnIterator beginValueOn () const
 
 RootNode ()=delete
 This class cannot be constructed or deleted. More...
 
 RootNode (const RootNode &)=delete
 
RootNodeoperator= (const RootNode &)=delete
 
 ~RootNode ()=delete
 
AccessorType getAccessor () const
 
DataTypedata ()
 
const DataTypedata () const
 
const BBoxTypebbox () 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...
 
const ValueTypebackground () const
 Return the total number of active voxels in the root and all its child nodes. More...
 
const uint32_t & tileCount () const
 Return the number of tiles encoded in this root node. More...
 
const ValueTypeminimum () const
 Return a const reference to the minimum active value encoded in this root node and any of its child nodes. More...
 
const ValueTypemaximum () const
 Return a const reference to the maximum active value encoded in this root node and any of its child nodes. More...
 
const FloatTypeaverage () const
 Return a const reference to the average of all the active values encoded in this root node and any of its child nodes. More...
 
FloatType variance () const
 Return the variance of all the active values encoded in this root node and any of its child nodes. More...
 
const FloatTypestdDeviation () const
 Return a const reference to the standard deviation of all the active values encoded in this root node and any of its child nodes. More...
 
uint64_t memUsage () const
 Return the actual memory footprint of this root node. More...
 
ValueType getValue (const CoordType &ijk) const
 Return the value of the given voxel. More...
 
bool isActive (const CoordType &ijk) const
 
bool isEmpty () const
 Return true if this RootNode is empty, i.e. contains no values or nodes. More...
 
bool probeValue (const CoordType &ijk, ValueType &v) const
 
const LeafNodeTypeprobeLeaf (const CoordType &ijk) const
 
const ChildNodeTypeprobeChild (const CoordType &ijk) const
 
const TileprobeTile (const CoordType &ijk) const
 Find and return a Tile of this root node. More...
 

Static Public Member Functions

static uint64_t memUsage (uint32_t tableSize)
 Return the expected memory footprint in bytes with the specified number of tiles. More...
 

Static Public Attributes

static constexpr bool FIXED_SIZE = DataType::FIXED_SIZE
 
static constexpr uint32_t LEVEL = 1 + ChildT::LEVEL
 

Private Types

using ValueT = typename ChildT::ValueType
 
using BuildT = typename ChildT::BuildType
 
using CoordT = typename ChildT::CoordType
 
using StatsT = typename ChildT::FloatType
 
using KeyT = uint64_t
 Return a key based on the coordinates of a voxel. More...
 

Private Member Functions

const Tiletile (uint32_t n) const
 Returns a non-const reference to the tile at the specified linear offset. More...
 
Tiletile (uint32_t n)
 
ChildT * getChild (const Tile *tile)
 Returns a const reference to the child node in the specified tile. More...
 
const ChildT * getChild (const Tile *tile) const
 
const ValueTgetMin () const
 
const ValueTgetMax () const
 
void setMin (const ValueT &v)
 
void setMax (const ValueT &v)
 
void setAvg (const StatsT &v)
 
void setDev (const StatsT &v)
 

Static Private Member Functions

template<typename CoordType >
static KeyT CoordToKey (const CoordType &ijk)
 
static CoordT KeyToCoord (const KeyT &key)
 
static constexpr uint32_t padding ()
 Return padding of this class in bytes, due to aliasing and 32B alignment. More...
 

Private Attributes

BBox< CoordTmBBox
 
uint32_t mTableSize
 
ValueT mBackground
 
ValueT mMinimum
 
ValueT mMaximum
 
StatsT mAverage
 
StatsT mStdDevi
 

Friends

template<typename , int , int , int >
class ReadAccessor
 
template<typename >
class Tree
 

Detailed Description

template<typename ChildT>
class nanovdb::RootNode< ChildT >

Top-most node of the VDB tree structure.

Member Typedef Documentation

using BuildType = typename DataType::BuildT
using ChildNodeType = ChildT
using CoordType = typename ChildT::CoordType
using DataType = RootData<ChildT>
using FloatType = typename DataType::StatsT
using LeafNodeType = typename ChildT::LeafNodeType
using RootType = RootNode<ChildT>
using Tile = typename DataType::Tile
using ValueType = typename DataType::ValueT

Constructor & Destructor Documentation

RootNode ( )
delete

This class cannot be constructed or deleted.

RootNode ( const RootNode< ChildT > &  )
delete
~RootNode ( )
delete

Member Function Documentation

const FloatType& average ( ) const
inline

Return a const reference to the average of all the active values encoded in this root node and any of its child nodes.

const ValueType& background ( ) const
inline

Return the total number of active voxels in the root and all its child nodes.

Return a const reference to the background value, i.e. the value associated with any coordinate location that has not been set explicitly.

const BBoxType& bbox ( ) 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.

ChildIterator beginChild ( ) const
inline
ValueIterator beginValue ( ) const
inline
ValueOnIterator beginValueOn ( ) const
inline
DataType* data ( )
inline
const DataType* data ( ) const
inline
AccessorType getAccessor ( ) const
inline
ValueType getValue ( const CoordType ijk) const
inline

Return the value of the given voxel.

bool isActive ( const CoordType ijk) const
inline
bool isEmpty ( ) const
inline

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

const ValueType& maximum ( ) const
inline

Return a const reference to the maximum active value encoded in this root node and any of its child nodes.

static uint64_t memUsage ( uint32_t  tableSize)
inlinestatic

Return the expected memory footprint in bytes with the specified number of tiles.

uint64_t memUsage ( ) const
inline

Return the actual memory footprint of this root node.

const ValueType& minimum ( ) const
inline

Return a const reference to the minimum active value encoded in this root node and any of its child nodes.

RootNode& operator= ( const RootNode< ChildT > &  )
delete
const ChildNodeType* probeChild ( const CoordType ijk) const
inline
const LeafNodeType* probeLeaf ( const CoordType ijk) const
inline
const Tile* probeTile ( const CoordType ijk) const
inline

Find and return a Tile of this root node.

bool probeValue ( const CoordType ijk,
ValueType v 
) const
inline
const FloatType& stdDeviation ( ) const
inline

Return a const reference to the standard deviation of all the active values encoded in this root node and any of its child nodes.

const uint32_t& tileCount ( ) const
inline

Return the number of tiles encoded in this root node.

FloatType variance ( ) const
inline

Return the variance of all the active values encoded in this root node and any of its child nodes.

Friends And Related Function Documentation

friend class ReadAccessor
friend
friend class Tree
friend

Member Data Documentation

constexpr bool FIXED_SIZE = DataType::FIXED_SIZE
static
constexpr uint32_t LEVEL = 1 + ChildT::LEVEL
static