1 |
– |
/* Copyright (c) 1986 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 |
|
* o_face.c - routines for creating octrees for polygonal faces. |
6 |
|
* |
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 |
> |
int |
41 |
> |
o_face( /* determine if face intersects cube */ |
42 |
> |
OBJREC *o, |
43 |
> |
CUBE *cu |
44 |
> |
) |
45 |
|
{ |
46 |
|
FVECT cumin, cumax; |
47 |
|
FVECT v1, v2; |
60 |
|
|
61 |
|
vloc = ABOVE | BELOW; /* check vertices */ |
62 |
|
for (i = 0; i < f->nv; i++) |
63 |
< |
if (j = plocate(VERTEX(f,i), cumin, cumax)) |
63 |
> |
if ( (j = plocate(VERTEX(f,i), cumin, cumax)) ) |
64 |
|
vloc &= j; |
65 |
|
else |
66 |
|
return(O_HIT); /* vertex inside */ |