37 |
|
* 5) If test 4 fails, we have no intersection. |
38 |
|
*/ |
39 |
|
|
40 |
< |
|
41 |
< |
o_face(o, cu) /* determine if face intersects cube */ |
42 |
< |
OBJREC *o; |
43 |
< |
CUBE *cu; |
40 |
> |
/* XXX this is extern, but not declared in any header file yet */ |
41 |
> |
int |
42 |
> |
o_face( /* determine if face intersects cube */ |
43 |
> |
OBJREC *o, |
44 |
> |
CUBE *cu |
45 |
> |
) |
46 |
|
{ |
47 |
|
FVECT cumin, cumax; |
48 |
|
FVECT v1, v2; |
61 |
|
|
62 |
|
vloc = ABOVE | BELOW; /* check vertices */ |
63 |
|
for (i = 0; i < f->nv; i++) |
64 |
< |
if (j = plocate(VERTEX(f,i), cumin, cumax)) |
64 |
> |
if ( (j = plocate(VERTEX(f,i), cumin, cumax)) ) |
65 |
|
vloc &= j; |
66 |
|
else |
67 |
|
return(O_HIT); /* vertex inside */ |