66 if( gapL + gapR > 0 ) {
68 return (
v->t - u->
t) + (u->
t - w->
t) * (gapL / (gapL + gapR));
70 return (
v->t - w->
t) + (w->
t - u->
t) * (gapR / (gapL + gapR));
90 if( gapL + gapR > 0 ) {
91 return (
v->t - w->
t) * gapL + (
v->t - u->
t) * gapR;
121 if( gapL + gapR > 0 ) {
123 return (
v->s - u->
s) + (u->
s - w->
s) * (gapL / (gapL + gapR));
125 return (
v->s - w->
s) + (w->
s - u->
s) * (gapR / (gapL + gapR));
145 if( gapL + gapR > 0 ) {
146 return (
v->s - w->
s) * gapL + (
v->s - u->
s) * gapR;
161 return (u->
s*(
v->t - w->
t) +
v->s*(w->
t - u->
t) + w->
s*(u->
t -
v->t)) >= 0;
172#define RealInterpolate(a,x,b,y) \
173 (a = (a < 0) ? 0 : a, b = (b < 0) ? 0 : b, \
174 ((a <= b) ? ((b == 0) ? ((x+y) / 2) \
175 : (x + (y-x) * (a/(a+b)))) \
176 : (y + (x-y) * (b/(a+b)))))
178#ifndef FOR_TRITE_TEST_PROGRAM
179#define Interpolate(a,x,b,y) RealInterpolate(a,x,b,y)
186extern int RandomInterpolate;
190printf(
"*********************%d\n",RandomInterpolate);
191 if( RandomInterpolate ) {
192 a = 1.2 * drand48() - 0.1;
193 a = (
a < 0) ? 0 : ((
a > 1) ? 1 :
a);
201#define Swap(a,b) do { GLUvertex *t = a; a = b; b = t; } while (0)
227 v->s = (o2->
s + d1->
s) / 2;
228 }
else if(
VertLeq( d1, d2 )) {
232 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
238 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
250 v->t = (o2->
t + d1->
t) / 2;
255 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
261 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
int __gl_vertCCW(GLUvertex *u, GLUvertex *v, GLUvertex *w)
GLdouble __gl_edgeSign(GLUvertex *u, GLUvertex *v, GLUvertex *w)
GLdouble __gl_transEval(GLUvertex *u, GLUvertex *v, GLUvertex *w)
#define RealInterpolate(a, x, b, y)
GLdouble __gl_edgeEval(GLUvertex *u, GLUvertex *v, GLUvertex *w)
void __gl_edgeIntersect(GLUvertex *o1, GLUvertex *d1, GLUvertex *o2, GLUvertex *d2, GLUvertex *v)
#define Interpolate(a, x, b, y)
int __gl_vertLeq(GLUvertex *u, GLUvertex *v)
GLdouble __gl_transSign(GLUvertex *u, GLUvertex *v, GLUvertex *w)
#define TransEval(u, v, w)
#define EdgeSign(u, v, w)
#define TransSign(u, v, w)
#define EdgeEval(u, v, w)