89 |
|
} |
90 |
|
|
91 |
|
|
92 |
+ |
static void |
93 |
+ |
myCombine(coords, vertex_data, weight, dataOut) |
94 |
+ |
register GLdouble coords[3]; |
95 |
+ |
GLdouble *vertex_data[4]; |
96 |
+ |
GLfloat weight[4]; |
97 |
+ |
GLdouble **dataOut; |
98 |
+ |
{ |
99 |
+ |
register GLdouble *newvert; |
100 |
+ |
|
101 |
+ |
newvert = (GLdouble *)malloc(3*sizeof(GLdouble)); |
102 |
+ |
if (newvert == NULL) |
103 |
+ |
error(SYSTEM, "out of memory in myCombine"); |
104 |
+ |
VCOPY(newvert, coords); /* no data, just coordinates */ |
105 |
+ |
*dataOut = newvert; |
106 |
+ |
} |
107 |
+ |
|
108 |
+ |
|
109 |
|
static |
110 |
|
newtess() /* allocate GLU tessellation object */ |
111 |
|
{ |
114 |
|
gluTessCallback(gluto, GLU_TESS_BEGIN, glBegin); |
115 |
|
gluTessCallback(gluto, GLU_TESS_VERTEX, glVertex3dv); |
116 |
|
gluTessCallback(gluto, GLU_TESS_END, glEnd); |
117 |
+ |
gluTessCallback(gluto, GLU_TESS_COMBINE, myCombine); |
118 |
|
gluTessCallback(gluto, GLU_TESS_ERROR, glu_error); |
119 |
|
gluTessProperty(gluto, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO); |
120 |
|
} |
247 |
|
objerror(o, USER, "illegal radii"); |
248 |
|
if (o->oargs.farg[6] <= FTINY && (iscyl || o->oargs.farg[7] <= FTINY)) |
249 |
|
return; |
250 |
< |
if (o->oargs.farg[6] < 0.) /* complains for tiny neg's */ |
251 |
< |
o->oargs.farg[6] = 0.; |
252 |
< |
if (!iscyl && o->oargs.farg[7] < 0.) |
253 |
< |
o->oargs.farg[7] = 0.; |
250 |
> |
if (!iscyl) { |
251 |
> |
if (o->oargs.farg[6] < 0.) /* complains for tiny neg's */ |
252 |
> |
o->oargs.farg[6] = 0.; |
253 |
> |
if (o->oargs.farg[7] < 0.) |
254 |
> |
o->oargs.farg[7] = 0.; |
255 |
> |
} |
256 |
|
cent[0] = .5*(o->oargs.farg[0] + o->oargs.farg[3]); |
257 |
|
cent[1] = .5*(o->oargs.farg[1] + o->oargs.farg[4]); |
258 |
|
cent[2] = .5*(o->oargs.farg[2] + o->oargs.farg[5]); |