MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
TriTagger (Tag tag, Interface *moab) | |
ErrorCode | visit (EntityHandle, int, bool &descent) |
Visit a node in the tree during a traversal. | |
ErrorCode | leaf (EntityHandle node) |
Process a leaf node during tree traversal. | |
Private Attributes | |
Interface * | mMB |
Tag | mTag |
std::vector< EntityHandle > | mHandles |
std::vector< int > | mTagData |
Definition at line 464 of file obb_tree_tool.cpp.
TriTagger::TriTagger | ( | Tag | tag, |
Interface * | moab | ||
) | [inline] |
Definition at line 473 of file obb_tree_tool.cpp.
ErrorCode TriTagger::leaf | ( | EntityHandle | node | ) | [inline, virtual] |
Process a leaf node during tree traversal.
Implements moab::OrientedBoxTreeTool::Op.
Definition at line 481 of file obb_tree_tool.cpp.
References moab::Interface::get_entities_by_handle(), hash_handle(), MB_SUCCESS, mHandles, mMB, mTag, mTagData, and moab::Interface::tag_set_data().
{ mHandles.clear(); mMB->get_entities_by_handle( node, mHandles ); mTagData.clear(); mTagData.resize( mHandles.size(), hash_handle( node ) ); mMB->tag_set_data( mTag, &mHandles[0], mHandles.size(), &mTagData[0] ); return MB_SUCCESS; }
ErrorCode TriTagger::visit | ( | EntityHandle | node, |
int | depth, | ||
bool & | descend | ||
) | [inline, virtual] |
Visit a node in the tree during a traversal.
This method is called for each node in the tree visited during a pre-order traversal.
node | The EntityHandle for the entity set for the tree node. |
depth | The current depth in the tree. |
descend | Output: if false, traversal will skip children of the current node, or if the current node is a leaf, the 'leaf' method will not be called. |
Implements moab::OrientedBoxTreeTool::Op.
Definition at line 475 of file obb_tree_tool.cpp.
References MB_SUCCESS.
{ descent = true; return MB_SUCCESS; }
std::vector< EntityHandle > TriTagger::mHandles [private] |
Definition at line 469 of file obb_tree_tool.cpp.
Referenced by leaf().
Interface* TriTagger::mMB [private] |
Definition at line 467 of file obb_tree_tool.cpp.
Referenced by leaf().
Tag TriTagger::mTag [private] |
Definition at line 468 of file obb_tree_tool.cpp.
Referenced by leaf().
std::vector< int > TriTagger::mTagData [private] |
Definition at line 470 of file obb_tree_tool.cpp.
Referenced by leaf().