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

Comparing ray/src/rt/rxtrace.cpp (file contents):
Revision 2.6 by greg, Tue Nov 19 16:28:18 2024 UTC vs.
Revision 2.8 by greg, Thu Jan 2 01:54:49 2025 UTC

# Line 71 | Line 71 | static RayReportCall ourtrace;
71  
72   RayReportCall printvals;                /* print selected ray values */
73  
74 < void  putscolor(COLORV *scol);          /* convert/print spectral color */
74 > void  putscolor(COLORV *scol, double sf = 1.);          /* convert/print spectral color */
75  
76   static oputf_t *ray_out[32], *every_out[32];
77  
# Line 413 | Line 413 | setrtoutput(const char *outvals)       /* set up output tabl
413          return(ncomp);
414   }
415  
416 < static int
416 > int
417   printvals(                      /* print requested ray values */
418          RAY  *r, void *cd
419   )
# Line 511 | Line 511 | oputr(                         /* print mirrored contribution */
511          RAY  *r
512   )
513   {
514 <        putscolor(r->mcol);
514 >        putscolor(r->mcol, out_scalefactor);
515   }
516  
517   static void
# Line 532 | Line 532 | oputx(                         /* print unmirrored contribution */
532          copyscolor(cdiff, r->rcol);
533          sopscolor(cdiff, -=, r->mcol);
534  
535 <        putscolor(cdiff);
535 >        putscolor(cdiff, out_scalefactor);
536   }
537  
538   static void
# Line 548 | Line 548 | oputv(                         /* print value */
548          RAY  *r
549   )
550   {
551 <        putscolor(r->rcol);
551 >        putscolor(r->rcol, out_scalefactor);
552   }
553  
554   static void
# Line 560 | Line 560 | oputV(                         /* print value contribution */
560  
561          raycontrib(contr, r, PRIMARY);
562          smultscolor(contr, r->rcol);
563 <        putscolor(contr);
563 >        putscolor(contr, out_scalefactor);
564   }
565  
566   static void
# Line 768 | Line 768 | putrgbe(RREAL *v, int n)       /* output RGBE color */
768          putbinary(cout, sizeof(cout), 1, stdout);
769   }
770  
771 < static void
772 < putscolor(COLORV *scol)         /* output (spectral) color */
771 > void
772 > putscolor(COLORV *scol, double sf)              /* output (spectral) color */
773   {
774          static COLORMAT xyz2myrgbmat;
775          SCOLOR          my_scol;
776          COLOR           col;
777                                          /* single channel output? */
778          if (sens_curve != NULL) {
779 <                RREAL   v = (*sens_curve)(scol) * out_scalefactor;
779 >                RREAL   v = (*sens_curve)(scol) * sf;
780                  (*putreal)(&v, 1);
781                  return;
782          }
783 <        if (out_scalefactor != 1.) {    /* apply scalefactor if any */
783 >        if (sf != 1.) {                 /* apply scalefactor if any */
784                  copyscolor(my_scol, scol);
785 <                scalescolor(my_scol, out_scalefactor);
785 >                scalescolor(my_scol, sf);
786                  scol = my_scol;
787          }
788          if (out_prims == NULL) {        /* full spectral reporting */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines