ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/octree.h
(Generate patch)

Comparing ray/src/common/octree.h (file contents):
Revision 1.1 by greg, Thu Feb 2 10:34:18 1989 UTC vs.
Revision 2.4 by gwlarson, Mon Aug 24 16:38:44 1998 UTC

# Line 20 | Line 20
20   *              < -1:   it is an index to a set of objects
21   */
22  
23 < typedef int  OCTREE;
23 > #ifndef  OCTREE
24 > #define  OCTREE         int
25 > #endif
26  
27   #define  EMPTY          (-1)
28  
# Line 29 | Line 31 | typedef int  OCTREE;
31   #define  istree(ot)     ((ot) > EMPTY)
32  
33   #define  oseti(ot)      (-(ot)-2)       /* object set index */
34 < #define  octbi(ot)      ((ot)>>8)       /* octree block index */
35 < #define  octti(ot)      (((ot)&0377)<<3)/* octree index in block */
34 > #define  OCTBLKSIZ      04000           /* octree block size */
35 > #define  octbi(ot)      ((ot)>>11)      /* octree block index */
36 > #define  octti(ot)      (((ot)&03777)<<3)/* octree index in block */
37  
38 + #ifndef  MAXOBLK
39 + #ifdef  BIGMEM
40 + #define  MAXOBLK        32767           /* maximum octree block */
41 + #else
42   #define  MAXOBLK        4095            /* maximum octree block */
43 + #endif
44 + #endif
45  
46   extern OCTREE  *octblock[MAXOBLK];      /* octree blocks */
47  
# Line 61 | Line 70 | extern CUBE  thescene;                 /* the main scene */
70   #define  IO_FILES       010             /* object file names */
71   #define  IO_BOUNDS      020             /* octree boundary */
72   #define  IO_ALL         (~0)            /* everything */
73 +                                /* octree format identifier */
74 + #define  OCTFMT         "Radiance_octree"
75                                  /* magic number for octree files */
76 < #define  OCTMAGIC       (275+sizeof(OBJECT))
76 > #define  MAXOBJSIZ      8               /* maximum sizeof(OBJECT) */
77 > #define  OCTMAGIC       ( 4 *MAXOBJSIZ+251)     /* increment first value */
78                                  /* octree node types */
79   #define  OT_EMPTY       0
80   #define  OT_FULL        1
81   #define  OT_TREE        2
82 +                                /* return values for surface functions */
83 + #define  O_MISS         0               /* no intersection */
84 + #define  O_HIT          1               /* intersection */
85 + #define  O_IN           2               /* cube contained entirely */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines