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

Comparing ray/src/rt/sphere.c (file contents):
Revision 2.4 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.7 by schorsch, Tue Mar 30 16:13:01 2004 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static const char       RCSid[] = "$Id$";
2 > static const char RCSid[] = "$Id$";
3   #endif
4   /*
5   *  sphere.c - compute ray intersection with spheres.
# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include "copyright.h"
9  
10   #include  "ray.h"
11
11   #include  "otypes.h"
12 + #include  "rtotypes.h"
13  
14  
15 < o_sphere(so, r)                 /* compute intersection with sphere */
16 < OBJREC  *so;
17 < register RAY  *r;
15 > extern int
16 > o_sphere(                       /* compute intersection with sphere */
17 >        OBJREC  *so,
18 >        register RAY  *r
19 > )
20   {
21          double  a, b, c;        /* coefficients for quadratic equation */
22          double  root[2];        /* quadratic roots */
23          int  nroots;
24          double  t;
25 <        register FLOAT  *ap;
25 >        register RREAL  *ap;
26          register int  i;
27  
28          if (so->oargs.nfargs != 4)
# Line 77 | Line 79 | register RAY  *r;
79          }
80          r->rod = -DOT(r->rdir, r->ron);
81          r->rox = NULL;
82 +        r->pert[0] = r->pert[1] = r->pert[2] = 0.0;
83 +        r->uv[0] = r->uv[1] = 0.0;
84  
85          return(1);                      /* hit */
86   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines