81 if( eNext->
Sym < eNext ) { eNext = eNext->
Sym; }
98 e->activeRegion =
NULL;
159 }
while(
e != eOrig );
198 }
while(
e != eOrig );
209 if( eDel->
Sym < eDel ) { eDel = eDel->
Sym; }
234 }
while(
e != eStart );
258 }
while(
e != eStart );
283 if (newVertex1 ==
NULL || newVertex2 ==
NULL || newFace ==
NULL) {
330 int joiningLoops =
FALSE;
331 int joiningVertices =
FALSE;
333 if( eOrg == eDst )
return 1;
335 if( eDst->
Org != eOrg->
Org ) {
337 joiningVertices =
TRUE;
349 if( ! joiningVertices ) {
351 if (newVertex ==
NULL)
return 0;
359 if( ! joiningLoops ) {
361 if (newFace ==
NULL)
return 0;
387 int joiningLoops =
FALSE;
392 if( eDel->
Lface != eDel->Rface ) {
398 if( eDel->
Onext == eDel ) {
402 eDel->Rface->anEdge = eDel->Oprev;
405 Splice( eDel, eDel->Oprev );
406 if( ! joiningLoops ) {
408 if (newFace ==
NULL)
return 0;
418 if( eDelSym->
Onext == eDelSym ) {
425 Splice( eDelSym, eDelSym->Oprev );
458 eNew->
Org = eOrg->Dst;
479 if (tempHalfEdge ==
NULL)
return NULL;
481 eNew = tempHalfEdge->
Sym;
488 eOrg->Dst = eNew->
Org;
489 eNew->Dst->anEdge = eNew->
Sym;
490 eNew->Rface = eOrg->Rface;
511 int joiningLoops =
FALSE;
528 eNew->
Org = eOrg->Dst;
535 if( ! joiningLoops ) {
562 eNext = eStart->
Lnext;
568 if(
e->Rface ==
NULL ) {
571 if(
e->Onext ==
e ) {
575 e->Org->anEdge =
e->Onext;
579 if( eSym->
Onext == eSym ) {
584 Splice( eSym, eSym->Oprev );
588 }
while(
e != eStart );
617 eSym = &
mesh->eHeadSym;
619 v->next =
v->prev =
v;
637 e->activeRegion =
NULL;
672 if(
v2->next !=
v2 ) {
674 v2->next->prev =
v1->prev;
679 if( e2->
next != e2 ) {
691#ifdef DELETE_BY_ZAPPING
699 while( fHead->
next != fHead ) {
717 for(
f =
mesh->fHead.next;
f != &
mesh->fHead;
f = fNext ) {
722 for(
v =
mesh->vHead.next;
v != &
mesh->vHead;
v = vNext ) {
727 for(
e =
mesh->eHead.next;
e != &
mesh->eHead;
e = eNext ) {
752 for( fPrev = fHead ; (
f = fPrev->
next) != fHead; fPrev =
f) {
758 assert(
e->Lnext->Onext->Sym ==
e );
759 assert(
e->Onext->Sym->Lnext ==
e );
762 }
while(
e !=
f->anEdge );
767 for( vPrev = vHead ; (
v = vPrev->
next) != vHead; vPrev =
v) {
773 assert(
e->Lnext->Onext->Sym ==
e );
774 assert(
e->Onext->Sym->Lnext ==
e );
777 }
while(
e !=
v->anEdge );
782 for( ePrev = eHead ; (
e = ePrev->
next) != eHead; ePrev =
e) {
788 assert(
e->Lnext->Onext->Sym ==
e );
789 assert(
e->Onext->Sym->Lnext ==
e );
792 &&
e->Sym == &
mesh->eHeadSym
GLUhalfEdge * __gl_meshMakeEdge(GLUmesh *mesh)
GLUhalfEdge * __gl_meshSplitEdge(GLUhalfEdge *eOrg)
static void MakeVertex(GLUvertex *newVertex, GLUhalfEdge *eOrig, GLUvertex *vNext)
static void KillVertex(GLUvertex *vDel, GLUvertex *newOrg)
static void Splice(GLUhalfEdge *a, GLUhalfEdge *b)
void __gl_meshCheckMesh(GLUmesh *mesh)
void __gl_meshZapFace(GLUface *fZap)
static void MakeFace(GLUface *newFace, GLUhalfEdge *eOrig, GLUface *fNext)
void __gl_meshDeleteMesh(GLUmesh *mesh)
GLUmesh * __gl_meshNewMesh(void)
GLUhalfEdge * __gl_meshConnect(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
int __gl_meshDelete(GLUhalfEdge *eDel)
GLUmesh * __gl_meshUnion(GLUmesh *mesh1, GLUmesh *mesh2)
int __gl_meshSplice(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
static GLUface * allocFace()
static void KillEdge(GLUhalfEdge *eDel)
static void KillFace(GLUface *fDel, GLUface *newLface)
static GLUhalfEdge * MakeEdge(GLUhalfEdge *eNext)
GLUhalfEdge * __gl_meshAddEdgeVertex(GLUhalfEdge *eOrg)
static GLUvertex * allocVertex()
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat v2
ActiveRegion * activeRegion