OpenVDB 9.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
LeafFnBase< CoordT, MaskT, LOG2DIM > Struct Template Reference

Base-class for quantized float leaf nodes. More...

#include <nanovdb/NanoVDB.h>

Inherited by LeafData< Fp16, CoordT, MaskT, LOG2DIM >, LeafData< Fp4, CoordT, MaskT, LOG2DIM >, LeafData< Fp8, CoordT, MaskT, LOG2DIM >, and LeafData< FpN, CoordT, MaskT, LOG2DIM >.

Public Types

using ValueType = float
 
using FloatType = float
 

Public Member Functions

void init (float min, float max, uint8_t bitWidth)
 
float getMin () const
 return the quantized minimum of the active values in this node More...
 
float getMax () const
 return the quantized maximum of the active values in this node More...
 
float getAvg () const
 return the quantized average of the active values in this node More...
 
float getDev () const
 return the quantized standard deviation of the active values in this node More...
 
void setMin (float min)
 
void setMax (float max)
 
void setAvg (float avg)
 
void setDev (float dev)
 
template<typename T >
void setOrigin (const T &ijk)
 

Public Attributes

CoordT mBBoxMin
 
uint8_t mBBoxDif [3]
 
uint8_t mFlags
 
MaskT< LOG2DIM > mValueMask
 
float mMinimum
 
float mQuantum
 
uint16_t mMin
 
uint16_t mMax
 
uint16_t mAvg
 
uint16_t mDev
 

Detailed Description

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>
struct nanovdb::LeafFnBase< CoordT, MaskT, LOG2DIM >

Base-class for quantized float leaf nodes.

Member Typedef Documentation

◆ FloatType

using FloatType = float

◆ ValueType

using ValueType = float

Member Function Documentation

◆ getAvg()

float getAvg ( ) const
inline

return the quantized average of the active values in this node

◆ getDev()

float getDev ( ) const
inline

return the quantized standard deviation of the active values in this node

Note
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

◆ getMax()

float getMax ( ) const
inline

return the quantized maximum of the active values in this node

◆ getMin()

float getMin ( ) const
inline

return the quantized minimum of the active values in this node

◆ init()

void init ( float  min,
float  max,
uint8_t  bitWidth 
)
inline

◆ setAvg()

void setAvg ( float  avg)
inline
Note
min <= avg <= max or 0 <= (avg-min)/(min-max) <= 1

◆ setDev()

void setDev ( float  dev)
inline
Note
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

◆ setMax()

void setMax ( float  max)
inline
Note
min <= X <= max or 0 <= (X-min)/(min-max) <= 1

◆ setMin()

void setMin ( float  min)
inline
Note
min <= X <= max or 0 <= (X-min)/(min-max) <= 1

◆ setOrigin()

void setOrigin ( const T &  ijk)
inline

Member Data Documentation

◆ mAvg

uint16_t mAvg

◆ mBBoxDif

uint8_t mBBoxDif[3]

◆ mBBoxMin

CoordT mBBoxMin

◆ mDev

uint16_t mDev

◆ mFlags

uint8_t mFlags

◆ mMax

uint16_t mMax

◆ mMin

uint16_t mMin

◆ mMinimum

float mMinimum

◆ mQuantum

float mQuantum

◆ mValueMask

MaskT<LOG2DIM> mValueMask