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

Comparing ray/src/rt/o_face.c (file contents):
Revision 2.4 by greg, Tue Mar 11 17:08:55 2003 UTC vs.
Revision 2.6 by greg, Thu Mar 2 16:51:55 2006 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   #include "copyright.h"
9  
10   #include  "ray.h"
11
11   #include  "face.h"
12 + #include  "rtotypes.h"
13  
14  
15 < o_face(o, r)            /* compute intersection with polygonal face */
16 < OBJREC  *o;
17 < register RAY  *r;
15 > extern int
16 > o_face(         /* compute intersection with polygonal face */
17 >        OBJREC  *o,
18 >        register RAY  *r
19 > )
20   {
21          double  rdot;           /* direction . normal */
22          double  t;              /* distance to intersection */
23          FVECT  pisect;          /* intersection point */
24          register FACE  *f;      /* face record */
23        register int  i;
25  
26          f = getface(o);
27                  
# Line 43 | Line 44 | register RAY  *r;
44          if (t <= FTINY || t >= r->rot)          /* not good enough */
45                  return(0);
46                                                  /* compute intersection */
47 <        for (i = 0; i < 3; i++)
47 <                pisect[i] = r->rorg[i] + r->rdir[i]*t;
47 >        VSUM(pisect, r->rorg, r->rdir, t);
48  
49          if (!inface(pisect, f))                 /* ray intersects face? */
50                  return(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines