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

Comparing ray/src/rt/rvmain.c (file contents):
Revision 2.20 by greg, Wed Jan 17 01:31:08 2024 UTC vs.
Revision 2.25 by greg, Sat Jun 7 05:09:46 2025 UTC

# Line 16 | Line 16 | static const char      RCSid[] = "$Id$";
16   #include  "ambient.h"
17   #include  "rpaint.h"
18   #include  "random.h"
19 #include  "paths.h"
19   #include  "view.h"
20   #include  "pmapray.h"
21  
# Line 55 | Line 54 | static void onsig(int  signo);
54   static void sigdie(int  signo, char  *msg);
55   static void printdefaults(void);
56  
57 + static void
58 + set_defaults(void)
59 + {
60 +        shadthresh = .1;
61 +        shadcert = .25;
62 +        directrelay = 0;
63 +        vspretest = 128;
64 +        srcsizerat = 0.;
65 +        specthresh = .3;
66 +        specjitter = 1.;
67 +        maxdepth = 6;
68 +        minweight = 1e-3;
69 +        ambacc = 0.3;
70 +        ambres = 32;
71 +        ambdiv = 256;
72 +        ambssamp = 64;
73 + }
74 +
75   int
76   main(int argc, char *argv[])
77   {
# Line 75 | Line 92 | main(int argc, char *argv[])
92                                          /* global program name */
93          progname = argv[0] = fixargv0(argv[0]);
94                                          /* set our defaults */
95 <        shadthresh = .1;
79 <        shadcert = .25;
80 <        directrelay = 0;
81 <        vspretest = 128;
82 <        srcsizerat = 0.;
83 <        specthresh = .3;
84 <        specjitter = 1.;
85 <        maxdepth = 6;
86 <        minweight = 1e-3;
87 <        ambacc = 0.3;
88 <        ambres = 32;
89 <        ambdiv = 256;
90 <        ambssamp = 64;
95 >        set_defaults();
96                                          /* option city */
97          for (i = 1; i < argc; i++) {
98                                                  /* expand arguments */
# Line 192 | Line 197 | main(int argc, char *argv[])
197                  }
198          }
199                                          /* set/check spectral sampling */
200 <        rval = setspectrsamp(CNDX, WLPART);
196 <        if (rval < 0)
200 >        if (setspectrsamp(CNDX, WLPART) <= 0)
201                  error(USER, "unsupported spectral sampling");
202  
203          err = setview(&ourview);        /* set viewing parameters */
# Line 266 | Line 270 | wputs(                         /* warning output function */
270   )
271   {
272          int  lasterrno = errno;
273 +        if (erract[WARNING].pf == NULL)
274 +                return;         /* called by calcomp or someone */
275          eputs(s);
276          errno = lasterrno;
277   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines