HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType > Class Template Reference

Specialization of GridSampler for construction from a ValueAccessor type. More...

#include <Interpolation.h>

Public Types

using Ptr = SharedPtr< GridSampler >
 
using ValueType = typename TreeT::ValueType
 
using TreeType = TreeT
 
using GridType = Grid< TreeType >
 
using AccessorType = typename tree::ValueAccessor< TreeT >
 

Public Member Functions

 GridSampler (const AccessorType &acc, const math::Transform &transform)
 
const math::Transformtransform () const
 
template<typename RealType >
ValueType sampleVoxel (const RealType &x, const RealType &y, const RealType &z) const
 Sample a point in index space in the grid. More...
 
ValueType sampleVoxel (typename Coord::ValueType i, typename Coord::ValueType j, typename Coord::ValueType k) const
 Sample value in integer index space. More...
 
ValueType isSample (const Coord &ijk) const
 Sample value in integer index space. More...
 
ValueType isSample (const Vec3d &ispoint) const
 Sample in fractional index space. More...
 
ValueType wsSample (const Vec3d &wspoint) const
 Sample in world space. More...
 

Detailed Description

template<typename TreeT, typename SamplerType>
class openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >

Specialization of GridSampler for construction from a ValueAccessor type.

Note
This version should normally be favored over the one above that takes a Grid or Tree. The reason is this version uses a ValueAccessor that performs fast (cached) access where the tree-based flavor performs slower (uncached) access.
Warning
Since this version stores a pointer to an (externally allocated) value accessor it is not threadsafe. Hence each thread should have its own instance of a GridSampler constructed from a local ValueAccessor. Alternatively the Grid/Tree-based GridSampler is threadsafe, but also slower.

Definition at line 392 of file Interpolation.h.

Member Typedef Documentation

template<typename TreeT , typename SamplerType >
using openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::AccessorType = typename tree::ValueAccessor<TreeT>

Definition at line 399 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
using openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::GridType = Grid<TreeType>

Definition at line 398 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
using openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::Ptr = SharedPtr<GridSampler>

Definition at line 395 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
using openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::TreeType = TreeT

Definition at line 397 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
using openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::ValueType = typename TreeT::ValueType

Definition at line 396 of file Interpolation.h.

Constructor & Destructor Documentation

template<typename TreeT , typename SamplerType >
openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::GridSampler ( const AccessorType acc,
const math::Transform transform 
)
inline
Parameters
acca ValueAccessor to be sampled
transformis used when sampling world space locations.

Definition at line 403 of file Interpolation.h.

Member Function Documentation

template<typename TreeT , typename SamplerType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::isSample ( const Coord &  ijk) const
inline

Sample value in integer index space.

Parameters
ijkthe location in index space

Definition at line 432 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::isSample ( const Vec3d &  ispoint) const
inline

Sample in fractional index space.

Parameters
ispointthe location in index space

Definition at line 436 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
template<typename RealType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::sampleVoxel ( const RealType &  x,
const RealType &  y,
const RealType &  z 
) const
inline

Sample a point in index space in the grid.

Parameters
xFractional x-coordinate of point in index-coordinates of grid
yFractional y-coordinate of point in index-coordinates of grid
zFractional z-coordinate of point in index-coordinates of grid

Definition at line 414 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::sampleVoxel ( typename Coord::ValueType  i,
typename Coord::ValueType  j,
typename Coord::ValueType  k 
) const
inline

Sample value in integer index space.

Parameters
iInteger x-coordinate in index space
jInteger y-coordinate in index space
kInteger x-coordinate in index space

Definition at line 423 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
const math::Transform& openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::transform ( ) const
inline

Definition at line 407 of file Interpolation.h.

template<typename TreeT , typename SamplerType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >::wsSample ( const Vec3d &  wspoint) const
inline

Sample in world space.

Parameters
wspointthe location in world space

Definition at line 445 of file Interpolation.h.


The documentation for this class was generated from the following file: