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.16 by schorsch, Sat Mar 19 12:51:36 2016 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   {
78   #define  check(ol,al)           if (argv[i][ol] || \
# Line 74 | 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;
78 <        shadcert = .25;
79 <        directrelay = 0;
80 <        vspretest = 128;
81 <        srcsizerat = 0.;
82 <        specthresh = .3;
83 <        specjitter = 1.;
84 <        maxdepth = 6;
85 <        minweight = 1e-2;
86 <        ambacc = 0.3;
87 <        ambres = 32;
88 <        ambdiv = 256;
89 <        ambssamp = 64;
95 >        set_defaults();
96                                          /* option city */
97          for (i = 1; i < argc; i++) {
98                                                  /* expand arguments */
# Line 190 | Line 196 | main(int argc, char *argv[])
196                          goto badopt;
197                  }
198          }
199 +                                        /* set/check spectral sampling */
200 +        if (setspectrsamp(CNDX, WLPART) <= 0)
201 +                error(USER, "unsupported spectral sampling");
202 +
203          err = setview(&ourview);        /* set viewing parameters */
204          if (err != NULL)
205                  error(USER, err);
# Line 256 | Line 266 | badopt:
266  
267   void
268   wputs(                          /* warning output function */
269 <        char    *s
269 >        const char      *s
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   }
# Line 267 | Line 279 | wputs(                         /* warning output function */
279  
280   void
281   eputs(                          /* put string to stderr */
282 <        char  *s
282 >        const char  *s
283   )
284   {
285          static int  midline = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines