ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/util/rsensor.c
(Generate patch)

Comparing ray/src/util/rsensor.c (file contents):
Revision 2.22 by greg, Fri Nov 17 20:02:08 2023 UTC vs.
Revision 2.24 by greg, Wed Apr 23 02:35:27 2025 UTC

# Line 11 | Line 11 | static const char RCSid[] = "$Id$";
11   #include "ray.h"
12   #include "platform.h"
13   #include "source.h"
14 + #include "func.h"
15   #include "view.h"
16   #include "random.h"
17  
# Line 101 | Line 102 | main(
102          directrelay = 3;
103          ambounce = 1;
104          maxdepth = -10;
105 +                                /* initialize calcomp routines */
106 +        initfunc();
107                                  /* get options from command line */
108          for (i = 1; i < argc; i++) {
109                  while ((rval = expandarg(&argc, &argv, i)) > 0)
# Line 522 | Line 525 | comp_sensor(
525          char    *err;
526          int     nt, np;
527          SCOLOR  vsum;
525        COLOR   cres;
528          RAY     rr;
529          double  sf;
530          int     i, j;
# Line 592 | Line 594 | comp_sensor(
594                          }
595                  }
596          }
597 <                                                /* finish our calculation */
596 <        while (ray_presult(&rr, 0) > 0) {
597 >        while (ray_presult(&rr, 0) > 0) {       /* finish our calculation */
598                  smultscolor(rr.rcol, rr.rcoef);
599                  saddscolor(vsum, rr.rcol);
600          }
601 <                                                /* print our result */
602 <        scolor_rgb(cres, vsum);
603 <        printf("%.4e %.4e %.4e\n", colval(cres,RED),
603 <                                colval(cres,GRN), colval(cres,BLU));
601 >        for (i = 0; i < NCSAMP; i++)            /* print our result */
602 >                printf(" %.4e", vsum[i]);
603 >        fputc('\n', stdout);
604   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)