g4tools  5.4.0
glutess
Go to the documentation of this file.
1 // see license file for original license.
2 
3 #ifndef tools_glutess_glutess
4 #define tools_glutess_glutess
5 
6 #include "_tess"
7 
10 
13 GLUAPI void GLUAPIENTRY gluTessCallback (GLUtesselator* tess, GLUenum which, _GLUfuncptr CallBackFunc);
16 GLUAPI void GLUAPIENTRY gluTessNormal (GLUtesselator* tess, GLUdouble valueX, GLUdouble valueY, GLUdouble valueZ);
19 
20 #include "mesh"
21 #include "normal"
22 #include "sweep"
23 #include "tessmono"
24 #include "render"
25 
26 #define GLU_TESS_DEFAULT_TOLERANCE 0.0
27 #define GLU_TESS_MESH 100112 /* void (*)(GLUmesh *mesh) */
28 
29 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noBegin( GLUenum /*type*/ ) {}
30 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noEdgeFlag( GLUboolean /*boundaryEdge*/ ) {}
31 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noVertex( void * /*data*/ ) {}
32 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noEnd( void ) {}
33 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noError( GLUenum /*errnum*/ ) {}
34 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noCombine( GLUdouble /*coords*/[3], void* /*data*/[4],
35  GLUfloat /*weight*/[4], void** /*dataOut*/ ) {}
36 /*ARGSUSED*/ inline/*static*/ void GLUAPIENTRY static_noMesh( GLUmesh* /*mesh*/ ) {}
37 
38 
39 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noBeginData( GLUenum /*type*/, void* /*polygonData*/ ) {}
40 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noEdgeFlagData( GLUboolean /*boundaryEdge*/, void* /*polygonData*/ ) {}
41 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noVertexData( void* /*data*/, void* /*polygonData*/ ) {}
42 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noEndData( void* /*polygonData*/ ) {}
43 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noErrorData( GLUenum /*errnum*/, void* /*polygonData*/ ) {}
44 inline /*ARGSUSED*/ void GLUAPIENTRY __gl_noCombineData( GLUdouble /*coords*/[3],
45  void* /*data*/[4],
46  GLUfloat /*weight*/[4],
47  void** /*outData*/,
48  void* /*polygonData*/ ) {}
49 
50 /* Half-edges are allocated in pairs (see mesh.c) */
51 //typedef struct { GLUhalfEdge e, eSym; } EdgePair;
52 
53 inline size_t MAX_FAST_ALLOC() {
54  static const size_t s_value = (GLU_MAX(sizeof(EdgePair),GLU_MAX(sizeof(GLUvertex),sizeof(GLUface))));
55  return s_value;
56 }
57 
59 gluNewTess( void )
60 {
61  GLUtesselator *tess;
62 
63  /* Only initialize fields which can be changed by the api. Other fields
64  * are initialized where they are used.
65  */
66 
67  if (memInit( MAX_FAST_ALLOC() ) == 0) {
68  return 0; /* out of memory */
69  }
70  tess = (GLUtesselator *)memAlloc( sizeof( GLUtesselator ));
71  if (tess == NULL) {
72  return 0; /* out of memory */
73  }
74 
75  tess->state = T_DORMANT;
76 
77  tess->normal[0] = 0;
78  tess->normal[1] = 0;
79  tess->normal[2] = 0;
80 
85 
86  tess->callBegin = &static_noBegin;
87  tess->callEdgeFlag = &static_noEdgeFlag;
88  tess->callVertex = &static_noVertex;
89  tess->callEnd = &static_noEnd;
90 
91  tess->callError = &static_noError;
92  tess->callCombine = &static_noCombine;
93  tess->callMesh = &static_noMesh;
94 
95  tess->callBeginData= &__gl_noBeginData;
96  tess->callEdgeFlagData= &__gl_noEdgeFlagData;
97  tess->callVertexData= &__gl_noVertexData;
98  tess->callEndData= &__gl_noEndData;
99  tess->callErrorData= &__gl_noErrorData;
100  tess->callCombineData= &__gl_noCombineData;
101 
102  tess->polygonData= NULL;
103 
104  return tess;
105 }
106 
107 inline/*static*/ void static_MakeDormant( GLUtesselator *tess )
108 {
109  /* Return the tessellator to its original dormant state. */
110 
111  if( tess->mesh != NULL ) {
112  __gl_meshDeleteMesh( tess->mesh );
113  }
114  tess->state = T_DORMANT;
115  tess->lastEdge = NULL;
116  tess->mesh = NULL;
117 }
118 
119 #define RequireState( tess, s ) if( tess->state != s ) static_GotoState(tess,s)
120 
121 inline/*static*/ void static_GotoState( GLUtesselator *tess, enum TessState newState )
122 {
123  while( tess->state != newState ) {
124  /* We change the current state one level at a time, to get to
125  * the desired state.
126  */
127  if( tess->state < newState ) {
128  switch( tess->state ) {
129  case T_DORMANT:
131  gluTessBeginPolygon( tess, NULL );
132  break;
133  case T_IN_POLYGON:
135  gluTessBeginContour( tess );
136  break;
137  default:
138  ;
139  }
140  } else {
141  switch( tess->state ) {
142  case T_IN_CONTOUR:
144  gluTessEndContour( tess );
145  break;
146  case T_IN_POLYGON:
148  /* gluTessEndPolygon( tess ) is too much work! */
149  static_MakeDormant( tess );
150  break;
151  default:
152  ;
153  }
154  }
155  }
156 }
157 
158 
159 inline void GLUAPIENTRY
161 {
162  RequireState( tess, T_DORMANT );
163  memFree( tess );
164 }
165 
166 
167 inline void GLUAPIENTRY
169 {
170  GLUenum windingRule;
171 
172  switch( which ) {
173  case GLU_TESS_TOLERANCE:
174  if( value < 0.0 || value > 1.0 ) break;
175  tess->relTolerance = value;
176  return;
177 
179  windingRule = (GLUenum) value;
180  if( windingRule != value ) break; /* not an integer */
181 
182  switch( windingRule ) {
188  tess->windingRule = windingRule;
189  return;
190  default:
191  break;
192  }
193  return; //G.Barrand : add : seen with g++-8.1.0.
194 
196  tess->boundaryOnly = (value != 0);
197  return;
198 
199  default:
201  return;
202  }
204 }
205 
206 /* Returns tessellator property */
207 inline void GLUAPIENTRY
209 {
210  switch (which) {
211  case GLU_TESS_TOLERANCE:
212  /* tolerance should be in range [0..1] */
213  assert(0.0 <= tess->relTolerance && tess->relTolerance <= 1.0);
214  *value= tess->relTolerance;
215  break;
217  assert(tess->windingRule == GLU_TESS_WINDING_ODD ||
222  *value= tess->windingRule;
223  break;
225  assert(tess->boundaryOnly == TOOLS_GLU_TRUE || tess->boundaryOnly == TOOLS_GLU_FALSE);
226  *value= tess->boundaryOnly;
227  break;
228  default:
229  *value= 0.0;
231  break;
232  }
233 } /* gluGetTessProperty() */
234 
235 inline void GLUAPIENTRY
237 {
238  tess->normal[0] = x;
239  tess->normal[1] = y;
240  tess->normal[2] = z;
241 }
242 
243 // G.Barrand : begin : g++-8.1.0 : the five below functions introduced to avoid warnings :
244 // warning :cast between incompatible function types
245 inline void GLUAPIENTRY
247  tess->callVertexData = (a_fn == NULL) ? &__gl_noVertexData : a_fn;
248 }
249 inline void GLUAPIENTRY
251  tess->callBeginData = (a_fn == NULL) ? &__gl_noBeginData : a_fn;
252 }
253 inline void GLUAPIENTRY
255  tess->callEndData = (a_fn == NULL) ? &__gl_noEndData : a_fn;
256 }
257 inline void GLUAPIENTRY
259  tess->callErrorData = (a_fn == NULL) ? &__gl_noErrorData : a_fn;
260 }
261 inline void GLUAPIENTRY
263  void (GLUAPIENTRY* a_fn)(GLUdouble [3],void *[4],GLUfloat [4],void **,void *)) {
264  tess->callCombineData = (a_fn == NULL) ? &__gl_noCombineData : a_fn;
265 }
266 // G.Barrand : end : g++-8.1.0.
267 
268 inline void GLUAPIENTRY
270 {
271  switch( which ) {
272  case GLU_TESS_BEGIN:
273  tess->callBegin = (fn == NULL) ? &static_noBegin : (void (GLUAPIENTRY *)(GLUenum)) fn;
274  return;
275  case GLU_TESS_BEGIN_DATA:
276  tess->callBeginData = (fn == NULL) ?
277  &__gl_noBeginData : (void (GLUAPIENTRY *)(GLUenum, void *)) fn;
278  return;
279  case GLU_TESS_EDGE_FLAG:
280  tess->callEdgeFlag = (fn == NULL) ? &static_noEdgeFlag :
281  (void (GLUAPIENTRY *)(GLUboolean)) fn;
282  /* If the client wants boundary edges to be flagged,
283  * we render everything as separate triangles (no strips or fans).
284  */
285  tess->flagBoundary = (fn != NULL);
286  return;
288  tess->callEdgeFlagData= (fn == NULL) ?
289  &__gl_noEdgeFlagData : (void (GLUAPIENTRY *)(GLUboolean, void *)) fn;
290  /* If the client wants boundary edges to be flagged,
291  * we render everything as separate triangles (no strips or fans).
292  */
293  tess->flagBoundary = (fn != NULL);
294  return;
295  case GLU_TESS_VERTEX:
296  tess->callVertex = (fn == NULL) ? &static_noVertex :
297  (void (GLUAPIENTRY *)(void *)) fn;
298  return;
300  tess->callVertexData = (fn == NULL) ?
301  &__gl_noVertexData : (void (GLUAPIENTRY *)(void *, void *)) fn;
302  return;
303  case GLU_TESS_END:
304  tess->callEnd = (fn == NULL) ? &static_noEnd : (void (GLUAPIENTRY *)(void)) fn;
305  return;
306  case GLU_TESS_END_DATA:
307  tess->callEndData = (fn == NULL) ? &__gl_noEndData :
308  (void (GLUAPIENTRY *)(void *)) fn;
309  return;
310  case GLU_TESS_ERROR:
311  tess->callError = (fn == NULL) ? &static_noError : (void (GLUAPIENTRY *)(GLUenum)) fn;
312  return;
313  case GLU_TESS_ERROR_DATA:
314  tess->callErrorData = (fn == NULL) ?
315  &__gl_noErrorData : (void (GLUAPIENTRY *)(GLUenum, void *)) fn;
316  return;
317  case GLU_TESS_COMBINE:
318  tess->callCombine = (fn == NULL) ? &static_noCombine :
319  (void (GLUAPIENTRY *)(GLUdouble [3],void *[4], GLUfloat [4], void ** )) fn;
320  return;
322  tess->callCombineData = (fn == NULL) ? &__gl_noCombineData :
323  (void (GLUAPIENTRY *)(GLUdouble [3],
324  void *[4],
325  GLUfloat [4],
326  void **,
327  void *)) fn;
328  return;
329  case GLU_TESS_MESH:
330  tess->callMesh = (fn == NULL) ? &static_noMesh : (void (GLUAPIENTRY *)(GLUmesh *)) fn;
331  return;
332  default:
334  return;
335  }
336 }
337 
338 inline/*static*/ int static_AddVertex( GLUtesselator *tess, GLUdouble coords[3], void *data )
339 {
340  GLUhalfEdge *e;
341 
342  e = tess->lastEdge;
343  if( e == NULL ) {
344  /* Make a self-loop (one vertex, one edge). */
345 
346  e = __gl_meshMakeEdge( tess->mesh );
347  if (e == NULL) return 0;
348  if ( !__gl_meshSplice( e, e->Sym ) ) return 0;
349  } else {
350  /* Create a new vertex and edge which immediately follow e
351  * in the ordering around the left face.
352  */
353  if (__gl_meshSplitEdge( e ) == NULL) return 0;
354  e = e->Lnext;
355  }
356 
357  /* The new vertex is now e->Org. */
358  e->Org->data = data;
359  e->Org->coords[0] = coords[0];
360  e->Org->coords[1] = coords[1];
361  e->Org->coords[2] = coords[2];
362 
363  /* The winding of an edge says how the winding number changes as we
364  * cross from the edge''s right face to its left face. We add the
365  * vertices in such an order that a CCW contour will add +1 to
366  * the winding number of the region inside the contour.
367  */
368  e->winding = 1;
369  e->Sym->winding = -1;
370 
371  tess->lastEdge = e;
372 
373  return 1;
374 }
375 
376 
377 inline/*static*/ void static_CacheVertex( GLUtesselator *tess, GLUdouble coords[3], void *data )
378 {
379  CachedVertex *v = &tess->cache[tess->cacheCount];
380 
381  v->data = data;
382  v->coords[0] = coords[0];
383  v->coords[1] = coords[1];
384  v->coords[2] = coords[2];
385  ++tess->cacheCount;
386 }
387 
388 
389 inline/*static*/ int static_EmptyCache( GLUtesselator *tess )
390 {
391  CachedVertex *v = tess->cache;
392  CachedVertex *vLast;
393 
394  tess->mesh = __gl_meshNewMesh();
395  if (tess->mesh == NULL) return 0;
396 
397  for( vLast = v + tess->cacheCount; v < vLast; ++v ) {
398  if ( !static_AddVertex( tess, v->coords, v->data ) ) return 0;
399  }
400  tess->cacheCount = 0;
401  tess->emptyCache = TOOLS_GLU_FALSE;
402 
403  return 1;
404 }
405 
406 
407 inline void GLUAPIENTRY
408 gluTessVertex( GLUtesselator *tess, GLUdouble coords[3], void *data )
409 {
410  int i, tooLarge = TOOLS_GLU_FALSE;
411  GLUdouble x, clamped[3];
412 
413  RequireState( tess, T_IN_CONTOUR );
414 
415  if( tess->emptyCache ) {
416  if ( !static_EmptyCache( tess ) ) {
418  return;
419  }
420  tess->lastEdge = NULL;
421  }
422  for( i = 0; i < 3; ++i ) {
423  x = coords[i];
424  if( x < - GLU_TESS_MAX_COORD ) {
425  x = - GLU_TESS_MAX_COORD;
426  tooLarge = TOOLS_GLU_TRUE;
427  }
428  if( x > GLU_TESS_MAX_COORD ) {
429  x = GLU_TESS_MAX_COORD;
430  tooLarge = TOOLS_GLU_TRUE;
431  }
432  clamped[i] = x;
433  }
434  if( tooLarge ) {
436  }
437 
438  if( tess->mesh == NULL ) {
439  if( tess->cacheCount < GLU_TESS_MAX_CACHE ) {
440  static_CacheVertex( tess, clamped, data );
441  return;
442  }
443  if ( !static_EmptyCache( tess ) ) {
445  return;
446  }
447  }
448  if ( !static_AddVertex( tess, clamped, data ) ) {
450  }
451 }
452 
453 
454 inline void GLUAPIENTRY
455 gluTessBeginPolygon( GLUtesselator *tess, void *data )
456 {
457  RequireState( tess, T_DORMANT );
458 
459  tess->state = T_IN_POLYGON;
460  tess->cacheCount = 0;
461  tess->emptyCache = TOOLS_GLU_FALSE;
462  tess->mesh = NULL;
463 
464  tess->polygonData= data;
465 }
466 
467 
468 inline void GLUAPIENTRY
470 {
471  RequireState( tess, T_IN_POLYGON );
472 
473  tess->state = T_IN_CONTOUR;
474  tess->lastEdge = NULL;
475  if( tess->cacheCount > 0 ) {
476  /* Just set a flag so we don't get confused by empty contours
477  * -- these can be generated accidentally with the obsolete
478  * NextContour() interface.
479  */
480  tess->emptyCache = TOOLS_GLU_TRUE;
481  }
482 }
483 
484 
485 inline void GLUAPIENTRY
487 {
488  RequireState( tess, T_IN_CONTOUR );
489  tess->state = T_IN_POLYGON;
490 }
491 
492 inline void GLUAPIENTRY
494 {
495  GLUmesh *mesh;
496 
497  if (setjmp(tess->env) != 0) {
498  /* come back here if out of memory */
500  return;
501  }
502 
503  RequireState( tess, T_IN_POLYGON );
504  tess->state = T_DORMANT;
505 
506  if( tess->mesh == NULL ) {
507  if( ! tess->flagBoundary && tess->callMesh == &static_noMesh ) {
508 
509  /* Try some special code to make the easy cases go quickly
510  * (eg. convex polygons). This code does NOT handle multiple contours,
511  * intersections, edge flags, and of course it does not generate
512  * an explicit mesh either.
513  */
514  if( __gl_renderCache( tess )) {
515  tess->polygonData= NULL;
516  return;
517  }
518  }
519  if ( !static_EmptyCache( tess ) ) longjmp(tess->env,1); /* could've used a label*/
520  }
521 
522  /* Determine the polygon normal and project vertices onto the plane
523  * of the polygon.
524  */
525  __gl_projectPolygon( tess );
526 
527  /* __gl_computeInterior( tess ) computes the planar arrangement specified
528  * by the given contours, and further subdivides this arrangement
529  * into regions. Each region is marked "inside" if it belongs
530  * to the polygon, according to the rule given by tess->windingRule.
531  * Each interior region is guaranteed be monotone.
532  */
533  if ( !__gl_computeInterior( tess ) ) {
534  longjmp(tess->env,1); /* could've used a label */
535  }
536 
537  mesh = tess->mesh;
538  if( ! tess->fatalError ) {
539  int rc = 1;
540 
541  /* If the user wants only the boundary contours, we throw away all edges
542  * except those which separate the interior from the exterior.
543  * Otherwise we tessellate all the regions marked "inside".
544  */
545  if( tess->boundaryOnly ) {
546  rc = __gl_meshSetWindingNumber( mesh, 1, TOOLS_GLU_TRUE );
547  } else {
548  rc = __gl_meshTessellateInterior( mesh );
549  }
550  if (rc == 0) longjmp(tess->env,1); /* could've used a label */
551 
552  __gl_meshCheckMesh( mesh );
553 
554  if( tess->callBegin != &static_noBegin || tess->callEnd != &static_noEnd
555  || tess->callVertex != &static_noVertex || tess->callEdgeFlag != &static_noEdgeFlag
556  || tess->callBeginData != &__gl_noBeginData
557  || tess->callEndData != &__gl_noEndData
558  || tess->callVertexData != &__gl_noVertexData
559  || tess->callEdgeFlagData != &__gl_noEdgeFlagData )
560  {
561  if( tess->boundaryOnly ) {
562  __gl_renderBoundary( tess, mesh ); /* output boundary contours */
563  } else {
564  __gl_renderMesh( tess, mesh ); /* output strips and fans */
565  }
566  }
567  if( tess->callMesh != &static_noMesh ) {
568 
569  /* Throw away the exterior faces, so that all faces are interior.
570  * This way the user doesn't have to check the "inside" flag,
571  * and we don't need to even reveal its existence. It also leaves
572  * the freedom for an implementation to not generate the exterior
573  * faces in the first place.
574  */
575  __gl_meshDiscardExterior( mesh );
576  (*tess->callMesh)( mesh ); /* user wants the mesh itself */
577  tess->mesh = NULL;
578  tess->polygonData= NULL;
579  return;
580  }
581  }
582  __gl_meshDeleteMesh( mesh );
583  tess->polygonData= NULL;
584  tess->mesh = NULL;
585 }
586 
587 
588 /*******************************************************/
589 
590 /* Obsolete calls -- for backward compatibility */
591 
592 /*
593 inline void GLUAPIENTRY
594 gluBeginPolygon( GLUtesselator *tess )
595 {
596  gluTessBeginPolygon( tess, NULL );
597  gluTessBeginContour( tess );
598 }
599 
600 
601 inline void GLUAPIENTRY
602 gluNextContour( GLUtesselator *tess, GLUenum type )
603 {
604  gluTessEndContour( tess );
605  gluTessBeginContour( tess );
606 }
607 
608 
609 inline void GLUAPIENTRY
610 gluEndPolygon( GLUtesselator *tess )
611 {
612  gluTessEndContour( tess );
613  gluTessEndPolygon( tess );
614 }
615 */
616 
617 #include "undef"
618 
619 #endif
GLUtesselator::state
enum TessState state
Definition: _tess:31
TessState
TessState
Definition: _tess:15
GLU_TESS_MISSING_END_POLYGON
#define GLU_TESS_MISSING_END_POLYGON
Definition: _glu:131
static_noCombine
inline void GLUAPIENTRY static_noCombine(GLUdouble[3], void *[4], GLUfloat[4], void **)
Definition: glutess:34
__gl_meshSplitEdge
GLUhalfEdge * __gl_meshSplitEdge(GLUhalfEdge *eOrg)
Definition: mesh:654
__gl_noBeginData
void GLUAPIENTRY __gl_noBeginData(GLUenum, void *)
Definition: glutess:39
memFree
#define memFree
Definition: memalloc:42
GLU_TESS_WINDING_POSITIVE
#define GLU_TESS_WINDING_POSITIVE
Definition: _glu:39
static_GotoState
inline void static_GotoState(GLUtesselator *tess, enum TessState newState)
Definition: glutess:121
_GLUfuncptr
void(* _GLUfuncptr)()
Definition: _glu:49
GLU_TESS_DEFAULT_TOLERANCE
#define GLU_TESS_DEFAULT_TOLERANCE
Definition: glutess:26
gluTessCallback_GLU_TESS_VERTEX_DATA
void GLUAPIENTRY gluTessCallback_GLU_TESS_VERTEX_DATA(GLUtesselator *tess, void(GLUAPIENTRY *a_fn)(void *, void *))
Definition: glutess:246
GLU_TESS_TOLERANCE
#define GLU_TESS_TOLERANCE
Definition: _glu:118
GLUvoid
void GLUvoid
Definition: _glu:15
gluTessCallback_GLU_TESS_COMBINE_DATA
void GLUAPIENTRY gluTessCallback_GLU_TESS_COMBINE_DATA(GLUtesselator *tess, void(GLUAPIENTRY *a_fn)(GLUdouble[3], void *[4], GLUfloat[4], void **, void *))
Definition: glutess:262
GLU_TESS_BOUNDARY_ONLY
#define GLU_TESS_BOUNDARY_ONLY
Definition: _glu:117
__gl_noEdgeFlagData
void GLUAPIENTRY __gl_noEdgeFlagData(GLUboolean, void *)
Definition: glutess:40
GLUtesselator::cache
CachedVertex cache[GLU_TESS_MAX_CACHE]
Definition: _tess:76
gluGetTessProperty
void GLUAPIENTRY gluGetTessProperty(GLUtesselator *tess, GLUenum which, GLUdouble *value)
Definition: glutess:208
sweep
GLU_TESS_MISSING_END_CONTOUR
#define GLU_TESS_MISSING_END_CONTOUR
Definition: _glu:132
GLU_MAX
#define GLU_MAX(x, y)
Definition: _glu:73
__gl_computeInterior
int __gl_computeInterior(GLUtesselator *tess)
Definition: sweep:1287
gluTessCallback
GLUAPI void GLUAPIENTRY gluTessCallback(GLUtesselator *tess, GLUenum which, _GLUfuncptr CallBackFunc)
Definition: glutess:269
GLUmesh
Definition: mesh:131
GLU_TESS_COMBINE_DATA
#define GLU_TESS_COMBINE_DATA
Definition: _glu:31
CachedVertex
Definition: _tess:22
GLU_TESS_BEGIN
#define GLU_TESS_BEGIN
Definition: _glu:100
GLUtesselator::normal
GLUdouble normal[3]
Definition: _tess:41
__gl_meshSplice
int __gl_meshSplice(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
Definition: mesh:504
T_IN_POLYGON
@ T_IN_POLYGON
Definition: _tess:15
GLUtesselator::lastEdge
GLUhalfEdge * lastEdge
Definition: _tess:33
GLUhalfEdge::Lnext
GLUhalfEdge * Lnext
Definition: mesh:110
MAX_FAST_ALLOC
size_t MAX_FAST_ALLOC()
Definition: glutess:53
GLU_TESS_MESH
#define GLU_TESS_MESH
Definition: glutess:27
GLU_TESS_MISSING_BEGIN_CONTOUR
#define GLU_TESS_MISSING_BEGIN_CONTOUR
Definition: _glu:130
GLUtesselator::cacheCount
int cacheCount
Definition: _tess:75
__gl_projectPolygon
void __gl_projectPolygon(GLUtesselator *tess)
Definition: normal:148
memAlloc
#define memAlloc
Definition: memalloc:40
GLUtesselator::emptyCache
GLUboolean emptyCache
Definition: _tess:74
GLU_TESS_ERROR
#define GLU_TESS_ERROR
Definition: _glu:103
GLU_TESS_END
#define GLU_TESS_END
Definition: _glu:102
__gl_noErrorData
void GLUAPIENTRY __gl_noErrorData(GLUenum, void *)
Definition: glutess:43
__gl_meshDeleteMesh
void __gl_meshDeleteMesh(GLUmesh *mesh)
Definition: mesh:890
GLUhalfEdge
Definition: mesh:106
GLUvertex::data
void * data
Definition: mesh:86
gluTessBeginPolygon
GLUAPI void GLUAPIENTRY gluTessBeginPolygon(GLUtesselator *tess, GLUvoid *data)
Definition: glutess:455
GLUAPIENTRY
#define GLUAPIENTRY
Definition: _glu:48
GLUhalfEdge::Sym
GLUhalfEdge * Sym
Definition: mesh:108
static_noEdgeFlag
inline void GLUAPIENTRY static_noEdgeFlag(GLUboolean)
Definition: glutess:30
static_CacheVertex
inline void static_CacheVertex(GLUtesselator *tess, GLUdouble coords[3], void *data)
Definition: glutess:377
normal
GLU_TESS_WINDING_ABS_GEQ_TWO
#define GLU_TESS_WINDING_ABS_GEQ_TWO
Definition: _glu:138
GLUtesselator::polygonData
void * polygonData
Definition: _tess:79
CachedVertex::coords
GLUdouble coords[3]
Definition: _tess:23
GLUhalfEdge::winding
int winding
Definition: mesh:116
GLUtesselator::boundaryOnly
GLUboolean boundaryOnly
Definition: _tess:61
TOOLS_GLU_TRUE
#define TOOLS_GLU_TRUE
Definition: _glu:82
__gl_noEndData
void GLUAPIENTRY __gl_noEndData(void *)
Definition: glutess:42
GLUdouble
double GLUdouble
Definition: _glu:16
gluTessCallback_GLU_TESS_ERROR_DATA
void GLUAPIENTRY gluTessCallback_GLU_TESS_ERROR_DATA(GLUtesselator *tess, void(GLUAPIENTRY *a_fn)(GLUenum, void *))
Definition: glutess:258
__gl_meshTessellateInterior
int __gl_meshTessellateInterior(GLUmesh *mesh)
Definition: tessmono:133
__gl_renderCache
GLUboolean __gl_renderCache(GLUtesselator *tess)
Definition: render:418
GLUtesselator::mesh
GLUmesh * mesh
Definition: _tess:34
GLU_TESS_WINDING_NEGATIVE
#define GLU_TESS_WINDING_NEGATIVE
Definition: _glu:40
GLUfloat
float GLUfloat
Definition: _glu:19
__gl_renderMesh
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
Definition: render:59
static_MakeDormant
inline void static_MakeDormant(GLUtesselator *tess)
Definition: glutess:107
GLU_TESS_MISSING_BEGIN_POLYGON
#define GLU_TESS_MISSING_BEGIN_POLYGON
Definition: _glu:129
static_noError
inline void GLUAPIENTRY static_noError(GLUenum)
Definition: glutess:33
RequireState
#define RequireState(tess, s)
Definition: glutess:119
CALL_ERROR_OR_ERROR_DATA
#define CALL_ERROR_OR_ERROR_DATA(a)
Definition: _tess:128
static_noEnd
inline void GLUAPIENTRY static_noEnd(void)
Definition: glutess:32
gluTessBeginContour
GLUAPI void GLUAPIENTRY gluTessBeginContour(GLUtesselator *tess)
Definition: glutess:469
GLU_TESS_ERROR_DATA
#define GLU_TESS_ERROR_DATA
Definition: _glu:30
TOOLS_GLU_FALSE
#define TOOLS_GLU_FALSE
Definition: _glu:81
GLU_TESS_WINDING_ODD
#define GLU_TESS_WINDING_ODD
Definition: _glu:38
GLU_TESS_VERTEX
#define GLU_TESS_VERTEX
Definition: _glu:101
memInit
#define memInit
Definition: memalloc:43
GLUtesselator::env
jmp_buf env
Definition: _tess:89
GLU_TESS_MAX_CACHE
#define GLU_TESS_MAX_CACHE
Definition: _tess:20
GLU_OUT_OF_MEMORY
#define GLU_OUT_OF_MEMORY
Definition: _glu:95
GLUtesselator
Definition: _tess:27
GLUtesselator::windingRule
GLUenum windingRule
Definition: _tess:48
T_DORMANT
@ T_DORMANT
Definition: _tess:15
__gl_meshDiscardExterior
void __gl_meshDiscardExterior(GLUmesh *mesh)
Definition: tessmono:155
GLUtesselator::relTolerance
GLUdouble relTolerance
Definition: _tess:47
GLUvertex
Definition: mesh:82
GLUboolean
unsigned char GLUboolean
Definition: _glu:18
GLU_TESS_END_DATA
#define GLU_TESS_END_DATA
Definition: _glu:29
GLUvertex::coords
GLUdouble coords[3]
Definition: mesh:89
GLU_TESS_COORD_TOO_LARGE
#define GLU_TESS_COORD_TOO_LARGE
Definition: _glu:133
GLUtesselator::fatalError
GLUboolean fatalError
Definition: _tess:49
gluTessEndContour
GLUAPI void GLUAPIENTRY gluTessEndContour(GLUtesselator *tess)
Definition: glutess:486
__gl_meshMakeEdge
GLUhalfEdge * __gl_meshMakeEdge(GLUmesh *mesh)
Definition: mesh:451
GLU_TESS_BEGIN_DATA
#define GLU_TESS_BEGIN_DATA
Definition: _glu:27
gluDeleteTess
GLUAPI void GLUAPIENTRY gluDeleteTess(GLUtesselator *tess)
Definition: glutess:160
GLU_INVALID_VALUE
#define GLU_INVALID_VALUE
Definition: _glu:94
mesh
GLU_TESS_EDGE_FLAG
#define GLU_TESS_EDGE_FLAG
Definition: _glu:104
gluTessEndPolygon
GLUAPI void GLUAPIENTRY gluTessEndPolygon(GLUtesselator *tess)
Definition: glutess:493
GLUface
Definition: mesh:94
gluTessNormal
GLUAPI void GLUAPIENTRY gluTessNormal(GLUtesselator *tess, GLUdouble valueX, GLUdouble valueY, GLUdouble valueZ)
Definition: glutess:236
GLU_TESS_EDGE_FLAG_DATA
#define GLU_TESS_EDGE_FLAG_DATA
Definition: _glu:107
GLUhalfEdge::Org
GLUvertex * Org
Definition: mesh:111
static_EmptyCache
inline int static_EmptyCache(GLUtesselator *tess)
Definition: glutess:389
GLU_TESS_COMBINE
#define GLU_TESS_COMBINE
Definition: _glu:106
static_noVertex
inline void GLUAPIENTRY static_noVertex(void *)
Definition: glutess:31
undef
render
__gl_noVertexData
void GLUAPIENTRY __gl_noVertexData(void *, void *)
Definition: glutess:41
gluTessCallback_GLU_TESS_BEGIN_DATA
void GLUAPIENTRY gluTessCallback_GLU_TESS_BEGIN_DATA(GLUtesselator *tess, void(GLUAPIENTRY *a_fn)(GLUenum, void *))
Definition: glutess:250
__gl_meshNewMesh
GLUmesh * __gl_meshNewMesh(void)
Definition: mesh:782
__gl_noCombineData
void GLUAPIENTRY __gl_noCombineData(GLUdouble[3], void *[4], GLUfloat[4], void **, void *)
Definition: glutess:44
gluNewTess
GLUAPI GLUtesselator *GLUAPIENTRY gluNewTess(void)
Definition: glutess:59
GLUAPI
#define GLUAPI
Definition: _glu:51
_tess
static_AddVertex
inline int static_AddVertex(GLUtesselator *tess, GLUdouble coords[3], void *data)
Definition: glutess:338
GLUtesselator::flagBoundary
GLUboolean flagBoundary
Definition: _tess:60
GLU_TESS_WINDING_NONZERO
#define GLU_TESS_WINDING_NONZERO
Definition: _glu:137
static_noBegin
inline void GLUAPIENTRY static_noBegin(GLUenum)
Definition: glutess:29
CachedVertex::data
void * data
Definition: _tess:24
tessmono
gluTessVertex
GLUAPI void GLUAPIENTRY gluTessVertex(GLUtesselator *tess, GLUdouble *location, GLUvoid *data)
__gl_meshCheckMesh
void __gl_meshCheckMesh(GLUmesh *mesh)
Definition: mesh:917
gluTessProperty
GLUAPI void GLUAPIENTRY gluTessProperty(GLUtesselator *tess, GLUenum which, GLUdouble data)
Definition: glutess:168
__gl_renderBoundary
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
Definition: render:312
EdgePair
Definition: mesh:239
GLU_TESS_VERTEX_DATA
#define GLU_TESS_VERTEX_DATA
Definition: _glu:28
__gl_meshSetWindingNumber
int __gl_meshSetWindingNumber(GLUmesh *mesh, int value, GLUboolean keepOnlyBoundary)
Definition: tessmono:179
GLU_TESS_WINDING_RULE
#define GLU_TESS_WINDING_RULE
Definition: _glu:34
T_IN_CONTOUR
@ T_IN_CONTOUR
Definition: _tess:15
GLUenum
unsigned int GLUenum
Definition: _glu:14
GLU_INVALID_ENUM
#define GLU_INVALID_ENUM
Definition: _glu:93
gluTessCallback_GLU_TESS_END_DATA
void GLUAPIENTRY gluTessCallback_GLU_TESS_END_DATA(GLUtesselator *tess, void(GLUAPIENTRY *a_fn)(void *))
Definition: glutess:254
GLU_TESS_MAX_COORD
#define GLU_TESS_MAX_COORD
Definition: _glu:90
static_noMesh
inline void GLUAPIENTRY static_noMesh(GLUmesh *)
Definition: glutess:36