HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim > Class Template Reference

Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels) More...

#include <NanoVDB.h>

+ Inheritance diagram for nanovdb::LeafNode< 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 >
 

Public Member Functions

__hostdev__ ValueOnIterator beginValueOn () const
 
__hostdev__ ValueOnIterator cbeginValueOn () const
 
__hostdev__ ValueOffIterator beginValueOff () const
 
__hostdev__ ValueOffIterator cbeginValueOff () const
 
__hostdev__ ValueIterator beginValue () const
 
__hostdev__ ValueIterator cbeginValueAll () const
 
__hostdev__ DataTypedata ()
 
__hostdev__ const DataTypedata () const
 
__hostdev__ const MaskType
< LOG2DIM > & 
valueMask () const
 Return a const reference to the bit mask of active voxels in this leaf node. More...
 
__hostdev__ const MaskType
< LOG2DIM > & 
getValueMask () const
 
__hostdev__ ValueType minimum () const
 Return a const reference to the minimum active value encoded in this leaf node. More...
 
__hostdev__ ValueType maximum () const
 Return a const reference to the maximum active value encoded in this leaf node. More...
 
__hostdev__ FloatType average () const
 Return a const reference to the average of all the active values encoded in this leaf node. More...
 
__hostdev__ FloatType variance () const
 Return the variance of all the active values encoded in this leaf node. More...
 
__hostdev__ FloatType stdDeviation () const
 Return a const reference to the standard deviation of all the active values encoded in this leaf node. More...
 
__hostdev__ uint8_t flags () const
 
__hostdev__ CoordT origin () const
 Return the origin in index space of this leaf node. More...
 
__hostdev__ void localToGlobalCoord (Coord &ijk) const
 Converts (in place) a local index coordinate to a global index coordinate. More...
 
__hostdev__ CoordT offsetToGlobalCoord (uint32_t n) const
 
__hostdev__ BBox< CoordT > bbox () const
 Return the bounding box in index space of active values in this leaf node. More...
 
__hostdev__ 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
 
LeafNodeoperator= (const LeafNode &)=delete
 
 ~LeafNode ()=delete
 
__hostdev__ ValueType getValue (uint32_t offset) const
 Return the voxel value at the given offset. More...
 
__hostdev__ ValueType getValue (const CoordT &ijk) const
 Return the voxel value at the given coordinate. More...
 
__hostdev__ ValueType getFirstValue () const
 Return the first value in this leaf node. More...
 
__hostdev__ ValueType getLastValue () const
 Return the last value in this leaf node. More...
 
__hostdev__ void setValue (const CoordT &ijk, const ValueType &v)
 Sets the value at the specified location and activate its state. More...
 
__hostdev__ void setValueOnly (uint32_t offset, const ValueType &v)
 Sets the value at the specified location but leaves its state unchanged. More...
 
__hostdev__ void setValueOnly (const CoordT &ijk, const ValueType &v)
 
__hostdev__ bool isActive (const CoordT &ijk) const
 Return true if the voxel value at the given coordinate is active. More...
 
__hostdev__ bool isActive (uint32_t n) const
 
__hostdev__ bool isActive () const
 Return true if any of the voxel value are active in this leaf node. More...
 
__hostdev__ bool hasBBox () const
 
__hostdev__ 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...
 
__hostdev__ const LeafNodeprobeLeaf (const CoordT &) const
 
