OpenVDB 11.0.0
Loading...
Searching...
No Matches
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.
 

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::v11_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

◆ AccessorT

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
typedef InGridT::ConstAccessor AccessorT
protected

◆ LeafManagerT

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
typedef tree::LeafManager<OutTreeT> LeafManagerT

◆ OutLeafT

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
typedef OutTreeT::LeafNodeType OutLeafT

◆ OutTreeT

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
typedef OutGridT::TreeType OutTreeT

Constructor & Destructor Documentation

◆ GridOperator() [1/2]

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
GridOperator ( const InGridT & grid,
const MaskGridType * mask,
const MapT & map,
InterruptT * interrupt = nullptr,
bool densify = true )
inline

◆ GridOperator() [2/2]

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
GridOperator ( const GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT > & )
default

◆ ~GridOperator()

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
virtual ~GridOperator ( )
virtualdefault

Member Function Documentation

◆ operator()()

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
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!

◆ operator=()

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
GridOperator & operator= ( const GridOperator< InGridT, MaskGridType, OutGridT, MapT, OperatorT, InterruptT > & )
default

◆ process()

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
OutGridT::Ptr process ( bool threaded = true)
inline

Member Data Documentation

◆ mAcc

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
AccessorT mAcc
mutableprotected

◆ mDensify

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
const bool mDensify
protected

◆ mInterrupt

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
InterruptT* mInterrupt
protected

◆ mMap

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
const MapT& mMap
protected

◆ mMask

template<typename InGridT , typename MaskGridType , typename OutGridT , typename MapT , typename OperatorT , typename InterruptT = util::NullInterrupter>
const MaskGridType* mMask
protected