--- ray/src/ot/o_cone.c 1989/02/02 10:33:02 1.1 +++ ray/src/ot/o_cone.c 2003/02/22 02:07:26 2.2 @@ -1,9 +1,6 @@ -/* Copyright (c) 1986 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: o_cone.c,v 2.2 2003/02/22 02:07:26 greg Exp $"; #endif - /* * o_cone.c - routines for intersecting cubes with cones. * @@ -59,19 +56,19 @@ register CUBE *cu; if (findcseg(ep0, ep1, co, p) > 0.0) { /* check min. distance to cone */ if (dist2lseg(p, ep0, ep1) > (r+FTINY)*(r+FTINY)) - return(0); + return(O_MISS); #ifdef STRICT /* get cube boundaries */ for (i = 0; i < 3; i++) cumax[i] = (cumin[i] = cu->cuorg[i]) + cu->cusize; /* closest segment intersects? */ if (clip(ep0, ep1, cumin, cumax)) - return(1); + return(O_HIT); } /* check sub-cubes */ cukid.cusize = cu->cusize * 0.5; if (cukid.cusize < mincusize) - return(1); /* cube too small */ + return(O_HIT); /* cube too small */ cukid.cutree = EMPTY; for (j = 0; j < 8; j++) { @@ -81,12 +78,12 @@ register CUBE *cu; cukid.cuorg[i] += cukid.cusize; } if (o_cone(o, &cukid)) - return(1); /* sub-cube intersects */ + return(O_HIT); /* sub-cube intersects */ } - return(0); /* no intersection */ + return(O_MISS); /* no intersection */ #else } - return(1); /* assume intersection */ + return(O_HIT); /* assume intersection */ #endif }