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

Comparing ray/src/rt/rmain.c (file contents):
Revision 2.35 by greg, Wed Dec 21 09:51:52 1994 UTC vs.
Revision 2.41 by greg, Sat Jul 6 21:59:00 1996 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1994 Regents of the University of California */
1 > /* Copyright (c) 1996 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 51 | Line 51 | char  *getlibpath();                   /* library directory list */
51  
52   char  *sigerr[NSIG];                    /* signal error messages */
53  
54 + char  *shm_boundary = NULL;             /* boundary of shared memory */
55 +
56   extern char  VersionID[];               /* version ID string */
57  
58   extern int  stderr_v();                 /* standard error output */
# Line 61 | Line 63 | int  (*cmdvec)() = NULL;               /* command error vector */
63   int  (*trace)() = NULL;                 /* trace call */
64   int  do_irrad = 0;                      /* compute irradiance? */
65  
66 + char  *errfile = NULL;                  /* error output file */
67 +
68   extern time_t  time();
69   time_t  tstart;                         /* start time */
70  
# Line 115 | Line 119 | extern double  srcsizerat;             /* maximum source size/dis
119   extern double  specthresh;              /* specular sampling threshold */
120   extern double  specjitter;              /* specular sampling jitter */
121  
122 + extern COLOR  cextinction;              /* global extinction coefficient */
123 + extern COLOR  salbedo;                  /* global scattering albedo */
124 + extern double  seccg;                   /* global scattering eccentricity */
125 + extern double  ssampdist;               /* scatter sampling distance */
126 +
127   extern int  backvis;                    /* back face visibility */
128  
129   extern int  maxdepth;                   /* maximum recursion depth */
130   extern double  minweight;               /* minimum ray weight */
131  
132   extern COLOR  ambval;                   /* ambient value */
133 + extern int  ambvwt;                     /* initial weight for ambient value */
134   extern double  ambacc;                  /* ambient accuracy */
135   extern int  ambres;                     /* ambient resolution */
136   extern int  ambdiv;                     /* ambient divisions */
# Line 148 | Line 158 | char  *argv[];
158          char  *recover = NULL;
159          char  *outfile = NULL;
160          char  *zfile = NULL;
151        char  *errfile = NULL;
161          char  *ambfile = NULL;
162          int  loadflags = ~IO_FILES;
163          int  seqstart = 0;
# Line 382 | Line 391 | char  *argv[];
391                                                  atof(argv[i+3]));
392                                  i += 3;
393                                  break;
394 +                        case 'w':                               /* weight */
395 +                                check(3,"i");
396 +                                ambvwt = atoi(argv[++i]);
397 +                                break;
398                          case 'a':                               /* accuracy */
399                                  check(3,"f");
400                                  ambacc = atof(argv[++i]);
# Line 454 | Line 467 | char  *argv[];
467                                  goto badopt;
468                          }
469                          break;
470 +                case 'm':                               /* medium */
471 +                        switch (argv[i][2]) {
472 +                        case 'e':                               /* extinction */
473 +                                check(3,"fff");
474 +                                setcolor(cextinction, atof(argv[i+1]),
475 +                                                atof(argv[i+2]),
476 +                                                atof(argv[i+3]));
477 +                                i += 3;
478 +                                break;
479 +                        case 'a':                               /* albedo */
480 +                                check(3,"fff");
481 +                                setcolor(salbedo, atof(argv[i+1]),
482 +                                                atof(argv[i+2]),
483 +                                                atof(argv[i+3]));
484 +                                i += 3;
485 +                                break;
486 +                        case 'g':                               /* eccentr. */
487 +                                check(3,"f");
488 +                                seccg = atof(argv[++i]);
489 +                                break;
490 +                        case 's':                               /* sampling */
491 +                                check(3,"f");
492 +                                ssampdist = atof(argv[++i]);
493 +                                break;
494 +                        default:
495 +                                goto badopt;
496 +                        }
497 +                        break;
498   #if  RTRACE
499                  case 'I':                               /* immed. irradiance */
500                          bool(2,imm_irrad);
# Line 667 | Line 708 | char  *argv[];
708                  }
709                  if (persist == PARALLEL) {      /* multiprocessing */
710                          preload_objs();         /* preload scene */
711 +                        strcpy(shm_boundary=bmalloc(16), "SHM_BOUNDARY");
712                          while ((rval=fork()) == 0) {    /* keep on forkin' */
713                                  pflock(1);
714                                  pfhold();
# Line 820 | Line 862 | printdefaults()                        /* print default values to stdout */
862                          ourview.type==VT_PAR ? "parallel" :
863                          ourview.type==VT_HEM ? "hemispherical" :
864                          ourview.type==VT_ANG ? "angular" :
865 +                        ourview.type==VT_CYL ? "cylindrical" :
866                          "unknown");
867          printf("-vp %f %f %f\t# view point\n",
868                          ourview.vp[0], ourview.vp[1], ourview.vp[2]);
# Line 863 | Line 906 | printdefaults()                        /* print default values to stdout */
906          printf("-st %f\t\t\t# specular threshold\n", specthresh);
907          printf("-av %f %f %f\t# ambient value\n", colval(ambval,RED),
908                          colval(ambval,GRN), colval(ambval, BLU));
909 +        printf("-aw %-9d\t\t\t# ambient value weight\n", ambvwt);
910          printf("-ab %-9d\t\t\t# ambient bounces\n", ambounce);
911          printf("-aa %f\t\t\t# ambient accuracy\n", ambacc);
912          printf("-ar %-9d\t\t\t# ambient resolution\n", ambres);
913          printf("-ad %-9d\t\t\t# ambient divisions\n", ambdiv);
914          printf("-as %-9d\t\t\t# ambient super-samples\n", ambssamp);
915 +        printf("-me %.2e %.2e %.2e\t# extinction coefficient\n",
916 +                        colval(cextinction,RED),
917 +                        colval(cextinction,GRN),
918 +                        colval(cextinction,BLU));
919 +        printf("-ma %f %f %f\t# scattering albedo\n", colval(salbedo,RED),
920 +                        colval(salbedo,GRN), colval(salbedo,BLU));
921 +        printf("-mg %f\t\t\t# scattering eccentricity\n", seccg);
922 +        printf("-ms %f\t\t\t# mist sampling distance\n", ssampdist);
923          printf("-lr %-9d\t\t\t# limit reflection\n", maxdepth);
924          printf("-lw %f\t\t\t# limit weight\n", minweight);
925   #if  RPICT

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)