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 2.4 by gwlarson, Mon Aug 24 16:38:44 1998 UTC vs.
Revision 2.10 by greg, Fri Jun 27 06:53:21 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   *  octree.h - header file for routines using octrees.
7 *
8 *     7/28/85
4   */
5 + #ifndef _RAD_OCTREE_H_
6 + #define _RAD_OCTREE_H_
7 + #ifdef __cplusplus
8 + extern "C" {
9 + #endif
10  
11   /*
12   *      An octree is expressed as an integer which is either
# Line 36 | Line 36
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
39 > #ifdef  SMLMEM
40   #define  MAXOBLK        4095            /* maximum octree block */
41 + #else
42 + #define  MAXOBLK        32767           /* maximum octree block */
43   #endif
44   #endif
45  
# Line 47 | Line 47 | extern OCTREE  *octblock[MAXOBLK];     /* octree blocks */
47  
48   #define  octkid(ot,br)  (octblock[octbi(ot)][octti(ot)+br])
49  
50 extern OCTREE  octalloc(), combine(), fullnode();
51
50   /*
51   *      The cube structure is used to hold an octree and its cubic
52   *      boundaries.
# Line 83 | Line 81 | extern CUBE  thescene;                 /* the main scene */
81   #define  O_MISS         0               /* no intersection */
82   #define  O_HIT          1               /* intersection */
83   #define  O_IN           2               /* cube contained entirely */
84 +
85 +
86 + extern OCTREE   octalloc(void);
87 + extern void     octfree(OCTREE ot);
88 + extern void     octdone(void);
89 + extern OCTREE   combine(OCTREE ot);
90 + extern void     culocate(CUBE *cu, FVECT pt);
91 + extern void     cucopy(CUBE *cu1, CUBE *cu2);
92 + extern int      incube(CUBE *cu, FVECT pt);
93 +
94 + extern int      readoct(char *fname, int load, CUBE *scene, char *ofn[]);
95 +
96 + extern void     readscene(FILE *fp, int objsiz);
97 + extern void     writescene(int firstobj, int nobjs, FILE *fp);
98 +
99 +
100 + #ifdef __cplusplus
101 + }
102 + #endif
103 + #endif /* _RAD_OCTREE_H_ */
104 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines