--- ray/src/ot/sphere.c 2003/02/22 02:07:26 2.2 +++ ray/src/ot/sphere.c 2016/04/20 18:51:35 2.6 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: sphere.c,v 2.2 2003/02/22 02:07:26 greg Exp $"; +static const char RCSid[] = "$Id: sphere.c,v 2.6 2016/04/20 18:51:35 greg Exp $"; #endif /* * sphere.c - routines for creating octrees for spheres. @@ -50,14 +50,16 @@ static const char RCSid[] = "$Id: sphere.c,v 2.2 2003/ */ -o_sphere(o, cu) /* determine if sphere intersects cube */ -OBJREC *o; -register CUBE *cu; +int +o_sphere( /* determine if sphere intersects cube */ + OBJREC *o, + CUBE *cu +) { FVECT v1; double d1, d2; - register FLOAT *fa; - register int i; + RREAL *fa; + int i; #define cent fa #define rad fa[3] /* get arguments */ @@ -69,8 +71,10 @@ register CUBE *cu; o->otype = o->otype == OBJ_SPHERE ? OBJ_BUBBLE : OBJ_SPHERE; rad = -rad; - } else if (rad <= FTINY) - objerror(o, USER, "zero radius"); + } else if (rad <= FTINY) { + objerror(o, WARNING, "zero radius"); + return(O_MISS); + } d1 = ROOT3/2.0 * cu->cusize; /* bounding radius for cube */