98 if(
f->inside && !
f->marked ) {
120 struct FaceCount max, newFace;
127 newFace =
MaximumFan(
e );
if( newFace.size > max.size ) { max = newFace; }
128 newFace =
MaximumFan(
e->Lnext );
if( newFace.size > max.size ) { max = newFace; }
129 newFace =
MaximumFan(
e->Lprev );
if( newFace.size > max.size ) { max = newFace; }
131 newFace =
MaximumStrip(
e );
if( newFace.size > max.size ) { max = newFace; }
132 newFace =
MaximumStrip(
e->Lnext );
if( newFace.size > max.size ) { max = newFace; }
133 newFace =
MaximumStrip(
e->Lprev );
if( newFace.size > max.size ) { max = newFace; }
135 (*(max.render))( tess, max.eStart, max.size );
146#define Marked(f) (! (f)->inside || (f)->marked)
148#define AddToTrail(f,t) ((f)->trail = (t), (t) = (f), (f)->marked = TRUE)
150#define FreeTrail(t) do { \
151 while( (t) != NULL ) { \
152 (t)->marked = FALSE; t = (t)->trail; \
164 struct FaceCount newFace = { 0, NULL, &
RenderFan };
168 for(
e = eOrig; !
Marked(
e->Lface );
e =
e->Onext ) {
172 for(
e = eOrig; !
Marked(
e->Rface );
e =
e->Oprev ) {
183#define IsEven(n) (((n) & 1) == 0)
197 struct FaceCount newFace = { 0, NULL, &
RenderStrip };
198 long headSize = 0, tailSize = 0;
202 for(
e = eOrig; !
Marked(
e->Lface ); ++tailSize,
e =
e->Onext ) {
211 for(
e = eOrig; !
Marked(
e->Rface ); ++headSize,
e =
e->Dnext ) {
220 newFace.size = tailSize + headSize;
222 newFace.eStart = eTail->
Sym;
223 }
else if(
IsEven( headSize )) {
224 newFace.eStart = eHead;
230 newFace.eStart = eHead->
Onext;
260 for( ;
f != NULL;
f =
f->trail ) {
269 newState = !
e->Rface->inside;
270 if( edgeState != newState ) {
271 edgeState = newState;
278 }
while(
e !=
f->anEdge );
295 e->Lface->marked =
TRUE;
317 e->Lface->marked =
TRUE;
323 e->Lface->marked =
TRUE;
352 }
while(
e !=
f->anEdge );
361#define SIGN_INCONSISTENT 2
376 GLdouble dot, xc, yc, zc, xp, yp, zp,
n[3];
393 norm[0] = norm[1] = norm[2] = 0.0;
401 xp = xc; yp = yc; zp = zc;
407 n[0] = yp*zc - zp*yc;
408 n[1] = zp*xc - xp*zc;
409 n[2] = xp*yc - yp*xc;
411 dot =
n[0]*norm[0] +
n[1]*norm[1] +
n[2]*norm[2];
417 norm[0] +=
n[0]; norm[1] +=
n[1]; norm[2] +=
n[2];
419 norm[0] -=
n[0]; norm[1] -=
n[1]; norm[2] -=
n[2];
421 }
else if( dot != 0 ) {
455 norm[0] = tess->
normal[0];
456 norm[1] = tess->
normal[1];
457 norm[2] = tess->
normal[2];
458 if( norm[0] == 0 && norm[1] == 0 && norm[2] == 0 ) {
478 if( sign < 0 )
return TRUE;
481 if( sign > 0 )
return TRUE;
493 for( vc =
v0+1; vc < vn; ++vc ) {
497 for( vc = vn-1; vc >
v0; --vc ) {
#define GLU_TESS_WINDING_NONZERO
#define GLU_TESS_WINDING_POSITIVE
#define GLU_TESS_WINDING_NEGATIVE
#define GLU_TESS_WINDING_ODD
#define GL_TRIANGLE_STRIP
#define GLU_TESS_WINDING_ABS_GEQ_TWO
typedef void((*Func_t)())
static struct FaceCount MaximumFan(GLUhalfEdge *eOrig)
static void RenderStrip(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
#define SIGN_INCONSISTENT
static void RenderMaximumFaceGroup(GLUtesselator *tess, GLUface *fOrig)
static struct FaceCount MaximumStrip(GLUhalfEdge *eOrig)
GLboolean __gl_renderCache(GLUtesselator *tess)
static void RenderLonelyTriangles(GLUtesselator *tess, GLUface *head)
static void RenderTriangle(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
static void RenderFan(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
static int ComputeNormal(GLUtesselator *tess, GLdouble norm[3], int check)
CachedVertex cache[TESS_MAX_CACHE]
#define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a)
#define CALL_BEGIN_OR_BEGIN_DATA(a)
#define CALL_VERTEX_OR_VERTEX_DATA(a)
#define CALL_END_OR_END_DATA()