26 |
|
|
27 |
|
FILE *matfp; /* material output file */ |
28 |
|
|
29 |
+ |
int dospectra = 0; /* output spectral colors? */ |
30 |
|
|
31 |
+ |
|
32 |
|
extern int r_comment(int ac, char **av); |
33 |
|
extern int r_color(int ac, char **av); |
34 |
|
extern int r_cone(int ac, char **av); |
109 |
|
} |
110 |
|
printf(" %s", argv[i]); |
111 |
|
break; |
112 |
+ |
case 's': /* spectral color output? */ |
113 |
+ |
dospectra = !dospectra; |
114 |
+ |
break; |
115 |
|
default: |
116 |
|
goto userr; |
117 |
|
} |
137 |
|
} |
138 |
|
exit(0); |
139 |
|
userr: |
140 |
< |
fprintf(stderr, "Usage: %s [-g dist][-e mult][-m matf] [file.mgf] ..\n", |
140 |
> |
fprintf(stderr, "Usage: %s [-s][-g dist][-e mult][-m matf] [file.mgf] ..\n", |
141 |
|
argv[0]); |
142 |
|
exit(1); |
143 |
|
} |
693 |
|
double mult; |
694 |
|
int cbeg, cend, i; |
695 |
|
|
696 |
< |
if (!(clr->flags & C_CDSPEC)) { /* not defined spectrally? */ |
696 |
> |
if (!dospectra | !(clr->flags & C_CDSPEC)) { |
697 |
|
cvtcolor(radrgb, clr, intensity); |
698 |
< |
return("void"); |
698 |
> |
return("void"); /* just use RGB */ |
699 |
|
} |
700 |
|
setcolor(radrgb, intensity, intensity, intensity); |
701 |
|
for (cbeg = 0; cbeg < C_CNSS; cbeg++) /* trim zeros off beginning */ |