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>
|
| 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...
|
|
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.
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: