OpenVDB  2.1.0
Public Types | Public Member Functions | List of all members
DualGridSampler< SourceGridT, TargetGridT, 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 SourceGridT::ValueType ValueType
 

Public Member Functions

 DualGridSampler (const SourceGridT &source, const TargetGridT &target)
 
ValueType operator() (const Coord &ijk) const
 Return the value of the source grid at the index coordinates, ijk, relative to the target grid. More...
 

Detailed Description

template<typename SourceGridT, typename TargetGridT, typename SamplerT = tools::BoxSampler>
class openvdb::v2_1_0::tools::DualGridSampler< SourceGridT, TargetGridT, 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! Also note that unless the grids are aligned, virtual methods are used to resolve the coordinate transformations, which is clearly not optimal. So consider resolving the Map types of the two grids for better performance.

Member Typedef Documentation

typedef SourceGridT::ValueType ValueType

Constructor & Destructor Documentation

DualGridSampler ( const SourceGridT &  source,
const TargetGridT &  target 
)
inline

Member Function Documentation

ValueType operator() ( const Coord &  ijk) const
inline

Return the value of the source grid at the index coordinates, ijk, relative to the target grid.


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