1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ SGI"; |
28 |
|
#define MAXCONE 16 /* number of different cone sizes */ |
29 |
|
#endif |
30 |
|
#ifndef MAXVERT |
31 |
< |
#define MAXVERT 32 /* maximum number of cone vertices */ |
31 |
> |
#define MAXVERT 64 /* maximum number of cone vertices */ |
32 |
|
#endif |
33 |
|
#ifndef MINVERT |
34 |
|
#define MINVERT 4 /* minimum number of cone vertices */ |
264 |
|
} |
265 |
|
|
266 |
|
|
267 |
+ |
dev_auxcom(cmd, args) /* process an auxiliary command */ |
268 |
+ |
char *cmd, *args; |
269 |
+ |
{ |
270 |
+ |
sprintf(errmsg, "%s: unknown command", cmd); |
271 |
+ |
error(COMMAND, errmsg); |
272 |
+ |
} |
273 |
+ |
|
274 |
+ |
|
275 |
+ |
VIEW * |
276 |
+ |
dev_auxview(n, hvres) /* return nth auxiliary view */ |
277 |
+ |
int n; |
278 |
+ |
int hvres[2]; |
279 |
+ |
{ |
280 |
+ |
if (n) |
281 |
+ |
return(NULL); |
282 |
+ |
hvres[0] = odev.hres; hvres[1] = odev.vres; |
283 |
+ |
return(&odev.v); |
284 |
+ |
} |
285 |
+ |
|
286 |
+ |
|
287 |
|
int |
288 |
|
dev_input() /* get X11 input */ |
289 |
|
{ |
379 |
|
for (i = 0; i < MAXCONE; i++) { |
380 |
|
d = (double)i/(MAXCONE-1); d *= d; /* x^2 distribution */ |
381 |
|
cone[i].rad = minrad + (1.-minrad)*d; |
382 |
< |
cone[i].nverts = MINVERT + (MAXVERT-MINVERT)*d; |
382 |
> |
cone[i].nverts = MINVERT + 0.5 + (MAXVERT-MINVERT)*d; |
383 |
|
cone[i].va = (FVECT *)malloc(cone[i].nverts*sizeof(FVECT)); |
384 |
|
if (cone[i].va == NULL) |
385 |
|
error(SYSTEM, "out of memory in initcones"); |