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

Comparing ray/src/cv/pabopto2bsdf.c (file contents):
Revision 2.40 by greg, Mon Apr 5 19:56:18 2021 UTC vs.
Revision 2.42 by greg, Mon Nov 21 18:28:24 2022 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include <math.h>
15   #include "rtio.h"
16   #include "platform.h"
17 + #include "paths.h"
18   #include "bsdfrep.h"
19                                  /* global argv[0] */
20   char                    *progname;
# Line 229 | Line 230 | int
230   main(int argc, char *argv[])
231   {
232          extern int      nprocs;
233 <        int             auto_grazing = 0;
233 >        static char     gval_buf[16];
234 >        char *          auto_grazing = NULL;
235          const char      *symmetry = "0";
236          int             ninpfiles, totinc;
237          int             a, i;
# Line 248 | Line 250 | main(int argc, char *argv[])
250                          break;
251                  case 'g':
252                          if (toupper(argv[a+1][0]) == 'A')
253 <                                auto_grazing = 1;
253 >                                auto_grazing = argv[a+1] = gval_buf;
254                          else
255                                  lim_graze = atof(argv[a+1]);
256                          ++a;
# Line 272 | Line 274 | main(int argc, char *argv[])
274                  if (auto_grazing && fabs(inpfile[i].theta - 90.) < lim_graze)
275                          lim_graze = fabs(inpfile[i].theta - 90.);
276          }
277 +        if (auto_grazing)
278 +                sprintf(auto_grazing, "%.2f", lim_graze);
279          for (i = ninpfiles; i < totinc; i++) {  /* copy for "up" symmetry */
280                  inpfile[i] = inpfile[i-ninpfiles];
281                  inpfile[i].phi += 180.;         /* invert duplicate data */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines