OpenVDB  9.0.1
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT > Class Template Reference

Apply an operator to an input grid to produce an output grid with the same active voxel topology but a potentially different value type. More...

#include <openvdb/tools/GridOperators.h>

Public Types

typedef OutGridT::TreeType OutTreeT
 
typedef OutTreeT::LeafNodeType OutLeafT
 
typedef tree::LeafManager< OutTreeTLeafManagerT
 

Public Member Functions

 GridOperator (const InGridT &grid, const MaskGridType *mask, const MapT &map, InterruptT *interrupt=nullptr, bool densify=true)
 
 GridOperator (const GridOperator &)=default
 
GridOperatoroperator= (const GridOperator &)=default
 
virtual ~GridOperator ()=default
 
OutGridT::Ptr process (bool threaded=true)
 
void operator() (const typename LeafManagerT::LeafRange &range) const
 Iterate sequentially over LeafNodes and voxels in the output grid and apply the operator using a value accessor for the input grid. More...
 

Protected Types

typedef InGridT::ConstAccessor AccessorT
 

Protected Attributes

AccessorT mAcc
 
const MapT & mMap
 
InterruptT * mInterrupt
 
const MaskGridType * mMask
 
const bool mDensify
 

Detailed Description

template<typename InGridT, typename MaskGridType, typename OutGridT, typename MapT, typename OperatorT, typename InterruptT = util::NullInterrupter>
class openvdb::v9_0::tools::gridop::GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT >

Apply an operator to an input grid to produce an output grid with the same active voxel topology but a potentially different value type.

To facilitate inlining, this class is also templated on a Map type.

Note
This is a helper class and should never be used directly.

Member Typedef Documentation

typedef InGridT::ConstAccessor AccessorT
protected
typedef OutTreeT::LeafNodeType OutLeafT
typedef OutGridT::TreeType OutTreeT

Constructor & Destructor Documentation

GridOperator ( const InGridT &  grid,
const MaskGridType *  mask,
const MapT &  map,
InterruptT *  interrupt = nullptr,
bool  densify = true 
)
inline
GridOperator ( const GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT > &  )
default
virtual ~GridOperator ( )
virtualdefault

Member Function Documentation

void operator() ( const typename LeafManagerT::LeafRange range) const
inline

Iterate sequentially over LeafNodes and voxels in the output grid and apply the operator using a value accessor for the input grid.

Note
Never call this public method directly - it is called by TBB threads only!
GridOperator& operator= ( const GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT > &  )
default
OutGridT::Ptr process ( bool  threaded = true)
inline

Member Data Documentation

AccessorT mAcc
mutableprotected
const bool mDensify
protected
InterruptT* mInterrupt
protected
const MapT& mMap
protected
const MaskGridType* mMask
protected