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 2.30 by greg, Tue Sep 18 19:51:07 2007 UTC vs.
Revision 2.34 by greg, Sat Apr 18 16:14:26 2009 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   #include  <signal.h>
9   #include  <ctype.h>
10  
11 #include  "platform.h"
11   #include  "mkillum.h"
13 #include  "random.h"
12  
13                                  /* default parameters */
14   #define  SAMPDENS       48              /* points per projected steradian */
# Line 26 | Line 24 | static const char RCSid[] = "$Id$";
24   struct illum_args  thisillum = {        /* our illum and default values */
25                  0,
26                  UDzpos,
27 +                0.,
28                  DFLMAT,
29                  DFLDAT,
30                  0,
# Line 307 | Line 306 | xoptions(                      /* process options in string s */
306                          }
307                          if (!*++cp || isspace(*cp))
308                                  continue;
309 <                        if (isintd(++cp, " \t\n\r")) {
309 >                        if (isintd(cp, " \t\n\r")) {
310                                  thisillum.sampdens = atoi(cp);
311                          } else {
312                                  atos(buf, sizeof(buf), cp);
# Line 384 | Line 383 | xoptions(                      /* process options in string s */
383                                  break;
384                          case 'z':
385                          case 'Z':
386 <                                thisillum.udir = negax ? UDxneg : UDxpos;
386 >                                thisillum.udir = negax ? UDzneg : UDzpos;
387                                  break;
388                          default:
389                                  thisillum.udir = UDunknown;
# Line 393 | Line 392 | xoptions(                      /* process options in string s */
392                          if (thisillum.udir == UDunknown || !isspace(*cp))
393                                  break;
394                          continue;
395 +                case 't':                       /* object thickness */
396 +                        if (*++cp != '=')
397 +                                break;
398 +                        if (!isfltd(++cp, " \t\n\r"))
399 +                                break;
400 +                        thisillum.thick = atof(cp);
401 +                        if (thisillum.thick < .0)
402 +                                thisillum.thick = .0;
403 +                        cp = sskip(cp);
404 +                        continue;
405                  case '!':                       /* processed file! */
406                          sprintf(errmsg, "(%s): already processed!", nm);
407                          error(WARNING, errmsg);
# Line 435 | Line 444 | printopts(void)                        /* print out option default values *
444                  printf("l+\t\t\t\t# light type on\n");
445          else
446                  printf("l-\t\t\t\t# light type off\n");
447 <        printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens);
448 <        printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps);
447 >        printf("d=%d\t\t\t\t# density of directions\n", thisillum.sampdens);
448 >        printf("s=%d\t\t\t\t# samples per direction\n", thisillum.nsamps);
449          printf("b=%f\t\t\t# minimum average brightness\n", thisillum.minbrt);
450          switch (thisillum.udir) {
451          case UDzneg:
# Line 460 | Line 469 | printopts(void)                        /* print out option default values *
469          case UDunknown:
470                  break;
471          }
472 +        printf("t=%f\t\t\t# object thickness\n", thisillum.thick);
473   }
474  
475  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines