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.19 by greg, Mon Feb 6 22:40:21 2023 UTC vs.
Revision 2.23 by greg, Tue Apr 22 17:12:25 2025 UTC

# Line 12 | Line 12 | static const char      RCSid[] = "$Id$";
12  
13   #include  "platform.h"
14   #include  "ray.h"
15 + #include  "func.h"
16   #include  "source.h"
17   #include  "ambient.h"
18   #include  "rpaint.h"
# Line 55 | Line 56 | static void onsig(int  signo);
56   static void sigdie(int  signo, char  *msg);
57   static void printdefaults(void);
58  
59 + static void
60 + set_defaults(void)
61 + {
62 +        shadthresh = .1;
63 +        shadcert = .25;
64 +        directrelay = 0;
65 +        vspretest = 128;
66 +        srcsizerat = 0.;
67 +        specthresh = .3;
68 +        specjitter = 1.;
69 +        maxdepth = 6;
70 +        minweight = 1e-3;
71 +        ambacc = 0.3;
72 +        ambres = 32;
73 +        ambdiv = 256;
74 +        ambssamp = 64;
75 + }
76 +
77   int
78   main(int argc, char *argv[])
79   {
# Line 75 | Line 94 | main(int argc, char *argv[])
94                                          /* global program name */
95          progname = argv[0] = fixargv0(argv[0]);
96                                          /* set our defaults */
97 <        shadthresh = .1;
98 <        shadcert = .25;
99 <        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;
97 >        set_defaults();
98 >                                        /* initialize calcomp routines */
99 >        initfunc();
100                                          /* option city */
101          for (i = 1; i < argc; i++) {
102                                                  /* expand arguments */
# Line 191 | Line 200 | main(int argc, char *argv[])
200                          goto badopt;
201                  }
202          }
203 +                                        /* set/check spectral sampling */
204 +        if (setspectrsamp(CNDX, WLPART) <= 0)
205 +                error(USER, "unsupported spectral sampling");
206 +
207          err = setview(&ourview);        /* set viewing parameters */
208          if (err != NULL)
209                  error(USER, err);
# Line 261 | Line 274 | wputs(                         /* warning output function */
274   )
275   {
276          int  lasterrno = errno;
277 +        if (erract[WARNING].pf == NULL)
278 +                return;         /* called by calcomp or someone */
279          eputs(s);
280          errno = lasterrno;
281   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines