HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer Class Reference

A GridTransformer applies a geometric transformation to an input grid using one of several sampling schemes, and stores the result in an output grid. More...

#include <GridTransformer.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer:

Classes

struct  MatrixTransform
 

Public Types

using Ptr = SharedPtr< GridTransformer >
 
- Public Types inherited from openvdb::OPENVDB_VERSION_NAME::tools::GridResampler
using Ptr = SharedPtr< GridResampler >
 
using InterruptFunc = std::function< bool(void)>
 

Public Member Functions

 GridTransformer (const Mat4R &xform)
 
 GridTransformer (const Vec3R &pivot, const Vec3R &scale, const Vec3R &rotate, const Vec3R &translate, const std::string &xformOrder="tsr", const std::string &rotationOrder="zyx")
 
 ~GridTransformer () override=default
 
const Mat4RgetTransform () const
 
template<class Sampler , class GridT >
void transformGrid (const GridT &inGrid, GridT &outGrid) const
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::GridResampler
 GridResampler ()
 
virtual ~GridResampler ()
 
void setThreaded (bool b)
 Enable or disable threading. (Threading is enabled by default.) More...
 
bool threaded () const
 Return true if threading is enabled. More...
 
void setTransformTiles (bool b)
 Enable or disable processing of tiles. (Enabled by default, except for level set grids.) More...
 
bool transformTiles () const
 Return true if tile processing is enabled. More...
 
template<typename InterrupterType >
void setInterrupter (InterrupterType &)
 Allow processing to be aborted by providing an interrupter object. The interrupter will be queried periodically during processing. More...
 
template<typename Sampler , typename GridT , typename Transformer >
void transformGrid (const Transformer &, const GridT &inGrid, GridT &outGrid) const
 

Additional Inherited Members

- Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::GridResampler
template<typename Sampler , typename GridT , typename Transformer >
void applyTransform (const Transformer &, const GridT &inGrid, GridT &outGrid) const
 
bool interrupt () const
 

Detailed Description

A GridTransformer applies a geometric transformation to an input grid using one of several sampling schemes, and stores the result in an output grid.

Note
GridTransformer is optimized for affine transformations.

Usage:

Mat4R xform = ...;
GridTransformer transformer(xform);
transformer.transformGrid<BoxSampler>(inGrid, outGrid);

or

Vec3R pivot = ..., scale = ..., rotate = ..., translate = ...;
GridTransformer transformer(pivot, scale, rotate, translate);
transformer.transformGrid<QuadraticSampler>(inGrid, outGrid);

Definition at line 253 of file GridTransformer.h.

Member Typedef Documentation

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer::GridTransformer ( const Mat4R xform)
inline

Definition at line 532 of file GridTransformer.h.

openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer::GridTransformer ( const Vec3R pivot,
const Vec3R scale,
const Vec3R rotate,
const Vec3R translate,
const std::string xformOrder = "tsr",
const std::string rotationOrder = "zyx" 
)
inline

Definition at line 549 of file GridTransformer.h.

openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer::~GridTransformer ( )
overridedefault

Member Function Documentation

const Mat4R& openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer::getTransform ( void  ) const
inline

Definition at line 268 of file GridTransformer.h.

template<class Sampler , class GridT >
void openvdb::OPENVDB_VERSION_NAME::tools::GridTransformer::transformGrid ( const GridT &  inGrid,
GridT &  outGrid 
) const

Definition at line 691 of file GridTransformer.h.


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