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

DynamicNodeManager operator to merge two trees using a CSG difference. 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>
| CsgDifferenceOp (TreeT &tree, TagT tag)
| Convenience constructor to CSG difference a single non-const tree from another. This constructor takes a Steal or DeepCopy tag dispatch class.
| CsgDifferenceOp (const TreeT &tree, DeepCopy tag)
| Convenience constructor to CSG difference a single const tree from another. This constructor requires an explicit DeepCopy tag dispatch class.
| CsgDifferenceOp (TreeToMerge< TreeT > &tree)
| Constructor to CSG difference the tree in a TreeToMerge object from another.
void | setPruneCancelledTiles (bool doprune)
| Enables immediate pruning of tiles that cancel each other out.
size_t | size () const
| Return the number of trees being merged (only ever 1)
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::CsgDifferenceOp< TreeT >

DynamicNodeManager operator to merge two trees using a CSG difference.

Note
  This class modifies the topology of the tree so is designed to be used from DynamicNodeManager::foreachTopDown(). PruneCancelledTiles will set to background any leaf tile that matches in the two trees, thus minimizing ghost banding when common borders are differenced.

## 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

## CsgDifferenceOp() [1/3]

template<typename TreeT>
template<typename TagT>

CsgDifferenceOp | ( | TreeT & | tree,
|  | TagT | tag )

inline

Convenience constructor to CSG difference a single non-const tree from another. This constructor takes a Steal or DeepCopy tag dispatch class.

## CsgDifferenceOp() [2/3]

template<typename TreeT>

CsgDifferenceOp | ( | const TreeT & | tree,
|  | DeepCopy | tag )

inline

Convenience constructor to CSG difference a single const tree from another. This constructor requires an explicit DeepCopy tag dispatch class.

## CsgDifferenceOp() [3/3]

template<typename TreeT>

CsgDifferenceOp | ( | TreeToMerge< TreeT > & | tree | ) |

inline explicit

Constructor to CSG difference the tree in a TreeToMerge object from another.

## Member Function Documentation

## 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

## setPruneCancelledTiles()

template<typename TreeT>

void setPruneCancelledTiles | ( | bool | doprune | ) |

inline

Enables immediate pruning of tiles that cancel each other out.

## size()

template<typename TreeT>

size_t size | ( |  | ) | const

inline

Return the number of trees being merged (only ever 1)