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.2 by greg, Fri Oct 2 16:17:04 1992 UTC vs.
Revision 2.8 by greg, Tue Dec 5 11:46:00 1995 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ LBL";
16  
17   #ifdef  DISPERSE
18   #include  "source.h"
19 + static  disperse();
20 + static int  lambda();
21   #endif
22  
23   /*
# Line 65 | Line 67 | register RAY  *r;
67          if (m->oargs.nfargs != (m->otype==MAT_DIELECTRIC ? 5 : 8))
68                  objerror(m, USER, "bad arguments");
69  
68        r->rt = r->rot;                         /* just use ray length */
69
70          raytexture(r, m->omod);                 /* get modifiers */
71  
72          cos1 = raynormal(dnorm, r);             /* cosine of theta1 */
# Line 84 | Line 84 | register RAY  *r;
84                  setcolor(mcolor, pow(m->oargs.farg[0], r->rot),
85                                   pow(m->oargs.farg[1], r->rot),
86                                   pow(m->oargs.farg[2], r->rot));
87 +                multcolor(mcolor, r->pcol);     /* modify */
88          } else {                                /* outside */
89                  nratio = 1.0 / nratio;
90                  if (m->otype == MAT_INTERFACE)
# Line 128 | Line 129 | register RAY  *r;
129                          if (m->otype != MAT_DIELECTRIC
130                                          || r->rod > 0.0
131                                          || r->crtype & SHADOW
132 <                                        || directinvis
132 >                                        || !directvis
133                                          || m->oargs.farg[4] == 0.0
134                                          || !disperse(m, r, p.rdir, trans))
135   #endif
136                          {
137                                  rayvalue(&p);
137                                multcolor(mcolor, r->pcol);     /* modify */
138                                  scalecolor(p.rcol, trans);
139                                  addcolor(r->rcol, p.rcol);
140 +                                if (nratio >= 1.0-FTINY && nratio <= 1.0+FTINY)
141 +                                        r->rt = r->rot + p.rt;
142                          }
143                  }
144          }
# Line 155 | Line 157 | register RAY  *r;
157          }
158  
159          multcolor(r->rcol, mcolor);             /* multiply by transmittance */
160 +
161 +        return(1);
162   }
163  
164  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines