186 |
|
getaim(s) /* aim camera */ |
187 |
|
char *s; |
188 |
|
{ |
189 |
– |
extern double tan(), atan(); |
189 |
|
double zfact; |
190 |
|
VIEW nv; |
191 |
|
|
216 |
|
getrotate(s) /* rotate camera */ |
217 |
|
char *s; |
218 |
|
{ |
220 |
– |
extern double normalize(), tan(), atan(); |
219 |
|
VIEW nv; |
220 |
|
FVECT v1; |
221 |
|
double angle, elev, zfact; |
287 |
|
for (cp++; isspace(*cp); cp++) |
288 |
|
; |
289 |
|
if (*cp == '\0') { /* interactive */ |
290 |
< |
sprintf(buf, "exposure (%lf): ", exposure); |
290 |
> |
sprintf(buf, "exposure (%f): ", exposure); |
291 |
|
(*dev->comout)(buf); |
292 |
|
(*dev->comin)(buf, NULL); |
293 |
|
for (cp = buf; isspace(*cp); cp++) |
305 |
|
e *= atof(cp); |
306 |
|
} |
307 |
|
if (p != NULL) { /* relative setting */ |
308 |
< |
if (bright(p->v) < 1e-25) { |
308 |
> |
if (bright(p->v) < 1e-15) { |
309 |
|
error(COMMAND, "cannot normalize to zero"); |
310 |
|
return; |
311 |
|
} |
398 |
|
extern int ambdiv; |
399 |
|
extern int ambssamp; |
400 |
|
extern int ambounce; |
401 |
< |
extern int directinvis; |
401 |
> |
extern int directvis; |
402 |
|
extern double srcsizerat; |
403 |
|
extern int do_irrad; |
404 |
|
extern double specjitter; |
435 |
|
case 't': /* threshold */ |
436 |
|
getparam(s+2, "direct threshold", 'r', &shadthresh); |
437 |
|
break; |
438 |
< |
case 'i': /* invisibility */ |
439 |
< |
getparam(s+2, "direct invisibility", |
440 |
< |
'b', &directinvis); |
438 |
> |
case 'v': /* visibility */ |
439 |
> |
getparam(s+2, "direct visibility", |
440 |
> |
'b', &directvis); |
441 |
|
break; |
442 |
|
case 's': /* sampling */ |
443 |
|
getparam(s+2, "direct sampling", 'r', &srcsizerat); |
455 |
|
case 'a': /* ambient */ |
456 |
|
switch (s[1]) { |
457 |
|
case 'v': /* value */ |
458 |
< |
getparam(s+2, "ambient value", 'C', ambval); |
458 |
> |
getparam(s+2, "ambient value", 'C', (COLOR *)ambval); |
459 |
|
break; |
460 |
|
case 'a': /* accuracy */ |
461 |
|
getparam(s+2, "ambient accuracy", 'r', &ambacc); |
593 |
|
error(COMMAND, errmsg); |
594 |
|
return; |
595 |
|
} |
596 |
+ |
#ifdef MSDOS |
597 |
+ |
setmode(fileno(fp), O_BINARY); |
598 |
+ |
#endif |
599 |
|
(*dev->comout)("writing \""); |
600 |
|
(*dev->comout)(fname); |
601 |
|
(*dev->comout)("\"...\n"); |