--- ray/src/rt/rv2.c 1992/02/18 16:38:51 2.7 +++ ray/src/rt/rv2.c 1992/10/02 16:19:43 2.10 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1992 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -65,6 +65,16 @@ char *s; int change = 0; VIEW nv; + while (isspace(*s)) + s++; + if (*s == '-') { /* command line parameters */ + copystruct(&nv, &ourview); + if (sscanview(&nv, s)) + newview(&nv); + else + error(COMMAND, "bad view option(s)"); + return; + } if (sscanf(s, "%s", buf) == 1) { /* write parameters to a file */ if ((fname = getpath(buf, NULL, 0)) == NULL || (fp = fopen(fname, "a")) == NULL) { @@ -176,7 +186,6 @@ char *s; getaim(s) /* aim camera */ char *s; { - extern double tan(), atan(); double zfact; VIEW nv; @@ -207,7 +216,6 @@ char *s; getrotate(s) /* rotate camera */ char *s; { - extern double normalize(), tan(), atan(); VIEW nv; FVECT v1; double angle, elev, zfact; @@ -386,7 +394,6 @@ register char *s; extern double shadcert; extern COLOR ambval; extern double ambacc; - extern double minarad; extern int ambres; extern int ambdiv; extern int ambssamp; @@ -464,8 +471,7 @@ register char *s; break; case 'r': if (getparam(s+2, "ambient resolution", 'i', &ambres)) - minarad = ambres > 0 ? - thescene.cusize/ambres : 0.0; + setambres(ambres); break; default: goto badparam;