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

Comparing ray/src/ot/sphere.c (file contents):
Revision 2.5 by schorsch, Tue Mar 30 16:13:00 2004 UTC vs.
Revision 2.6 by greg, Wed Apr 20 18:51:35 2016 UTC

# Line 53 | Line 53 | static const char      RCSid[] = "$Id$";
53   int
54   o_sphere(                       /* determine if sphere intersects cube */
55          OBJREC  *o,
56 <        register CUBE  *cu
56 >        CUBE  *cu
57   )
58   {
59          FVECT  v1;
60          double  d1, d2;
61 <        register RREAL  *fa;
62 <        register int  i;
61 >        RREAL  *fa;
62 >        int  i;
63   #define  cent           fa
64   #define  rad            fa[3]
65                                          /* get arguments */
# Line 71 | Line 71 | o_sphere(                      /* determine if sphere intersects cube */
71                  o->otype = o->otype == OBJ_SPHERE ?
72                                  OBJ_BUBBLE : OBJ_SPHERE;
73                  rad = -rad;
74 <        } else if (rad <= FTINY)
75 <                objerror(o, USER, "zero radius");
74 >        } else if (rad <= FTINY) {
75 >                objerror(o, WARNING, "zero radius");
76 >                return(O_MISS);
77 >        }
78  
79          d1 = ROOT3/2.0 * cu->cusize;    /* bounding radius for cube */
80  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines