MOAB: Mesh Oriented datABase  (version 5.2.1)
TriCounter Class Reference
+ Inheritance diagram for TriCounter:
+ Collaboration diagram for TriCounter:

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
Interface * mbi
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 40 of file obb_analysis.cpp.

References MBTRI.

    {

        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 30 of file obb_analysis.cpp.

References box(), and moab::OrientedBox::contained().

    {
        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.

Interface* TriCounter::mbi

Definition at line 21 of file obb_analysis.cpp.

Definition at line 23 of file obb_analysis.cpp.

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