OpenVDB  12.1.0
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
GetValue< BuildT > Struct Template Reference

Below is an example of a struct used for random get methods. More...

#include <nanovdb/NanoVDB.h>

Public Types

using Type = typename NanoLeaf< BuildT >::ValueType
 

Static Public Member Functions

static __hostdev__ Type get (const NanoRoot< BuildT > &root)
 
static __hostdev__ Type get (const typename NanoRoot< BuildT >::Tile &tile)
 
static __hostdev__ Type get (const NanoUpper< BuildT > &node, uint32_t n)
 
static __hostdev__ Type get (const NanoLower< BuildT > &node, uint32_t n)
 
static __hostdev__ Type get (const NanoLeaf< BuildT > &leaf, uint32_t n)
 

Static Public Attributes

static constexpr int LEVEL = 0
 

Detailed Description

template<typename BuildT>
struct nanovdb::GetValue< BuildT >

Below is an example of a struct used for random get methods.

Note
All member methods, data, and types are mandatory.
template<typename BuildT>
struct GetOpT {
using Type = typename BuildToValueMap<BuildT>::Type;// return type
static constexpr int LEVEL = 0;// minimum level for the descent during top-down traversal
__hostdev__ static Type get(const NanoRoot<BuildT>& root, args...) { }
__hostdev__ static Type get(const typename NanoRoot<BuildT>::Tile& tile, args...) { }
__hostdev__ static Type get(const NanoUpper<BuildT>& node, uint32_t n, args...) { }
__hostdev__ static Type get(const NanoLower<BuildT>& node, uint32_t n, args...) { }
__hostdev__ static Type get(const NanoLeaf<BuildT>& leaf, uint32_t n, args...) { }
};

Below is an example of the struct used for random set methods

Note
All member methods and data are mandatory.
template<typename BuildT>
struct SetOpT {
static constexpr int LEVEL = 0;// minimum level for the descent during top-down traversal
__hostdev__ static void set(NanoRoot<BuildT>& root, args...) { }
__hostdev__ static void set(typename NanoRoot<BuildT>::Tile& tile, args...) { }
__hostdev__ static void set(NanoUpper<BuildT>& node, uint32_t n, args...) { }
__hostdev__ static void set(NanoLower<BuildT>& node, uint32_t n, args...) { }
__hostdev__ static void set(NanoLeaf<BuildT>& leaf, uint32_t n, args...) { }
};
Implements Tree::getValue(math::Coord), i.e. return the value associated with a specific coordinate ijk.
Template Parameters
BuildTBuild type of the grid being called

The value at a coordinate either maps to the background, a tile value or a leaf value.

Member Typedef Documentation

using Type = typename NanoLeaf<BuildT>::ValueType

Member Function Documentation

static __hostdev__ Type get ( const NanoRoot< BuildT > &  root)
inlinestatic
static __hostdev__ Type get ( const typename NanoRoot< BuildT >::Tile &  tile)
inlinestatic
static __hostdev__ Type get ( const NanoUpper< BuildT > &  node,
uint32_t  n 
)
inlinestatic
static __hostdev__ Type get ( const NanoLower< BuildT > &  node,
uint32_t  n 
)
inlinestatic
static __hostdev__ Type get ( const NanoLeaf< BuildT > &  leaf,
uint32_t  n 
)
inlinestatic

Member Data Documentation

constexpr int LEVEL = 0
static