ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/ot/o_face.c
(Generate patch)

Comparing ray/src/ot/o_face.c (file contents):
Revision 1.3 by greg, Sat Oct 14 11:19:32 1989 UTC vs.
Revision 2.4 by schorsch, Sat Mar 27 12:41:45 2004 UTC

# Line 1 | Line 1
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   *
# Line 40 | Line 37 | static char SCCSid[] = "$SunId$ LBL";
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;
# Line 57 | Line 56 | CUBE  *cu;
56                  return(O_MISS);
57                                          /* compute cube boundaries */
58          for (j = 0; j < 3; j++)
59 <                cumax[j] = (cumin[j] = cu->cuorg[j]) + cu->cusize;
59 >                cumax[j] = (cumin[j] = cu->cuorg[j]-FTINY)
60 >                                + cu->cusize + 2.0*FTINY;
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 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines