ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rv2.c
(Generate patch)

Comparing ray/src/rt/rv2.c (file contents):
Revision 2.6 by greg, Fri Jan 17 09:27:17 1992 UTC vs.
Revision 2.9 by greg, Mon Apr 6 18:04:19 1992 UTC

# Line 1 | Line 1
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";
# Line 65 | Line 65 | char  *s;
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) {
# Line 297 | Line 307 | char  *s;
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                  }
# Line 386 | Line 396 | register char  *s;
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;
# Line 464 | Line 473 | register char  *s;
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines