HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT > Class Template Reference

This is a simple convenience class that allows for sampling from a source grid into the index space of a target grid. At construction the source and target grids are checked for alignment which potentially renders interpolation unnecessary. Else interpolation is performed according to the templated Sampler type. More...

#include <Interpolation.h>

Public Types

using ValueType = typename GridOrTreeT::ValueType
 
using GridType = typename TreeAdapter< GridOrTreeT >::GridType
 
using TreeType = typename TreeAdapter< GridOrTreeT >::TreeType
 
using AccessorType = typename TreeAdapter< GridType >::AccessorType
 

Public Member Functions

 DualGridSampler (const GridType &sourceGrid, const math::Transform &targetXform)
 Grid and transform constructor. More...
 
 DualGridSampler (const TreeType &sourceTree, const math::Transform &sourceXform, const math::Transform &targetXform)
 Tree and transform constructor. More...
 
ValueType operator() (const Coord &ijk) const
 Return the value of the source grid at the index coordinates, ijk, relative to the target grid (or its tranform). More...
 
bool isAligned () const
 Return true if the two grids are aligned. More...
 

Detailed Description

template<typename GridOrTreeT, typename SamplerT>
class openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >

This is a simple convenience class that allows for sampling from a source grid into the index space of a target grid. At construction the source and target grids are checked for alignment which potentially renders interpolation unnecessary. Else interpolation is performed according to the templated Sampler type.

Warning
For performance reasons the check for alignment of the two grids is only performed at construction time!

Definition at line 472 of file Interpolation.h.

Member Typedef Documentation

template<typename GridOrTreeT, typename SamplerT>
using openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::AccessorType = typename TreeAdapter<GridType>::AccessorType

Definition at line 478 of file Interpolation.h.

template<typename GridOrTreeT, typename SamplerT>
using openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::GridType = typename TreeAdapter<GridOrTreeT>::GridType

Definition at line 476 of file Interpolation.h.

template<typename GridOrTreeT, typename SamplerT>
using openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::TreeType = typename TreeAdapter<GridOrTreeT>::TreeType

Definition at line 477 of file Interpolation.h.

template<typename GridOrTreeT, typename SamplerT>
using openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::ValueType = typename GridOrTreeT::ValueType

Definition at line 475 of file Interpolation.h.

Constructor & Destructor Documentation

template<typename GridOrTreeT, typename SamplerT>
openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::DualGridSampler ( const GridType sourceGrid,
const math::Transform targetXform 
)
inline

Grid and transform constructor.

Parameters
sourceGridSource grid.
targetXformTransform of the target grid.

Definition at line 483 of file Interpolation.h.

template<typename GridOrTreeT, typename SamplerT>
openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::DualGridSampler ( const TreeType sourceTree,
const math::Transform sourceXform,
const math::Transform targetXform 
)
inline

Tree and transform constructor.

Parameters
sourceTreeSource tree.
sourceXformTransform of the source grid.
targetXformTransform of the target grid.

Definition at line 495 of file Interpolation.h.

Member Function Documentation

template<typename GridOrTreeT, typename SamplerT>
bool openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::isAligned ( ) const
inline

Return true if the two grids are aligned.

Definition at line 513 of file Interpolation.h.

template<typename GridOrTreeT, typename SamplerT>
ValueType openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >::operator() ( const Coord &  ijk) const
inline

Return the value of the source grid at the index coordinates, ijk, relative to the target grid (or its tranform).

Definition at line 506 of file Interpolation.h.


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