15 |
|
#include <ctype.h> |
16 |
|
|
17 |
|
/* default parameters */ |
18 |
< |
#define SAMPDENS 128 /* points per projected steradian */ |
18 |
> |
#define SAMPDENS 48 /* points per projected steradian */ |
19 |
|
#define NSAMPS 32 /* samples per point */ |
20 |
|
#define DFLMAT "illum_mat" /* material name */ |
21 |
|
/* selection options */ |
89 |
|
rtargv[rtargc] = NULL; |
90 |
|
/* just asking for defaults? */ |
91 |
|
if (!strcmp(argv[gargc-1], "-defaults")) { |
92 |
+ |
printopts(); fflush(stdout); |
93 |
|
rtpath = getpath(rtargv[0], getenv("PATH"), X_OK); |
94 |
|
if (rtpath == NULL) { |
95 |
|
eputs(rtargv[0]); |
269 |
|
case 'e': /* exclude material */ |
270 |
|
if (cp[1] != '=') |
271 |
|
break; |
272 |
< |
matselect = (*++cp == 'i') ? S_ELEM : S_COMPL; |
273 |
< |
atos(matcheck, MAXSTR, ++cp); |
272 |
> |
matselect = (*cp == 'i') ? S_ELEM : S_COMPL; |
273 |
> |
cp += 2; |
274 |
> |
atos(matcheck, MAXSTR, cp); |
275 |
|
cp = sskip(cp); |
276 |
|
continue; |
277 |
|
case 'a': /* use everything */ |
342 |
|
doneheader = 0; |
343 |
|
continue; |
344 |
|
case '!': /* processed file! */ |
345 |
< |
sprintf(errmsg, "(%s): processed by mkillum already!", |
344 |
< |
nm); |
345 |
> |
sprintf(errmsg, "(%s): already processed!", nm); |
346 |
|
error(WARNING, errmsg); |
347 |
+ |
matselect = S_NONE; |
348 |
|
return; |
349 |
|
} |
350 |
|
opterr: /* skip faulty option */ |
364 |
|
} |
365 |
|
/* print pure comment */ |
366 |
|
printf("# %s", s+2); |
367 |
+ |
} |
368 |
+ |
|
369 |
+ |
|
370 |
+ |
printopts() /* print out option default values */ |
371 |
+ |
{ |
372 |
+ |
printf("m=%s\t\t\t# material name\n", thisillum.matname); |
373 |
+ |
printf("f=%s\t\t\t# data file name\n", thisillum.datafile); |
374 |
+ |
printf("c=n\t\t\t\t# color none\n"); |
375 |
+ |
printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens); |
376 |
+ |
printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps); |
377 |
|
} |
378 |
|
|
379 |
|
|