OpenVDB  11.0.0
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
ReadAccessor< BuildT, 0, 1, 2 > Class Template Reference

Node caching at all (three) tree levels. More...

#include <nanovdb/NanoVDB.h>

Inherited by ChannelAccessor< ChannelT, IndexT >, PointAccessor< AttT, BuildT >, and PointAccessor< AttT, Point >.

Public Types

using BuildType = BuildT
 
using ValueType = ValueT
 
using CoordType = CoordT
 

Public Member Functions

 ReadAccessor (const RootT &root)
 Constructor from a root node. More...
 
 ReadAccessor (const GridT &grid)
 Constructor from a grid. More...
 
 ReadAccessor (const TreeT &tree)
 Constructor from a tree. More...
 
const RootTroot () const
 
 ReadAccessor (const ReadAccessor &)=default
 Defaults constructors. More...
 
 ~ReadAccessor ()=default
 
ReadAccessoroperator= (const ReadAccessor &)=default
 
template<typename NodeT >
const NodeT * getNode () const
 Return a const point to the cached node of the specified type. More...
 
template<int LEVEL>
const NodeTrait< TreeT, LEVEL >::type * getNode () const
 
void clear ()
 Reset this access to its initial state, i.e. with an empty cache. More...
 
template<typename NodeT >
bool isCached (const CoordType &ijk) const
 
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 LeafTprobeLeaf (const CoordType &ijk) 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
 
template<typename RayT >
uint32_t getDim (const CoordType &ijk, const RayT &ray) const
 

Static Public Attributes

static const int CacheLevels = 3
 

Friends

template<typename >
class RootNode
 Allow nodes to insert themselves into the cache. More...
 
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, 0, 1, 2 >

Node caching at all (three) tree levels.

Member Typedef Documentation

using BuildType = BuildT
using CoordType = CoordT
using ValueType = ValueT

Constructor & Destructor Documentation

ReadAccessor ( const RootT root)
inline

Constructor from a root node.

ReadAccessor ( const GridT grid)
inline

Constructor from a grid.

ReadAccessor ( const TreeT tree)
inline

Constructor from a tree.

ReadAccessor ( const ReadAccessor< BuildT, 0, 1, 2 > &  )
default

Defaults constructors.

~ReadAccessor ( )
default

Member Function Documentation

void clear ( )
inline

Reset this access to its initial state, i.e. with an empty cache.

auto get ( const CoordType ijk,
ArgsT &&...  args 
) const
inline
uint32_t getDim ( const CoordType ijk,
const RayT &  ray 
) const
inline
const NodeT* getNode ( ) const
inline

Return a const point to the cached node of the specified type.

Warning
The return value could be NULL.
const NodeTrait<TreeT, LEVEL>::type* getNode ( ) const
inline
auto getNodeInfo ( const CoordType ijk) const
inline
ValueType getValue ( const CoordType ijk) const
inline
ValueType getValue ( int  i,
int  j,
int  k 
) const
inline
bool isActive ( const CoordType ijk) const
inline
bool isCached ( const CoordType ijk) const
inline
ValueType operator() ( const CoordType ijk) const
inline
ValueType operator() ( int  i,
int  j,
int  k 
) const
inline
ReadAccessor& operator= ( const ReadAccessor< BuildT, 0, 1, 2 > &  )
default
const LeafT* probeLeaf ( const CoordType ijk) const
inline
bool probeValue ( const CoordType ijk,
ValueType v 
) const
inline
const RootT& root ( ) const
inline
auto set ( const CoordType ijk,
ArgsT &&...  args 
) const
inline

Friends And Related Function Documentation

friend class InternalNode
friend
friend class LeafNode
friend
friend class RootNode
friend

Allow nodes to insert themselves into the cache.

Member Data Documentation

const int CacheLevels = 3
static