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

Comparing ray/src/cv/bsdf2klems.c (file contents):
Revision 2.34 by greg, Tue Dec 7 23:55:02 2021 UTC vs.
Revision 2.38 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 12 | Line 12 | static const char RCSid[] = "$Id$";
12   #include <math.h>
13   #include <ctype.h>
14   #include "random.h"
15 #include "platform.h"
16 #include "paths.h"
15   #include "rtio.h"
16   #include "calcomp.h"
17   #include "bsdfrep.h"
# Line 22 | Line 20 | static const char RCSid[] = "$Id$";
20   enum {CIE_X, CIE_Y, CIE_Z};
21                                  /* assumed maximum # Klems patches */
22   #define MAXPATCHES      145
25                                /* global argv[0] */
26 char                    *progname;
23                                  /* selected basis function name */
24   static const char       klems_full[] = "LBNL/Klems Full";
25   static const char       klems_half[] = "LBNL/Klems Half";
# Line 621 | Line 617 | main(int argc, char *argv[])
617          char    buf[1024];
618          char    *cp;
619          int     i, na;
620 <
621 <        progname = argv[0];
620 >                                                /* set global progname */
621 >        fixargv0(argv[0]);
622          esupport |= E_VARIABLE|E_FUNCTION|E_RCONST;
623          esupport &= ~(E_INCHAN|E_OUTCHAN);
624          scompile("PI:3.14159265358979323846", NULL, 0);
# Line 639 | Line 635 | main(int argc, char *argv[])
635                          single_plane_incident = 0;
636                          break;
637                  case 'f':
638 <                        if (!argv[i][2]) {
638 >                        if ((argv[i][0] == '-') & !argv[i][2]) {
639                                  if (strchr(argv[++i], '=') != NULL) {
640                                          add_wbsdf("-f", 1);
641                                          add_wbsdf(argv[i], 1);
# Line 700 | Line 696 | main(int argc, char *argv[])
696                          fprintf(stderr, "\tor 3 arguments using Dx,Dy,Dz: bsdf(ix,iy,iz)\n");
697                          goto userr;
698                  }
699 +                doptimize(1);                   /* optimize definitions */
700                  ++eclock;
701                  if (dofwd) {
702                          input_orient = -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines