#include "gluos.h"
#include <assert.h>
#include "tess.h"
Go to the source code of this file.
|
static struct FaceCount | MaximumFan (GLUhalfEdge *eOrig) |
|
static struct FaceCount | MaximumStrip (GLUhalfEdge *eOrig) |
|
static void | RenderFan (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
static void | RenderStrip (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
static void | RenderTriangle (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
static void | RenderMaximumFaceGroup (GLUtesselator *tess, GLUface *fOrig) |
|
static void | RenderLonelyTriangles (GLUtesselator *tess, GLUface *head) |
|
void | __gl_renderMesh (GLUtesselator *tess, GLUmesh *mesh) |
|
void | __gl_renderBoundary (GLUtesselator *tess, GLUmesh *mesh) |
|
static int | ComputeNormal (GLUtesselator *tess, GLdouble norm[3], int check) |
|
GLboolean | __gl_renderCache (GLUtesselator *tess) |
|
◆ AddToTrail
◆ FALSE
◆ FreeTrail
◆ IsEven
◆ Marked
#define Marked |
( |
|
f | ) |
(! (f)->inside || (f)->marked) |
◆ SIGN_INCONSISTENT
◆ TRUE
◆ __gl_renderBoundary()
Definition at line 339 of file render.c.
340{
343
344 for(
f =
mesh->fHead.next;
f != &
mesh->fHead;
f =
f->next ) {
348 do {
351 }
while(
e !=
f->anEdge );
353 }
354 }
355}
#define CALL_BEGIN_OR_BEGIN_DATA(a)
#define CALL_VERTEX_OR_VERTEX_DATA(a)
#define CALL_END_OR_END_DATA()
Referenced by gluTessEndPolygon().
◆ __gl_renderCache()
Definition at line 441 of file render.c.
442{
448
450
452 }
453
459 }
460
463
465 }
467
469 }
470
471
475 break;
478 break;
481 break;
484 }
485
489
492 for( vc =
v0+1; vc <
vn; ++vc ) {
494 }
495 } else {
496 for( vc =
vn-1; vc >
v0; --vc ) {
498 }
499 }
502}
_Tp _STLP_CALL norm(const complex< _Tp > &__z)
#define GLU_TESS_WINDING_NONZERO
#define GLU_TESS_WINDING_POSITIVE
#define GLU_TESS_WINDING_NEGATIVE
#define GLU_TESS_WINDING_ODD
#define GLU_TESS_WINDING_ABS_GEQ_TWO
#define SIGN_INCONSISTENT
static int ComputeNormal(GLUtesselator *tess, GLdouble norm[3], int check)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint vn
CachedVertex cache[TESS_MAX_CACHE]
Referenced by gluTessEndPolygon().
◆ __gl_renderMesh()
Definition at line 82 of file render.c.
83{
85
86
88
89 for(
f =
mesh->fHead.next;
f != &
mesh->fHead;
f =
f->next ) {
91 }
92 for(
f =
mesh->fHead.next;
f != &
mesh->fHead;
f =
f->next ) {
93
94
95
96
97
98 if(
f->inside && !
f->marked ) {
101 }
102 }
106 }
107}
static void RenderMaximumFaceGroup(GLUtesselator *tess, GLUface *fOrig)
static void RenderLonelyTriangles(GLUtesselator *tess, GLUface *head)
Referenced by gluTessEndPolygon().
◆ ComputeNormal()
Definition at line 362 of file render.c.
371{
375 GLdouble dot, xc, yc, zc, xp, yp, zp,
n[3];
377
378
379
380
381
382
383
384
385
386
387
388
389
390
393 }
394
400 xp = xc; yp = yc; zp = zc;
404
405
406 n[0] = yp*zc - zp*yc;
407 n[1] = zp*xc - xp*zc;
408 n[2] = xp*yc - yp*xc;
409
412
413
414
415 if( dot >= 0 ) {
417 } else {
419 }
420 } else if( dot != 0 ) {
421
422 if( dot > 0 ) {
425 } else {
428 }
429 }
430 }
432}
#define check(expected, result)
Referenced by __gl_renderCache().
◆ MaximumFan()
Definition at line 158 of file render.c.
159{
160
161
162
163
167
168 for(
e = eOrig; !
Marked(
e->Lface );
e =
e->Onext ) {
171 }
172 for(
e = eOrig; !
Marked(
e->Rface );
e =
e->Oprev ) {
175 }
177
179 return newFace;
180}
static void RenderFan(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
Referenced by RenderMaximumFaceGroup().
◆ MaximumStrip()
Definition at line 185 of file render.c.
186{
187
188
189
190
191
192
193
194
195
196
198 long headSize = 0, tailSize = 0;
201
202 for(
e = eOrig; !
Marked(
e->Lface ); ++tailSize,
e =
e->Onext ) {
204 ++tailSize;
208 }
210
211 for(
e = eOrig; !
Marked(
e->Rface ); ++headSize,
e =
e->Dnext ) {
213 ++headSize;
217 }
219
220 newFace.
size = tailSize + headSize;
223 }
else if(
IsEven( headSize )) {
225 } else {
226
227
228
231 }
232
234 return newFace;
235}
static void RenderStrip(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
Referenced by RenderMaximumFaceGroup().
◆ RenderFan()
◆ RenderLonelyTriangles()
Definition at line 248 of file render.c.
249{
250
251
252
254 int newState;
255 int edgeState = -1;
256
258
259 for( ;
f !=
NULL;
f =
f->trail ) {
260
261
263 do {
265
266
267
268 newState = !
e->Rface->inside;
269 if( edgeState != newState ) {
270 edgeState = newState;
272 }
273 }
275
277 }
while(
e !=
f->anEdge );
278 }
280}
#define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a)
Referenced by __gl_renderMesh().
◆ RenderMaximumFaceGroup()
Definition at line 110 of file render.c.
111{
112
113
114
115
116
117
118
121
125
128 newFace =
MaximumFan(
e->Lnext );
if( newFace.size >
max.size ) {
max = newFace; }
129 newFace =
MaximumFan(
e->Lprev );
if( newFace.size >
max.size ) {
max = newFace; }
130
134 }
135 (*(
max.render))( tess,
max.eStart,
max.size );
136}
static struct FaceCount MaximumFan(GLUhalfEdge *eOrig)
static struct FaceCount MaximumStrip(GLUhalfEdge *eOrig)
static void RenderTriangle(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
Referenced by __gl_renderMesh().
◆ RenderStrip()
Definition at line 305 of file render.c.
306{
307
308
309
310
314
316 e->Lface->marked =
TRUE;
321
322 e->Lface->marked =
TRUE;
326 }
327
330}
#define GL_TRIANGLE_STRIP
Referenced by MaximumStrip().
◆ RenderTriangle()