HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union > Struct Template Reference

DynamicNodeManager operator to merge trees using a CSG union or intersection. More...

#include <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 >
 CsgUnionOrIntersectionOp (TreeT &tree, TagT tag)
 Convenience constructor to CSG union or intersect a single non-const tree with another. This constructor takes a Steal or DeepCopy tag dispatch class. More...
 
 CsgUnionOrIntersectionOp (const TreeT &tree, DeepCopy tag)
 Convenience constructor to CSG union or intersect a single const tree with another. This constructor requires a DeepCopy tag dispatch class. More...
 
template<typename TreesT , typename TagT >
 CsgUnionOrIntersectionOp (TreesT &trees, TagT tag)
 Constructor to CSG union or intersect 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. More...
 
 CsgUnionOrIntersectionOp (const std::vector< TreeToMerge< TreeT >> &trees)
 Constructor to accept a vector of TreeToMerge objects, primarily used when mixing const/non-const trees. More...
 
 CsgUnionOrIntersectionOp (const std::deque< TreeToMerge< TreeT >> &trees)
 Constructor to accept a deque of TreeToMerge objects, primarily used when mixing const/non-const trees. More...
 
bool empty () const
 Return true if no trees being merged. More...
 
size_t size () const
 Return the number of trees being merged. More...
 
void setPruneCancelledTiles (bool doprune)
 Enables immediate pruning of tiles that cancel each other out. More...
 
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, bool Union>
struct openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >

DynamicNodeManager operator to merge trees using a CSG union or intersection.

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

A union and an intersection are opposite operations to each other so implemented in a combined class. Use the CsgUnionOp and CsgIntersectionOp aliases for convenience.

Definition at line 192 of file Merge.h.

Member Typedef Documentation

template<typename TreeT, bool Union>
using openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::LeafT = typename TreeT::LeafNodeType

Definition at line 196 of file Merge.h.

template<typename TreeT, bool Union>
using openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::RootT = typename TreeT::RootNodeType

Definition at line 195 of file Merge.h.

template<typename TreeT, bool Union>
using openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::ValueT = typename TreeT::ValueType

Definition at line 194 of file Merge.h.

Constructor & Destructor Documentation

template<typename TreeT, bool Union>
template<typename TagT >
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::CsgUnionOrIntersectionOp ( TreeT &  tree,
TagT  tag 
)
inline

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

Definition at line 202 of file Merge.h.

template<typename TreeT, bool Union>
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::CsgUnionOrIntersectionOp ( const TreeT &  tree,
DeepCopy  tag 
)
inline

Convenience constructor to CSG union or intersect a single const tree with another. This constructor requires a DeepCopy tag dispatch class.

Definition at line 207 of file Merge.h.

template<typename TreeT, bool Union>
template<typename TreesT , typename TagT >
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::CsgUnionOrIntersectionOp ( TreesT &  trees,
TagT  tag 
)
inline

Constructor to CSG union or intersect 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.

Definition at line 214 of file Merge.h.

template<typename TreeT, bool Union>
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::CsgUnionOrIntersectionOp ( const std::vector< TreeToMerge< TreeT >> &  trees)
inlineexplicit

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

Note
Union/intersection order is preserved.

Definition at line 226 of file Merge.h.

template<typename TreeT, bool Union>
openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::CsgUnionOrIntersectionOp ( const std::deque< TreeToMerge< TreeT >> &  trees)
inlineexplicit

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

Note
Union/intersection order is preserved.

Definition at line 232 of file Merge.h.

Member Function Documentation

template<typename TreeT, bool Union>
bool openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::empty ( void  ) const
inline

Return true if no trees being merged.

Definition at line 236 of file Merge.h.

template<typename TreeT , bool Union>
bool openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::operator() ( RootT root,
size_t  idx 
) const

Definition at line 714 of file Merge.h.

template<typename TreeT , bool Union>
template<typename NodeT >
bool openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::operator() ( NodeT &  node,
size_t  idx 
) const

Definition at line 897 of file Merge.h.

template<typename TreeT , bool Union>
bool openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::operator() ( LeafT leaf,
size_t  idx 
) const

Definition at line 978 of file Merge.h.

template<typename TreeT, bool Union>
void openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::setPruneCancelledTiles ( bool  doprune)
inline

Enables immediate pruning of tiles that cancel each other out.

Definition at line 242 of file Merge.h.

template<typename TreeT, bool Union>
size_t openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionOrIntersectionOp< TreeT, Union >::size ( void  ) const
inline

Return the number of trees being merged.

Definition at line 239 of file Merge.h.


The documentation for this struct was generated from the following file: