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

Comparing src/util/rsensor.c (file contents):
Revision 2.22 by greg, Fri Nov 17 20:02:08 2023 UTC vs.
Revision 2.25 by greg, Tue Jun 3 21:31:51 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 19 | Line 20 | static const char RCSid[] = "$Id$";
20   #define MAXNT           181     /* maximum number of theta divisions */
21   #define MAXNP           360     /* maximum number of phi divisions */
22  
22 extern char     *progname;      /* global argv[0] */
23   extern int      nowarn;         /* don't report warnings? */
24  
25                                  /* current sensor's perspective */
# Line 92 | Line 92 | main(
92          int     doheader = 1;
93          int     optwarn = 0;
94          int     i, rval;
95 <
96 <        progname = argv[0];
95 >                                /* set global progname */
96 >        fixargv0(argv[0]);
97                                  /* set up rendering defaults */
98          rand_samp = 1;
99          dstrsrc = 0.65;
# Line 101 | Line 101 | main(
101          directrelay = 3;
102          ambounce = 1;
103          maxdepth = -10;
104 +                                /* initialize calcomp routines */
105 +        initfunc();
106                                  /* get options from command line */
107          for (i = 1; i < argc; i++) {
108                  while ((rval = expandarg(&argc, &argv, i)) > 0)
# Line 522 | Line 524 | comp_sensor(
524          char    *err;
525          int     nt, np;
526          SCOLOR  vsum;
525        COLOR   cres;
527          RAY     rr;
528          double  sf;
529          int     i, j;
# Line 592 | Line 593 | comp_sensor(
593                          }
594                  }
595          }
596 <                                                /* finish our calculation */
596 <        while (ray_presult(&rr, 0) > 0) {
596 >        while (ray_presult(&rr, 0) > 0) {       /* finish our calculation */
597                  smultscolor(rr.rcol, rr.rcoef);
598                  saddscolor(vsum, rr.rcol);
599          }
600 <                                                /* print our result */
601 <        scolor_rgb(cres, vsum);
602 <        printf("%.4e %.4e %.4e\n", colval(cres,RED),
603 <                                colval(cres,GRN), colval(cres,BLU));
600 >        for (i = 0; i < NCSAMP; i++)            /* print our result */
601 >                printf(" %.4e", vsum[i]);
602 >        fputc('\n', stdout);
603   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines