1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
65 |
|
int change = 0; |
66 |
|
VIEW nv; |
67 |
|
|
68 |
+ |
while (isspace(*s)) |
69 |
+ |
s++; |
70 |
+ |
if (*s == '-') { /* command line parameters */ |
71 |
+ |
copystruct(&nv, &ourview); |
72 |
+ |
if (sscanview(&nv, s)) |
73 |
+ |
newview(&nv); |
74 |
+ |
else |
75 |
+ |
error(COMMAND, "bad view option(s)"); |
76 |
+ |
return; |
77 |
+ |
} |
78 |
|
if (sscanf(s, "%s", buf) == 1) { /* write parameters to a file */ |
79 |
|
if ((fname = getpath(buf, NULL, 0)) == NULL || |
80 |
|
(fp = fopen(fname, "a")) == NULL) { |
307 |
|
e *= atof(cp); |
308 |
|
} |
309 |
|
if (p != NULL) { /* relative setting */ |
310 |
< |
if (bright(p->v) <= FTINY) { |
310 |
> |
if (bright(p->v) < 1e-25) { |
311 |
|
error(COMMAND, "cannot normalize to zero"); |
312 |
|
return; |
313 |
|
} |
396 |
|
extern double shadcert; |
397 |
|
extern COLOR ambval; |
398 |
|
extern double ambacc; |
389 |
– |
extern double minarad; |
399 |
|
extern int ambres; |
400 |
|
extern int ambdiv; |
401 |
|
extern int ambssamp; |
473 |
|
break; |
474 |
|
case 'r': |
475 |
|
if (getparam(s+2, "ambient resolution", 'i', &ambres)) |
476 |
< |
minarad = ambres > 0 ? |
468 |
< |
thescene.cusize/ambres : 0.0; |
476 |
> |
setambres(ambres); |
477 |
|
break; |
478 |
|
default: |
479 |
|
goto badparam; |