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 |
|
|
34 |
|
#define octbi(ot) ((ot)>>8) /* octree block index */ |
35 |
|
#define octti(ot) (((ot)&0377)<<3)/* octree index in block */ |
36 |
|
|
37 |
+ |
#ifndef MAXOBLK |
38 |
+ |
#ifdef BIGMEM |
39 |
+ |
#define MAXOBLK 8191 /* maximum octree block */ |
40 |
+ |
#else |
41 |
|
#define MAXOBLK 4095 /* maximum octree block */ |
42 |
+ |
#endif |
43 |
+ |
#endif |
44 |
|
|
45 |
|
extern OCTREE *octblock[MAXOBLK]; /* octree blocks */ |
46 |
|
|
72 |
|
/* octree format identifier */ |
73 |
|
#define OCTFMT "Radiance_octree" |
74 |
|
/* magic number for octree files */ |
75 |
< |
#define OCTMAGIC (283+sizeof(OBJECT)) |
75 |
> |
#define MAXOBJSIZ 8 /* maximum sizeof(OBJECT) */ |
76 |
> |
#define OCTMAGIC ( 4 *MAXOBJSIZ+251) /* increment first value */ |
77 |
|
/* octree node types */ |
78 |
|
#define OT_EMPTY 0 |
79 |
|
#define OT_FULL 1 |