OpenVDB 13.1.0
Loading...
Searching...
No Matches
RootData< ChildT > Struct Template Reference

Struct with all the member data of the RootNode (useful during serialization of an openvdb RootNode) More...

#include <nanovdb/NanoVDB.h>

Classes

struct  Tile
class  TileIter

Public 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.
using TileIterator = TileIter<RootData>
using ConstTileIterator = TileIter<const RootData>

Public Member Functions

const Tile * tile (uint32_t n) const
 Returns a pointer to the tile at the specified linear offset.
Tile * tile (uint32_t n)
TileIterator beginTile ()
ConstTileIterator cbeginTile () const
TileIterator probe (const CoordT &ijk)
ConstTileIterator probe (const CoordT &ijk) const
Tile * probeTile (const CoordT &ijk)
const Tile * probeTile (const CoordT &ijk) const
ChildT * probeChild (const CoordT &ijk)
const ChildT * probeChild (const CoordT &ijk) const
ChildT * getChild (const Tile *tile)
 Returns a const reference to the child node in the specified tile.
const ChildT * getChild (const Tile *tile) const
const ValueT & getMin () const
const ValueT & getMax () const
const StatsT & average () const
const StatsT & stdDeviation () const
void setMin (const ValueT &v)
void setMax (const ValueT &v)
void setAvg (const StatsT &v)
void setDev (const StatsT &v)
 RootData ()=delete
 This class cannot be constructed or deleted.
 RootData (const RootData &)=delete
RootData & operator= (const RootData &)=delete
 ~RootData ()=delete

Static Public 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.

Public Attributes

math::BBox< CoordT > mBBox
uint32_t mTableSize
ValueT mBackground
ValueT mMinimum
ValueT mMaximum
StatsT mAverage
StatsT mStdDevi

Static Public Attributes

static constexpr bool FIXED_SIZE = false

Detailed Description

template<typename ChildT>
struct nanovdb::RootData< ChildT >

Struct with all the member data of the RootNode (useful during serialization of an openvdb RootNode)

Note
No client code should (or can) interface with this struct so it can safely be ignored!

Member Typedef Documentation

◆ BuildT

template<typename ChildT>
using BuildT = typename ChildT::BuildType

◆ ConstTileIterator

template<typename ChildT>
using ConstTileIterator = TileIter<const RootData>

◆ CoordT

template<typename ChildT>
using CoordT = typename ChildT::CoordType

◆ KeyT

template<typename ChildT>
using KeyT = uint64_t

Return a key based on the coordinates of a voxel.

◆ StatsT

template<typename ChildT>
using StatsT = typename ChildT::FloatType

◆ TileIterator

template<typename ChildT>
using TileIterator = TileIter<RootData>

◆ ValueT

template<typename ChildT>
using ValueT = typename ChildT::ValueType

Constructor & Destructor Documentation

◆ RootData() [1/2]

template<typename ChildT>
RootData ( )
delete

This class cannot be constructed or deleted.

◆ RootData() [2/2]

template<typename ChildT>
RootData ( const RootData< ChildT > & )
delete

◆ ~RootData()

template<typename ChildT>
~RootData ( )
delete

Member Function Documentation

◆ average()

template<typename ChildT>
const StatsT & average ( ) const
inline

◆ beginTile()

template<typename ChildT>
TileIterator beginTile ( )
inline

◆ cbeginTile()

template<typename ChildT>
ConstTileIterator cbeginTile ( ) const
inline

◆ CoordToKey()

template<typename ChildT>
template<typename CoordType>
KeyT CoordToKey ( const CoordType & ijk)
inlinestatic

◆ getChild() [1/2]

template<typename ChildT>
ChildT * getChild ( const Tile * tile)
inline

Returns a const reference to the child node in the specified tile.

Warning
A child node is assumed to exist in the specified tile

◆ getChild() [2/2]

template<typename ChildT>
const ChildT * getChild ( const Tile * tile) const
inline

◆ getMax()

template<typename ChildT>
const ValueT & getMax ( ) const
inline

◆ getMin()

template<typename ChildT>
const ValueT & getMin ( ) const
inline

◆ KeyToCoord()

template<typename ChildT>
CoordT KeyToCoord ( const KeyT & key)
inlinestatic

◆ operator=()

template<typename ChildT>
RootData & operator= ( const RootData< ChildT > & )
delete

◆ padding()

template<typename ChildT>
constexpr uint32_t padding ( )
inlinestaticconstexpr

Return padding of this class in bytes, due to aliasing and 32B alignment.

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

◆ probe() [1/2]

template<typename ChildT>
TileIterator probe ( const CoordT & ijk)
inline

◆ probe() [2/2]

template<typename ChildT>
ConstTileIterator probe ( const CoordT & ijk) const
inline

◆ probeChild() [1/2]

template<typename ChildT>
ChildT * probeChild ( const CoordT & ijk)
inline

◆ probeChild() [2/2]

template<typename ChildT>
const ChildT * probeChild ( const CoordT & ijk) const
inline

◆ probeTile() [1/2]

template<typename ChildT>
Tile * probeTile ( const CoordT & ijk)
inline

◆ probeTile() [2/2]

template<typename ChildT>
const Tile * probeTile ( const CoordT & ijk) const
inline

◆ setAvg()

template<typename ChildT>
void setAvg ( const StatsT & v)
inline

◆ setDev()

template<typename ChildT>
void setDev ( const StatsT & v)
inline

◆ setMax()

template<typename ChildT>
void setMax ( const ValueT & v)
inline

◆ setMin()

template<typename ChildT>
void setMin ( const ValueT & v)
inline

◆ stdDeviation()

template<typename ChildT>
const StatsT & stdDeviation ( ) const
inline

◆ tile() [1/2]

template<typename ChildT>
Tile * tile ( uint32_t n)
inline

◆ tile() [2/2]

template<typename ChildT>
const Tile * tile ( uint32_t n) const
inline

Returns a pointer to the tile at the specified linear offset.

Warning
The linear offset is assumed to be in the valid range

Member Data Documentation

◆ FIXED_SIZE

template<typename ChildT>
bool FIXED_SIZE = false
staticconstexpr

◆ mAverage

template<typename ChildT>
StatsT mAverage

◆ mBackground

template<typename ChildT>
ValueT mBackground

◆ mBBox

template<typename ChildT>
math::BBox<CoordT> mBBox

◆ mMaximum

template<typename ChildT>
ValueT mMaximum

◆ mMinimum

template<typename ChildT>
ValueT mMinimum

◆ mStdDevi

template<typename ChildT>
StatsT mStdDevi

◆ mTableSize

template<typename ChildT>
uint32_t mTableSize