--- ray/src/ot/bbox.c 1989/02/02 10:33:00 1.1 +++ ray/src/ot/bbox.c 2003/02/25 02:47:22 2.3 @@ -1,19 +1,18 @@ -/* Copyright (c) 1987 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: bbox.c,v 2.3 2003/02/25 02:47:22 greg Exp $"; #endif - /* * bbox.c - routines for bounding box computation. - * - * 8/4/87 */ +#include "copyright.h" + #include "standard.h" #include "object.h" +#include "octree.h" + #include "otypes.h" #include "face.h" @@ -27,10 +26,9 @@ add2bbox(o, bbmin, bbmax) /* expand bounding box to f register OBJREC *o; FVECT bbmin, bbmax; { -#define co ((CONE *)osp) -#define fo ((FACE *)osp) -#define io ((INSTANCE *)osp) - register char *osp; + CONE *co; + FACE *fo; + INSTANCE *io; FVECT v; register int i, j; @@ -64,21 +62,18 @@ FVECT bbmin, bbmax; circle2bbox(CO_P1(co), co->ad, CO_R1(co), bbmin, bbmax); break; case OBJ_INSTANCE: - io = getinstance(o, GET_BOUNDS); + io = getinstance(o, IO_BOUNDS); for (j = 0; j < 8; j++) { for (i = 0; i < 3; i++) { v[i] = io->obj->scube.cuorg[i]; if (j & 1<obj->scube.cusize; } - multp3(v, v, io->f.xfm); + multp3(v, v, io->x.f.xfm); point2bbox(v, bbmin, bbmax); } break; } -#undef co -#undef fo -#undef io }