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.80 by greg, Thu Jul 4 01:06:35 2019 UTC vs.
Revision 2.84 by greg, Wed Aug 14 22:33:02 2019 UTC

# Line 146 | Line 146 | rtrace(                                /* trace rays from file */
146          case 'f': putreal = putf; break;
147          case 'd': putreal = putd; break;
148          case 'c':
149 <                if (outvals[0] && (outvals[1] || !strchr("vVWrx", outvals[0])))
150 <                        error(USER, "color format only with one of 'vVWrx'");
149 >                if (outvals[0] && (outvals[1] || !strchr("vrx", outvals[0])))
150 >                        error(USER, "color format only with -ov, -or, -ox");
151                  putreal = putrgbe; break;
152          default:
153                  error(CONSISTENCY, "botched output format");
# Line 267 | Line 267 | setoutput(                             /* set up output tables */
267                          break;
268                  case 'V':                               /* contribution */
269                          *table++ = oputV;
270                        castonly = 0;
270                          if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0))
271                                  error(WARNING,
272                                          "-otV accuracy depends on -aa 0 -as 0");
# Line 316 | Line 315 | setoutput(                             /* set up output tables */
315                          break;
316                  }
317          *table = NULL;
318 <        if (do_irrad | imm_irrad)                       /* compatibile? */
319 <                for (table = ray_out; *table != NULL; table++)
320 <                        if ((*table == oputr) | (*table == oputR) |
321 <                                        (*table == oputx) | (*table == oputX)) {
322 <                                error(WARNING, "-orRxX options incompatible with -I+ and -i+");
323 <                                break;
324 <                        }
318 >                                                        /* compatibility */
319 >        for (table = ray_out; *table != NULL; table++) {
320 >                if ((*table == oputV) | (*table == oputW))
321 >                        error(WARNING, "-oVW options require trace mode");
322 >                if ((do_irrad | imm_irrad) &&
323 >                                (*table == oputr) | (*table == oputR) |
324 >                                (*table == oputx) | (*table == oputX))
325 >                        error(WARNING, "-orRxX options incompatible with -I+ and -i+");
326 >        }
327   }
328  
329  
# Line 662 | Line 663 | oputN(                         /* print unperturbed normal */
663          RAY  *r
664   )
665   {
666 <        if (r->rot < FHUGE)
667 <                (*putreal)(r->ron, 3);
668 <        else
666 >        if (r->rot < FHUGE) {
667 >                if (r->rflips & 1) {    /* undo any flippin' flips */
668 >                        FVECT   unrm;
669 >                        unrm[0] = -r->ron[0];
670 >                        unrm[1] = -r->ron[1];
671 >                        unrm[2] = -r->ron[2];
672 >                        (*putreal)(unrm, 3);
673 >                } else
674 >                        (*putreal)(r->ron, 3);
675 >        } else
676                  (*putreal)(vdummy, 3);
677   }
678  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines