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

Comparing ray/src/util/rad.c (file contents):
Revision 2.41 by greg, Mon Oct 24 13:49:16 1994 UTC vs.
Revision 2.44 by greg, Fri Aug 18 10:39:56 1995 UTC

# Line 49 | Line 49 | int    onevalue(), catvalues(), boolvalue(),
49   #define PENUMBRAS       20              /* shadow penumbras are desired */
50   #define VARIABILITY     21              /* level of light variability */
51   #define REPORT          22              /* report frequency and errfile */
52 + #define RAWSAVE         23              /* save raw picture file */
53                                  /* total number of variables */
54 < #define NVARS           23
54 > #define NVARS           24
55  
56   VARIABLE        vv[NVARS] = {           /* variable-value pairs */
57          {"objects",     3,      0,      NULL,   catvalues},
# Line 76 | Line 77 | VARIABLE       vv[NVARS] = {           /* variable-value pairs */
77          {"PENUMBRAS",   3,      0,      NULL,   boolvalue},
78          {"VARIABILITY", 3,      0,      NULL,   qualvalue},
79          {"REPORT",      3,      0,      NULL,   onevalue},
80 +        {"RAWSAVE",     3,      0,      NULL,   boolvalue},
81   };
82  
83   VARIABLE        *matchvar();
# Line 647 | Line 649 | setdefaults()                  /* set default values for unassigned v
649                  vval(VARIABILITY) = "L";
650                  vdef(VARIABILITY)++;
651          }
652 +        if (!vdef(RAWSAVE)) {
653 +                vval(RAWSAVE) = "F";
654 +                vdef(RAWSAVE)++;
655 +        }
656   }
657  
658  
# Line 1042 | Line 1048 | char   *po;
1048          }
1049          po = addarg(po, "-pt .04");
1050          if (vbool(PENUMBRAS))
1051 <                op = addarg(op, "-ds .1 -dj .7");
1051 >                op = addarg(op, "-ds .1 -dj .65");
1052          else
1053                  op = addarg(op, "-ds .2");
1054          op = addarg(op, "-dt .05 -dc .75 -dr 3 -sj 1 -st .01");
# Line 1179 | Line 1185 | register char  *vs;
1185                  zpos = -1; vs++;
1186          }
1187          viewtype = 'v';
1188 <        if (*vs == 'v' | *vs == 'l' | *vs == 'a' | *vs == 'h')
1188 >        if (*vs == 'v' | *vs == 'l' | *vs == 'a' | *vs == 'h' | *vs == 'c')
1189                  viewtype = *vs++;
1190          cp = viewopts;
1191          if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) {       /* got one! */
# Line 1234 | Line 1240 | register char  *vs;
1240                  case 'h':
1241                          cp = addarg(cp, "-vh 180 -vv 180");
1242                          break;
1243 +                case 'c':
1244 +                        cp = addarg(cp, "-vh 180 -vv 90");
1245 +                        break;
1246                  }
1247          } else {
1248                  while (!isspace(*vs))           /* else skip id */
# Line 1493 | Line 1502 | char   *opts, *po;
1502                          unlink(picfile);
1503                          exit(1);
1504                  }
1505 <                                                /* remove raw file */
1506 <                rmfile(rawfile);
1505 >                                                /* remove/rename raw file */
1506 >                if (vbool(RAWSAVE)) {
1507 >                        sprintf(combuf, "%s_%s.rwp", vval(PICTURE), vs);
1508 >                        mvfile(rawfile, combuf);
1509 >                } else
1510 >                        rmfile(rawfile);
1511          }
1512   }
1513  
# Line 1539 | Line 1552 | char   *fn;
1552          if (noaction)
1553                  return(0);
1554          return(unlink(fn));
1555 + }
1556 +
1557 +
1558 + mvfile(fold, fnew)              /* move a file */
1559 + char    *fold, *fnew;
1560 + {
1561 +        if (!silent)
1562 + #ifdef MSDOS
1563 +                printf("\trename %s %s\n", fold, fnew);
1564 + #else
1565 +                printf("\tmv %s %s\n", fold, fnew);
1566 + #endif
1567 +        if (noaction)
1568 +                return(0);
1569 +        return(rename(fold, fnew));
1570   }
1571  
1572  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines