MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
VtxTagger (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< EntityHandle > | mConn |
std::vector< int > | mTagData |
Definition at line 516 of file obb_tree_tool.cpp.
VtxTagger::VtxTagger | ( | Tag | tag, |
Interface * | moab | ||
) | [inline] |
Definition at line 526 of file obb_tree_tool.cpp.
ErrorCode VtxTagger::leaf | ( | EntityHandle | node | ) | [inline, virtual] |
Process a leaf node during tree traversal.
Implements moab::OrientedBoxTreeTool::Op.
Definition at line 534 of file obb_tree_tool.cpp.
References moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), hash_handle(), MB_SUCCESS, mConn, mHandles, mMB, mTag, mTagData, and moab::Interface::tag_set_data().
{ mHandles.clear(); mMB->get_entities_by_handle( node, mHandles ); mConn.clear(); mMB->get_connectivity( &mHandles[0], mHandles.size(), mConn ); mTagData.clear(); mTagData.resize( mConn.size(), hash_handle( node ) ); mMB->tag_set_data( mTag, &mConn[0], mConn.size(), &mTagData[0] ); return MB_SUCCESS; }
ErrorCode VtxTagger::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 528 of file obb_tree_tool.cpp.
References MB_SUCCESS.
{ descent = true; return MB_SUCCESS; }
std::vector< EntityHandle > VtxTagger::mConn [private] |
Definition at line 522 of file obb_tree_tool.cpp.
Referenced by leaf().
std::vector< EntityHandle > VtxTagger::mHandles [private] |
Definition at line 521 of file obb_tree_tool.cpp.
Referenced by leaf().
Interface* VtxTagger::mMB [private] |
Definition at line 519 of file obb_tree_tool.cpp.
Referenced by leaf().
Tag VtxTagger::mTag [private] |
Definition at line 520 of file obb_tree_tool.cpp.
Referenced by leaf().
std::vector< int > VtxTagger::mTagData [private] |
Definition at line 523 of file obb_tree_tool.cpp.
Referenced by leaf().