OpenVDB 11.0.0

Loading...
Searching...
No Matches
SumMergeOp< TreeT > Struct Template Reference

DynamicNodeManager operator to merge trees using a sum operation. More...

`#include <openvdb/tools/Merge.h>`

## Public Types
using | ValueT = typename TreeT::ValueType
using | RootT = typename TreeT::RootNodeType
using | LeafT = typename TreeT::LeafNodeType

## Public Member Functions
template<typename TagT>
| SumMergeOp (TreeT &tree, TagT tag)
| Convenience constructor to sum a single non-const tree with another. This constructor takes a Steal or DeepCopy tag dispatch class.
| SumMergeOp (const TreeT &tree, DeepCopy tag)
| Convenience constructor to sum a single const tree with another. This constructor requires a DeepCopy tag dispatch class.
template<typename TreesT, typename TagT>
| SumMergeOp (TreesT &trees, TagT tag)
| Constructor to sum a container of multiple const or non-const tree pointers. A Steal tag requires a container of non-const trees, a DeepCopy tag will accept either const or non-const trees.
| SumMergeOp (const std::vector< TreeToMerge< TreeT > > &trees)
| Constructor to accept a vector of TreeToMerge objects, primarily used when mixing const/non-const trees.
| SumMergeOp (const std::deque< TreeToMerge< TreeT > > &trees)
| Constructor to accept a deque of TreeToMerge objects, primarily used when mixing const/non-const trees.
bool | empty () const
| Return true if no trees being merged.
size_t | size () const
| Return the number of trees being merged.
bool | operator() (RootT &root, size_t idx) const
template<typename NodeT>
bool | operator() (NodeT &node, size_t idx) const
bool | operator() (LeafT &leaf, size_t idx) const

## Detailed Description

template<typename TreeT>
struct openvdb::v11_0::tools::SumMergeOp< TreeT >

DynamicNodeManager operator to merge trees using a sum operation.

Note
  This class modifies the topology of the tree so is designed to be used from DynamicNodeManager::foreachTopDown().

## Member Typedef Documentation

## ◆ LeafT

template<typename TreeT>

using LeafT = typename TreeT::LeafNodeType

## ◆ RootT

template<typename TreeT>

using RootT = typename TreeT::RootNodeType

## ◆ ValueT

template<typename TreeT>

using ValueT = typename TreeT::ValueType

## Constructor & Destructor Documentation

## ◆ SumMergeOp() [1/5]

template<typename TreeT>
template<typename TagT>

SumMergeOp | ( | TreeT & | tree,
|  | TagT | tag )
| inline

Convenience constructor to sum a single non-const tree with another. This constructor takes a Steal or DeepCopy tag dispatch class.

## ◆ SumMergeOp() [2/5]

template<typename TreeT>

SumMergeOp | ( | const TreeT & | tree,
|  | DeepCopy | tag )
| inline

Convenience constructor to sum a single const tree with another. This constructor requires a DeepCopy tag dispatch class.

## ◆ SumMergeOp() [3/5]

template<typename TreeT>
template<typename TreesT, typename TagT>

SumMergeOp | ( | TreesT & | trees,
|  | TagT | tag )
| inline

Constructor to sum a container of multiple const or non-const tree pointers. A Steal tag requires a container of non-const trees, a DeepCopy tag will accept either const or non-const trees.

## ◆ SumMergeOp() [4/5]

template<typename TreeT>

SumMergeOp | ( | const std::vector< TreeToMerge< TreeT > > & | trees | ) |
| inline explicit

Constructor to accept a vector of TreeToMerge objects, primarily used when mixing const/non-const trees.

Note
  Sum order is preserved.

## ◆ SumMergeOp() [5/5]

template<typename TreeT>

SumMergeOp | ( | const std::deque< TreeToMerge< TreeT > > & | trees | ) |
| inline explicit

Constructor to accept a deque of TreeToMerge objects, primarily used when mixing const/non-const trees.

Note
  Sum order is preserved.

## Member Function Documentation

## ◆ empty()

template<typename TreeT>

bool empty | ( |  | ) | const
| inline

Return true if no trees being merged.

## ◆ operator()() [1/3]

template<typename TreeT>

bool operator() | ( | LeafT & | leaf,
|  | size_t | idx ) const

## ◆ operator()() [2/3]

template<typename TreeT>
template<typename NodeT>

bool operator() | ( | NodeT & | node,
|  | size_t | idx ) const

## ◆ operator()() [3/3]

template<typename TreeT>

bool operator() | ( | RootT & | root,
|  | size_t | idx ) const

## ◆ size()

template<typename TreeT>

size_t size | ( |  | ) | const
| inline

Return the number of trees being merged.