176 |
a2, d2, th2, lerp(p0.z, p2.z, .5)); |
a2, d2, th2, lerp(p0.z, p2.z, .5)); |
177 |
// Render it. XXX -- jvk, you need to make this |
// Render it. XXX -- jvk, you need to make this |
178 |
// render the solid fillet. |
// render the solid fillet. |
179 |
if(sp.split()) { |
if(!(flags & 8)) { |
180 |
if(flags & 1) { |
if(sp.split()) { |
181 |
ZVec intern; |
if(flags & 1) { |
182 |
glBegin(GL_QUAD_STRIP); |
ZVec intern; |
183 |
for(float f = 0; f < .5; f+= 1.0 / ndice) { |
glBegin(GL_QUAD_STRIP); |
184 |
ZVec p = sp.point(f, BlendSimply(), &intern); |
for(float f = 0; f < .5; f+= 1.0 / ndice) { |
185 |
v(p); |
ZVec p = sp.point(f, BlendSimply(), &intern); |
186 |
v(intern); |
v(p); |
187 |
} |
v(intern); |
188 |
glEnd(); |
} |
189 |
glBegin(GL_QUAD_STRIP); |
glEnd(); |
190 |
for(float f = 1; f > .5; f-= 1.0 / ndice) { |
glBegin(GL_QUAD_STRIP); |
191 |
ZVec p = sp.point(f, BlendSimply(), &intern); |
for(float f = 1; f > .5; f-= 1.0 / ndice) { |
192 |
v(p); |
ZVec p = sp.point(f, BlendSimply(), &intern); |
193 |
v(intern); |
v(p); |
194 |
|
v(intern); |
195 |
|
} |
196 |
|
glEnd(); |
197 |
|
} |
198 |
|
if(flags & 2) { |
199 |
|
glBegin(GL_LINE_STRIP); |
200 |
|
for(float f = 0; f < .5; f+= 1.0 / ndice) { |
201 |
|
ZVec p = sp.point(f, BlendSimply()); |
202 |
|
vl(p); |
203 |
|
} |
204 |
|
glEnd(); |
205 |
|
glBegin(GL_LINE_STRIP); |
206 |
|
for(float f = 1; f > .5; f-= 1.0 / ndice) { |
207 |
|
ZVec p = sp.point(f, BlendSimply()); |
208 |
|
vl(p); |
209 |
|
} |
210 |
|
glEnd(); |
211 |
|
} |
212 |
|
} else { |
213 |
|
if(flags & 1) { |
214 |
|
ZVec intern; |
215 |
|
glBegin(GL_QUAD_STRIP); |
216 |
|
for(float f = 0; f < 1; f+= 1.0 / ndice) { |
217 |
|
ZVec p = sp.point(f, BlendSimply(), &intern); |
218 |
|
v(p); |
219 |
|
v(intern); |
220 |
|
} |
221 |
|
glEnd(); |
222 |
|
} |
223 |
|
if(flags & 2) { |
224 |
|
glBegin(GL_LINE_STRIP); |
225 |
|
for(float f = 0; f < 1; f+= 1.0 / ndice) { |
226 |
|
ZVec p = sp.point(f, BlendSimply(), 0); |
227 |
|
vl(p); |
228 |
|
} |
229 |
|
glEnd(); |
230 |
} |
} |
|
glEnd(); |
|
|
} |
|
|
if(flags & 2) { |
|
|
glBegin(GL_LINE_STRIP); |
|
|
for(float f = 0; f < .5; f+= 1.0 / ndice) { |
|
|
ZVec p = sp.point(f, BlendSimply()); |
|
|
vl(p); |
|
|
} |
|
|
glEnd(); |
|
|
glBegin(GL_LINE_STRIP); |
|
|
for(float f = 1; f > .5; f-= 1.0 / ndice) { |
|
|
ZVec p = sp.point(f, BlendSimply()); |
|
|
vl(p); |
|
|
} |
|
|
glEnd(); |
|
231 |
} |
} |
232 |
} else { |
} else { |
233 |
|
// Render non-filleted connection |
234 |
if(flags & 1) { |
if(flags & 1) { |
235 |
ZVec intern; |
glBegin(GL_TRIANGLE_FAN); |
236 |
glBegin(GL_QUAD_STRIP); |
v(ctr); |
237 |
for(float f = 0; f < 1; f+= 1.0 / ndice) { |
for(float f = 0; f <= 1; f+= 1.0 / ndice) { |
238 |
ZVec p = sp.point(f, BlendSimply(), &intern); |
float a = lerp(a1, a2, f); |
239 |
|
ZVec p = ctr + dirVec(a) * csize; |
240 |
v(p); |
v(p); |
|
v(intern); |
|
241 |
} |
} |
242 |
glEnd(); |
glEnd(); |
243 |
} |
} |
244 |
if(flags & 2) { |
if (flags & 2) { |
245 |
glBegin(GL_LINE_STRIP); |
glBegin(GL_LINE_STRIP); |
246 |
for(float f = 0; f < 1; f+= 1.0 / ndice) { |
ZVec p = 0.5 * (p0 + p1); |
247 |
ZVec p = sp.point(f, BlendSimply(), 0); |
vl(p); |
248 |
|
for(float f = 0; f <= 1.0; f+= 1.0 / ndice) { |
249 |
|
float a = lerp(a1, a2, f); |
250 |
|
ZVec p = ctr + dirVec(a) * csize; |
251 |
vl(p); |
vl(p); |
252 |
} |
} |
253 |
glEnd(); |
glEnd(); |
254 |
} |
} |
255 |
|
|
256 |
} |
} |
257 |
} |
} |
258 |
}; |
}; |