Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels)
More...
#include <nanovdb/NanoVDB.h>
Inherits LeafData< BuildT, Coord, Mask, 3 >.
|
static CoordT | OffsetToLocalCoord (uint32_t n) |
|
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...
|
|
template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
class nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >
Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels)
◆ BuildType
◆ CoordType
◆ DataType
◆ FloatType
◆ LeafNodeType
◆ MaskIterT
◆ MaskType
◆ ValueType
◆ LeafNode() [1/2]
This class cannot be constructed or deleted.
◆ LeafNode() [2/2]
◆ ~LeafNode()
◆ average()
Return a const reference to the average of all the active values encoded in this leaf node.
◆ bbox()
BBox<CoordT> bbox |
( |
| ) |
const |
|
inline |
Return the bounding box in index space of active values in this leaf node.
◆ beginValue()
◆ beginValueOff()
◆ beginValueOn()
◆ CoordToOffset()
static uint32_t CoordToOffset |
( |
const CoordT & |
ijk | ) |
|
|
inlinestatic |
Return the linear offset corresponding to the given coordinate.
◆ data() [1/2]
◆ data() [2/2]
◆ dim()
Return the dimension, in index space, of this leaf node (typically 8 as for openvdb leaf nodes!)
◆ flags()
◆ getValue() [1/2]
ValueType getValue |
( |
const CoordT & |
ijk | ) |
const |
|
inline |
Return the voxel value at the given coordinate.
◆ getValue() [2/2]
Return the voxel value at the given offset.
◆ hasBBox()
◆ isActive() [1/3]
Return true
if any of the voxel value are active in this leaf node.
◆ isActive() [2/3]
bool isActive |
( |
const CoordT & |
ijk | ) |
const |
|
inline |
Return true
if the voxel value at the given coordinate is active.
◆ isActive() [3/3]
bool isActive |
( |
uint32_t |
n | ) |
const |
|
inline |
◆ localToGlobalCoord()
void localToGlobalCoord |
( |
Coord & |
ijk | ) |
const |
|
inline |
Converts (in place) a local index coordinate to a global index coordinate.
◆ maximum()
Return a const reference to the maximum active value encoded in this leaf node.
◆ memUsage()
return memory usage in bytes for the class
◆ minimum()
Return a const reference to the minimum active value encoded in this leaf node.
◆ offsetToGlobalCoord()
CoordT offsetToGlobalCoord |
( |
uint32_t |
n | ) |
const |
|
inline |
◆ OffsetToLocalCoord()
static CoordT OffsetToLocalCoord |
( |
uint32_t |
n | ) |
|
|
inlinestatic |
◆ operator=()
◆ origin()
Return the origin in index space of this leaf node.
◆ padding()
static uint32_t padding |
( |
| ) |
|
|
inlinestatic |
◆ probeLeaf()
const LeafNode* probeLeaf |
( |
const CoordT & |
| ) |
const |
|
inline |
◆ probeValue()
bool probeValue |
( |
const CoordT & |
ijk, |
|
|
ValueType & |
v |
|
) |
| const |
|
inline |
Return true
if the voxel value at the given coordinate is active and updates v
with the value.
◆ setValue()
void setValue |
( |
const CoordT & |
ijk, |
|
|
const ValueType & |
v |
|
) |
| |
|
inline |
Sets the value at the specified location and activate its state.
- Note
- This is safe since it does not change the topology of the tree (unlike setValue methods on the other nodes)
◆ setValueOnly() [1/2]
void setValueOnly |
( |
const CoordT & |
ijk, |
|
|
const ValueType & |
v |
|
) |
| |
|
inline |
◆ setValueOnly() [2/2]
void setValueOnly |
( |
uint32_t |
offset, |
|
|
const ValueType & |
v |
|
) |
| |
|
inline |
Sets the value at the specified location but leaves its state unchanged.
- Note
- This is safe since it does not change the topology of the tree (unlike setValue methods on the other nodes)
◆ stdDeviation()
Return a const reference to the standard deviation of all the active values encoded in this leaf node.
◆ updateBBox()
Updates the local bounding box of active voxels in this node. Return true if bbox was updated.
- Warning
- It assumes that the origin and value mask have already been set.
This method is based on few (intrinsic) bit operations and hence is relatively fast. However, it should only only be called of either the value mask has changed or if the active bounding box is still undefined. e.g. during construction of this node.
◆ valueMask()
Return a const reference to the bit mask of active voxels in this leaf node.
◆ variance()
Return the variance of all the active values encoded in this leaf node.
◆ voxelCount()
static uint32_t voxelCount |
( |
| ) |
|
|
inlinestatic |
Return the total number of voxels (e.g. values) encoded in this leaf node.
◆ InternalNode
◆ ReadAccessor
◆ RootNode
◆ DIM
constexpr uint32_t DIM = 1u << TOTAL |
|
staticconstexpr |
◆ FIXED_SIZE
constexpr bool FIXED_SIZE = DataType::FIXED_SIZE |
|
staticconstexpr |
◆ LEVEL
constexpr uint32_t LEVEL = 0 |
|
staticconstexpr |
◆ LOG2DIM
constexpr uint32_t LOG2DIM = Log2Dim |
|
staticconstexpr |
◆ MASK
constexpr uint32_t MASK = (1u << LOG2DIM) - 1u |
|
staticconstexpr |
◆ NUM_VALUES
constexpr uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL) |
|
staticconstexpr |
◆ SIZE
constexpr uint32_t SIZE = 1u << 3 * LOG2DIM |
|
staticconstexpr |
◆ TOTAL