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

Public Member Functions

 LeafHexer (OrientedBoxTreeTool *tool, Interface *mb2, Tag tag)
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

OrientedBoxTreeToolmTool
InterfacemOut
Tag mTag
std::vector< EntityHandlemHandles
std::vector< EntityHandlemConn
std::vector< int > mTagData

Detailed Description

Definition at line 571 of file obb_tree_tool.cpp.


Constructor & Destructor Documentation

LeafHexer::LeafHexer ( OrientedBoxTreeTool tool,
Interface mb2,
Tag  tag 
) [inline]

Definition at line 582 of file obb_tree_tool.cpp.

: mTool( tool ), mOut( mb2 ), mTag( tag ) {}

Member Function Documentation

ErrorCode LeafHexer::leaf ( EntityHandle  node) [inline, virtual]

Process a leaf node during tree traversal.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 590 of file obb_tree_tool.cpp.

References moab::OrientedBoxTreeTool::box(), box(), ErrorCode, hash_handle(), moab::OrientedBox::make_hex(), MB_SUCCESS, mOut, mTag, mTool, and moab::Interface::tag_set_data().

    {
        OrientedBox box;
        ErrorCode rval = mTool->box( node, box );
        if( MB_SUCCESS != rval ) return rval;
        EntityHandle h;
        rval = box.make_hex( h, mOut );
        if( MB_SUCCESS != rval ) return rval;
        int i = hash_handle( node );
        return mOut->tag_set_data( mTag, &h, 1, &i );
    }
ErrorCode LeafHexer::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 584 of file obb_tree_tool.cpp.

References MB_SUCCESS.

    {
        descent = true;
        return MB_SUCCESS;
    }

Member Data Documentation

std::vector< EntityHandle > LeafHexer::mConn [private]

Definition at line 578 of file obb_tree_tool.cpp.

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

Definition at line 577 of file obb_tree_tool.cpp.

Definition at line 575 of file obb_tree_tool.cpp.

Referenced by leaf().

Tag LeafHexer::mTag [private]

Definition at line 576 of file obb_tree_tool.cpp.

Referenced by leaf().

std::vector< int > LeafHexer::mTagData [private]

Definition at line 579 of file obb_tree_tool.cpp.

Definition at line 574 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