#include "mesh"
#include "_tess"
Go to the source code of this file.
|
inline struct FaceCount | static_MaximumFan (GLUhalfEdge *eOrig) |
|
inline struct FaceCount | static_MaximumStrip (GLUhalfEdge *eOrig) |
|
inline void | static_RenderFan (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
inline void | static_RenderStrip (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
inline void | static_RenderTriangle (GLUtesselator *tess, GLUhalfEdge *eStart, long size) |
|
inline void | static_RenderMaximumFaceGroup (GLUtesselator *tess, GLUface *fOrig) |
|
inline void | static_RenderLonelyTriangles (GLUtesselator *tess, GLUface *head) |
|
void | __gl_renderMesh (GLUtesselator *tess, GLUmesh *mesh) |
|
void | __gl_renderBoundary (GLUtesselator *tess, GLUmesh *mesh) |
|
int | SIGN_INCONSISTENT () |
|
inline int | static_ComputeNormal (GLUtesselator *tess, GLUdouble norm[3], int check) |
|
GLUboolean | __gl_renderCache (GLUtesselator *tess) |
|
◆ AddToTrail
#define AddToTrail |
( |
|
f, |
|
|
|
t |
|
) |
| ((f)->trail = (t), (t) = (f), (f)->marked = TOOLS_GLU_TRUE) |
◆ FreeTrail
#define FreeTrail |
( |
|
t | ) |
do { while( (t) != NULL ) { (t)->marked = TOOLS_GLU_FALSE; t = (t)->trail; } } while(false) |
◆ IsEven
#define IsEven |
( |
|
n | ) |
(((n) & 1) == 0) |
◆ Marked
#define Marked |
( |
|
f | ) |
(! (f)->inside || (f)->marked) |
◆ tools_glutess_render
#define tools_glutess_render |
Definition at line 4 of file render.
◆ __gl_renderBoundary()
◆ __gl_renderCache()
Definition at line 418 of file render.
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 ) {
◆ __gl_renderMesh()
◆ SIGN_INCONSISTENT()
int SIGN_INCONSISTENT |
( |
| ) |
|
|
inline |
Definition at line 334 of file render.
335 static const int s_value = 2;
◆ static_ComputeNormal()
Definition at line 339 of file render.
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 ) {
◆ static_MaximumFan()
Definition at line 130 of file render.
144 for( e = eOrig; !
Marked( e->Rface ); e = e->Oprev ) {
◆ static_MaximumStrip()
Definition at line 157 of file render.
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 )) {
◆ static_RenderFan()
◆ static_RenderLonelyTriangles()
Definition at line 221 of file render.
232 for( ; f != NULL; f = f->trail ) {
241 newState = ! e->Rface->inside;
242 if( edgeState != newState ) {
243 edgeState = newState;
250 }
while( e != f->anEdge );
◆ static_RenderMaximumFaceGroup()
Definition at line 87 of file render.
104 newFace =
static_MaximumFan( e );
if( newFace.size > max.size ) { max = newFace; }
106 newFace =
static_MaximumFan( e->Lprev );
if( newFace.size > max.size ) { max = newFace; }
110 newFace =
static_MaximumStrip( e->Lprev );
if( newFace.size > max.size ) { max = newFace; }
112 (*(max.render))( tess, max.eStart, max.size );
◆ static_RenderStrip()
Definition at line 278 of file render.
288 while( !
Marked( e->Lface )) {
293 if(
Marked( e->Lface ))
break;
◆ static_RenderTriangle()