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

Comparing ray/src/gen/mkillum.c (file contents):
Revision 1.7 by greg, Thu Jul 25 12:52:16 1991 UTC vs.
Revision 1.12 by greg, Fri Aug 23 12:30:29 1991 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include  <ctype.h>
16  
17                                  /* default parameters */
18 < #define  SAMPDENS       128             /* points per projected steradian */
18 > #define  SAMPDENS       48              /* points per projected steradian */
19   #define  NSAMPS         32              /* samples per point */
20   #define  DFLMAT         "illum_mat"     /* material name */
21 + #define  DFLDAT         "illum"         /* data file name */
22                                  /* selection options */
23   #define  S_NONE         0               /* select none */
24   #define  S_ELEM         1               /* select specified element */
# Line 36 | Line 37 | struct rtproc  rt;             /* our rtrace process */
37   struct illum_args  thisillum = {        /* our illum and default values */
38                  0,
39                  DFLMAT,
40 <                DFLMAT,
40 >                DFLDAT,
41                  0,
42                  VOIDID,
43                  SAMPDENS,
44                  NSAMPS,
45 +                0.,
46          };
47  
48   char    matcheck[MAXSTR];       /* current material to include or exclude */
# Line 89 | Line 91 | char   *argv[];
91          rtargv[rtargc] = NULL;
92                                  /* just asking for defaults? */
93          if (!strcmp(argv[gargc-1], "-defaults")) {
94 +                printopts(); fflush(stdout);
95                  rtpath = getpath(rtargv[0], getenv("PATH"), X_OK);
96                  if (rtpath == NULL) {
97                          eputs(rtargv[0]);
# Line 256 | Line 259 | char   *nm;
259                                  break;
260                          if (!*++cp) {
261                                  strcpy(thisillum.datafile,thisillum.matname);
262 +                                thisillum.dfnum = 0;
263                                  thisillum.flags &= ~IL_DATCLB;
264                                  continue;
265                          }
# Line 326 | Line 330 | char   *nm;
330                                  break;
331                          cp++;
332                          continue;
333 +                case 'b':                       /* brightness */
334 +                        if (*++cp != '=')
335 +                                break;
336 +                        if (!isfltd(++cp, " \t\n"))
337 +                                break;
338 +                        thisillum.minbrt = atof(cp);
339 +                        cp = sskip(cp);
340 +                        continue;
341                  case 'o':                       /* output file */
342                          if (*++cp != '=')
343                                  break;
# Line 363 | Line 375 | char   *nm;
375          }
376                                                  /* print pure comment */
377          printf("# %s", s+2);
378 + }
379 +
380 +
381 + printopts()                     /* print out option default values */
382 + {
383 +        printf("m=%-15s\t\t# material name\n", thisillum.matname);
384 +        printf("f=%-15s\t\t# data file name\n", thisillum.datafile);
385 +        printf("c=n\t\t\t\t# color none\n");
386 +        printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens);
387 +        printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps);
388 +        printf("b=%f\t\t\t# minimum average brightness\n", thisillum.minbrt);
389   }
390  
391  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines