MOAB: Mesh Oriented datABase  (version 5.5.0)
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. More...
 
ErrorCode leaf (EntityHandle node)
 Process a leaf node during tree traversal. More...
 
- Public Member Functions inherited from moab::OrientedBoxTreeTool::Op
virtual ~Op ()
 

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

Definition at line 582 of file obb_tree_tool.cpp.

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

Member Function Documentation

◆ leaf()

ErrorCode LeafHexer::leaf ( EntityHandle  node)
inlinevirtual

Process a leaf node during tree traversal.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 590 of file obb_tree_tool.cpp.

591  {
593  ErrorCode rval = mTool->box( node, box );
594  if( MB_SUCCESS != rval ) return rval;
595  EntityHandle h;
596  rval = box.make_hex( h, mOut );
597  if( MB_SUCCESS != rval ) return rval;
598  int i = hash_handle( node );
599  return mOut->tag_set_data( mTag, &h, 1, &i );
600  }

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

◆ visit()

ErrorCode LeafHexer::visit ( EntityHandle  node,
int  depth,
bool &  descend 
)
inlinevirtual

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.

585  {
586  descent = true;
587  return MB_SUCCESS;
588  }

References MB_SUCCESS.

Member Data Documentation

◆ mConn

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

Definition at line 578 of file obb_tree_tool.cpp.

◆ mHandles

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

Definition at line 577 of file obb_tree_tool.cpp.

◆ mOut

Interface* LeafHexer::mOut
private

Definition at line 575 of file obb_tree_tool.cpp.

Referenced by leaf().

◆ mTag

Tag LeafHexer::mTag
private

Definition at line 576 of file obb_tree_tool.cpp.

Referenced by leaf().

◆ mTagData

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

Definition at line 579 of file obb_tree_tool.cpp.

◆ mTool

OrientedBoxTreeTool* LeafHexer::mTool
private

Definition at line 574 of file obb_tree_tool.cpp.

Referenced by leaf().


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