moab
TriCounter Class Reference
Inheritance diagram for TriCounter:
moab::OrientedBoxTreeTool::Op

List of all members.

Public Member Functions

 TriCounter (Interface *mbi_p, OrientedBoxTreeTool *tool_p, const CartVect &p)
virtual ErrorCode visit (EntityHandle node, int, bool &descend)
 Visit a node in the tree during a traversal.
virtual ErrorCode leaf (EntityHandle node)
 Process a leaf node during tree traversal.

Public Attributes

int count
Interfacembi
OrientedBoxTreeTooltool
const CartVectpt

Detailed Description

Definition at line 16 of file obb_analysis.cpp.


Constructor & Destructor Documentation

TriCounter::TriCounter ( Interface mbi_p,
OrientedBoxTreeTool tool_p,
const CartVect p 
) [inline]

Definition at line 25 of file obb_analysis.cpp.

                                                                                :
    OrientedBoxTreeTool::Op(), count(0), mbi(mbi_p), tool(tool_p), pt(p)
  {}

Member Function Documentation

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

Process a leaf node during tree traversal.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 38 of file obb_analysis.cpp.

                                             {

    int numtris;
    ErrorCode rval = tool->get_moab_instance()->get_number_entities_by_type( node, MBTRI, numtris );
    count += numtris;
    return rval;
  }
virtual ErrorCode TriCounter::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 29 of file obb_analysis.cpp.

                                                                  {
    OrientedBox box;
    ErrorCode rval = tool->box( node, box );
    
    descend = box.contained( pt, 1e-6 );

    return rval;
  }

Member Data Documentation

Definition at line 20 of file obb_analysis.cpp.

Definition at line 21 of file obb_analysis.cpp.

Definition at line 23 of file obb_analysis.cpp.


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