OpenVDB: GridResampleToMatchOp< Sampler > Class Template Reference

OpenVDB 8.0.0

Public Member Functions | List of all members
GridResampleToMatchOp< Sampler > Class Template Reference

GridResampleToMatchOp is a functor class for use with GridBase::apply() that samples an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide, but the output grid's transform is unchanged. More...

`#include <UT_VDBTools.h>`

## Public Member Functions
| GridResampleToMatchOp (GridPtr outGrid)
template<typename GridType >
void | operator() (const GridType &inGrid)

## Detailed Description

### template<typename Sampler>
class openvdb_houdini::GridResampleToMatchOp< Sampler >

GridResampleToMatchOp is a functor class for use with GridBase::apply() that samples an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide, but the output grid's transform is unchanged.

See also
  GridTransformOp, GridResampleOp

Example:
  const Grid& inGrid = ...; // generic reference to a grid of any type
  // Create a new, empty output grid of the same (so far, unknown) type as
  // the input grid and with the same metadata, but with a different transform.
  GridPtr outGrid = inGrid.copyGridWithNewTree();
  outGrid->setTransform(myTransform);
  // Resolve the input grid's type and resample it into the output grid,
  // using a second-order sampling kernel.
  GridResampleToMatchOp<openvdb::tools::QuadraticSampler> op(outGrid);
  inGrid.apply<openvdb_houdini::ScalarGridTypes>(op);

## Constructor & Destructor Documentation

## ◆ GridResampleToMatchOp()

GridResampleToMatchOp | ( | GridPtr | outGrid | ) |
| inline

## Member Function Documentation

## ◆ operator()()

void operator() | ( | const GridType & | inGrid | ) |
| inline

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

- UT_VDBTools.h

openvdb_houdini::Grid
openvdb::GridBase Grid
Definition: openvdb_houdini/openvdb_houdini/Utils.h:33
openvdb::v8_2::TypeList
A list of types (not necessarily unique)
Definition: TypeList.h:366
openvdb_houdini::GridPtr
openvdb::GridBase::Ptr GridPtr
Definition: openvdb_houdini/openvdb_houdini/Utils.h:34