8 |
|
#include "copyright.h" |
9 |
|
|
10 |
|
#include "ray.h" |
11 |
– |
|
11 |
|
#include "instance.h" |
12 |
+ |
#include "rtotypes.h" |
13 |
|
|
14 |
|
|
15 |
< |
o_instance(o, r) /* compute ray intersection with octree */ |
16 |
< |
OBJREC *o; |
17 |
< |
register RAY *r; |
15 |
> |
extern int |
16 |
> |
o_instance( /* compute ray intersection with octree */ |
17 |
> |
OBJREC *o, |
18 |
> |
register RAY *r |
19 |
> |
) |
20 |
|
{ |
21 |
|
RAY rcont; |
22 |
|
double d; |
25 |
|
/* get the octree */ |
26 |
|
ins = getinstance(o, IO_ALL); |
27 |
|
/* copy and transform ray */ |
28 |
< |
copystruct(&rcont, r); |
28 |
> |
rcont = *r; |
29 |
|
multp3(rcont.rorg, r->rorg, ins->x.b.xfm); |
30 |
|
multv3(rcont.rdir, r->rdir, ins->x.b.xfm); |
31 |
|
for (i = 0; i < 3; i++) |