Go to the documentation of this file.
3 #ifndef tools_glutess_render
4 #define tools_glutess_render
123 #define Marked(f) (! (f)->inside || (f)->marked)
125 #define AddToTrail(f,t) ((f)->trail = (t), (t) = (f), (f)->marked = TOOLS_GLU_TRUE)
128 #define FreeTrail(t) do { while( (t) != NULL ) { (t)->marked = TOOLS_GLU_FALSE; t = (t)->trail; } } while(false)
144 for( e = eOrig; !
Marked( e->Rface ); e = e->Oprev ) {
155 #define IsEven(n) (((n) & 1) == 0)
170 long headSize = 0, tailSize = 0;
178 if(
Marked( e->Lface ))
break;
183 for( e = eOrig; !
Marked( e->Rface ); ++headSize, e = e->Dnext ) {
187 if(
Marked( e->Rface ))
break;
192 newFace.
size = tailSize + headSize;
195 }
else if(
IsEven( headSize )) {
232 for( ; f != NULL; f = f->
trail ) {
241 newState = ! e->Rface->inside;
242 if( edgeState != newState ) {
243 edgeState = newState;
250 }
while( e != f->
anEdge );
324 }
while( e != f->
anEdge );
335 static const int s_value = 2;
352 GLUdouble dot, xc, yc, zc, xp, yp, zp, n[3];
369 norm[0] = norm[1] = norm[2] = 0.0;
377 xp = xc; yp = yc; zp = zc;
383 n[0] = yp*zc - zp*yc;
384 n[1] = zp*xc - xp*zc;
385 n[2] = xp*yc - yp*xc;
387 dot = n[0]*norm[0] + n[1]*norm[1] + n[2]*norm[2];
393 norm[0] += n[0]; norm[1] += n[1]; norm[2] += n[2];
395 norm[0] -= n[0]; norm[1] -= n[1]; norm[2] -= n[2];
397 }
else if( dot != 0 ) {
431 norm[0] = tess->
normal[0];
432 norm[1] = tess->
normal[1];
433 norm[2] = tess->
normal[2];
434 if( norm[0] == 0 && norm[1] == 0 && norm[2] == 0 ) {
469 for( vc = v0+1; vc < vn; ++vc ) {
473 for( vc = vn-1; vc > v0; --vc ) {
#define GLU_TESS_WINDING_POSITIVE
inline void static_RenderMaximumFaceGroup(GLUtesselator *tess, GLUface *fOrig)
CachedVertex cache[GLU_TESS_MAX_CACHE]
#define CALL_END_OR_END_DATA()
inline struct FaceCount static_MaximumFan(GLUhalfEdge *eOrig)
inlined C code : ///////////////////////////////////
#define GLU_TESS_WINDING_ABS_GEQ_TWO
inline void static_RenderFan(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
GLUboolean __gl_renderCache(GLUtesselator *tess)
#define GLU_TESS_WINDING_NEGATIVE
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
#define GLU_TESS_WINDING_ODD
inline int static_ComputeNormal(GLUtesselator *tess, GLUdouble norm[3], int check)
#define CALL_VERTEX_OR_VERTEX_DATA(a)
#define CALL_BEGIN_OR_BEGIN_DATA(a)
#define GLU_TRIANGLE_STRIP
inline struct FaceCount static_MaximumStrip(GLUhalfEdge *eOrig)
inline void static_RenderLonelyTriangles(GLUtesselator *tess, GLUface *head)
#define GLU_TESS_WINDING_NONZERO
inline void static_RenderStrip(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
inline void static_RenderTriangle(GLUtesselator *tess, GLUhalfEdge *eStart, long size)
#define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a)
void(* render)(GLUtesselator *, GLUhalfEdge *, long)