--- ray/src/ot/o_instance.c 1989/10/13 20:08:08 1.2 +++ ray/src/ot/o_instance.c 1991/01/05 09:41:26 1.7 @@ -1,4 +1,4 @@ -/* Copyright (c) 1988 Regents of the University of California */ +/* Copyright (c) 1991 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -53,7 +53,7 @@ CUBE *cu; int vloc, vout; register int i, j; /* get octree arguments */ - in = getinstance(o, GET_BOUNDS); + in = getinstance(o, IO_BOUNDS); /* check if cube vertex in octree */ for (j = 0; j < 3; j++) cumax[j] = (cumin[j] = in->obj->scube.cuorg[j]) + @@ -66,17 +66,17 @@ CUBE *cu; if (i & 1<cusize; } - multp3(v2, v1, in->b.xfm); + multp3(v2, v1, in->x.b.xfm); if (j = plocate(v2, cumin, cumax)) vout++; vloc &= j; } if (vout == 0) /* all inside */ - return(2); + return(O_IN); if (vout < 8) /* some inside */ - return(1); + return(O_HIT); if (vloc) /* all to one side */ - return(0); + return(O_MISS); /* octree vertices in cube? */ for (j = 0; j < 3; j++) cumax[j] = (cumin[j] = cu->cuorg[j]) + cu->cusize; @@ -87,14 +87,14 @@ CUBE *cu; if (i & 1<obj->scube.cusize; } - multp3(vert[i], v1, in->f.xfm); + multp3(vert[i], v1, in->x.f.xfm); if (j = plocate(vert[i], cumin, cumax)) vloc &= j; else - return(1); /* vertex inside */ + return(O_HIT); /* vertex inside */ } if (vloc) /* all to one side */ - return(0); + return(O_MISS); /* check edges */ for (i = 0; i < 4; i++) for (j = 0; j < 3; j++) { @@ -102,8 +102,8 @@ CUBE *cu; VCOPY(v1, vert[vstart[i]]); VCOPY(v2, vert[vstart[i] ^ 1<