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

Comparing ray/src/ot/bbox.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:33:00 1989 UTC vs.
Revision 2.3 by greg, Tue Feb 25 02:47:22 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1987 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  bbox.c - routines for bounding box computation.
9 *
10 *      8/4/87
6   */
7  
8 + #include "copyright.h"
9 +
10   #include  "standard.h"
11  
12   #include  "object.h"
13  
14 + #include  "octree.h"
15 +
16   #include  "otypes.h"
17  
18   #include  "face.h"
# Line 27 | Line 26 | add2bbox(o, bbmin, bbmax)              /* expand bounding box to f
26   register OBJREC  *o;
27   FVECT  bbmin, bbmax;
28   {
29 < #define  co     ((CONE *)osp)
30 < #define  fo     ((FACE *)osp)
31 < #define  io     ((INSTANCE *)osp)
33 <        register char  *osp;
29 >        CONE  *co;
30 >        FACE  *fo;
31 >        INSTANCE  *io;
32          FVECT  v;
33          register int  i, j;
34  
# Line 64 | Line 62 | FVECT  bbmin, bbmax;
62                  circle2bbox(CO_P1(co), co->ad, CO_R1(co), bbmin, bbmax);
63                  break;
64          case OBJ_INSTANCE:
65 <                io = getinstance(o, GET_BOUNDS);
65 >                io = getinstance(o, IO_BOUNDS);
66                  for (j = 0; j < 8; j++) {
67                          for (i = 0; i < 3; i++) {
68                                  v[i] = io->obj->scube.cuorg[i];
69                                  if (j & 1<<i)
70                                          v[i] += io->obj->scube.cusize;
71                          }
72 <                        multp3(v, v, io->f.xfm);
72 >                        multp3(v, v, io->x.f.xfm);
73                          point2bbox(v, bbmin, bbmax);
74                  }
75                  break;
76          }
79 #undef  co
80 #undef  fo
81 #undef  io
77   }
78  
79  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines