OpenVDB 10.0.1
Loading...
Searching...
No Matches
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>

Inheritance diagram for ReadAccessor< BuildT, 0, 1, 2 >:
ChannelAccessor< ChannelT > PointAccessor< AttT >

Public Types

using ValueType = ValueT
 
using CoordType = CoordT
 
using NodeInfo = typename ReadAccessor< ValueT, -1, -1, -1 >::NodeInfo
 

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.
 
const RootTroot () const
 
 ReadAccessor (const ReadAccessor &)=default
 Defaults constructors.
 
 ~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.
 
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.
 
template<typename NodeT >
bool isCached (const CoordType &ijk) const
 
ValueType getValue (const CoordType &ijk) const
 
ValueType operator() (const CoordType &ijk) const
 
ValueType operator() (int i, int j, int k) const
 
NodeInfo 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 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.
 
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

◆ CoordType

template<typename BuildT >
using CoordType = CoordT

◆ NodeInfo

template<typename BuildT >
using NodeInfo = typename ReadAccessor<ValueT, -1, -1, -1>::NodeInfo

◆ ValueType

template<typename BuildT >
using ValueType = ValueT

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, 0, 1, 2 > &  )
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.

◆ getDim()

template<typename BuildT >
template<typename RayT >
uint32_t getDim ( const CoordType ijk,
const RayT &  ray 
) const
inline

◆ getNode() [1/2]

template<typename BuildT >
template<typename NodeT >
const NodeT * getNode ( ) const
inline

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

Warning
The return value could be NULL.

◆ getNode() [2/2]

template<typename BuildT >
template<int LEVEL>
const NodeTrait< TreeT, LEVEL >::type * getNode ( ) const
inline

◆ getNodeInfo()

template<typename BuildT >
NodeInfo getNodeInfo ( const CoordType ijk) const
inline

◆ getValue()

template<typename BuildT >
ValueType getValue ( const CoordType ijk) const
inline

◆ isActive()

template<typename BuildT >
bool isActive ( const CoordType ijk) const
inline

◆ isCached()

template<typename BuildT >
template<typename NodeT >
bool isCached ( 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, 0, 1, 2 > &  )
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

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 = 3
static