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

Comparing ray/src/common/bsdf.c (file contents):
Revision 2.48 by greg, Mon Mar 24 04:00:45 2014 UTC vs.
Revision 2.51 by greg, Sat Aug 1 23:27:04 2015 UTC

# Line 199 | Line 199 | SDloadFile(SDData *sd, const char *fname)
199          }
200          wtl = ezxml_child(ezxml_child(fl, "Optical"), "Layer");
201          if (wtl == NULL) {
202 <                sprintf(SDerrorDetail, "BSDF \"%s\": no optical layers'",
202 >                sprintf(SDerrorDetail, "BSDF \"%s\": no optical layers",
203                                  sd->name);
204                  ezxml_free(fl);
205                  return SDEformat;
# Line 595 | Line 595 | SDsizeBSDF(double *projSA, const FVECT v1, const RREAL
595                  rdf = sd->rb;
596                  tdf = (sd->tb != NULL) ? sd->tb : sd->tf;
597          }
598 <        if (v2 != NULL)                 /* bidirectional? */
598 >        if (v2 != NULL) {               /* bidirectional? */
599                  if (v1[2] > 0 ^ v2[2] > 0)
600                          rdf = NULL;
601                  else
602                          tdf = NULL;
603 +        }
604          ec = SDEdata;                   /* run through components */
605          for (i = (rdf==NULL) ? 0 : rdf->ncomp; i--; ) {
606                  ec = (*rdf->comp[i].func->queryProjSA)(projSA, v1, v2,
# Line 763 | Line 764 | SDsampBSDF(SDValue *sv, FVECT ioVec, double randX, int
764                  cdarr[i] = (*rdf->comp[i].func->getCDist)(inVec, &rdf->comp[i]);
765                  if (cdarr[i] == NULL)
766                          cdarr[i] = &SDemptyCD;
767 <                else
767 <                        sv->cieY += cdarr[i]->cTotal;
767 >                sv->cieY += cdarr[i]->cTotal;
768          }
769          if (sv->cieY <= 1e-6) {         /* anything to sample? */
770                  sv->cieY = .0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines