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

using AccessorType = typename TreeAdapter<GridType>::AccessorType

## ◆ GridType

using GridType = typename TreeAdapter<GridOrTreeT>::GridType

## ◆ TreeType

using TreeType = typename TreeAdapter<GridOrTreeT>::TreeType

## ◆ ValueType

using ValueType = typename GridOrTreeT::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