MOAB: Mesh Oriented datABase  (version 5.4.1)
moab::BSPTreePoly::EdgeUse Struct Reference
+ Collaboration diagram for moab::BSPTreePoly::EdgeUse:

Public Member Functions

 EdgeUse (Edge *edge)
 EdgeUse (Edge *edge, Face *face)
 ~EdgeUse ()
BSPTreePoly::Vertexstart () const
BSPTreePoly::Vertexend () const
int sense () const
void insert_after (BSPTreePoly::EdgeUse *prev)
void insert_before (BSPTreePoly::EdgeUse *next)

Public Attributes

BSPTreePoly::EdgeUseprevPtr
BSPTreePoly::EdgeUsenextPtr
BSPTreePoly::EdgeedgePtr
BSPTreePoly::FacefacePtr

Detailed Description

Definition at line 46 of file BSPTreePoly.cpp.


Constructor & Destructor Documentation

Definition at line 264 of file BSPTreePoly.cpp.

: prevPtr( 0 ), nextPtr( 0 ), edgePtr( edge ), facePtr( 0 ) {}

Definition at line 266 of file BSPTreePoly.cpp.

References nextPtr, prevPtr, and moab::BSPTreePoly::Face::usePtr.

                                                                          : edgePtr( edge ), facePtr( face )
{
    assert( !face->usePtr );
    face->usePtr = prevPtr = nextPtr = this;

    if( !face->usePtr )
    {
        face->usePtr = prevPtr = nextPtr = this;
        return;
    }

    nextPtr = face->usePtr;
    prevPtr = nextPtr->prevPtr;
    assert( prevPtr->nextPtr == nextPtr );
    nextPtr->prevPtr = this;
    prevPtr->nextPtr = this;
}

Definition at line 312 of file BSPTreePoly.cpp.

{
    if( facePtr->usePtr == this ) facePtr->usePtr = ( nextPtr == this ) ? 0 : nextPtr;

    if( edgePtr->forwardPtr == this ) edgePtr->forwardPtr = 0;
    if( edgePtr->reversePtr == this ) edgePtr->reversePtr = 0;

    if( !edgePtr->forwardPtr && !edgePtr->reversePtr ) delete edgePtr;

    nextPtr->prevPtr = prevPtr;
    prevPtr->nextPtr = nextPtr;
    nextPtr = prevPtr = 0;
}

Member Function Documentation

Definition at line 284 of file BSPTreePoly.cpp.

References end(), facePtr, nextPtr, and prevPtr.

Referenced by moab::BSPTreePoly::cut_polyhedron(), moab::BSPTreePoly::set(), and moab::split_edge().

{
    // shouldn't already be in a face
    assert( !facePtr );
    // adjacent edges should share vertices
    assert( start() == prev->end() );

    facePtr          = prev->facePtr;
    nextPtr          = prev->nextPtr;
    prevPtr          = prev;
    nextPtr->prevPtr = this;
    prevPtr->nextPtr = this;
}

Definition at line 298 of file BSPTreePoly.cpp.

References facePtr, nextPtr, prevPtr, and start().

Referenced by moab::split_edge().

{
    // shouldn't already be in a face
    assert( !facePtr );
    // adjacent edges should share vertices
    assert( end() == next->start() );

    facePtr          = next->facePtr;
    prevPtr          = next->prevPtr;
    nextPtr          = next;
    nextPtr->prevPtr = this;
    prevPtr->nextPtr = this;
}

Definition at line 326 of file BSPTreePoly.cpp.

{
    if( edgePtr->forwardPtr == this )
        return 1;
    else if( edgePtr->reversePtr == this )
        return -1;
    else
        return 0;
}

Definition at line 336 of file BSPTreePoly.cpp.

Referenced by moab::BSPTreePoly::cut_polyhedron(), insert_before(), moab::BSPTreePoly::is_valid(), and moab::split_face().

{
    if( edgePtr->forwardPtr == this )
        return edgePtr->start();
    else if( edgePtr->reversePtr == this )
        return edgePtr->end();
    else
        return 0;
}

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