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.8 by greg, Wed Mar 4 16:52:10 1992 UTC vs.
Revision 2.15 by greg, Mon Mar 8 12:37:35 1993 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 176 | Line 186 | char  *s;
186   getaim(s)                               /* aim camera */
187   char  *s;
188   {
179        extern double  tan(), atan();
189          double  zfact;
190          VIEW  nv;
191  
# Line 207 | Line 216 | char  *s;
216   getrotate(s)                            /* rotate camera */
217   char  *s;
218   {
210        extern double  normalize(), tan(), atan();
219          VIEW  nv;
220          FVECT  v1;
221          double  angle, elev, zfact;
# Line 279 | Line 287 | char  *s;
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++)
# Line 297 | Line 305 | char  *s;
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                  }
# Line 390 | Line 398 | register char  *s;
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;
# Line 427 | Line 435 | register char  *s;
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);
# Line 447 | Line 455 | register char  *s;
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);
# Line 585 | Line 593 | char  *s;
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");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines