Go to the source code of this file.
|
| #define | VertEq(u, v) ((u)->s == (v)->s && (u)->t == (v)->t) |
| |
| #define | VertLeq(u, v) |
| |
| #define | EdgeEval(u, v, w) __gl_edgeEval(u,v,w) |
| |
| #define | EdgeSign(u, v, w) __gl_edgeSign(u,v,w) |
| |
| #define | TransLeq(u, v) |
| |
| #define | TransEval(u, v, w) __gl_transEval(u,v,w) |
| |
| #define | TransSign(u, v, w) __gl_transSign(u,v,w) |
| |
| #define | EdgeGoesLeft(e) VertLeq( (e)->Dst, (e)->Org ) |
| |
| #define | EdgeGoesRight(e) VertLeq( (e)->Org, (e)->Dst ) |
| |
| #define | ABS(x) ((x) < 0 ? -(x) : (x)) |
| |
| #define | VertL1dist(u, v) (ABS(u->s - v->s) + ABS(u->t - v->t)) |
| |
| #define | VertCCW(u, v, w) __gl_vertCCW(u,v,w) |
| |
|
| int | __gl_vertLeq (GLUvertex *u, GLUvertex *v) |
| |
| GLdouble | __gl_edgeEval (GLUvertex *u, GLUvertex *v, GLUvertex *w) |
| |
| GLdouble | __gl_edgeSign (GLUvertex *u, GLUvertex *v, GLUvertex *w) |
| |
| GLdouble | __gl_transEval (GLUvertex *u, GLUvertex *v, GLUvertex *w) |
| |
| GLdouble | __gl_transSign (GLUvertex *u, GLUvertex *v, GLUvertex *w) |
| |
| int | __gl_vertCCW (GLUvertex *u, GLUvertex *v, GLUvertex *w) |
| |
| void | __gl_edgeIntersect (GLUvertex *o1, GLUvertex *d1, GLUvertex *o2, GLUvertex *d2, GLUvertex *v) |
| |
◆ ABS
| #define ABS |
( |
|
x | ) |
((x) < 0 ? -(x) : (x)) |
◆ EdgeEval
◆ EdgeGoesLeft
| #define EdgeGoesLeft |
( |
|
e | ) |
VertLeq( (e)->Dst, (e)->Org ) |
◆ EdgeGoesRight
| #define EdgeGoesRight |
( |
|
e | ) |
VertLeq( (e)->Org, (e)->Dst ) |
◆ EdgeSign
◆ TransEval
◆ TransLeq
| #define TransLeq |
( |
|
u, |
|
|
|
v |
|
) |
| |
Value: (((u)->t < (v)->t) || \
((u)->t == (v)->t && (u)->s <= (v)->s))
◆ TransSign
◆ VertCCW
◆ VertEq
| #define VertEq |
( |
|
u, |
|
|
|
v |
|
) |
| ((u)->s == (v)->s && (u)->t == (v)->t) |
◆ VertL1dist
| #define VertL1dist |
( |
|
u, |
|
|
|
v |
|
) |
| (ABS(u->s - v->s) + ABS(u->t - v->t)) |
◆ VertLeq
Value: (((u)->s < (v)->s) || \
((u)->s == (v)->s && (u)->t <= (v)->t))
◆ __gl_edgeEval()
48{
49
50
51
52
53
54
55
56
57
58
60
62
65
66 if( gapL + gapR > 0 ) {
67 if( gapL < gapR ) {
68 return (v->
t - u->
t) + (u->
t - w->
t) * (gapL / (gapL + gapR));
69 } else {
70 return (v->
t - w->
t) + (w->
t - u->
t) * (gapR / (gapL + gapR));
71 }
72 }
73
74 return 0;
75}
#define VertLeq(u, v)
Definition geom.h:50
double GLdouble
Definition glu-libtess.h:65
GLdouble t
Definition mesh.h:122
GLdouble s
Definition mesh.h:122
References GLUvertex::s, GLUvertex::t, and VertLeq.
◆ __gl_edgeIntersect()
210{
212
213
214
215
216
217
218
219
220
224
226
227 v->
s = (o2->
s + d1->
s) / 2;
228 }
else if(
VertLeq( d1, d2 )) {
229
232 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
234 } else {
235
238 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
240 }
241
242
243
247
249
250 v->
t = (o2->
t + d1->
t) / 2;
252
255 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
257 } else {
258
261 if( z1+z2 < 0 ) { z1 = -z1; z2 = -z2; }
263 }
264}
#define Interpolate(a, x, b, y)
Definition geom.c:179
#define Swap(a, b)
Definition geom.c:201
#define TransEval(u, v, w)
Definition geom.h:61
#define TransLeq(u, v)
Definition geom.h:59
#define EdgeSign(u, v, w)
Definition geom.h:55
#define TransSign(u, v, w)
Definition geom.h:62
#define EdgeEval(u, v, w)
Definition geom.h:54
References EdgeEval, EdgeSign, Interpolate, GLUvertex::s, Swap, GLUvertex::t, TransEval, TransLeq, TransSign, and VertLeq.
Referenced by CheckForIntersect().
◆ __gl_edgeSign()
78{
79
80
81
82
84
86
89
90 if( gapL + gapR > 0 ) {
91 return (v->
t - w->
t) * gapL + (v->
t - u->
t) * gapR;
92 }
93
94 return 0;
95}
References GLUvertex::s, GLUvertex::t, and VertLeq.
◆ __gl_transEval()
103{
104
105
106
107
108
109
110
111
112
113
115
117
120
121 if( gapL + gapR > 0 ) {
122 if( gapL < gapR ) {
123 return (v->
s - u->
s) + (u->
s - w->
s) * (gapL / (gapL + gapR));
124 } else {
125 return (v->
s - w->
s) + (w->
s - u->
s) * (gapR / (gapL + gapR));
126 }
127 }
128
129 return 0;
130}
References GLUvertex::s, GLUvertex::t, and TransLeq.
◆ __gl_transSign()
133{
134
135
136
137
139
141
144
145 if( gapL + gapR > 0 ) {
146 return (v->
s - w->
s) * gapL + (v->
s - u->
s) * gapR;
147 }
148
149 return 0;
150}
References GLUvertex::s, GLUvertex::t, and TransLeq.
◆ __gl_vertCCW()
◆ __gl_vertLeq()