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[ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/glutess/_tess (Version 11.3.0) and /externals/g4tools/include/tools/glutess/_tess (Version 3.1)


  1 // see license file for original license.         
  2                                                   
  3 #ifndef tools_glutess__tess                       
  4 #define tools_glutess__tess                       
  5                                                   
  6 #include "mesh"                                   
  7 #include "dict"                                   
  8 #include "priorityq"                              
  9                                                   
 10 #include <csetjmp>                                
 11                                                   
 12 /* The begin/end calls must be properly nested    
 13  * the current state to enforce the ordering.     
 14  */                                               
 15 enum TessState { T_DORMANT, T_IN_POLYGON, T_IN    
 16                                                   
 17 /* We cache vertex data for single-contour pol    
 18  * try a quick-and-dirty decomposition first.     
 19  */                                               
 20 #define GLU_TESS_MAX_CACHE 100                    
 21                                                   
 22 typedef struct CachedVertex {                     
 23   GLUdouble coords[3];                            
 24   void    *data;                                  
 25 } CachedVertex;                                   
 26                                                   
 27 struct GLUtesselator {                            
 28                                                   
 29   /*** state needed for collecting the input d    
 30                                                   
 31   enum TessState state;   /* what begin/end ca    
 32                                                   
 33   GLUhalfEdge *lastEdge;  /* lastEdge->Org is     
 34   GLUmesh *mesh;    /* stores the input contou    
 35                                    the tessell    
 36                                                   
 37   void    (GLUAPIENTRY *callError)( GLUenum er    
 38                                                   
 39   /*** state needed for projecting onto the sw    
 40                                                   
 41   GLUdouble normal[3];  /* user-specified norm    
 42   GLUdouble sUnit[3]; /* unit vector in s-dire    
 43   GLUdouble tUnit[3]; /* unit vector in t-dire    
 44                                                   
 45   /*** state needed for the line sweep ***/       
 46                                                   
 47   GLUdouble relTolerance; /* tolerance for mer    
 48   GLUenum windingRule;  /* rule for determinin    
 49   GLUboolean  fatalError; /* fatal error: need    
 50                                                   
 51   Dict    *dict;    /* edge dictionary for swe    
 52   PriorityQ *pq;    /* priority queue of verte    
 53   GLUvertex *event;   /* current sweep event b    
 54                                                   
 55   void    (GLUAPIENTRY *callCombine)( GLUdoubl    
 56               GLUfloat weight[4], void **outDa    
 57                                                   
 58   /*** state needed for rendering callbacks (s    
 59                                                   
 60   GLUboolean  flagBoundary; /* mark boundary e    
 61   GLUboolean  boundaryOnly; /* Extract contour    
 62   GLUface *lonelyTriList;                         
 63     /* list of triangles which could not be re    
 64                                                   
 65   void    (GLUAPIENTRY *callBegin)( GLUenum ty    
 66   void    (GLUAPIENTRY *callEdgeFlag)( GLUbool    
 67   void    (GLUAPIENTRY *callVertex)( void *dat    
 68   void    (GLUAPIENTRY *callEnd)( void );         
 69   void    (GLUAPIENTRY *callMesh)( GLUmesh *me    
 70                                                   
 71                                                   
 72   /*** state needed to cache single-contour po    
 73                                                   
 74   GLUboolean  emptyCache;   /* empty cache on     
 75   int   cacheCount;   /* number of cached vert    
 76   CachedVertex  cache[GLU_TESS_MAX_CACHE];  /*    
 77                                                   
 78   /*** rendering callbacks that also pass poly    
 79   void    (GLUAPIENTRY *callBeginData)( GLUenu    
 80   void    (GLUAPIENTRY *callEdgeFlagData)( GLU    
 81              void *polygonData );                 
 82   void    (GLUAPIENTRY *callVertexData)( void     
 83   void    (GLUAPIENTRY *callEndData)( void *po    
 84   void    (GLUAPIENTRY *callErrorData)( GLUenu    
 85   void    (GLUAPIENTRY *callCombineData)( GLUd    
 86             GLUfloat weight[4], void **outData    
 87             void *polygonData );                  
 88                                                   
 89   jmp_buf env;      /* place to jump to when m    
 90                                                   
 91   void *polygonData;    /* client data for cur    
 92 };                                                
 93                                                   
 94 void GLUAPIENTRY __gl_noBeginData( GLUenum typ    
 95 void GLUAPIENTRY __gl_noEdgeFlagData( GLUboole    
 96 void GLUAPIENTRY __gl_noVertexData( void *data    
 97 void GLUAPIENTRY __gl_noEndData( void *polygon    
 98 void GLUAPIENTRY __gl_noErrorData( GLUenum err    
 99 void GLUAPIENTRY __gl_noCombineData( GLUdouble    
100        GLUfloat weight[4], void **outData,        
101        void *polygonData );                       
102                                                   
103 #define CALL_BEGIN_OR_BEGIN_DATA(a) \             
104    if (tess->callBeginData != &__gl_noBeginDat    
105       (*tess->callBeginData)((a),tess->polygon    
106    else (*tess->callBegin)((a));                  
107                                                   
108 #define CALL_VERTEX_OR_VERTEX_DATA(a) \           
109    if (tess->callVertexData != &__gl_noVertexD    
110       (*tess->callVertexData)((a),tess->polygo    
111    else (*tess->callVertex)((a));                 
112                                                   
113 #define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a) \     
114    if (tess->callEdgeFlagData != &__gl_noEdgeF    
115       (*tess->callEdgeFlagData)((a),tess->poly    
116    else (*tess->callEdgeFlag)((a));               
117                                                   
118 #define CALL_END_OR_END_DATA() \                  
119    if (tess->callEndData != &__gl_noEndData) \    
120       (*tess->callEndData)(tess->polygonData);    
121    else (*tess->callEnd)();                       
122                                                   
123 #define CALL_COMBINE_OR_COMBINE_DATA(a,b,c,d)     
124    if (tess->callCombineData != &__gl_noCombin    
125       (*tess->callCombineData)((a),(b),(c),(d)    
126    else (*tess->callCombine)((a),(b),(c),(d));    
127                                                   
128 #define CALL_ERROR_OR_ERROR_DATA(a) \             
129    if (tess->callErrorData != &__gl_noErrorDat    
130       (*tess->callErrorData)((a),tess->polygon    
131    else (*tess->callError)((a));                  
132                                                   
133 #endif