70 if (pair == NULL)
return NULL;
76 if( eNext->
Sym < eNext ) { eNext = eNext->
Sym; }
93 e->activeRegion = NULL;
136 assert(vNew != NULL);
154 }
while(
e != eOrig );
169 assert(fNew != NULL);
193 }
while(
e != eOrig );
204 if( eDel->
Sym < eDel ) { eDel = eDel->
Sym; }
229 }
while(
e != eStart );
253 }
while(
e != eStart );
278 if (newVertex1 == NULL || newVertex2 == NULL || newFace == NULL) {
279 if (newVertex1 != NULL)
memFree(newVertex1);
280 if (newVertex2 != NULL)
memFree(newVertex2);
281 if (newFace != NULL)
memFree(newFace);
325 int joiningLoops =
FALSE;
326 int joiningVertices =
FALSE;
328 if( eOrg == eDst )
return 1;
330 if( eDst->
Org != eOrg->
Org ) {
332 joiningVertices =
TRUE;
344 if( ! joiningVertices ) {
346 if (newVertex == NULL)
return 0;
354 if( ! joiningLoops ) {
356 if (newFace == NULL)
return 0;
382 int joiningLoops =
FALSE;
387 if( eDel->
Lface != eDel->Rface ) {
393 if( eDel->
Onext == eDel ) {
397 eDel->Rface->anEdge = eDel->Oprev;
400 Splice( eDel, eDel->Oprev );
401 if( ! joiningLoops ) {
403 if (newFace == NULL)
return 0;
413 if( eDelSym->
Onext == eDelSym ) {
420 Splice( eDelSym, eDelSym->Oprev );
445 if (eNew == NULL)
return NULL;
453 eNew->
Org = eOrg->Dst;
456 if (newVertex == NULL)
return NULL;
474 if (tempHalfEdge == NULL)
return NULL;
476 eNew = tempHalfEdge->
Sym;
483 eOrg->Dst = eNew->
Org;
484 eNew->Dst->anEdge = eNew->
Sym;
485 eNew->Rface = eOrg->Rface;
506 int joiningLoops =
FALSE;
508 if (eNew == NULL)
return NULL;
523 eNew->
Org = eOrg->Dst;
530 if( ! joiningLoops ) {
532 if (newFace == NULL)
return NULL;
557 eNext = eStart->
Lnext;
563 if(
e->Rface == NULL ) {
566 if(
e->Onext ==
e ) {
570 e->Org->anEdge =
e->Onext;
574 if( eSym->
Onext == eSym ) {
579 Splice( eSym, eSym->Oprev );
583 }
while(
e != eStart );
632 e->activeRegion = NULL;
660 if( f2->
next != f2 ) {
661 f1->prev->next = f2->
next;
667 if(
v2->next !=
v2 ) {
674 if( e2->
next != e2 ) {
686#ifdef DELETE_BY_ZAPPING
694 while( fHead->
next != fHead ) {
747 for( fPrev = fHead ; (
f = fPrev->
next) != fHead; fPrev =
f) {
748 assert(
f->prev == fPrev );
751 assert(
e->Sym !=
e );
752 assert(
e->Sym->Sym ==
e );
753 assert(
e->Lnext->Onext->Sym ==
e );
754 assert(
e->Onext->Sym->Lnext ==
e );
755 assert(
e->Lface ==
f );
757 }
while(
e !=
f->anEdge );
759 assert(
f->prev == fPrev &&
f->
anEdge == NULL &&
f->data == NULL );
762 for( vPrev = vHead ; (
v = vPrev->
next) != vHead; vPrev =
v) {
763 assert(
v->prev == vPrev );
766 assert(
e->Sym !=
e );
767 assert(
e->Sym->Sym ==
e );
768 assert(
e->Lnext->Onext->Sym ==
e );
769 assert(
e->Onext->Sym->Lnext ==
e );
770 assert(
e->Org ==
v );
772 }
while(
e !=
v->anEdge );
774 assert(
v->prev == vPrev &&
v->
anEdge == NULL &&
v->data == NULL );
777 for( ePrev = eHead ; (
e = ePrev->
next) != eHead; ePrev =
e) {
778 assert(
e->Sym->next == ePrev->
Sym );
779 assert(
e->Sym !=
e );
780 assert(
e->Sym->Sym ==
e );
781 assert(
e->Org != NULL );
782 assert(
e->Dst != NULL );
783 assert(
e->Lnext->Onext->Sym ==
e );
784 assert(
e->Onext->Sym->Lnext ==
e );
786 assert(
e->Sym->next == ePrev->
Sym
789 &&
e->
Org == NULL &&
e->Dst == NULL
790 &&
e->Lface == NULL &&
e->Rface == NULL );
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()
ActiveRegion * activeRegion