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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.46 by greg, Thu Aug 28 03:22:16 2003 UTC vs.
Revision 2.47 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include "copyright.h"
15  
16   #include  "ray.h"
17
17   #include  "ambient.h"
18 <
18 > #include  "source.h"
19   #include  "otypes.h"
20 <
20 > #include  "rtotypes.h"
21   #include  "random.h"
22  
23   #ifndef  MAXITER
# Line 27 | Line 26 | static const char RCSid[] = "$Id$";
26                                          /* estimate of Fresnel function */
27   #define  FRESNE(ci)     (exp(-5.85*(ci)) - 0.00287989916)
28  
30 static void  gaussamp();
29  
30   /*
31   *      This routine implements the isotropic Gaussian
# Line 66 | Line 64 | typedef struct {
64          double  pdot;           /* perturbed dot product */
65   }  NORMDAT;             /* normal material data */
66  
67 + static srcdirf_t dirnorm;
68 + static void gaussamp(RAY  *r, NORMDAT  *np);
69  
70 +
71   static void
72 < dirnorm(cval, np, ldir, omega)          /* compute source contribution */
73 < COLOR  cval;                    /* returned coefficient */
74 < register NORMDAT  *np;          /* material data */
75 < FVECT  ldir;                    /* light source direction */
76 < double  omega;                  /* light source size */
72 > dirnorm(                /* compute source contribution */
73 >        COLOR  cval,                    /* returned coefficient */
74 >        void  *nnp,             /* material data */
75 >        FVECT  ldir,                    /* light source direction */
76 >        double  omega                   /* light source size */
77 > )
78   {
79 +        register NORMDAT *np = nnp;
80          double  ldot;
81          double  ldiff;
82          double  dtmp, d2;
# Line 159 | Line 162 | double  omega;                 /* light source size */
162   }
163  
164  
165 < int
166 < m_normal(m, r)                  /* color a ray that hit something normal */
167 < register OBJREC  *m;
168 < register RAY  *r;
165 > extern int
166 > m_normal(                       /* color a ray that hit something normal */
167 >        register OBJREC  *m,
168 >        register RAY  *r
169 > )
170   {
171          NORMDAT  nd;
172          double  fest;
# Line 353 | Line 357 | register RAY  *r;
357  
358  
359   static void
360 < gaussamp(r, np)                 /* sample gaussian specular */
361 < RAY  *r;
362 < register NORMDAT  *np;
360 > gaussamp(                       /* sample gaussian specular */
361 >        RAY  *r,
362 >        register NORMDAT  *np
363 > )
364   {
365          RAY  sr;
366          FVECT  u, v, h;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines