OpenVDB  3.0.0
Public Types | Public Member Functions | List of all members
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

typedef GridOrTreeT::ValueType ValueType
 
typedef TreeAdapter< GridOrTreeT >::GridType GridType
 
typedef TreeAdapter< GridOrTreeT >::TreeType TreeType
 
typedef TreeAdapter< GridType >::AccessorType 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::v3_0_0::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!

Member Typedef Documentation

typedef TreeAdapter<GridOrTreeT>::GridType GridType
typedef TreeAdapter<GridOrTreeT>::TreeType TreeType
typedef GridOrTreeT::ValueType ValueType

Constructor & Destructor Documentation

DualGridSampler ( const GridType sourceGrid,
const math::Transform targetXform 
)
inline

Grid and transform constructor.

Parameters
sourceGridSource grid.
targetXformTransform of the target grid.
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.

Member Function Documentation

bool isAligned ( ) const
inline

Return true if the two grids are aligned.

ValueType 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).


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