OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
ReadAccessor< BuildT, -1, -1, -1 > Class Template Reference

A read-only value accessor with three levels of node caching. This allows for inverse tree traversal during lookup, which is on average significantly faster than calling the equivalent method on the tree (i.e. top-down traversal). More...

`#include <nanovdb/NanoVDB.h>`

## Public Types
using | BuildType = BuildT
using | ValueType = typename RootT::ValueType
using | CoordType = typename RootT::CoordType

## Public Member Functions
| ReadAccessor (const RootT &root)
| Constructor from a root node.
| ReadAccessor (const GridT &grid)
| Constructor from a grid.
| ReadAccessor (const TreeT &tree)
| Constructor from a tree.
void | clear ()
| Reset this access to its initial state, i.e. with an empty cache @node Noop since this template specialization has no cache.
const RootT & | root () const
| ReadAccessor (const ReadAccessor &)=default
| Defaults constructors.
| ~ReadAccessor ()=default
ReadAccessor & | operator= (const ReadAccessor &)=default
ValueType | getValue (const CoordType &ijk) const
ValueType | getValue (int i, int j, int k) const
ValueType | operator() (const CoordType &ijk) const
ValueType | operator() (int i, int j, int k) const
auto | getNodeInfo (const CoordType &ijk) const
bool | isActive (const CoordType &ijk) const
bool | probeValue (const CoordType &ijk, ValueType &v) const
const LeafT * | probeLeaf (const CoordType &ijk) const
template<typename RayT >
uint32_t | getDim (const CoordType &ijk, const RayT &ray) const
template<typename OpT , typename... ArgsT>
auto | get (const CoordType &ijk, ArgsT &&... args) const
template<typename OpT , typename... ArgsT>
auto | set (const CoordType &ijk, ArgsT &&... args) const

## Static Public Attributes
static const int | CacheLevels = 0

## Friends
template<typename >
class | RootNode
| Allow nodes to insert themselves into the cache.
template<typename , uint32_t >
class | InternalNode
template<typename , typename , template< uint32_t > class, uint32_t >
class | LeafNode

## Detailed Description

template<typename BuildT>
class nanovdb::ReadAccessor< BuildT, -1, -1, -1 >

A read-only value accessor with three levels of node caching. This allows for inverse tree traversal during lookup, which is on average significantly faster than calling the equivalent method on the tree (i.e. top-down traversal).

Note
  By virtue of the fact that a value accessor accelerates random access operations by re-using cached access patterns, this access should be reused for multiple access operations. In other words, never create an instance of this accessor for a single access only. In general avoid single access operations with this accessor, and if that is not possible call the corresponding method on the tree instead.

Warning
  Since this ReadAccessor internally caches raw pointers to the nodes of the tree structure, it is not safe to copy between host and device, or even to share among multiple threads on the same host or device. However, it is light-weight so simple instantiate one per thread (on the host and/or device).

Used to accelerated random access into a VDB tree. Provides on average O(1) random access operations by means of inverse tree traversal, which amortizes the non-const time complexity of the root node.

## Member Typedef Documentation

## ◆ BuildType

template<typename BuildT >

using BuildType = BuildT

## ◆ CoordType

template<typename BuildT >

using CoordType = typename RootT::CoordType

## ◆ ValueType

template<typename BuildT >

using ValueType = typename RootT::ValueType

## Constructor & Destructor Documentation

## ◆ ReadAccessor() [1/4]

template<typename BuildT >

ReadAccessor | ( | const RootT & | root | ) |
| inline

Constructor from a root node.

## ◆ ReadAccessor() [2/4]

template<typename BuildT >

ReadAccessor | ( | const GridT & | grid | ) |
| inline

Constructor from a grid.

## ◆ ReadAccessor() [3/4]

template<typename BuildT >

ReadAccessor | ( | const TreeT & | tree | ) |
| inline

Constructor from a tree.

## ◆ ReadAccessor() [4/4]

template<typename BuildT >

ReadAccessor | ( | const ReadAccessor< BuildT, -1, -1, -1 > & |  | ) |
| default

Defaults constructors.

## ◆ ~ReadAccessor()

template<typename BuildT >

~ReadAccessor | ( |  | ) |
| default

## Member Function Documentation

## ◆ clear()

template<typename BuildT >

void clear | ( |  | ) |
| inline

Reset this access to its initial state, i.e. with an empty cache @node Noop since this template specialization has no cache.

## ◆ get()

template<typename BuildT >
template<typename OpT , typename... ArgsT>

auto get | ( | const CoordType & | ijk,
|  | ArgsT &&... | args ) const
| inline

## ◆ getDim()

template<typename BuildT >
template<typename RayT >

uint32_t getDim | ( | const CoordType & | ijk,
|  | const RayT & | ray ) const
| inline

## ◆ getNodeInfo()

template<typename BuildT >

auto getNodeInfo | ( | const CoordType & | ijk | ) | const
| inline

## ◆ getValue() [1/2]

template<typename BuildT >

ValueType getValue | ( | const CoordType & | ijk | ) | const
| inline

## ◆ getValue() [2/2]

template<typename BuildT >

ValueType getValue | ( | int | i,
|  | int | j,
|  | int | k ) const
| inline

## ◆ isActive()

template<typename BuildT >

bool isActive | ( | const CoordType & | ijk | ) | const
| inline

## ◆ operator()() [1/2]

template<typename BuildT >

ValueType operator() | ( | const CoordType & | ijk | ) | const
| inline

## ◆ operator()() [2/2]

template<typename BuildT >

ValueType operator() | ( | int | i,
|  | int | j,
|  | int | k ) const
| inline

## ◆ operator=()

template<typename BuildT >

ReadAccessor & operator= | ( | const ReadAccessor< BuildT, -1, -1, -1 > & |  | ) |
| default

## ◆ probeLeaf()

template<typename BuildT >

const LeafT * probeLeaf | ( | const CoordType & | ijk | ) | const
| inline

## ◆ probeValue()

template<typename BuildT >

bool probeValue | ( | const CoordType & | ijk,
|  | ValueType & | v ) const
| inline

## ◆ root()

template<typename BuildT >

const RootT & root | ( |  | ) | const
| inline

## ◆ set()

template<typename BuildT >
template<typename OpT , typename... ArgsT>

auto set | ( | const CoordType & | ijk,
|  | ArgsT &&... | args ) const
| inline

## Friends And Related Symbol Documentation

## ◆ InternalNode

template<typename BuildT >
template<typename , uint32_t >

friend class InternalNode
| friend

## ◆ LeafNode

template<typename BuildT >
template<typename , typename , template< uint32_t > class, uint32_t >

friend class LeafNode
| friend

## ◆ RootNode

template<typename BuildT >
template<typename >

friend class RootNode
| friend

Allow nodes to insert themselves into the cache.

## Member Data Documentation

## ◆ CacheLevels

template<typename BuildT >

const int CacheLevels = 0
| static