OpenVDB 11.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
PointAccessor< AttT, BuildT > Class Template Reference

Class to access points at a specific voxel location. More...

#include <nanovdb/NanoVDB.h>

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

Public Types

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

Public Member Functions

 PointAccessor (const NanoGrid< BuildT > &grid)
 
 operator bool () const
 return true if this access was initialized correctly
 
const NanoGrid< BuildT > & grid () const
 
uint64_t gridPoints (const AttT *&begin, const AttT *&end) const
 Return the total number of point in the grid and set the iterators to the complete range of points.
 
uint64_t leafPoints (const Coord &ijk, const AttT *&begin, const AttT *&end) const
 Return the number of points in the leaf node containing the coordinate ijk. If this return value is larger than zero then the iterators begin and end will point to all the attributes contained within that leaf node.
 
uint64_t voxelPoints (const Coord &ijk, const AttT *&begin, const AttT *&end) const
 get iterators over attributes to points at a specific voxel location
 
const RootTroot () const
 
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 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
 

Detailed Description

template<typename AttT, typename BuildT = uint32_t>
class nanovdb::PointAccessor< AttT, BuildT >

Class to access points at a specific voxel location.

Note
If GridClass::PointIndex AttT should be uint32_t and if GridClass::PointData Vec3f

Member Typedef Documentation

◆ BuildType

using BuildType = BuildT
inherited

◆ CoordType

using CoordType = CoordT
inherited

◆ ValueType

using ValueType = ValueT
inherited

Constructor & Destructor Documentation

◆ PointAccessor()

PointAccessor ( const NanoGrid< BuildT > &  grid)
inline

Member Function Documentation

◆ clear()

void clear ( )
inlineinherited

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

◆ get()

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

◆ getDim()

uint32_t getDim ( const CoordType ijk,
const RayT &  ray 
) const
inlineinherited

◆ getNode() [1/2]

const NodeT * getNode ( ) const
inlineinherited

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

Warning
The return value could be NULL.

◆ getNode() [2/2]

const NodeTrait< TreeT, LEVEL >::type * getNode ( ) const
inlineinherited

◆ getNodeInfo()

auto getNodeInfo ( const CoordType ijk) const
inlineinherited

◆ getValue() [1/2]

ValueType getValue ( const CoordType ijk) const
inlineinherited

◆ getValue() [2/2]

ValueType getValue ( int  i,
int  j,
int  k 
) const
inlineinherited

◆ grid()

const NanoGrid< BuildT > & grid ( ) const
inline

◆ gridPoints()

uint64_t gridPoints ( const AttT *&  begin,
const AttT *&  end 
) const
inline

Return the total number of point in the grid and set the iterators to the complete range of points.

◆ isActive()

bool isActive ( const CoordType ijk) const
inlineinherited

◆ isCached()

bool isCached ( const CoordType ijk) const
inlineinherited

◆ leafPoints()

uint64_t leafPoints ( const Coord ijk,
const AttT *&  begin,
const AttT *&  end 
) const
inline

Return the number of points in the leaf node containing the coordinate ijk. If this return value is larger than zero then the iterators begin and end will point to all the attributes contained within that leaf node.

◆ operator bool()

operator bool ( ) const
inline

return true if this access was initialized correctly

◆ operator()() [1/2]

ValueType operator() ( const CoordType ijk) const
inlineinherited

◆ operator()() [2/2]

ValueType operator() ( int  i,
int  j,
int  k 
) const
inlineinherited

◆ probeLeaf()

const LeafT * probeLeaf ( const CoordType ijk) const
inlineinherited

◆ probeValue()

bool probeValue ( const CoordType ijk,
ValueType v 
) const
inlineinherited

◆ root()

const RootT & root ( ) const
inlineinherited

◆ set()

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

◆ voxelPoints()

uint64_t voxelPoints ( const Coord ijk,
const AttT *&  begin,
const AttT *&  end 
) const
inline

get iterators over attributes to points at a specific voxel location

Member Data Documentation

◆ CacheLevels

const int CacheLevels = 3
staticinherited