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.8 by greg, Thu May 15 05:13:35 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  
6 + #include "copyright.h"
7 +
8   /*
9   *      An octree is expressed as an integer which is either
10   *      an index to eight other nodes, the empty tree, or an index
# Line 36 | Line 33
33   #define  octti(ot)      (((ot)&03777)<<3)/* octree index in block */
34  
35   #ifndef  MAXOBLK
36 < #ifdef  BIGMEM
40 < #define  MAXOBLK        32767           /* maximum octree block */
41 < #else
36 > #ifdef  SMLMEM
37   #define  MAXOBLK        4095            /* maximum octree block */
38 + #else
39 + #define  MAXOBLK        32767           /* maximum octree block */
40   #endif
41   #endif
42  
# Line 47 | Line 44 | extern OCTREE  *octblock[MAXOBLK];     /* octree blocks */
44  
45   #define  octkid(ot,br)  (octblock[octbi(ot)][octti(ot)+br])
46  
50 extern OCTREE  octalloc(), combine(), fullnode();
51
47   /*
48   *      The cube structure is used to hold an octree and its cubic
49   *      boundaries.
# Line 83 | Line 78 | extern CUBE  thescene;                 /* the main scene */
78   #define  O_MISS         0               /* no intersection */
79   #define  O_HIT          1               /* intersection */
80   #define  O_IN           2               /* cube contained entirely */
81 +
82 + #ifdef NOPROTO
83 +
84 + extern OCTREE   octalloc();
85 + extern void     octfree();
86 + extern void     octdone();
87 + extern OCTREE   combine();
88 + extern void     culocate();
89 + extern void     cucopy();
90 + extern int      incube();
91 + extern int      readoct();
92 + extern void     readscene();
93 + extern void     writescene();
94 +
95 + #else
96 +
97 + extern OCTREE   octalloc(void);
98 + extern void     octfree(OCTREE ot);
99 + extern void     octdone(void);
100 + extern OCTREE   combine(OCTREE ot);
101 + extern void     culocate(CUBE *cu, FVECT pt);
102 + extern void     cucopy(CUBE *cu1, CUBE *cu2);
103 + extern int      incube(CUBE *cu, FVECT pt);
104 +
105 + extern int      readoct(char *fname, int load, CUBE *scene, char *ofn[]);
106 +
107 + extern void     readscene(FILE *fp, int objsiz);
108 + extern void     writescene(int firstobj, int nobjs, FILE *fp);
109 +
110 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines