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

Public Member Functions

 VertexUse (Edge *edge, Vertex *vtx)
 ~VertexUse ()
void set_vertex (BSPTreePoly::Vertex *&vtx_ptr)

Public Attributes

BSPTreePoly::VertexUsenextPtr
BSPTreePoly::VertexUseprevPtr
BSPTreePoly::VertexvtxPtr
BSPTreePoly::EdgeedgePtr

Detailed Description

Definition at line 34 of file BSPTreePoly.cpp.


Constructor & Destructor Documentation

Definition at line 203 of file BSPTreePoly.cpp.

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

                                                                               : vtxPtr( vtx ), edgePtr( edge )
{
    if( !vtx->usePtr )
    {
        vtx->usePtr = prevPtr = nextPtr = this;
        return;
    }

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

Definition at line 218 of file BSPTreePoly.cpp.

{
    if( nextPtr == this )
    {
        assert( prevPtr == this );
        assert( vtxPtr->usePtr == this );
        vtxPtr->usePtr = 0;
        delete vtxPtr;
    }
    else if( vtxPtr->usePtr == this )
        vtxPtr->usePtr = nextPtr;

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

Member Function Documentation

Definition at line 235 of file BSPTreePoly.cpp.

References moab::BSPTreePoly::Vertex::usePtr, and vtx().

Referenced by moab::split_edge().

{
    if( vtxPtr )
    {
        if( nextPtr == prevPtr )
        {
            assert( nextPtr == this );
            vtxPtr->usePtr = 0;
            delete vtx;
            vtx = 0;
        }
        else
        {
            nextPtr->prevPtr = prevPtr;
            prevPtr->nextPtr = nextPtr;
            if( vtxPtr->usePtr == this ) vtxPtr->usePtr = nextPtr;
        }
    }

    if( vtx )
    {
        vtxPtr                  = vtx;
        nextPtr                 = vtxPtr->usePtr->nextPtr;
        prevPtr                 = vtxPtr->usePtr;
        nextPtr->prevPtr        = this;
        vtxPtr->usePtr->nextPtr = this;
    }
}

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