__hostdev__ 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>
__hostdev__ auto get (const CoordType &ijk, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto get (const uint32_t n, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto set (const CoordType &ijk, ArgsT &&...args)
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto set (const uint32_t n, ArgsT &&...args)
 

Static Public Member Functions

static __hostdev__ CoordT OffsetToLocalCoord (uint32_t n)
 Compute the local coordinates from a linear offset. More...
 
static __hostdev__ uint32_t dim ()
 Return the dimension, in index space, of this leaf node (typically 8 as for openvdb leaf nodes!) More...
 
static __hostdev__ uint32_t voxelCount ()
 Return the total number of voxels (e.g. values) encoded in this leaf node. More...
 
static __hostdev__ uint32_t padding ()
 
static __hostdev__ uint32_t CoordToOffset (const CoordT &ijk)
 Return the linear offset corresponding to the given coordinate. More...
 

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
 

Detailed Description

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)

Definition at line 6013 of file NanoVDB.h.

Member Typedef Documentation

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::BuildType = typename DataType::BuildType

Definition at line 6026 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::CoordType = CoordT

Definition at line 6027 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::DataType = LeafData<BuildT, CoordT, MaskT, Log2Dim>

Definition at line 6023 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::FloatType = typename DataType::FloatType

Definition at line 6025 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::LeafNodeType = LeafNode<BuildT, CoordT, MaskT, Log2Dim>

Definition at line 6022 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<bool ON>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::MaskIterT = typename Mask<Log2Dim>::template Iterator<ON>

Definition at line 6032 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<uint32_t LOG2>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::MaskType = MaskT<LOG2>

Definition at line 6030 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
using nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::ValueType = typename DataType::ValueType

Definition at line 6024 of file NanoVDB.h.

Constructor & Destructor Documentation

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::LeafNode ( )
delete

This class cannot be constructed or deleted.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::LeafNode ( const LeafNode< BuildT, CoordT, MaskT, Log2Dim > &  )
delete
template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::~LeafNode ( )
delete

Member Function Documentation

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ FloatType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::average ( ) const
inline

Return a const reference to the average of all the active values encoded in this leaf node.

Definition at line 6175 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ BBox<CoordT> nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::bbox ( ) const
inline

Return the bounding box in index space of active values in this leaf node.

Definition at line 6210 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::beginValue ( ) const
inline

Definition at line 6148 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueOffIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::beginValueOff ( ) const
inline

Definition at line 6097 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueOnIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::beginValueOn ( ) const
inline

Definition at line 6064 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::cbeginValueAll ( ) const
inline

Definition at line 6149 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueOffIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::cbeginValueOff ( ) const
inline

Definition at line 6098 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueOnIterator nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::cbeginValueOn ( ) const
inline

Definition at line 6065 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
static __hostdev__ uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::CoordToOffset ( const CoordT &  ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

Definition at line 6284 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ DataType* nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::data ( )
inline

Definition at line 6160 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ const DataType* nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::data ( ) const
inline

Definition at line 6162 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
static __hostdev__ uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::dim ( )
inlinestatic

Return the dimension, in index space, of this leaf node (typically 8 as for openvdb leaf nodes!)

Definition at line 6207 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ uint8_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::flags ( ) const
inline

Definition at line 6183 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::get ( const CoordType ijk,
ArgsT &&...  args 
) const
inline

Definition at line 6299 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::get ( const uint32_t  n,
ArgsT &&...  args 
) const
inline

Definition at line 6305 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::getFirstValue ( ) const
inline

Return the first value in this leaf node.

Definition at line 6244 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::getLastValue ( ) const
inline

Return the last value in this leaf node.

Definition at line 6246 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::getValue ( uint32_t  offset) const
inline

Return the voxel value at the given offset.

Definition at line 6238 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::getValue ( const CoordT &  ijk) const
inline

Return the voxel value at the given coordinate.

Definition at line 6241 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ const MaskType<LOG2DIM>& nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::getValueMask ( ) const
inline

Definition at line 6166 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::hasBBox ( ) const
inline

Definition at line 6271 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::isActive ( const CoordT &  ijk) const
inline

Return true if the voxel value at the given coordinate is active.

Definition at line 6260 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::isActive ( uint32_t  n) const
inline

Definition at line 6261 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::isActive ( ) const
inline

Return true if any of the voxel value are active in this leaf node.

Definition at line 6264 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ void nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::localToGlobalCoord ( Coord ijk) const
inline

Converts (in place) a local index coordinate to a global index coordinate.

Definition at line 6199 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::maximum ( ) const
inline

Return a const reference to the maximum active value encoded in this leaf node.

Definition at line 6172 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ uint64_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::memUsage ( ) const
inline

return memory usage in bytes for the leaf node

Definition at line 6229 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ ValueType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::minimum ( ) const
inline

Return a const reference to the minimum active value encoded in this leaf node.

Definition at line 6169 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ CoordT nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::offsetToGlobalCoord ( uint32_t  n) const
inline

Definition at line 6201 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
static __hostdev__ CoordT nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::OffsetToLocalCoord ( uint32_t  n)
inlinestatic

Compute the local coordinates from a linear offset.

Parameters
nLinear offset into this nodes dense table
Returns
Local (vs global) 3D coordinates

Definition at line 6191 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
LeafNode& nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::operator= ( const LeafNode< BuildT, CoordT, MaskT, Log2Dim > &  )
delete
template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ CoordT nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::origin ( ) const
inline

Return the origin in index space of this leaf node.

Definition at line 6186 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
static __hostdev__ uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::padding ( )
inlinestatic

Definition at line 6226 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ const LeafNode* nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::probeLeaf ( const CoordT &  ) const
inline

Definition at line 6281 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::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.

Definition at line 6274 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::set ( const CoordType ijk,
ArgsT &&...  args 
)
inline

Definition at line 6311 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::set ( const uint32_t  n,
ArgsT &&...  args 
)
inline

Definition at line 6317 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ void nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::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)

Definition at line 6251 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ void nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::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)

Definition at line 6256 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ void nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::setValueOnly ( const CoordT &  ijk,
const ValueType v 
)
inline

Definition at line 6257 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ FloatType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::stdDeviation ( ) const
inline

Return a const reference to the standard deviation of all the active values encoded in this leaf node.

Definition at line 6181 of file NanoVDB.h.

template<typename ValueT , typename CoordT , template< uint32_t > class MaskT, uint32_t LOG2DIM>
__hostdev__ bool nanovdb::LeafNode< ValueT, CoordT, MaskT, LOG2DIM >::updateBBox ( )
inline

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 if either the value mask has changed or if the active bounding box is still undefined. e.g. during construction of this node.

Definition at line 6387 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ const MaskType<LOG2DIM>& nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::valueMask ( ) const
inline

Return a const reference to the bit mask of active voxels in this leaf node.

Definition at line 6165 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
__hostdev__ FloatType nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::variance ( ) const
inline

Return the variance of all the active values encoded in this leaf node.

Definition at line 6178 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
static __hostdev__ uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::voxelCount ( )
inlinestatic

Return the total number of voxels (e.g. values) encoded in this leaf node.

Definition at line 6224 of file NanoVDB.h.

Friends And Related Function Documentation

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename , uint32_t >
friend class InternalNode
friend

Definition at line 6331 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename , int , int , int >
friend class ReadAccessor
friend

Definition at line 6323 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
template<typename >
friend class RootNode
friend

Definition at line 6329 of file NanoVDB.h.

Member Data Documentation

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::DIM = 1u << TOTAL
static

Definition at line 6154 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr bool nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::FIXED_SIZE = DataType::FIXED_SIZE
static

Definition at line 6028 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::LEVEL = 0
static

Definition at line 6157 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::LOG2DIM = Log2Dim
static

Definition at line 6152 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::MASK = (1u << LOG2DIM) - 1u
static

Definition at line 6156 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint64_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::NUM_VALUES = uint64_t(1) << (3 * TOTAL)
static

Definition at line 6158 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::SIZE = 1u << 3 * LOG2DIM
static

Definition at line 6155 of file NanoVDB.h.

template<typename BuildT, typename CoordT = Coord, template< uint32_t > class MaskT = Mask, uint32_t Log2Dim = 3>
constexpr uint32_t nanovdb::LeafNode< BuildT, CoordT, MaskT, Log2Dim >::TOTAL = LOG2DIM
static

Definition at line 6153 of file NanoVDB.h.


The documentation for this class was generated from the following file: