8 |
|
#include "copyright.h" |
9 |
|
|
10 |
|
#include "ray.h" |
11 |
– |
|
11 |
|
#include "data.h" |
13 |
– |
|
12 |
|
#include "func.h" |
13 |
+ |
#include "rtotypes.h" |
14 |
|
|
15 |
|
/* |
16 |
|
* A stored texture is specified as follows: |
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; |
74 |
|
d = 1.0 / (mf->f->sca * r->rox->f.sca); |
75 |
|
} else |
76 |
|
d = 1.0 / mf->f->sca; |
77 |
< |
for (i = 0; i < 3; i++) |
77 |
< |
r->pert[i] += disp[i] * d; |
77 |
> |
VSUM(r->pert, r->pert, disp, d); |
78 |
|
return(0); |
79 |
|
computerr: |
80 |
|
objerror(m, WARNING, "compute error"); |