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

Comparing ray/src/rt/glass.c (file contents):
Revision 2.8 by greg, Thu Apr 11 15:59:56 1996 UTC vs.
Revision 2.12 by greg, Mon Mar 3 00:10:51 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  glass.c - simpler shading function for thin glass surfaces.
9 *
10 *     11/14/86
6   */
7  
8 + #include "copyright.h"
9 +
10   #include  "ray.h"
11  
12   #include  "otypes.h"
# Line 26 | Line 23 | static char SCCSid[] = "$SunId$ LBL";
23   *      modifier glass id
24   *      0
25   *      0
26 < *      3 red grn blu
26 > *      3+ red grn blu [refractive_index]
27   *
28   *  The color is used for the transmission at normal incidence.
29   *  To compute transmissivity (tn) from transmittance (Tn) use:
# Line 69 | Line 66 | register RAY  *r;
66  
67          setcolor(mcolor, m->oargs.farg[0], m->oargs.farg[1], m->oargs.farg[2]);
68  
69 +                                                /* get modifiers */
70 +        raytexture(r, m->omod);
71          if (r->rod < 0.0)                       /* reorient if necessary */
72                  flipsurface(r);
73          mirtest = transtest = 0;
74          mirdist = transdist = r->rot;
75 <                                                /* get modifiers */
77 <        raytexture(r, m->omod);
75 >                                                /* perturb normal */
76          if (hastexture = DOT(r->pert,r->pert) > FTINY*FTINY)
77                  pdot = raynormal(pnorm, r);
78          else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines