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

Comparing ray/src/cv/checkBSDF.c (file contents):
Revision 2.3 by greg, Fri Dec 17 20:51:55 2021 UTC vs.
Revision 2.6 by greg, Wed Jan 26 17:30:07 2022 UTC

# Line 29 | Line 29 | typedef struct {
29   const SimpleStats       SSinit = {FHUGE, -FHUGE, .0, 0};
30  
31                                  /* relative difference formula */
32 < #define rdiff(a,b)      ((a)>(b) ? ((a)-(b))/(a) : ((b)-(a))/(b))
32 > #define rdiff(a,b)      ((a)>(b) ? ((a)-(b))/((a)+FTINY) : ((b)-(a))/((b)+FTINY))
33  
34   /* Figure out BSDF type (and optionally determine if in color) */
35   const char *
# Line 236 | Line 236 | checkXML(char *fname)
236          puts("=====================================================");
237          printf("File: '%s'\n", fname);
238          SDclearBSDF(&myBSDF, fname);
239 <        pth = getpath(fname, getrlibpath(), R_OK);
239 >        pth = getpath(fname, getrlibpath(), 0);
240          if (!pth) {
241                  fprintf(stderr, "Cannot find file '%s'\n", fname);
242                  return 0;
# Line 251 | Line 251 | checkXML(char *fname)
251          printf("Color: %d\n", (flags & F_IN_COLOR) != 0);
252          printf("Has Geometry: %d\n", (myBSDF.mgf != NULL));
253          puts("Component\tLambertian XYZ %\tMax. Dir\tMin. Angle");
254 <        detailComponent("Internal Refl", &myBSDF.rLambFront, myBSDF.rf);
255 <        detailComponent("External Refl", &myBSDF.rLambBack, myBSDF.rb);
254 >        detailComponent("Interior Refl", &myBSDF.rLambFront, myBSDF.rf);
255 >        detailComponent("Exterior Refl", &myBSDF.rLambBack, myBSDF.rb);
256          detailComponent("Int->Ext Trans", &myBSDF.tLambFront, myBSDF.tf);
257          detailComponent("Ext->Int Trans", &myBSDF.tLambBack, myBSDF.tb);
258          puts("Component\tReciprocity Error (min avg max %)");
259 <        checkReciprocity("Front Refl", 1, 1, &myBSDF, flags);
260 <        checkReciprocity("Back Refl", -1, -1, &myBSDF, flags);
259 >        checkReciprocity("Interior Refl", 1, 1, &myBSDF, flags);
260 >        checkReciprocity("Exterior Refl", -1, -1, &myBSDF, flags);
261          checkReciprocity("Transmission", -1, 1, &myBSDF, flags);
262          SDfreeBSDF(&myBSDF);
263          return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines