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

Comparing ray/src/ot/o_cone.c (file contents):
Revision 2.2 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 2.4 by schorsch, Tue Mar 30 16:13:00 2004 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   */
9  
10   #include  "standard.h"
11
11   #include  "octree.h"
13
12   #include  "object.h"
15
13   #include  "cone.h"
14  
15   #define  ROOT3          1.732050808
# Line 32 | Line 29 | static const char      RCSid[] = "$Id$";
29  
30   extern double  mincusize;               /* minimum cube size */
31  
32 + static double findcseg(FVECT ep0, FVECT ep1, CONE *co, FVECT p);
33  
34 < o_cone(o, cu)                   /* determine if cone intersects cube */
35 < OBJREC  *o;
36 < register CUBE  *cu;
34 >
35 >
36 > extern int
37 > o_cone(         /* determine if cone intersects cube */
38 >        OBJREC  *o,
39 >        register CUBE  *cu
40 > )
41   {
40        double  dist2lseg(), findcseg();
42          CONE  *co;
43          FVECT  ep0, ep1;
44 + #ifdef STRICT
45          FVECT  cumin, cumax;
46          CUBE  cukid;
47 +        register int  j;
48 + #endif
49          double  r;
50          FVECT  p;
51 <        register int  i, j;
51 >        register int  i;
52                                          /* get cone arguments */
53          co = getcone(o, 0);
54                                          /* get cube center */
# Line 88 | Line 92 | register CUBE  *cu;
92   }
93  
94  
95 < double
96 < findcseg(ep0, ep1, co, p)       /* find line segment from cone closest to p */
97 < FVECT  ep0, ep1;
98 < register CONE  *co;
99 < FVECT  p;
95 > static double
96 > findcseg(       /* find line segment from cone closest to p */
97 >        FVECT  ep0,
98 >        FVECT  ep1,
99 >        register CONE  *co,
100 >        FVECT  p
101 > )
102   {
103          double  d;
104          FVECT  v;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines