MOAB: Mesh Oriented datABase  (version 5.4.1)
TriTagger Class Reference
+ Inheritance diagram for TriTagger:
+ Collaboration diagram for TriTagger:

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

InterfacemMB
Tag mTag
std::vector< EntityHandlemHandles
std::vector< int > mTagData

Detailed Description

Definition at line 464 of file obb_tree_tool.cpp.


Constructor & Destructor Documentation

TriTagger::TriTagger ( Tag  tag,
Interface moab 
) [inline]

Definition at line 473 of file obb_tree_tool.cpp.

: mMB( moab ), mTag( tag ) {}

Member Function Documentation

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.

Parameters:
nodeThe EntityHandle for the entity set for the tree node.
depthThe current depth in the tree.
descendOutput: 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;
    }

Member Data Documentation

std::vector< EntityHandle > TriTagger::mHandles [private]

Definition at line 469 of file obb_tree_tool.cpp.

Referenced by leaf().

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().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines