OpenVDB: GetValue< BuildT > Struct Template Reference

OpenVDB 12.1.1

Loading...
Searching...
No Matches
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...) { }
  };
  nanovdb::RootNode< NanoUpper< BuildT > >::Tile
  typename DataType::Tile Tile
  Definition NanoVDB.h:2821
  nanovdb::NanoRoot
  RootNode< NanoUpper< BuildT > > NanoRoot
  Definition NanoVDB.h:4611
  __hostdev__
  #define __hostdev__
  Definition Util.h:73
  nanovdb::BuildToValueMap::Type
  T Type
  Definition NanoVDB.h:458
  nanovdb::GetValue::LEVEL
  static constexpr int LEVEL
  Definition NanoVDB.h:6060
  nanovdb::GetValue::get
  static __hostdev__ Type get(const NanoRoot< BuildT > &root)
  Definition NanoVDB.h:6061
  nanovdb::GetValue::Type
  typename NanoLeaf< BuildT >::ValueType Type
  Definition NanoVDB.h:6059

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

  BuildT | Build 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

## ◆ Type

template<typename BuildT>

using Type = typename NanoLeaf<BuildT>::ValueType

## Member Function Documentation

## ◆ get() [1/5]

template<typename BuildT>

__hostdev__ Type get | ( | const NanoLeaf< BuildT > & | leaf,
|  | uint32_t | n )
| inlinestatic

## ◆ get() [2/5]

template<typename BuildT>

__hostdev__ Type get | ( | const NanoLower< BuildT > & | node,
|  | uint32_t | n )
| inlinestatic

## ◆ get() [3/5]

template<typename BuildT>

__hostdev__ Type get | ( | const NanoRoot< BuildT > & | root | ) |
| inlinestatic

## ◆ get() [4/5]

template<typename BuildT>

__hostdev__ Type get | ( | const NanoUpper< BuildT > & | node,
|  | uint32_t | n )
| inlinestatic

## ◆ get() [5/5]

template<typename BuildT>

__hostdev__ Type get | ( | const typename NanoRoot< BuildT >::Tile & | tile | ) |
| inlinestatic

## Member Data Documentation

## ◆ LEVEL

template<typename BuildT>

int LEVEL = 0
| staticconstexpr