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

Comparing ray/src/rt/m_brdf.c (file contents):
Revision 2.6 by greg, Thu May 27 15:28:01 1993 UTC vs.
Revision 2.9 by greg, Thu Nov 18 09:43:04 1993 UTC

# Line 21 | Line 21 | static char SCCSid[] = "$SunId$ LBL";
21   *  String arguments include the reflection function and files.
22   *  The BRDF is currently used just for the specular component to light
23   *  sources.  Reflectance values or data coordinates are functions
24 < *  of the direction to the light source.
24 > *  of the direction to the light source.  (Data modification functions
25 > *  are passed the source direction as args 2-4.)
26   *      We orient the surface towards the incoming ray, so a single
27   *  surface can be used to represent an infinitely thin object.
28   *
# Line 88 | Line 89 | double  omega;                 /* light source size */
89          COLOR  ctmp;
90          FVECT  ldx;
91          double  lddx[3], pt[MAXDIM];
92 +        double  vldx[4];
93          register char   **sa;
94          register int    i;
95  
# Line 153 | Line 155 | double  omega;                 /* light source size */
155          } else {
156                  for (i = 0; i < np->dp->nd; i++)
157                          pt[i] = funvalue(sa[3+i], 3, lddx);
158 <                dtmp = datavalue(np->dp, pt);
159 <                dtmp = funvalue(sa[0], 1, &dtmp);
158 >                vldx[0] = datavalue(np->dp, pt);
159 >                vldx[1] = lddx[0]; vldx[2] = lddx[1]; vldx[3] = lddx[2];
160 >                dtmp = funvalue(sa[0], 4, vldx);
161                  setcolor(ctmp, dtmp, dtmp, dtmp);
162          }
163          if (errno) {
# Line 194 | Line 197 | register RAY  *r;
197          double  transtest, transdist;
198          int  hasrefl, hastrans;
199          COLOR  ctmp;
197        double  dtmp;
200          register MFUNC  *mf;
201          register int  i;
202                                                  /* check arguments */
# Line 239 | Line 241 | register RAY  *r;
241                                                  /* compute transmitted ray */
242          setbrdfunc(&nd);
243          transtest = 0;
244 +        transdist = r->rot;
245          errno = 0;
246          setcolor(ctmp, evalue(mf->ep[3]),
247                          evalue(mf->ep[4]),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines