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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.93 by greg, Mon Apr 6 04:10:44 2020 UTC vs.
Revision 2.94 by greg, Mon Apr 6 21:09:07 2020 UTC

# Line 45 | Line 45 | extern int  traincl;                   /* include == 1, exclude == 0 *
45   extern int  hresolu;                    /* horizontal resolution */
46   extern int  vresolu;                    /* vertical resolution */
47  
48 < extern int  castonly;                   /* only doing ray-casting? */
48 > int  castonly = 0;                      /* only doing ray-casting? */
49  
50   #ifndef  MAXTSET
51   #define  MAXTSET        8191            /* maximum number in trace set */
# Line 145 | Line 145 | rtrace(                                /* trace rays from file */
145          if (inform != 'a')
146                  SET_FILE_BINARY(inpfp);
147                                          /* set up output */
148 <        if (imm_irrad)
149 <                castonly = 0;
150 <        else if (castonly || every_out[0] != NULL)
148 >        if (castonly || every_out[0] != NULL)
149                  nproc = 1;              /* don't bother multiprocessing */
150          if ((nextflush > 0) & (nproc > nextflush)) {
151                  error(WARNING, "reducing number of processes to match flush interval");
# Line 238 | Line 236 | setrtoutput(void)                      /* set up output tables, return #c
236          if (!*vs)
237                  error(USER, "empty output specification");
238  
239 <        castonly = 1;
239 >        castonly = 1;                   /* sets castonly as side-effect */
240          do
241                  switch (*vs) {
242                  case 'T':                               /* trace sources */
# Line 288 | Line 286 | setrtoutput(void)                      /* set up output tables, return #c
286                  case 'V':                               /* contribution */
287                          *table++ = oputV;
288                          ncomp += 3;
289 +                        castonly = 0;
290                          if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0))
291                                  error(WARNING,
292                                          "-otV accuracy depends on -aa 0 -as 0");
# Line 355 | Line 354 | setrtoutput(void)                      /* set up output tables, return #c
354          if (*every_out != NULL)
355                  ncomp = 0;
356                                                          /* compatibility */
357 +        if ((do_irrad | imm_irrad) && castonly)
358 +                error(USER, "-I+ and -i+ options require some value output");
359          for (table = ray_out; *table != NULL; table++) {
360                  if ((*table == oputV) | (*table == oputW))
361                          error(WARNING, "-oVW options require trace mode");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines