47#define GLU_TESS_DEFAULT_TOLERANCE 0.0
48#define GLU_TESS_MESH 100112
57#if defined(__GNUC__) || defined(__clang__)
58#pragma GCC diagnostic push
60#pragma GCC diagnostic ignored "-Wunused-parameter"
69 GLfloat weight[4],
void **dataOut ) {}
74 void *polygonData ) {}
76 void *polygonData ) {}
78 void *polygonData ) {}
81 void *polygonData ) {}
86 void *polygonData ) {}
88#if defined(__GNUC__) || defined(__clang__)
89#pragma GCC diagnostic pop
96#define MAX(a,b) ((a) > (b) ? (a) : (b))
97#define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \
98 MAX(sizeof(GLUvertex),sizeof(GLUface))))
132 tess->callEnd = &
noEnd;
154 if( tess->
mesh != NULL ) {
162#define RequireState( tess, s ) if( tess->state != s ) GotoState(tess,s)
166 while( tess->
state != newState ) {
170 if( tess->
state < newState ) {
171 switch( tess->
state ) {
184 switch( tess->
state ) {
217 if( value < 0.0 || value > 1.0 )
break;
222 windingRule = (
GLenum) value;
223 if( windingRule != value )
break;
225 switch( windingRule ) {
293 tess->callBeginData = (fn == NULL) ?
297 tess->callEdgeFlag = (fn == NULL) ? &
noEdgeFlag :
305 tess->callEdgeFlagData= (fn == NULL) ?
313 tess->callVertex = (fn == NULL) ? &
noVertex :
317 tess->callVertexData = (fn == NULL) ?
331 tess->callErrorData = (fn == NULL) ?
335 tess->callCombine = (fn == NULL) ? &
noCombine :
364 if (
e == NULL)
return 0;
376 e->Org->coords[0] = coords[0];
377 e->Org->coords[1] = coords[1];
378 e->Org->coords[2] = coords[2];
386 e->Sym->winding = -1;
399 v->coords[0] = coords[0];
400 v->coords[1] = coords[1];
401 v->coords[2] = coords[2];
412 if (tess->
mesh == NULL)
return 0;
427 int i, tooLarge =
FALSE;
439 for( i = 0; i < 3; ++i ) {
455 if( tess->
mesh == NULL ) {
465 if ( !
AddVertex( tess, clamped, data ) ) {
514 if (setjmp(tess->
env) != 0) {
523 if( tess->
mesh == NULL ) {
551 longjmp(tess->
env,1);
567 if (rc == 0) longjmp(tess->
env,1);
571 if( tess->callBegin != &
noBegin || tess->callEnd != &
noEnd
584 if( tess->callMesh != &
noMesh ) {
593 (*tess->callMesh)(
mesh );
#define GLU_TESS_WINDING_NONZERO
#define GLU_TESS_WINDING_POSITIVE
#define GLU_TESS_BOUNDARY_ONLY
#define GLU_TESS_BEGIN_DATA
#define GLU_TESS_COMBINE_DATA
#define GLU_TESS_MISSING_BEGIN_CONTOUR
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
#define GLU_TESS_WINDING_NEGATIVE
#define GLU_TESS_END_DATA
#define GLU_TESS_WINDING_RULE
#define GLU_TESS_EDGE_FLAG
#define GLU_TESS_MISSING_END_CONTOUR
#define GLU_TESS_TOLERANCE
#define GLU_TESS_EDGE_FLAG_DATA
#define GLU_TESS_WINDING_ODD
#define GLU_TESS_COORD_TOO_LARGE
#define GLU_TESS_VERTEX_DATA
#define GLU_TESS_MISSING_BEGIN_POLYGON
#define GLU_TESS_MAX_COORD
#define GLU_OUT_OF_MEMORY
#define GLU_TESS_MISSING_END_POLYGON
#define GLU_TESS_ERROR_DATA
#define GLU_INVALID_VALUE
#define GLU_TESS_WINDING_ABS_GEQ_TWO
GLUhalfEdge * __gl_meshMakeEdge(GLUmesh *mesh)
GLUhalfEdge * __gl_meshSplitEdge(GLUhalfEdge *eOrg)
void __gl_meshCheckMesh(GLUmesh *mesh)
void __gl_meshDeleteMesh(GLUmesh *mesh)
GLUmesh * __gl_meshNewMesh(void)
int __gl_meshSplice(GLUhalfEdge *eOrg, GLUhalfEdge *eDst)
void __gl_projectPolygon(GLUtesselator *tess)
GLboolean __gl_renderCache(GLUtesselator *tess)
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
CachedVertex cache[TESS_MAX_CACHE]
int __gl_computeInterior(GLUtesselator *tess)
void GLAPIENTRY __gl_noErrorData(GLenum errnum, void *polygonData)
void GLAPIENTRY gluGetTessProperty(GLUtesselator *tess, GLenum which, GLdouble *value)
static int AddVertex(GLUtesselator *tess, GLdouble coords[3], void *data)
static void GLAPIENTRY noEdgeFlag(GLboolean boundaryEdge)
void GLAPIENTRY gluTessVertex(GLUtesselator *tess, GLdouble *coords, void *data)
void GLAPIENTRY gluNextContour(GLUtesselator *tess, GLenum type)
void GLAPIENTRY __gl_noEdgeFlagData(GLboolean boundaryEdge, void *polygonData)
static int EmptyCache(GLUtesselator *tess)
void GLAPIENTRY gluBeginPolygon(GLUtesselator *tess)
static void MakeDormant(GLUtesselator *tess)
static void GLAPIENTRY noBegin(GLenum type)
void GLAPIENTRY gluTessNormal(GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z)
void GLAPIENTRY gluTessProperty(GLUtesselator *tess, GLenum which, GLdouble value)
GLUtesselator *GLAPIENTRY gluNewTess(void)
static void CacheVertex(GLUtesselator *tess, GLdouble coords[3], void *data)
#define RequireState(tess, s)
void GLAPIENTRY gluDeleteTess(GLUtesselator *tess)
static void GLAPIENTRY noMesh(GLUmesh *mesh)
void GLAPIENTRY __gl_noEndData(void *polygonData)
void GLAPIENTRY gluTessBeginContour(GLUtesselator *tess)
void GLAPIENTRY gluTessCallback(GLUtesselator *tess, GLenum which, _GLUfuncptr fn)
#define GLU_TESS_DEFAULT_TOLERANCE
void GLAPIENTRY gluTessEndContour(GLUtesselator *tess)
void GLAPIENTRY __gl_noVertexData(void *data, void *polygonData)
static void GLAPIENTRY noError(GLenum errnum)
void GLAPIENTRY gluTessEndPolygon(GLUtesselator *tess)
static void GLAPIENTRY noEnd(void)
void GLAPIENTRY __gl_noCombineData(GLdouble coords[3], void *data[4], GLfloat weight[4], void **outData, void *polygonData)
static void GotoState(GLUtesselator *tess, enum TessState newState)
void GLAPIENTRY gluTessBeginPolygon(GLUtesselator *tess, void *data)
static void GLAPIENTRY noCombine(GLdouble coords[3], void *data[4], GLfloat weight[4], void **dataOut)
void GLAPIENTRY gluEndPolygon(GLUtesselator *tess)
static void GLAPIENTRY noVertex(void *data)
void GLAPIENTRY __gl_noBeginData(GLenum type, void *polygonData)
#define CALL_ERROR_OR_ERROR_DATA(a)
int __gl_meshSetWindingNumber(GLUmesh *mesh, int value, GLboolean keepOnlyBoundary)
void __gl_meshDiscardExterior(GLUmesh *mesh)
int __gl_meshTessellateInterior(GLUmesh *mesh)