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.18 by greg, Wed Mar 5 16:16:53 2003 UTC vs.
Revision 2.20 by greg, Thu Aug 28 03:22:16 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include  "ray.h"
11  
12 + #include  "ambient.h"
13 +
14   #include  "data.h"
15  
16   #include  "otypes.h"
# Line 170 | Line 172 | double  omega;                 /* light source size */
172                  /*
173                   *  Compute reflected non-diffuse component.
174                   */
175 <                if (np->mp->otype == MAT_MFUNC | np->mp->otype == MAT_MDATA)
175 >                if ((np->mp->otype == MAT_MFUNC) | (np->mp->otype == MAT_MDATA))
176                          multcolor(ctmp, np->mcolor);
177                  dtmp = ldot * omega * np->rspec;
178                  scalecolor(ctmp, dtmp);
# Line 179 | Line 181 | double  omega;                 /* light source size */
181                  /*
182                   *  Compute transmitted non-diffuse component.
183                   */
184 <                if (np->mp->otype == MAT_TFUNC | np->mp->otype == MAT_TDATA)
184 >                if ((np->mp->otype == MAT_TFUNC) | (np->mp->otype == MAT_TDATA))
185                          multcolor(ctmp, np->mcolor);
186                  dtmp = -ldot * omega * np->tspec;
187                  scalecolor(ctmp, dtmp);
# Line 204 | Line 206 | register RAY  *r;
206          register MFUNC  *mf;
207          register int  i;
208                                                  /* check arguments */
209 <        if (m->oargs.nsargs < 10 | m->oargs.nfargs < 9)
209 >        if ((m->oargs.nsargs < 10) | (m->oargs.nfargs < 9))
210                  objerror(m, USER, "bad # arguments");
211          nd.mp = m;
212          nd.pr = r;
# Line 335 | Line 337 | register RAY  *r;
337          if (r->crtype & SHADOW)
338                  return(1);
339                                                  /* check arguments */
340 <        if (m->oargs.nsargs < (hasdata(m->otype)?4:2) | m->oargs.nfargs <
341 <                        (m->otype==MAT_TFUNC|m->otype==MAT_TDATA?6:4))
340 >        if ((m->oargs.nsargs < (hasdata(m->otype)?4:2)) | (m->oargs.nfargs <
341 >                        ((m->otype==MAT_TFUNC)|(m->otype==MAT_TDATA)?6:4)))
342                  objerror(m, USER, "bad # arguments");
343                                                  /* check for back side */
344          if (r->rod < 0.0) {
# Line 359 | Line 361 | register RAY  *r;
361                                                  /* get specular component */
362          nd.rspec = m->oargs.farg[3];
363                                                  /* compute transmittance */
364 <        if (m->otype == MAT_TFUNC | m->otype == MAT_TDATA) {
364 >        if ((m->otype == MAT_TFUNC) | (m->otype == MAT_TDATA)) {
365                  nd.trans = m->oargs.farg[4]*(1.0 - nd.rspec);
366                  nd.tspec = nd.trans * m->oargs.farg[5];
367                  dtmp = nd.trans - nd.tspec;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines