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

Comparing ray/src/rt/t_data.c (file contents):
Revision 2.4 by greg, Wed Jan 12 16:46:53 1994 UTC vs.
Revision 2.8 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 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   *  t_data.c - routine for stored textures
9 *
10 *     6/4/86
6   */
7  
8 < #include  "ray.h"
8 > #include "copyright.h"
9  
10 + #include  "ray.h"
11   #include  "data.h"
16
12   #include  "func.h"
13 + #include  "rtotypes.h"
14  
15   /*
16   *      A stored texture is specified as follows:
# Line 34 | Line 30 | static char SCCSid[] = "$SunId$ LBL";
30   */
31  
32  
33 < t_data(m, r)                    /* interpolate texture data */
34 < register OBJREC  *m;
35 < RAY  *r;
33 > extern int
34 > t_data(                 /* interpolate texture data */
35 >        register OBJREC  *m,
36 >        RAY  *r
37 > )
38   {
39          int  nv;
40          FVECT  disp;
# Line 55 | Line 53 | RAY  *r;
53          errno = 0;
54          for (i = 0; i < nv; i++)
55                  pt[i] = evalue(mf->ep[i]);
56 <        if (errno)
56 >        if (errno == EDOM || errno == ERANGE)
57                  goto computerr;
58          dval[0] = datavalue(dp, pt);
59          for (i = 1; i < 3; i++) {
# Line 67 | Line 65 | RAY  *r;
65          errno = 0;
66          for (i = 0; i < 3; i++)
67                  disp[i] = funvalue(m->oargs.sarg[i], 3, dval);
68 <        if (errno)
68 >        if (errno == EDOM || errno == ERANGE)
69                  goto computerr;
70          if (mf->f != &unitxf)
71                  multv3(disp, disp, mf->f->xfm);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines