HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::build::LeafNode< BuildT > Struct Template Reference

#include <GridBuilder.h>

Classes

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 BuildType = BuildT
 
using ValueType = typename BuildToValueMap< BuildT >::type
 
using LeafNodeType = LeafNode< BuildT >
 
using NodeMaskType = Mask< LOG2DIM >
 
template<bool ON>
using MaskIterT = typename Mask< LOG2DIM >::template Iterator< ON >
 
using NanoLeafT = typename NanoNode< BuildT, 0 >::Type
 

Public Member Functions

ValueOnIterator beginValueOn ()
 
ValueOnIterator cbeginValueOn () const
 
ValueOffIterator beginValueOff ()
 
ValueOffIterator cbeginValueOff () const
 
ValueIterator beginValue ()
 
ValueIterator cbeginValueAll () const
 
 LeafNode (const Coord &ijk, const ValueType &value, bool state)
 
 LeafNode (const LeafNode &)=delete
 
 LeafNode (LeafNode &&)=delete
 
LeafNodeoperator= (const LeafNode &)=delete
 
LeafNodeoperator= (LeafNode &&)=delete
 
 ~LeafNode ()=default
 
const Mask< LOG2DIM > & getValueMask () const
 
const Mask< LOG2DIM > & valueMask () const
 
const Coordorigin () const
 
void localToGlobalCoord (Coord &ijk) const
 
Coord offsetToGlobalCoord (uint32_t n) const
 
ValueType getFirstValue () const
 
ValueType getLastValue () const
 
const ValueTypegetValue (uint32_t i) const
 
const ValueTypegetValue (const Coord &ijk) const
 
template<typename OpT , typename... ArgsT>
auto get (const Coord &ijk, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
auto set (const Coord &ijk, ArgsT &&...args)
 
template<typename AccT >
const ValueTypegetValueAndCache (const Coord &ijk, const AccT &) const
 
template<typename AccT >
void setValueAndCache (const Coord &ijk, const ValueType &value, const AccT &)
 
template<typename AccT >
void setValueOnAndCache (const Coord &ijk, const AccT &)
 
template<typename AccT >
bool isActiveAndCache (const Coord &ijk, const AccT &) const
 
void setValue (uint32_t n, const ValueType &value)
 
void setValue (const Coord &ijk, const ValueType &value)
 
void merge (LeafNode &other)
 
template<typename T >
std::enable_if
< std::is_floating_point< T >
::value >::type 
signedFloodFill (T outside)
 

Static Public Member Functions

static uint32_t CoordToOffset (const Coord &ijk)
 Return the linear offset corresponding to the given coordinate. More...
 
static Coord OffsetToLocalCoord (uint32_t n)
 

Public Attributes

Coord mOrigin
 
Mask< LOG2DIMmValueMask
 
ValueType mValues [SIZE]
 
union {
   NanoLeafT *   mDstNode
 
   uint64_t   mDstOffset
 
}; 
 

Static Public Attributes

static constexpr uint32_t LOG2DIM = 3
 
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 = DIM - 1
 
static constexpr uint32_t LEVEL = 0
 
static constexpr uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
 

Detailed Description

template<typename BuildT>
struct nanovdb::build::LeafNode< BuildT >

Definition at line 1093 of file GridBuilder.h.

Member Typedef Documentation

template<typename BuildT>
using nanovdb::build::LeafNode< BuildT >::BuildType = BuildT

Definition at line 1095 of file GridBuilder.h.

template<typename BuildT>
using nanovdb::build::LeafNode< BuildT >::LeafNodeType = LeafNode<BuildT>

Definition at line 1097 of file GridBuilder.h.

template<typename BuildT>
template<bool ON>
using nanovdb::build::LeafNode< BuildT >::MaskIterT = typename Mask<LOG2DIM>::template Iterator<ON>

Definition at line 1107 of file GridBuilder.h.

template<typename BuildT>
using nanovdb::build::LeafNode< BuildT >::NanoLeafT = typename NanoNode<BuildT, 0>::Type

Definition at line 1108 of file GridBuilder.h.

template<typename BuildT>
using nanovdb::build::LeafNode< BuildT >::NodeMaskType = Mask<LOG2DIM>

Definition at line 1105 of file GridBuilder.h.

template<typename BuildT>
using nanovdb::build::LeafNode< BuildT >::ValueType = typename BuildToValueMap<BuildT>::type

Definition at line 1096 of file GridBuilder.h.

Constructor & Destructor Documentation

template<typename BuildT>
nanovdb::build::LeafNode< BuildT >::LeafNode ( const Coord ijk,
const ValueType value,
bool  state 
)
inline

Definition at line 1174 of file GridBuilder.h.

template<typename BuildT>
nanovdb::build::LeafNode< BuildT >::LeafNode ( const LeafNode< BuildT > &  )
delete
template<typename BuildT>
nanovdb::build::LeafNode< BuildT >::LeafNode ( LeafNode< BuildT > &&  )
delete
template<typename BuildT>
nanovdb::build::LeafNode< BuildT >::~LeafNode ( )
default

Member Function Documentation

template<typename BuildT>
ValueIterator nanovdb::build::LeafNode< BuildT >::beginValue ( )
inline

Definition at line 1171 of file GridBuilder.h.

template<typename BuildT>
ValueOffIterator nanovdb::build::LeafNode< BuildT >::beginValueOff ( )
inline

Definition at line 1147 of file GridBuilder.h.

template<typename BuildT>
ValueOnIterator nanovdb::build::LeafNode< BuildT >::beginValueOn ( )
inline

Definition at line 1131 of file GridBuilder.h.

template<typename BuildT>
ValueIterator nanovdb::build::LeafNode< BuildT >::cbeginValueAll ( ) const
inline

Definition at line 1172 of file GridBuilder.h.

template<typename BuildT>
ValueOffIterator nanovdb::build::LeafNode< BuildT >::cbeginValueOff ( ) const
inline

Definition at line 1148 of file GridBuilder.h.

template<typename BuildT>
ValueOnIterator nanovdb::build::LeafNode< BuildT >::cbeginValueOn ( ) const
inline

Definition at line 1132 of file GridBuilder.h.

template<typename BuildT>
static uint32_t nanovdb::build::LeafNode< BuildT >::CoordToOffset ( const Coord ijk)
inlinestatic

Return the linear offset corresponding to the given coordinate.

Definition at line 1196 of file GridBuilder.h.

template<typename BuildT>
template<typename OpT , typename... ArgsT>
auto nanovdb::build::LeafNode< BuildT >::get ( const Coord ijk,
ArgsT &&...  args 
) const
inline

Definition at line 1228 of file GridBuilder.h.

template<typename BuildT>
ValueType nanovdb::build::LeafNode< BuildT >::getFirstValue ( ) const
inline

Definition at line 1222 of file GridBuilder.h.

template<typename BuildT>
ValueType nanovdb::build::LeafNode< BuildT >::getLastValue ( ) const
inline

Definition at line 1223 of file GridBuilder.h.

template<typename BuildT>
const ValueType& nanovdb::build::LeafNode< BuildT >::getValue ( uint32_t  i) const
inline

Definition at line 1224 of file GridBuilder.h.

template<typename BuildT>
const ValueType& nanovdb::build::LeafNode< BuildT >::getValue ( const Coord ijk) const
inline

Definition at line 1225 of file GridBuilder.h.

template<typename BuildT>
template<typename AccT >
const ValueType& nanovdb::build::LeafNode< BuildT >::getValueAndCache ( const Coord ijk,
const AccT &   
) const
inline

Definition at line 1235 of file GridBuilder.h.

template<typename BuildT>
const Mask<LOG2DIM>& nanovdb::build::LeafNode< BuildT >::getValueMask ( ) const
inline

Definition at line 1191 of file GridBuilder.h.

template<typename BuildT>
template<typename AccT >
bool nanovdb::build::LeafNode< BuildT >::isActiveAndCache ( const Coord ijk,
const AccT &   
) const
inline

Definition at line 1256 of file GridBuilder.h.

template<typename BuildT>
void nanovdb::build::LeafNode< BuildT >::localToGlobalCoord ( Coord ijk) const
inline

Definition at line 1210 of file GridBuilder.h.

template<typename BuildT>
void nanovdb::build::LeafNode< BuildT >::merge ( LeafNode< BuildT > &  other)
inline

Definition at line 1269 of file GridBuilder.h.

template<typename BuildT>
Coord nanovdb::build::LeafNode< BuildT >::offsetToGlobalCoord ( uint32_t  n) const
inline

Definition at line 1215 of file GridBuilder.h.

template<typename BuildT>
static Coord nanovdb::build::LeafNode< BuildT >::OffsetToLocalCoord ( uint32_t  n)
inlinestatic

Definition at line 1203 of file GridBuilder.h.

template<typename BuildT>
LeafNode& nanovdb::build::LeafNode< BuildT >::operator= ( const LeafNode< BuildT > &  )
delete
template<typename BuildT>
LeafNode& nanovdb::build::LeafNode< BuildT >::operator= ( LeafNode< BuildT > &&  )
delete
template<typename BuildT>
const Coord& nanovdb::build::LeafNode< BuildT >::origin ( ) const
inline

Definition at line 1193 of file GridBuilder.h.

template<typename BuildT>
template<typename OpT , typename... ArgsT>
auto nanovdb::build::LeafNode< BuildT >::set ( const Coord ijk,
ArgsT &&...  args 
)
inline

Definition at line 1231 of file GridBuilder.h.

template<typename BuildT>
void nanovdb::build::LeafNode< BuildT >::setValue ( uint32_t  n,
const ValueType value 
)
inline

Definition at line 1262 of file GridBuilder.h.

template<typename BuildT>
void nanovdb::build::LeafNode< BuildT >::setValue ( const Coord ijk,
const ValueType value 
)
inline

Definition at line 1267 of file GridBuilder.h.

template<typename BuildT>
template<typename AccT >
void nanovdb::build::LeafNode< BuildT >::setValueAndCache ( const Coord ijk,
const ValueType value,
const AccT &   
)
inline

Definition at line 1241 of file GridBuilder.h.

template<typename BuildT>
template<typename AccT >
void nanovdb::build::LeafNode< BuildT >::setValueOnAndCache ( const Coord ijk,
const AccT &   
)
inline

Definition at line 1249 of file GridBuilder.h.

template<typename BuildT >
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type nanovdb::build::LeafNode< BuildT >::signedFloodFill ( outside)
inline

Definition at line 1642 of file GridBuilder.h.

template<typename BuildT>
const Mask<LOG2DIM>& nanovdb::build::LeafNode< BuildT >::valueMask ( ) const
inline

Definition at line 1192 of file GridBuilder.h.

Member Data Documentation

union { ... }
template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::DIM = 1u << TOTAL
static

Definition at line 1100 of file GridBuilder.h.

template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::LEVEL = 0
static

Definition at line 1103 of file GridBuilder.h.

template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::LOG2DIM = 3
static

Definition at line 1098 of file GridBuilder.h.

template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::MASK = DIM - 1
static

Definition at line 1102 of file GridBuilder.h.

template<typename BuildT>
NanoLeafT* nanovdb::build::LeafNode< BuildT >::mDstNode

Definition at line 1114 of file GridBuilder.h.

template<typename BuildT>
uint64_t nanovdb::build::LeafNode< BuildT >::mDstOffset

Definition at line 1115 of file GridBuilder.h.

template<typename BuildT>
Coord nanovdb::build::LeafNode< BuildT >::mOrigin

Definition at line 1110 of file GridBuilder.h.

template<typename BuildT>
Mask<LOG2DIM> nanovdb::build::LeafNode< BuildT >::mValueMask

Definition at line 1111 of file GridBuilder.h.

template<typename BuildT>
ValueType nanovdb::build::LeafNode< BuildT >::mValues[SIZE]

Definition at line 1112 of file GridBuilder.h.

template<typename BuildT>
constexpr uint64_t nanovdb::build::LeafNode< BuildT >::NUM_VALUES = uint64_t(1) << (3 * TOTAL)
static

Definition at line 1104 of file GridBuilder.h.

template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::SIZE = 1u << 3 * LOG2DIM
static

Definition at line 1101 of file GridBuilder.h.

template<typename BuildT>
constexpr uint32_t nanovdb::build::LeafNode< BuildT >::TOTAL = LOG2DIM
static

Definition at line 1099 of file GridBuilder.h.


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