GridResampleOp is a functor class for use with UTvdbProcessTypedGrid() that samples an input grid into an output grid of the same type through a given transform.
More...
#include <openvdb_houdini/UT_VDBTools.h>
template<typename Sampler, typename TransformerType>
class openvdb_houdini::GridResampleOp< Sampler, TransformerType >
GridResampleOp is a functor class for use with UTvdbProcessTypedGrid() that samples an input grid into an output grid of the same type through a given transform.
The output grid's transform is unchanged by this operation.
- See also
- GridTransformOp, GridResampleToMatchOp
- Example:
namespace {
struct MyXform
{
openvdb::Vec3d transform(const openvdb::Vec3d&) const { ... }
openvdb::Vec3d invTransform(const openvdb::Vec3d&) const { ... }
};
}
const Grid& inGrid = ...;
GridPtr outGrid = inGrid.copyGridWithNewTree();
GridResampleOp<openvdb::tools::BoxSampler, MyXform> op(outGrid, MyXform());
- Parameters
-
outGrid | a generic pointer to an output grid of the same type as the grid to be resampled |
t | an object that implements GridResampler 's Transformer interface |
- Note
- GridResampleOp makes an internal copy of t.
void operator() |
( |
const GridType & |
inGrid | ) |
|
|
inline |