Convenience class that contains a pointer to a tree to be stolen or deep copied depending on the tag dispatch class used and a subset of methods to retrieve data from the tree.  
 More...
|  | 
|  | TreeToMerge ()=delete | 
|  | 
|  | TreeToMerge (TreeType &tree, Steal) | 
|  | Non-const pointer tree constructor for stealing data. 
 | 
|  | 
|  | TreeToMerge (typename TreeType::Ptr treePtr, Steal) | 
|  | Non-const shared pointer tree constructor for stealing data. 
 | 
|  | 
|  | TreeToMerge (const TreeType &tree, DeepCopy, bool initialize=true) | 
|  | Const tree pointer constructor for deep-copying data. As the tree is not mutable and thus cannot be pruned, a lightweight mask tree with the same topology is created that can be pruned to use as a reference. Initialization of this mask tree can optionally be disabled for delayed construction. 
 | 
|  | 
|  | TreeToMerge (TreeType &tree, DeepCopy tag, bool initialize=true) | 
|  | Non-const tree pointer constructor for deep-copying data. The tree is not intended to be modified so is not pruned, instead a lightweight mask tree with the same topology is created that can be pruned to use as a reference. Initialization of this mask tree can optionally be disabled for delayed construction. 
 | 
|  | 
| void | reset (typename TreeType::Ptr treePtr, Steal) | 
|  | Reset the non-const tree shared pointer. This is primarily used to preserve the order of trees to merge in a container but have the data in the tree be lazily loaded or resampled. 
 | 
|  | 
| TreeType * | treeToSteal () | 
|  | Return a pointer to the tree to be stolen. 
 | 
|  | 
| const TreeType * | treeToDeepCopy () | 
|  | Return a pointer to the tree to be deep-copied. 
 | 
|  | 
| const RootNodeType * | rootPtr () const | 
|  | Retrieve a const pointer to the root node. 
 | 
|  | 
| template<typename NodeT> | 
| const NodeT * | probeConstNode (const Coord &ijk) const | 
|  | Return a pointer to the node of type NodeTthat contains voxel (x, y, z). If no such node exists, returnnullptr.
 | 
|  | 
| void | pruneMask (Index level, const Coord &ijk) | 
|  | Prune the mask and remove the node associated with this coord. 
 | 
|  | 
| template<typename NodeT> | 
| std::unique_ptr< NodeT > | stealOrDeepCopyNode (const Coord &ijk, const ValueType &value) | 
|  | Return a pointer to the node of type NodeTthat contains voxel (x, y, z). If the tree is non-const, steal the node and replace it with the value provided. If the tree is const, deep-copy the node and modify the mask tree to prune the node.
 | 
|  | 
| template<typename NodeT> | 
| std::unique_ptr< NodeT > | stealOrDeepCopyNode (const Coord &ijk) | 
|  | Return a pointer to the node of type NodeTthat contains voxel (x, y, z). If the tree is non-const, steal the node and replace it with an inactive background-value tile. If the tree is const, deep-copy the node and modify the mask tree to prune the node.
 | 
|  | 
| template<typename NodeT> | 
| void | addTile (const Coord &ijk, const ValueType &value, bool active) | 
|  | Add a tile containing voxel (x, y, z) at the level of NodeT, deleting the existing branch if necessary. 
 | 
|  | 
| void | initializeMask () | 
|  | 
| bool | hasMask () const | 
|  | 
| MaskTreeType * | mask () | 
|  | 
| const MaskTreeType * | mask () const | 
|  | 
template<typename TreeT>
struct openvdb::v12_0::tools::TreeToMerge< TreeT >
Convenience class that contains a pointer to a tree to be stolen or deep copied depending on the tag dispatch class used and a subset of methods to retrieve data from the tree. 
The primary purpose of this class is to be able to create an array of TreeToMerge objects that each store a tree to be stolen or a tree to be deep-copied in an arbitrary order. Certain operations such as floating-point addition are non-associative so the order in which they are merged is important for the operation to remain deterministic regardless of how the data is being extracted from the tree.
- Note
- Stealing data requires a non-const tree pointer. There is a constructor to pass in a tree shared pointer for cases where it is desirable for this class to maintain shared ownership.