moab
moab::BSPTreePoly::EdgeUse Struct Reference

List of all members.

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


Constructor & Destructor Documentation

Definition at line 212 of file BSPTreePoly.cpp.

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

Definition at line 216 of file BSPTreePoly.cpp.

  : 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 264 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 302 of file BSPTreePoly.cpp.

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

Definition at line 235 of file BSPTreePoly.cpp.

{
    // shouldn't aready 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 249 of file BSPTreePoly.cpp.

{
    // shouldn't aready 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 282 of file BSPTreePoly.cpp.

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

Definition at line 292 of file BSPTreePoly.cpp.

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

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