26 |
|
#define S_ALL 3 /* select all */ |
27 |
|
|
28 |
|
/* rtrace command and defaults */ |
29 |
< |
char *rtargv[64] = { "rtrace", "-dj", ".25", "-dr", "3", "-di+", |
29 |
> |
char *rtargv[64] = { "rtrace", "-dj", ".25", "-dr", "3", "-dv-", |
30 |
|
"-ab", "2", "-ad", "256", "-as", "128", "-aa", ".15", }; |
31 |
|
int rtargc = 14; |
32 |
|
/* overriding rtrace options */ |
33 |
< |
char *myrtopts[] = { "-I-", "-i-", "-ov", "-h-", "-fff", NULL }; |
33 |
> |
char *myrtopts[] = { "-I-", "-i-", "-ov", "-h-", "-fff", "-y", "0", NULL }; |
34 |
|
|
35 |
|
struct rtproc rt; /* our rtrace process */ |
36 |
|
|
76 |
|
gargv = argv; |
77 |
|
/* set up rtrace command */ |
78 |
|
for (i = 1; i < argc; i++) { |
79 |
< |
if (argv[i][0] == '<' && !argv[i][1]) |
79 |
> |
if (argv[i][0] == '<' && argv[i][1] == '\0') |
80 |
|
break; |
81 |
|
rtargv[rtargc++] = argv[i]; |
82 |
|
if (argv[i][0] == '-' && argv[i][1] == 'w') |
83 |
< |
warnings = !warnings; |
83 |
> |
switch (argv[i][2]) { |
84 |
> |
case '\0': |
85 |
> |
warnings = !warnings; |
86 |
> |
break; |
87 |
> |
case '+': |
88 |
> |
case 'T': case 't': |
89 |
> |
case 'Y': case 'y': |
90 |
> |
case '1': |
91 |
> |
warnings = 1; |
92 |
> |
break; |
93 |
> |
case '-': |
94 |
> |
case 'F': case 'f': |
95 |
> |
case 'N': case 'n': |
96 |
> |
case '0': |
97 |
> |
warnings = 0; |
98 |
> |
break; |
99 |
> |
} |
100 |
|
} |
101 |
< |
if ((gargc = i) < 2) |
86 |
< |
error(USER, "too few arguments"); |
101 |
> |
gargc = i; |
102 |
|
rtargc--; |
103 |
|
for (i = 0; myrtopts[i] != NULL; i++) |
104 |
|
rtargv[rtargc++] = myrtopts[i]; |
117 |
|
perror(rtpath); |
118 |
|
exit(1); |
119 |
|
} |
120 |
+ |
if (gargc < 2 || argv[gargc-1][0] == '-') |
121 |
+ |
error(USER, "missing octree argument"); |
122 |
|
/* else initialize and run our calculation */ |
123 |
|
init(); |
124 |
|
if (gargc+1 < argc) |
402 |
|
{ |
403 |
|
printf("m=%-15s\t\t# material name\n", thisillum.matname); |
404 |
|
printf("f=%-15s\t\t# data file name\n", thisillum.datafile); |
405 |
< |
printf("c=n\t\t\t\t# color none\n"); |
405 |
> |
if (thisillum.flags & IL_COLAVG) |
406 |
> |
if (thisillum.flags & IL_COLDST) |
407 |
> |
printf("c=d\t\t\t\t# color distribution\n"); |
408 |
> |
else |
409 |
> |
printf("c=a\t\t\t\t# color average\n"); |
410 |
> |
else |
411 |
> |
printf("c=n\t\t\t\t# color none\n"); |
412 |
> |
if (thisillum.flags & IL_LIGHT) |
413 |
> |
printf("l+\t\t\t\t# light type on\n"); |
414 |
> |
else |
415 |
> |
printf("l-\t\t\t\t# light type off\n"); |
416 |
|
printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens); |
417 |
|
printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps); |
418 |
|
printf("b=%f\t\t\t# minimum average brightness\n", thisillum.minbrt); |