Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
moab::BSPTreePoly::Face Struct Reference
+ Collaboration diagram for moab::BSPTreePoly::Face:

Public Member Functions

 Face (Face *next)
 Face ()
 ~Face ()
double signed_volume () const

Public Attributes

BSPTreePoly::EdgeUseusePtr
BSPTreePoly::FacenextPtr

Detailed Description

Definition at line 156 of file BSPTreePoly.cpp.


Constructor & Destructor Documentation

moab::BSPTreePoly::Face::Face ( Face next) [inline]

Definition at line 158 of file BSPTreePoly.cpp.

        : usePtr( 0 ), nextPtr( next )
#ifdef DEBUG_IDS
          ,
          id( nextID++ )
#endif
    {
    }

Definition at line 166 of file BSPTreePoly.cpp.

        : usePtr( 0 ), nextPtr( 0 )
#ifdef DEBUG_IDS
          ,
          id( nextID++ )
#endif
    {
    }

Definition at line 374 of file BSPTreePoly.cpp.

{
    BSPTreePoly::EdgeUse* nextEdgeUsePtr = usePtr;
    while( nextEdgeUsePtr )
    {
        delete nextEdgeUsePtr;  // This is tricky: ~EdgeUse() might change the value of usePtr
        if( usePtr && usePtr != nextEdgeUsePtr )
            nextEdgeUsePtr = usePtr;
        else
            nextEdgeUsePtr = 0;
    }
    usePtr = 0;
}

Member Function Documentation

Definition at line 486 of file BSPTreePoly.cpp.

References moab::BSPTreePoly::EdgeUse::nextPtr, and moab::sum().

{
    CartVect sum( 0.0 );
    const CartVect* base = usePtr->start();
    CartVect d1          = ( *usePtr->end() - *base );
    for( EdgeUse* coedge = usePtr->nextPtr; coedge != usePtr; coedge = coedge->nextPtr )
    {
        CartVect d2 = ( *coedge->end() - *base );
        sum += d1 * d2;
        d1 = d2;
    }
    return ( 1.0 / 6.0 ) * ( sum % *base );
}

Member Data Documentation

List of all members.


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