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

Comparing ray/src/common/testBSDF.c (file contents):
Revision 1.4 by greg, Fri Jun 26 22:07:53 2015 UTC vs.
Revision 1.5 by greg, Wed Feb 3 18:33:18 2016 UTC

# Line 20 | Line 20 | Usage(const char *prog)
20   {
21          printf("Usage: %s [bsdf_directory]\n", prog);
22          printf("Input commands:\n");
23 <        printf("  l bsdf.xml\t\t\t Load (make active) given BSDF input file\n");
24 <        printf("  q theta_i phi_i theta_o phi_o\t Query BSDF for given path\n");
23 >        printf("  L bsdf.xml\t\t\t Load (make active) given BSDF input file\n");
24 >        printf("  q theta_i phi_i theta_o phi_o\t Query BSDF for given path (CIE-XYZ)\n");
25          printf("  s N theta phi\t\t\t Generate N ray directions at given incidence\n");
26          printf("  h theta phi\t\t\t Report hemispherical total at given incidence\n");
27          printf("  r theta phi\t\t\t Report hemispherical reflection at given incidence\n");
# Line 92 | Line 92 | main(int argc, char *argv[])
92                                  break;
93                          vec_from_deg(vin, atof(sskip2(cp,1)), atof(sskip2(cp,2)));
94                          vec_from_deg(vout, atof(sskip2(cp,3)), atof(sskip2(cp,4)));
95 <                        if (!SDreportError(SDevalBSDF(&val, vout, vin, bsdf), stderr))
96 <                                printf("%.3e\n", val.cieY);
95 >                        if (!SDreportError(SDevalBSDF(&val, vout, vin, bsdf), stderr)) {
96 >                                c_ccvt(&val.spec, C_CSXY);
97 >                                printf("%.3e %.3e %.3e\n",
98 >                                                val.spec.cx/val.spec.cy*val.cieY,
99 >                                                val.cieY,
100 >                                                (1.-val.spec.cx-val.spec.cy)/
101 >                                                val.spec.cy*val.cieY);
102 >                        }
103                          continue;
104                  case 'S':                       /* sample BSDF */
105                          if (bsdf == NULL)
# Line 144 | Line 150 | main(int argc, char *argv[])
150                  Usage(argv[0]);
151                  continue;
152   noBSDFerr:
153 <                fprintf(stderr, "%s: need to use 'l' command to load BSDF\n", argv[0]);
153 >                fprintf(stderr, "%s: need to use 'L' command to load BSDF\n", argv[0]);
154          }
155          return 0;
156   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines