moab
moab::BSPTreePoly::VertexUse Struct Reference

List of all members.

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 26 of file BSPTreePoly.cpp.


Constructor & Destructor Documentation

Definition at line 157 of file BSPTreePoly.cpp.

  : 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 172 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 188 of file BSPTreePoly.cpp.

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

Member Data Documentation


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