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

Comparing ray/src/cv/bsdf2ttree.c (file contents):
Revision 2.6 by greg, Fri Nov 9 02:25:32 2012 UTC vs.
Revision 2.7 by greg, Sat Nov 10 19:47:42 2012 UTC

# Line 16 | Line 16 | static const char RCSid[] = "$Id$";
16                                  /* global argv[0] */
17   char                    *progname;
18                                  /* percentage to cull (<0 to turn off) */
19 < int                     pctcull = 90;
19 > double                  pctcull = 90.;
20                                  /* sampling order */
21   int                     samp_order = 6;
22  
# Line 32 | Line 32 | interp_isotropic()
32          float           bsdf;
33   #if DEBUG
34          fprintf(stderr, "Writing isotropic order %d ", samp_order);
35 <        if (pctcull >= 0) fprintf(stderr, "data with %d%% culling\n", pctcull);
35 >        if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull);
36          else fputs("raw data\n", stderr);
37   #endif
38          if (pctcull >= 0) {                     /* begin output */
39 <                sprintf(cmd, "rttree_reduce -h -a -ff -r 3 -t %d -g %d",
39 >                sprintf(cmd, "rttree_reduce -h -a -ff -r 3 -t %f -g %d",
40                                  pctcull, samp_order);
41                  fflush(stdout);
42                  ofp = popen(cmd, "w");
# Line 94 | Line 94 | interp_anisotropic()
94          float           bsdf;
95   #if DEBUG
96          fprintf(stderr, "Writing anisotropic order %d ", samp_order);
97 <        if (pctcull >= 0) fprintf(stderr, "data with %d%% culling\n", pctcull);
97 >        if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull);
98          else fputs("raw data\n", stderr);
99   #endif
100          if (pctcull >= 0) {                     /* begin output */
101 <                sprintf(cmd, "rttree_reduce -h -a -ff -r 4 -t %d -g %d",
101 >                sprintf(cmd, "rttree_reduce -h -a -ff -r 4 -t %f -g %d",
102                                  pctcull, samp_order);
103                  fflush(stdout);
104                  ofp = popen(cmd, "w");
# Line 146 | Line 146 | static void
146   xml_prologue(int ac, char *av[])
147   {
148          static const char       *bsdf_type[4] = {
149 <                                        "Reflection Back",
150 <                                        "Transmission Back",
149 >                                        "Reflection Front",
150                                          "Transmission Front",
151 <                                        "Reflection Front"
151 >                                        "Transmission Back",
152 >                                        "Reflection Back"
153                                  };
154  
155          puts("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
# Line 209 | Line 209 | main(int argc, char *argv[])
209          for (i = 1; i < argc-1 && argv[i][0] == '-'; i++)
210                  switch (argv[i][1]) {           /* get option */
211                  case 't':
212 <                        pctcull = atoi(argv[++i]);
212 >                        pctcull = atof(argv[++i]);
213                          break;
214                  case 'g':
215                          samp_order = atoi(argv[++i]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines