OpenVDB 3.2.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_2_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

## ◆ AccessorType

typedef TreeAdapter<GridType>::AccessorType AccessorType

## ◆ GridType

typedef TreeAdapter<GridOrTreeT>::GridType GridType

## ◆ TreeType

typedef TreeAdapter<GridOrTreeT>::TreeType TreeType

## ◆ ValueType

typedef GridOrTreeT::ValueType ValueType

## Constructor & Destructor Documentation

## ◆ DualGridSampler() [1/2]

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

Grid and transform constructor.

Parameters

  sourceGrid | Source grid.
  targetXform | Transform of the target grid.

## ◆ DualGridSampler() [2/2]

DualGridSampler | ( | const TreeType & | sourceTree,
|  | const math::Transform & | sourceXform,
|  | const math::Transform & | targetXform
| ) |  |
| inline

Tree and transform constructor.

Parameters

  sourceTree | Source tree.
  sourceXform | Transform of the source grid.
  targetXform | Transform of the target grid.

## Member Function Documentation

## ◆ isAligned()

bool isAligned | ( |  | ) | const
| inline

Return true if the two grids are aligned.

## ◆ operator()()

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:

- Interpolation.h