OpenVDB  0.104.0
Classes | Namespaces | Functions
ValueTransformer.h File Reference
#include <tbb/parallel_for.h>
#include <tbb/parallel_reduce.h>
#include <openvdb/Types.h>
#include <openvdb/Grid.h>

Go to the source code of this file.

Classes

class  SharedOpApplier< IterT, OpT >
 
class  CopyableOpApplier< IterT, OpT >
 
class  SharedOpTransformer< InIterT, OutTreeT, OpT >
 

Namespaces

namespace  openvdb
 
namespace  openvdb::v0_104_0
 
namespace  openvdb::v0_104_0::tools
 
namespace  openvdb::v0_104_0::tools::valxform
 

Functions

template<typename IterT , typename XformOp >
void foreach (const IterT &iter, XformOp &op, bool threaded=true, bool shareOp=true)
 
template<typename IterT , typename XformOp >
void foreach (const IterT &iter, const XformOp &op, bool threaded=true, bool shareOp=true)
 
template<typename InIterT , typename OutGridT , typename XformOp >
void transformValues (const InIterT &inIter, OutGridT &outGrid, XformOp &op, bool threaded=true, bool shareOp=true)
 
template<typename InIterT , typename OutGridT , typename XformOp >
void transformValues (const InIterT &inIter, OutGridT &outGrid, const XformOp &op, bool threaded=true, bool shareOp=true)
 

Detailed Description

tools::foreach() and tools::transformValues() transform the values in a grid by iterating over the grid with a user-supplied iterator and applying a user-supplied functor at each step of the iteration. With tools::foreach(), the transformation is done in-place on the input grid, whereas with tools::transformValues(), transformed values are written to an output grid (which can, for example, have a different value type than the input grid). Both functions can optionally transform multiple values of the grid in parallel.