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

Comparing ray/src/hd/sm_qtree.h (file contents):
Revision 3.9 by gwlarson, Mon Dec 28 18:07:36 1998 UTC vs.
Revision 3.14 by greg, Thu May 15 05:13:35 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid: $Id$ */
2   /*
3   *  sm_qtree.h - header file for routines using spherical quadtrees.
4   *
# Line 19 | Line 16
16   *
17   *              < -1:   it is an index to a set of objects
18   */
19 < #include "object.h"
19 >
20   typedef struct _FUNC {
21      int (*func)();
22 +    int (*func_after)();
23      int *argptr;
24   }FUNC;
25  
26   #define F_FUNC(f) (f.func)
27 + #define F_FUNC2(f) (f.func_after)
28   #define F_ARGS(f) (f.argptr)
29   #define  QUADTREE               int
30  
# Line 43 | Line 42 | typedef struct _FUNC {
42  
43  
44   #ifndef  QT_MAX_BLK
45 < #ifdef  BIGMEM
47 < #define  QT_MAX_BLK     16383           /* maximum quadtree block */
48 < #else
45 > #ifdef  SMLMEM
46   #define  QT_MAX_BLK     2047            /* maximum quadtree block */
47 + #else
48 + #define  QT_MAX_BLK     16383           /* maximum quadtree block */
49   #endif
50   #endif
51  
# Line 70 | Line 69 | typedef struct _FUNC {
69   #define QT_SET_NTH_ELEM(s,n)   ((s)[(n)])  
70  
71   #define QT_CLEAR_SET(s)        ((s)[0] = 0)
72 < #define QT_SET_NEXT_ELEM(p)    (*(p)++)
72 > #define QT_SET_NEXT_ELEM(p)    (*(++p))
73   #define QT_SET_PTR(s)          (&((s)[1]))
74  
75  
# Line 78 | Line 77 | typedef struct _FUNC {
77   #define MAXCSET          2*QT_MAXSET
78   #define QT_MAXCSET       MAXCSET
79   #ifndef QT_SET_THRESHOLD
80 < #define QT_SET_THRESHOLD 64  
80 > #define QT_SET_THRESHOLD 32  
81   #endif
82  
83   #ifndef QT_MAX_LEVELS
# Line 99 | Line 98 | typedef struct _FUNC {
98   #define QT_FLAG_SET_MODIFIED(f)   ((f) |= QT_MODIFIED)
99  
100   #define qtSubdivide(qt) (qt = qtAlloc(),QT_CLEAR_CHILDREN(qt))
101 < #define qtSubdivide_tri(v0,v1,v2,a,b,c) (EDGE_MIDPOINT(a,v0,v1), \
102 <                                         EDGE_MIDPOINT(b,v1,v2), \
103 <                                         EDGE_MIDPOINT(c,v2,v0))
101 > #define qtSubdivide_tri(v0,v1,v2,a,b,c) (EDGE_MIDPOINT(a,v1,v2), \
102 >                                         EDGE_MIDPOINT(b,v2,v0), \
103 >                                         EDGE_MIDPOINT(c,v0,v1))
104  
105   extern QUADTREE  qtnewleaf(), qtaddelem(), qtdelelem();
106  
# Line 116 | Line 115 | extern OBJECT  *qtqueryset();
115   #else
116   #define qtqueryset(qt)  (qtsettab[QT_SET_INDEX(qt)])
117   #endif
118 <
118 > #if 0
119 > #define qtremovelast(qt) ((*(qtqueryset(qt)))--)
120 > #endif
121   #define qtinset(qt,id)  inset(qtqueryset(qt),id)
122   #define qtgetset(os,qt) setcopy(os,qtqueryset(qt))
123  
# Line 150 | Line 151 | extern QUADTREE qtRoot_remove_tri();
151   extern QUADTREE qtAdd_tri();
152   extern QUADTREE qtRoot_visit_tri_edges();
153   extern QUADTREE qtRoot_trace_ray();
154 +
155 +
156 +
157 +
158 +
159 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines