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

Comparing ray/src/rt/dielectric.c (file contents):
Revision 2.23 by greg, Wed Aug 7 05:10:09 2013 UTC vs.
Revision 2.24 by greg, Sat May 10 17:43:01 2014 UTC

# Line 64 | Line 64 | mylog(         /* special log for extinction coefficients */
64   }
65  
66  
67 < extern int
67 > int
68   m_dielectric(   /* color a ray which hit a dielectric interface */
69          OBJREC  *m,
70 <        register RAY  *r
70 >        RAY  *r
71   )
72   {
73          double  cos1, cos2, nratio;
# Line 81 | Line 81 | m_dielectric(  /* color a ray which hit a dielectric in
81          FVECT  dnorm;
82          double  d1, d2;
83          RAY  p;
84 <        register int  i;
84 >        int  i;
85  
86          if (m->oargs.nfargs != (m->otype==MAT_DIELECTRIC ? 5 : 8))
87                  objerror(m, USER, "bad arguments");
# Line 94 | Line 94 | m_dielectric(  /* color a ray which hit a dielectric in
94                  VCOPY(dnorm, r->ron);
95                  cos1 = r->rod;
96          }
97 <        flatsurface = !hastexture && r->ro != NULL && isflat(r->ro->otype);
97 >        flatsurface = r->ro != NULL && isflat(r->ro->otype) &&
98 >                        !hastexture | (r->crtype & AMBIENT);
99  
100                                                  /* index of refraction */
101          if (m->otype == MAT_DIELECTRIC)
# Line 199 | Line 200 | m_dielectric(  /* color a ray which hit a dielectric in
200                                  addcolor(r->rcol, p.rcol);
201                                                  /* virtual distance */
202                                  if (flatsurface ||
203 <                                        (1.-FTINY <= nratio &&
204 <                                                nratio <= 1.+FTINY)) {
203 >                                        (1.-FTINY <= nratio) &
204 >                                                (nratio <= 1.+FTINY)) {
205                                          transtest = 2*bright(p.rcol);
206                                          transdist = r->rot + p.rt;
207                                  }
# Line 380 | Line 381 | disperse(  /* check light sources for dispersion */
381  
382   static int
383   lambda(                 /* compute lambda for material */
384 <        register OBJREC  *m,
384 >        OBJREC  *m,
385          FVECT  v2,
386          FVECT  dv,
387          FVECT  lr

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines