#include "mesh"
#include "dict"
#include "geom"
#include "_tess"
#include "priorityq"
Go to the source code of this file.
|
inline void | static_SweepEvent (GLUtesselator *tess, GLUvertex *vEvent) |
|
inline void | static_WalkDirtyRegions (GLUtesselator *tess, ActiveRegion *regUp) |
|
inline int | static_CheckForRightSplice (GLUtesselator *tess, ActiveRegion *regUp) |
|
inline int | static_EdgeLeq (GLUtesselator *tess, ActiveRegion *reg1, ActiveRegion *reg2) |
|
inline void | static_DeleteRegion (GLUtesselator *tess, ActiveRegion *reg) |
|
inline int | static_FixUpperEdge (ActiveRegion *reg, GLUhalfEdge *newEdge) |
|
inline ActiveRegion * | static_TopLeftRegion (ActiveRegion *reg) |
|
inline ActiveRegion * | static_TopRightRegion (ActiveRegion *reg) |
|
inline ActiveRegion * | static_AddRegionBelow (GLUtesselator *tess, ActiveRegion *regAbove, GLUhalfEdge *eNewUp) |
|
inline GLUboolean | static_IsWindingInside (GLUtesselator *tess, int n) |
|
inline void | static_ComputeWinding (GLUtesselator *tess, ActiveRegion *reg) |
|
inline void | static_FinishRegion (GLUtesselator *tess, ActiveRegion *reg) |
|
inline GLUhalfEdge * | static_FinishLeftRegions (GLUtesselator *tess, ActiveRegion *regFirst, ActiveRegion *regLast) |
|
inline void | static_AddRightEdges (GLUtesselator *tess, ActiveRegion *regUp, GLUhalfEdge *eFirst, GLUhalfEdge *eLast, GLUhalfEdge *eTopLeft, GLUboolean cleanUp) |
|
inline void | static_CallCombine (GLUtesselator *tess, GLUvertex *isect, void *data[4], GLUfloat weights[4], int needed) |
|
inline void | static_SpliceMergeVertices (GLUtesselator *tess, GLUhalfEdge *e1, GLUhalfEdge *e2) |
|
inline void | static_VertexWeights (GLUvertex *isect, GLUvertex *org, GLUvertex *dst, GLUfloat *weights) |
|
inline void | static_GetIntersectData (GLUtesselator *tess, GLUvertex *isect, GLUvertex *orgUp, GLUvertex *dstUp, GLUvertex *orgLo, GLUvertex *dstLo) |
|
inline int | static_CheckForLeftSplice (GLUtesselator *tess, ActiveRegion *regUp) |
|
inline int | static_CheckForIntersect (GLUtesselator *tess, ActiveRegion *regUp) |
|
inline void | static_ConnectRightVertex (GLUtesselator *tess, ActiveRegion *regUp, GLUhalfEdge *eBottomLeft) |
|
inline void | static_ConnectLeftDegenerate (GLUtesselator *tess, ActiveRegion *regUp, GLUvertex *vEvent) |
|
inline void | static_ConnectLeftVertex (GLUtesselator *tess, GLUvertex *vEvent) |
|
GLUdouble | SENTINEL_COORD () |
|
inline void | static_AddSentinel (GLUtesselator *tess, GLUdouble t) |
|
inline void | static_InitEdgeDict (GLUtesselator *tess) |
|
inline void | static_DoneEdgeDict (GLUtesselator *tess) |
|
inline void | static_RemoveDegenerateEdges (GLUtesselator *tess) |
|
inline int | static_InitPriorityQ (GLUtesselator *tess) |
|
inline void | static_DonePriorityQ (GLUtesselator *tess) |
|
inline int | static_RemoveDegenerateFaces (GLUmesh *mesh) |
|
int | __gl_computeInterior (GLUtesselator *tess) |
|
◆ AddWinding
#define AddWinding |
( |
|
eDst, |
|
|
|
eSrc |
|
) |
| |
Value: (eDst->winding += eSrc->winding, \
eDst->Sym->winding += eSrc->Sym->winding)
Definition at line 76 of file sweep.
◆ DebugEvent
#define DebugEvent |
( |
|
tess | ) |
|
inlined C code : ///////////////////////////////////
Definition at line 41 of file sweep.
◆ RegionAbove
Definition at line 31 of file sweep.
◆ RegionBelow
Definition at line 30 of file sweep.
◆ tools_glutess_sweep
#define tools_glutess_sweep |
Definition at line 4 of file sweep.
◆ __gl_computeInterior()
Definition at line 1287 of file sweep.
1314 if( vNext == NULL || !
VertEq( vNext, v ))
break;
◆ SENTINEL_COORD()
◆ static_AddRegionBelow()
Definition at line 189 of file sweep.
200 if (regNew == NULL) longjmp(tess->
env,1);
202 regNew->
eUp = eNewUp;
205 if (regNew->
nodeUp == NULL) longjmp(tess->
env,1);
◆ static_AddRightEdges()
Definition at line 316 of file sweep.
340 }
while ( e != eLast );
346 if( eTopLeft == NULL ) {
354 if( e->
Org != ePrev->
Org )
break;
356 if( e->
Onext != ePrev ) {
◆ static_AddSentinel()
Definition at line 1108 of file sweep.
1116 if (reg == NULL) longjmp(tess->
env,1);
1119 if (e == NULL) longjmp(tess->
env,1);
1125 tess->
event = e->Dst;
1134 if (reg->
nodeUp == NULL) longjmp(tess->
env,1);
◆ static_CallCombine()
Definition at line 388 of file sweep.
394 coords[0] = isect->
coords[0];
395 coords[1] = isect->
coords[1];
396 coords[2] = isect->
coords[2];
400 if( isect->
data == NULL ) {
402 isect->
data = data[0];
◆ static_CheckForIntersect()
Definition at line 582 of file sweep.
604 assert( !
VertEq( dstLo, dstUp ));
607 assert( orgUp != tess->
event && orgLo != tess->
event );
627 assert(
GLU_MIN( orgUp->
t, dstUp->
t ) <= isect.
t );
628 assert( isect.
t <=
GLU_MAX( orgLo->
t, dstLo->
t ));
629 assert(
GLU_MIN( dstLo->
s, dstUp->
s ) <= isect.
s );
630 assert( isect.
s <=
GLU_MAX( orgLo->
s, orgUp->
s ));
648 orgMin =
VertLeq( orgUp, orgLo ) ? orgUp : orgLo;
649 if(
VertLeq( orgMin, &isect )) {
654 if(
VertEq( &isect, orgUp ) ||
VertEq( &isect, orgLo )) {
669 if( dstLo == tess->
event ) {
674 if (regUp == NULL) longjmp(tess->
env,1);
680 if( dstUp == tess->
event ) {
687 regLo->
eUp = eLo->Oprev;
723 eUp->
Org->
s = isect.
s;
724 eUp->
Org->
t = isect.
t;
729 longjmp(tess->
env,1);
◆ static_CheckForLeftSplice()
Definition at line 532 of file sweep.
557 assert( !
VertEq( eUp->Dst, eLo->Dst ));
559 if(
VertLeq( eUp->Dst, eLo->Dst )) {
565 if (e == NULL) longjmp(tess->
env,1);
574 if (e == NULL) longjmp(tess->
env,1);
576 e->Rface->inside = regUp->
inside;
◆ static_CheckForRightSplice()
Definition at line 475 of file sweep.
516 }
else if( eUp->
Org != eLo->
Org ) {
◆ static_ComputeWinding()
◆ static_ConnectLeftDegenerate()
Definition at line 917 of file sweep.
938 if( !
VertEq( e->Dst, vEvent )) {
957 eTopRight = reg->
eUp->
Sym;
958 eTopLeft = eLast = eTopRight->
Onext;
963 assert( eTopLeft != eTopRight );
966 eTopRight = eTopLeft->Oprev;
◆ static_ConnectLeftVertex()
Definition at line 977 of file sweep.
1009 if(
EdgeSign( eUp->Dst, vEvent, eUp->
Org ) == 0 ) {
1017 reg =
VertLeq( eLo->Dst, eUp->Dst ) ? regUp : regLo;
1020 if( reg == regUp ) {
1022 if (eNew == NULL) longjmp(tess->
env,1);
1025 if (tempHalfEdge == NULL) longjmp(tess->
env,1);
1027 eNew = tempHalfEdge->
Sym;
◆ static_ConnectRightVertex()
Definition at line 823 of file sweep.
864 if( eUp->Dst != eLo->Dst ) {
874 if (regUp == NULL) longjmp(tess->
env,1);
898 if (eNew == NULL) longjmp(tess->
env,1);
◆ static_DeleteRegion()
◆ static_DoneEdgeDict()
Definition at line 1153 of file sweep.
1174 assert( fixedEdges == 1 );
◆ static_DonePriorityQ()
◆ static_EdgeLeq()
Definition at line 83 of file sweep.
104 if( e1->Dst == event ) {
105 if( e2->Dst == event ) {
116 if( e2->Dst == event ) {
◆ static_FinishLeftRegions()
Definition at line 260 of file sweep.
279 ePrev = regFirst->
eUp;
280 while( regPrev != regLast ) {
284 if( e->
Org != ePrev->
Org ) {
299 if (e == NULL) longjmp(tess->
env,1);
304 if( ePrev->
Onext != e ) {
◆ static_FinishRegion()
◆ static_FixUpperEdge()
◆ static_GetIntersectData()
Definition at line 451 of file sweep.
463 data[0] = orgUp->
data;
464 data[1] = dstUp->
data;
465 data[2] = orgLo->
data;
466 data[3] = dstLo->
data;
◆ static_InitEdgeDict()
Definition at line 1138 of file sweep.
1146 if (tess->
dict == NULL) longjmp(tess->
env,1);
◆ static_InitPriorityQ()
Definition at line 1219 of file sweep.
1230 if (pq == NULL)
return 0;
1233 for( v = vHead->
next; v != vHead; v = v->
next ) {
1235 if (v->
pqHandle == LONG_MAX)
break;
1237 if (v != vHead || !
pqInit( pq ) ) {
◆ static_IsWindingInside()
Definition at line 214 of file sweep.
226 return (n >= 2) || (n <= -2);
◆ static_RemoveDegenerateEdges()
Definition at line 1185 of file sweep.
1194 for( e = eHead->
next; e != eHead; e = eNext ) {
1206 if( eLnext->
Lnext == e ) {
1210 if( eLnext == eNext || eLnext == eNext->
Sym ) { eNext = eNext->
next; }
1213 if( e == eNext || e == eNext->
Sym ) { eNext = eNext->
next; }
◆ static_RemoveDegenerateFaces()
inline int static_RemoveDegenerateFaces |
( |
GLUmesh * |
mesh | ) |
|
◆ static_SpliceMergeVertices()
Definition at line 414 of file sweep.
421 void *data[4] = { NULL, NULL, NULL, NULL };
422 GLUfloat weights[4] = { 0.5, 0.5, 0.0, 0.0 };
◆ static_SweepEvent()
Definition at line 1044 of file sweep.
1053 tess->
event = vEvent;
1063 if( e == vEvent->
anEdge ) {
1078 if (regUp == NULL) longjmp(tess->
env,1);
1080 eTopLeft = reg->
eUp;
1088 if( eBottomLeft->
Onext == eTopLeft ) {
◆ static_TopLeftRegion()
Definition at line 156 of file sweep.
164 }
while( reg->
eUp->
Org == org );
171 if (e == NULL)
return NULL;
◆ static_TopRightRegion()
Definition at line 178 of file sweep.
185 }
while( reg->
eUp->Dst == dst );
◆ static_VertexWeights()
Definition at line 430 of file sweep.
443 weights[0] = float(0.5 * t2 / (t1 + t2));
444 weights[1] = float(0.5 * t1 / (t1 + t2));
◆ static_WalkDirtyRegions()
Definition at line 736 of file sweep.
751 while( regLo->
dirty ) {
755 if( ! regUp->
dirty ) {
758 if( regUp == NULL || ! regUp->
dirty ) {
767 if( eUp->Dst != eLo->Dst ) {
788 if( eUp->
Org != eLo->
Org ) {
789 if( eUp->Dst != eLo->Dst
791 && (eUp->Dst == tess->
event || eLo->Dst == tess->
event) )
812 if( eUp->
Org == eLo->
Org && eUp->Dst == eLo->Dst ) {
inline ActiveRegion * static_AddRegionBelow(GLUtesselator *tess, ActiveRegion *regAbove, GLUhalfEdge *eNewUp)
GLUhalfEdge * __gl_meshSplitEdge(GLUhalfEdge *eOrg)
inline void static_DeleteRegion(GLUtesselator *tess, ActiveRegion *reg)
#define GLU_TESS_WINDING_POSITIVE
inline void static_SpliceMergeVertices(GLUtesselator *tess, GLUhalfEdge *e1, GLUhalfEdge *e2)
GLUhalfEdge * __gl_meshConnect(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
inline void static_ComputeWinding(GLUtesselator *tess, ActiveRegion *reg)
inline void static_RemoveDegenerateEdges(GLUtesselator *tess)
PQkey pqExtractMin(PriorityQ *pq)
#define CALL_COMBINE_OR_COMBINE_DATA(a, b, c, d)
PQhandle pqInsert(PriorityQ *pq, PQkey keyNew)
int __gl_meshSplice(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
inline void static_CallCombine(GLUtesselator *tess, GLUvertex *isect, void *data[4], GLUfloat weights[4], int needed)
inline ActiveRegion * static_TopRightRegion(ActiveRegion *reg)
void dictDeleteDict(Dict *dict)
inline void static_InitEdgeDict(GLUtesselator *tess)
DictNode * dictSearch(Dict *dict, DictKey key)
inline void static_DonePriorityQ(GLUtesselator *tess)
#define GLU_TESS_WINDING_ABS_GEQ_TWO
void pqInit(PriorityQ *pq)
Dict * dictNewDict(void *frame, int(*leq)(void *frame, DictKey key1, DictKey key2))
inlined C code : ///////////////////////////////////
ActiveRegion * activeRegion
int __gl_vertLeq(GLUvertex *u, GLUvertex *v)
inlined C code : ///////////////////////////////////
inline ActiveRegion * static_TopLeftRegion(ActiveRegion *reg)
inline void static_WalkDirtyRegions(GLUtesselator *tess, ActiveRegion *regUp)
#define AddWinding(eDst, eSrc)
#define EdgeEval(u, v, w)
inline int static_CheckForRightSplice(GLUtesselator *tess, ActiveRegion *regUp)
#define GLU_TESS_WINDING_NEGATIVE
void pqDelete(PriorityQ *pq, PQhandle hCurr)
#define CALL_ERROR_OR_ERROR_DATA(a)
void __gl_edgeIntersect(GLUvertex *o1, GLUvertex *d1, GLUvertex *o2, GLUvertex *d2, GLUvertex *v)
#define GLU_TESS_WINDING_ODD
inline GLUhalfEdge * static_FinishLeftRegions(GLUtesselator *tess, ActiveRegion *regFirst, ActiveRegion *regLast)
inline void static_VertexWeights(GLUvertex *isect, GLUvertex *org, GLUvertex *dst, GLUfloat *weights)
inline int static_EdgeLeq(GLUtesselator *tess, ActiveRegion *reg1, ActiveRegion *reg2)
inline int static_CheckForLeftSplice(GLUtesselator *tess, ActiveRegion *regUp)
#define dictInsert(dict, key)
inline void static_AddRightEdges(GLUtesselator *tess, ActiveRegion *regUp, GLUhalfEdge *eFirst, GLUhalfEdge *eLast, GLUhalfEdge *eTopLeft, GLUboolean cleanUp)
inline int static_CheckForIntersect(GLUtesselator *tess, ActiveRegion *regUp)
int __gl_meshDelete(GLUhalfEdge *eDel)
#define EdgeSign(u, v, w)
inline GLUboolean static_IsWindingInside(GLUtesselator *tess, int n)
inline void static_ConnectLeftVertex(GLUtesselator *tess, GLUvertex *vEvent)
GLUhalfEdge * __gl_meshMakeEdge(GLUmesh *mesh)
void pqDeletePriorityQ(PriorityQ *pq)
inline void static_ConnectRightVertex(GLUtesselator *tess, ActiveRegion *regUp, GLUhalfEdge *eBottomLeft)
inline void static_AddSentinel(GLUtesselator *tess, GLUdouble t)
GLUdouble SENTINEL_COORD()
PQkey pqMinimum(PriorityQ *pq)
void dictDelete(Dict *, DictNode *node)
inline void static_GetIntersectData(GLUtesselator *tess, GLUvertex *isect, GLUvertex *orgUp, GLUvertex *dstUp, GLUvertex *orgLo, GLUvertex *dstLo)
inline void static_DoneEdgeDict(GLUtesselator *tess)
#define DebugEvent(tess)
inlined C code : ///////////////////////////////////
inline int static_InitPriorityQ(GLUtesselator *tess)
inline int static_FixUpperEdge(ActiveRegion *reg, GLUhalfEdge *newEdge)
PriorityQ * pqNewPriorityQ(int(*leq)(PQkey key1, PQkey key2))
DictNode * dictInsertBefore(Dict *dict, DictNode *node, DictKey key)
inline void static_ConnectLeftDegenerate(GLUtesselator *tess, ActiveRegion *regUp, GLUvertex *vEvent)
inline void static_FinishRegion(GLUtesselator *tess, ActiveRegion *reg)
inline int static_RemoveDegenerateFaces(GLUmesh *mesh)
#define GLU_TESS_WINDING_NONZERO
void __gl_meshCheckMesh(GLUmesh *mesh)
#define GLU_TESS_NEED_COMBINE_CALLBACK
inline void static_SweepEvent(GLUtesselator *tess, GLUvertex *vEvent)
#define GLU_TESS_MAX_COORD