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

Comparing ray/src/common/bsdf.h (file contents):
Revision 2.24 by schorsch, Sun Mar 6 01:13:17 2016 UTC vs.
Revision 2.29 by greg, Tue Dec 7 23:49:50 2021 UTC

# Line 84 | Line 84 | extern const SDCDst    SDemptyCD;      /* empty distribution *
84   typedef struct SDComp_s SDComponent;
85  
86   /* Methods needed to handle BSDF components (nothing is optional) */
87 < typedef const struct {
87 > typedef struct {
88                                          /* return non-diffuse BSDF */
89 <        int             (*getBSDFs)(float coef[SDmaxCh], const FVECT outVec,
90 <                                    const FVECT inVec, SDComponent *sdc);
89 >        int             (*getBSDFs)(float coef[SDmaxCh], const FVECT inVec,
90 >                                    const FVECT outVec, SDComponent *sdc);
91                                          /* query non-diffuse PSA for vector */
92          SDError         (*queryProjSA)(double *psa, const FVECT v1,
93                                                  const RREAL *v2, int qflags,
# Line 104 | Line 104 | typedef const struct {
104   /* Structure to hold a spectral BSDF component (typedef SDComponent above) */
105   struct SDComp_s {
106          C_COLOR         cspec[SDmaxCh]; /* component spectral bases */
107 <        SDFunc          *func;          /* methods for this component */
107 >        const SDFunc    *func;          /* methods for this component */
108          void            *dist;          /* loaded distribution data */
109          SDCDst          *cdList;        /* cumulative distribution cache */
110   };
# Line 126 | Line 126 | typedef struct {
126          double          dim[3];         /* width, height, thickness (meters) */
127          SDValue         rLambFront;     /* diffuse front reflectance */
128          SDValue         rLambBack;      /* diffuse rear reflectance */
129 <        SDValue         tLamb;          /* diffuse transmission */
129 >        SDValue         tLambFront;     /* diffuse front transmittance */
130 >        SDValue         tLambBack;      /* diffuse back transmittance */
131          SDSpectralDF    *rf, *rb;       /* non-diffuse BRDF components */
132          SDSpectralDF    *tf, *tb;       /* non-diffuse BTDF components */
133   } SDData;
# Line 145 | Line 146 | extern struct SDCache_s {
146   #define SDretainAll     2               /* also keep cumulative cache data */
147  
148   extern int              SDretainSet;    /* =SDretainNone by default */
149 + extern unsigned long    SDmaxCache;     /* =0 (unlimited) by default */
150  
151   /*****************************************************************
152   * The following routines are less commonly used by applications.
# Line 213 | Line 215 | extern SDError         SDsizeBSDF(double *projSA, const FVECT
215                                          const SDData *sd);
216  
217   /* Return BSDF for the given incident and scattered ray vectors */
218 < extern SDError          SDevalBSDF(SDValue *sv, const FVECT outVec,
219 <                                        const FVECT inVec, const SDData *sd);
218 > extern SDError          SDevalBSDF(SDValue *sv, const FVECT inVec,
219 >                                        const FVECT outVec, const SDData *sd);
220  
221   /* Compute directional hemispherical scattering at given incident angle */
222   extern double           SDdirectHemi(const FVECT inVec,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines