40 |
|
*/ |
41 |
|
|
42 |
|
|
43 |
+ |
static int o_cube(CUBE *cu1, FULLXF *fxf, CUBE *cu); |
44 |
+ |
|
45 |
+ |
|
46 |
|
static int |
47 |
< |
o_cube(cu1, fxf, cu) /* determine if cubes intersect */ |
48 |
< |
CUBE *cu1; |
49 |
< |
FULLXF *fxf; |
50 |
< |
CUBE *cu; |
47 |
> |
o_cube( /* determine if cubes intersect */ |
48 |
> |
CUBE *cu1, |
49 |
> |
FULLXF *fxf, |
50 |
> |
CUBE *cu |
51 |
> |
) |
52 |
|
{ |
53 |
|
static int vstart[4] = {0, 3, 5, 6}; |
54 |
|
FVECT cumin, cumax; |
68 |
|
v1[j] += cu->cusize; |
69 |
|
} |
70 |
|
multp3(v2, v1, fxf->b.xfm); |
71 |
< |
if (j = plocate(v2, cumin, cumax)) |
71 |
> |
if ( (j = plocate(v2, cumin, cumax)) ) |
72 |
|
vout++; |
73 |
|
vloc &= j; |
74 |
|
} |
89 |
|
v1[j] += cu1->cusize; |
90 |
|
} |
91 |
|
multp3(vert[i], v1, fxf->f.xfm); |
92 |
< |
if (j = plocate(vert[i], cumin, cumax)) |
92 |
> |
if ( (j = plocate(vert[i], cumin, cumax)) ) |
93 |
|
vloc &= j; |
94 |
|
else |
95 |
|
return(O_HIT); /* vertex inside */ |
111 |
|
|
112 |
|
|
113 |
|
int |
114 |
< |
o_instance(o, cu) /* determine if instance intersects */ |
115 |
< |
OBJREC *o; |
116 |
< |
CUBE *cu; |
114 |
> |
o_instance( /* determine if instance intersects */ |
115 |
> |
OBJREC *o, |
116 |
> |
CUBE *cu |
117 |
> |
) |
118 |
|
{ |
119 |
|
INSTANCE *ins; |
120 |
|
/* get octree bounds */ |
125 |
|
|
126 |
|
|
127 |
|
int |
128 |
< |
o_mesh(o, cu) /* determine if mesh intersects */ |
129 |
< |
OBJREC *o; |
130 |
< |
CUBE *cu; |
128 |
> |
o_mesh( /* determine if mesh intersects */ |
129 |
> |
OBJREC *o, |
130 |
> |
CUBE *cu |
131 |
> |
) |
132 |
|
{ |
133 |
|
MESHINST *mip; |
134 |
|
/* get mesh bounds */ |