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

Comparing ray/src/rt/t_func.c (file contents):
Revision 2.6 by greg, Wed Mar 5 16:16:53 2003 UTC vs.
Revision 2.8 by greg, Mon Oct 25 22:57:45 2010 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include "copyright.h"
9  
10   #include  "ray.h"
11
11   #include  "func.h"
12 + #include  "rtotypes.h"
13  
14   /*
15   *      A procedural texture perturbs the surface normal
# Line 28 | Line 28 | static const char      RCSid[] = "$Id$";
28   */
29  
30  
31 < t_func(m, r)                    /* compute texture for ray */
32 < register OBJREC  *m;
33 < register RAY  *r;
31 > extern int
32 > t_func(                 /* compute texture for ray */
33 >        register OBJREC  *m,
34 >        register RAY  *r
35 > )
36   {
37          FVECT  disp;
38          double  d;
# Line 56 | Line 58 | register RAY  *r;
58                  d = 1.0 / (mf->f->sca * r->rox->f.sca);
59          } else
60                  d = 1.0 / mf->f->sca;
61 <        for (i = 0; i < 3; i++)
60 <                r->pert[i] += disp[i] * d;
61 >        VSUM(r->pert, r->pert, disp, d);
62          return(0);
63   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines