OpenVDB
11.0.0
|
Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels) More...
#include <nanovdb/NanoVDB.h>
Inherits LeafData< BuildT, CoordT, MaskT, Log2Dim >.
Classes | |
struct | ChildNodeType |
class | ValueIterator |
Visits all values in a leaf node, i.e. both active and inactive values. More... | |
class | ValueOffIterator |
Visits all inactive values in a leaf node. More... | |
class | ValueOnIterator |
Visits all active values in a leaf node. More... | |
Public Types | |
using | LeafNodeType = LeafNode< BuildT, CoordT, MaskT, Log2Dim > |
using | DataType = LeafData< BuildT, CoordT, MaskT, Log2Dim > |
using | ValueType = typename DataType::ValueType |
using | FloatType = typename DataType::FloatType |
using | BuildType = typename DataType::BuildType |
using | CoordType = CoordT |
template<uint32_t LOG2> | |
using | MaskType = MaskT< LOG2 > |
template<bool ON> | |
using | MaskIterT = typename Mask< Log2Dim >::template Iterator< ON > |
using | ArrayType = BuildT |
Public Member Functions | |
ValueOnIterator | beginValueOn () const |
ValueOnIterator | cbeginValueOn () const |
ValueOffIterator | beginValueOff () const |
ValueOffIterator | cbeginValueOff () const |
ValueIterator | beginValue () const |
ValueIterator | cbeginValueAll () const |
DataType * | data () |
const DataType * | data () const |
const MaskType< LOG2DIM > & | valueMask () const |
Return a const reference to the bit mask of active voxels in this leaf node. More... | |
const MaskType< LOG2DIM > & | getValueMask () const |
ValueType | minimum () const |
Return a const reference to the minimum active value encoded in this leaf node. More... | |
ValueType | maximum () const |
Return a const reference to the maximum active value encoded in this leaf node. More... | |
FloatType | average () const |
Return a const reference to the average of all the active values encoded in this leaf node. More... | |
FloatType | variance () const |
Return the variance of all the active values encoded in this leaf node. More... | |
FloatType | stdDeviation () const |
Return a const reference to the standard deviation of all the active values encoded in this leaf node. More... | |
uint8_t | flags () const |
CoordT | origin () const |
Return the origin in index space of this leaf node. More... | |
void | localToGlobalCoord (Coord &ijk) const |
Converts (in place) a local index coordinate to a global index coordinate. More... | |
CoordT | offsetToGlobalCoord (uint32_t n) const |
BBox< CoordT > | bbox () const |
Return the bounding box in index space of active values in this leaf node. More... | |
uint64_t | memUsage () const |
return memory usage in bytes for the leaf node More... | |
LeafNode ()=delete | |
This class cannot be constructed or deleted. More... | |
LeafNode (const LeafNode &)=delete | |
LeafNode & | operator= (const LeafNode &)=delete |
~LeafNode ()=delete | |
ValueType | getValue (uint32_t offset) const |
Return the voxel value at the given offset. More... | |
ValueType | getValue (const CoordT &ijk) const |
Return the voxel value at the given coordinate. More... | |
ValueType | getFirstValue () const |
Return the first value in this leaf node. More... | |
ValueType | getLastValue () const |
Return the last value in this leaf node. More... | |
void | setValue (const CoordT &ijk, const ValueType &v) |
Sets the value at the specified location and activate its state. More... | |
void | setValueOnly (uint32_t offset, const ValueType &v) |
Sets the value at the specified location but leaves its state unchanged. More... | |
void | setValueOnly (const CoordT &ijk, const ValueType &v) |
bool | isActive (const CoordT &ijk) const |
Return true if the voxel value at the given coordinate is active. More... | |
bool | isActive (uint32_t n) const |
bool | isActive () const |
Return true if any of the voxel value are active in this leaf node. More... | |
bool | hasBBox () const |
bool | probeValue (const CoordT &ijk, ValueType &v) const |
Return true if the voxel value at the given coordinate is active and updates v with the value. More... | |
const LeafNode * | probeLeaf (const CoordT &) const |
bool | updateBBox () |
Updates the local bounding box of active voxels in this node. Return true if bbox was updated. More... | |
template<typename OpT , typename... ArgsT> | |
auto | get (const CoordType &ijk, ArgsT &&...args) const |
template<typename OpT , typename... ArgsT> | |
auto | get (const uint32_t n, ArgsT &&...args) const |
template<typename OpT , typename... ArgsT> | |
auto | set (const CoordType &ijk, ArgsT &&...args) |
template<typename OpT , typename... ArgsT> | |
auto | set (const uint32_t n, ArgsT &&...args) |
void | setValueOnly (uint32_t offset, const ValueType &value) |
void | setValue (uint32_t offset, const ValueType &value) |
void | setOn (uint32_t offset) |
ValueType | getMin () const |
ValueType | getMax () const |
FloatType | getAvg () const |
FloatType | getDev () const |
void | setMin (const ValueType &v) |
void | setMax (const ValueType &v) |
void | setAvg (const FloatType &v) |
void | setDev (const FloatType &v) |
void | setOrigin (const T &ijk) |
void | fill (const ValueType &v) |
Static Public Member Functions | |
static CoordT | OffsetToLocalCoord (uint32_t n) |
Compute the local coordinates from a linear offset. More... | |
static uint32_t | dim () |
Return the dimension, in index space, of this leaf node (typically 8 as for openvdb leaf nodes!) More... | |
static uint32_t | voxelCount () |
Return the total number of voxels (e.g. values) encoded in this leaf node. More... | |
static uint32_t | padding () |
static uint32_t | CoordToOffset (const CoordT &ijk) |
Return the linear offset corresponding to the given coordinate. More... | |
static uint64_t | memUsage () |
static bool | hasStats () |
Public Attributes | |
CoordT | mBBoxMin |
uint8_t | mBBoxDif [3] |
uint8_t | mFlags |
MaskT< LOG2DIM > | mValueMask |
ValueType | mMinimum |
ValueType | mMaximum |
FloatType | mAverage |
FloatType | mStdDevi |
ValueType | mValues [1u<< 3 *LOG2DIM] |
Static Public Attributes | |
static constexpr bool | FIXED_SIZE = DataType::FIXED_SIZE |
static constexpr uint32_t | LOG2DIM = Log2Dim |
static constexpr uint32_t | TOTAL = LOG2DIM |
static constexpr uint32_t | DIM = 1u << TOTAL |
static constexpr uint32_t | SIZE = 1u << 3 * LOG2DIM |
static constexpr uint32_t | MASK = (1u << LOG2DIM) - 1u |
static constexpr uint32_t | LEVEL = 0 |
static constexpr uint64_t | NUM_VALUES = uint64_t(1) << (3 * TOTAL) |
Friends | |
template<typename , int , int , int > | |
class | ReadAccessor |
template<typename > | |
class | RootNode |
template<typename , uint32_t > | |
class | InternalNode |
Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels)
|
inherited |
using BuildType = typename DataType::BuildType |
using CoordType = CoordT |
using FloatType = typename DataType::FloatType |
using LeafNodeType = LeafNode<BuildT, CoordT, MaskT, Log2Dim> |
using MaskType = MaskT<LOG2> |
using ValueType = typename DataType::ValueType |
|
delete |
This class cannot be constructed or deleted.
|
delete |
|
inline |
Return a const reference to the average of all the active values encoded in this leaf node.
|
inline |
Return the bounding box in index space of active values in this leaf node.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Return the linear offset corresponding to the given coordinate.
|
inline |
|
inline |
|
inlinestatic |
Return the dimension, in index space, of this leaf node (typically 8 as for openvdb leaf nodes!)
|
inlineinherited |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the first value in this leaf node.
|
inline |
Return the last value in this leaf node.
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the voxel value at the given offset.
|
inline |
Return the voxel value at the given coordinate.
|
inline |
|
inlinestaticinherited |
|
inline |
Return true
if the voxel value at the given coordinate is active.
|
inline |
|
inline |
Return true
if any of the voxel value are active in this leaf node.
|
inline |
Converts (in place) a local index coordinate to a global index coordinate.
|
inline |
Return a const reference to the maximum active value encoded in this leaf node.
|
inlinestaticinherited |
|
inline |
return memory usage in bytes for the leaf node
|
inline |
Return a const reference to the minimum active value encoded in this leaf node.
|
inline |
|
inlinestatic |
Compute the local coordinates from a linear offset.
n | Linear offset into this nodes dense table |
|
inline |
Return the origin in index space of this leaf node.
|
inlinestatic |
|
inline |
|
inline |
Return true
if the voxel value at the given coordinate is active and updates v
with the value.
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Sets the value at the specified location and activate its state.
|
inlineinherited |
|
inline |
Sets the value at the specified location but leaves its state unchanged.
|
inline |
|
inline |
Return a const reference to the standard deviation of all the active values encoded in this leaf node.
|
inline |
Updates the local bounding box of active voxels in this node. Return true if bbox was updated.
This method is based on few (intrinsic) bit operations and hence is relatively fast. However, it should only only be called if either the value mask has changed or if the active bounding box is still undefined. e.g. during construction of this node.
Return a const reference to the bit mask of active voxels in this leaf node.
|
inline |
Return the variance of all the active values encoded in this leaf node.
|
inlinestatic |
Return the total number of voxels (e.g. values) encoded in this leaf node.
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
static |
|
static |
|
static |