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

Comparing ray/src/hd/sm.h (file contents):
Revision 3.1 by gwlarson, Wed Aug 19 17:45:23 1998 UTC vs.
Revision 3.13 by schorsch, Mon Jul 14 22:24:00 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.h
4   */
5  
6 < #ifndef _SM_H_
7 < #define _SM_H_
6 > #ifndef _RAD_SM_H_
7 > #define _RAD_SM_H_
8  
9   #include "rhd_sample.h"
10 + #include "sm_qtree.h"
11   #include "sm_stree.h"
12  
13 + #ifdef __cplusplus
14 + extern "C" {
15 + #endif
16 +
17 + #define NEWSETS
18 +
19 +
20   #ifndef TRUE
21   #define TRUE 1
22   #define FALSE 0
23   #endif
24  
20 #define P_REPLACE_EPS 0.5
21 #define SQRT3_2 0.8660254
25  
26 < #define MAX_EDGES 200
26 > #define ON_V 1
27 > #define ON_P 2
28 > #define ON_E 3
29 > #define IN_T 4
30  
31 < #define SM_INVALID  -1
32 < #define SM_DEFAULT   0
33 < #define SM_EXTRA_POINTS 5
34 < #define SM_EXTRA_VERTS  SM_EXTRA_POINTS
35 < #define SM_POINTSIZ     (3*sizeof(float)+ sizeof(int4))
36 < #define SM_POINT_SPACE SM_EXTRA_POINTS * SM_POINTSIZ
31 > #ifdef SMLFLT
32 > #define VERT_EPS 2e-3 /* min edge length in radians */
33 > #define COS_VERT_EPS 0.999998 /* cos min edge length in radians */
34 > #define EDGE_EPS 2e-5 /* min distance until considered "on-edge"*/
35 > #define COLINEAR_EPS 1e-10 /* min sine of between edges angle :amount off PI */
36 > #else
37 > #define VERT_EPS 5e-4 /* min edge length in radians */
38 > #define COS_VERT_EPS 0.999999875 /* cos min edge length in radians */
39 > #define EDGE_EPS 2e-7 /* min distance until considered "on-edge"*/
40 > #define COLINEAR_EPS 1e-10 /* min sine of between edges angle :amount off PI*/
41 > #endif
42  
43 < #define SM_INC_PERCENT 0.60
43 > #define EV_EPS EDGE_EPS      /* Minimum edge-vertex distance */
44 >
45 >
46 > #define S_REPLACE_SCALE (5.*5.)   /* if (distance to new point squared) is
47 >         > (triangle edge length squared*S_REPLACE_SCALE):for all edges/
48 >         triangle vertices: new point is puncture point: dont add*/
49 > #define S_REPLACE_TRI 2e-8              /* .052 radians to the sixth power */
50 >
51 >
52 >
53 > #define SM_DEFAULT 0
54 > #define SM_BASE_POINTS 162
55 > #define SM_BASE_TRIS 320
56 > #define SM_BASE_VERTS  SM_BASE_POINTS
57 >
58   #define SM_VIEW_FRAC   0.1
59  
60 + #define  SM_ALL_LEVELS -1
61  
62 +
63   typedef int VERT;  /* One triangle that vertex belongs to- the rest
64                        are derived by traversing neighbors */
65  
66   typedef struct _EDGE {
67 <    int verts[2];
67 >    S_ID verts[2];
68      int tris[2];
69   } EDGE;
70 +
71   #define E_NTH_VERT(e,i)  ((e>0)?Edges[(e)].verts[(i)]:Edges[-(e)].verts[(1-i)])
72   #define SET_E_NTH_VERT(e,i,v) if(e>0) Edges[(e)].verts[(i)]=(v); \
73                                 else Edges[-(e)].verts[(1-i)]=(v)
74   #define E_NTH_TRI(e,i)  ((e>0)?Edges[(e)].tris[(i)]:Edges[-(e)].tris[(1-i)])
75   #define SET_E_NTH_TRI(e,i,v) if(e>0) Edges[(e)].tris[(i)]=(v); \
76                                else Edges[-(e)].tris[(1-i)]=(v)
77 < #define eNew_edge() (((Ecnt) < MAX_EDGES)?(++Ecnt):SM_INVALID)
50 < #define eClear_edges() (Ecnt = 0)
77 > #define eClear_edges() (Ecnt = 0,free(Edges),Edges=NULL)
78  
79   #define FOR_ALL_EDGES(i) for((i)=1; (i) <= Ecnt; i++)
80 < #define FOR_ALL_EDGES_FROM(e,i) for((i)=++e; (i) <= Ecnt; i++)
80 > #define FOR_ALL_EDGES_FROM(e,i) for((i)=e+1; (i) <= Ecnt; i++)
81  
82  
83   typedef struct _TRI {
84 <  int verts[3];         /* Ids into sample and vertex array for each vertex*/
84 >  S_ID verts[3];         /* Ids into sample and vertex array for each vertex*/
85    int nbrs[3]; /* Ids for neighboring triangles: -1 if invalid */
86   }TRI;
87  
# Line 66 | Line 93 | typedef struct _TRI {
93   #define T_NTH_V(t,i)  ((t)->verts[(i)])
94   #define T_WHICH_V(t,i)     \
95           (T_NTH_V(t,0)==(i)?0:T_NTH_V(t,1)==(i)?1:T_NTH_V(t,2)==(i)?2:-1)
96 < #define T_NEXT_FREE(t) ((t)->verts[0])
97 < #define T_VALID_FLAG(t) ((t)->verts[1])
96 > #define T_NEXT_FREE(t) ((t)->nbrs[0])
97 > #define T_VALID_FLAG(t) ((t)->nbrs[1])
98   #define T_IS_VALID(t)  (T_VALID_FLAG(t)!=-1)
99   #define T_FLAGS 4
73 #define T_FLAG_BYTES T_FLAGS/8.0
74 #define T_TOTAL_FLAG_BYTES(c)  ((((c)+31)>>5)*sizeof(int4))
100  
101   typedef struct _SM {
102      FVECT view_center;    /* Canonical view center defining unit sphere */
103 <    RSAMP *samples;       /* Sample point information */
104 <    STREE locator;      /* spherical quadtree for point/triangle location */
103 >    SAMP *samples;        /* Sample point information */
104 >    STREE locator;        /* spherical quadtree for point/triangle location */
105      int max_tris;         /* Maximum number of triangles */
106 <    int tri_cnt;          /* Total number of tris ever alloc at one time*/
82 <    int num_tris;         /* Current number of sample (nonbase)triangles */
106 >    int num_tri;          /* Current number of triangles */
107      int free_tris;        /* pointer to free_list */
108      int max_verts;        /* Maximum number of vertices in the mesh */
109      TRI *tris;            /* Pointer to list of triangle structs */
110 <    VERT *verts;          /* List of vertices */
111 <    int4 *flags[T_FLAGS]; /* Bit 0 set if active(in current frustum) */
112 <                             /* Bit 1 set if not rendered since created */
89 <                             /* Bit 2 set if base triangle */
90 <                             /* Bit 3 set used for LRU replacement */
91 <    char *base;           /* Allocated space */
110 >    int32 *flags[T_FLAGS]; /* Bit 0 set if active(in current frustum) */
111 >                          /* Bit 1 set if not rendered since created */
112 >                          /* Bit 2 set if base triangle */
113   }SM;
114  
115   #define T_ACTIVE_FLAG   0
116   #define T_NEW_FLAG      1
117   #define T_BASE_FLAG     2
118 < #define T_LRU_FLAG      3
118 > #define T_BG_FLAG       3
119  
120   #define SM_VIEW_CENTER(m)             ((m)->view_center)
121   #define SM_SAMP(m)                    ((m)->samples)
122   #define SM_LOCATOR(m)                 (&((m)->locator))
123   #define SM_MAX_TRIS(m)                ((m)->max_tris)
124 < #define SM_TRI_CNT(m)                 ((m)->tri_cnt)
104 < #define SM_NUM_TRIS(m)                 ((m)->num_tris)
124 > #define SM_NUM_TRI(m)                 ((m)->num_tri)
125   #define SM_FREE_TRIS(m)               ((m)->free_tris)
126   #define SM_MAX_VERTS(m)               ((m)->max_verts)
127   #define SM_TRIS(m)                    ((m)->tris)
108 #define SM_VERTS(m)                   ((m)->verts)
128   #define SM_NTH_FLAGS(m,n)             ((m)->flags[(n)])
129 < #define SM_BASE(m)                    ((m)->base)
129 > #define SM_FLAGS(m)                   ((m)->flags)
130  
112 #define TF_OFFSET(n)  ((n) >> 5)
113 #define TF_BIT(n)     ((n) & 0x1f)
114 #define SM_IS_NTH_T_FLAG(sm,n,f)  (SM_NTH_FLAGS(sm,f)[TF_OFFSET(n)] & (0x1 <<TF_BIT(n)))
115 #define SM_SET_NTH_T_FLAG(sm,n,f) (SM_NTH_FLAGS(sm,f)[TF_OFFSET(n)] |= (0x1<<TF_BIT(n)))
116 #define SM_CLEAR_NTH_T_FLAG(sm,n,f) (SM_NTH_FLAGS(sm,f)[TF_OFFSET(n)] &= ~(0x1<<TF_BIT(n)))
131  
132 + #define SM_IS_NTH_T_FLAG(sm,n,f)  IS_FLAG(SM_NTH_FLAGS(sm,f),n)
133 + #define SM_SET_NTH_T_FLAG(sm,n,f) SET_FLAG(SM_NTH_FLAGS(sm,f),n)
134 + #define SM_CLR_NTH_T_FLAG(sm,n,f) CLR_FLAG(SM_NTH_FLAGS(sm,f),n)
135 +
136   #define SM_IS_NTH_T_ACTIVE(sm,n)     SM_IS_NTH_T_FLAG(sm,n,T_ACTIVE_FLAG)
137   #define SM_IS_NTH_T_BASE(sm,n)       SM_IS_NTH_T_FLAG(sm,n,T_BASE_FLAG)
138   #define SM_IS_NTH_T_NEW(sm,n)        SM_IS_NTH_T_FLAG(sm,n,T_NEW_FLAG)
139 < #define SM_IS_NTH_T_LRU(sm,n)        SM_IS_NTH_T_FLAG(sm,n,T_LRU_FLAG)
139 > #define SM_IS_NTH_T_BG(sm,n)        SM_IS_NTH_T_FLAG(sm,n,T_BG_FLAG)
140  
141   #define SM_SET_NTH_T_ACTIVE(sm,n)    SM_SET_NTH_T_FLAG(sm,n,T_ACTIVE_FLAG)
142   #define SM_SET_NTH_T_BASE(sm,n)      SM_SET_NTH_T_FLAG(sm,n,T_BASE_FLAG)
143 < #define SM_SET_NTH_T_NEW(sm,n)    SM_SET_NTH_T_FLAG(sm,n,T_NEW_FLAG)
144 < #define SM_SET_NTH_T_LRU(sm,n)       SM_SET_NTH_T_FLAG(sm,n,T_LRU_FLAG)
143 > #define SM_SET_NTH_T_NEW(sm,n)       SM_SET_NTH_T_FLAG(sm,n,T_NEW_FLAG)
144 > #define SM_SET_NTH_T_BG(sm,n)        SM_SET_NTH_T_FLAG(sm,n,T_BG_FLAG)
145  
146 < #define SM_CLEAR_NTH_T_ACTIVE(sm,n)  SM_CLEAR_NTH_T_FLAG(sm,n,T_ACTIVE_FLAG)
147 < #define SM_CLEAR_NTH_T_BASE(sm,n)    SM_CLEAR_NTH_T_FLAG(sm,n,T_BASE_FLAG)
148 < #define SM_CLEAR_NTH_T_NEW(sm,n)  SM_CLEAR_NTH_T_FLAG(sm,n,T_NEW_FLAG)
149 < #define SM_CLEAR_NTH_T_LRU(sm,n)     SM_CLEAR_NTH_T_FLAG(sm,n,T_LRU_FLAG)
146 > #define SM_CLR_NTH_T_ACTIVE(sm,n)   SM_CLR_NTH_T_FLAG(sm,n,T_ACTIVE_FLAG)
147 > #define SM_CLR_NTH_T_BASE(sm,n)     SM_CLR_NTH_T_FLAG(sm,n,T_BASE_FLAG)
148 > #define SM_CLR_NTH_T_NEW(sm,n)      SM_CLR_NTH_T_FLAG(sm,n,T_NEW_FLAG)
149 > #define SM_CLR_NTH_T_BG(sm,n)       SM_CLR_NTH_T_FLAG(sm,n,T_BG_FLAG)
150  
151   #define SM_NTH_TRI(m,n)               (&(SM_TRIS(m)[(n)]))
152 < #define SM_NTH_VERT(m,n)              (SM_VERTS(m)[(n)])
153 < #define SM_FREE_TRI_ID(m,n) (n = SM_FREE_TRIS(m)==-1? \
154 <    (SM_TRI_CNT(m)<SM_MAX_TRIS(m)?SM_TRI_CNT(m)++:-1):(n=SM_FREE_TRIS(m), \
137 <     SM_FREE_TRIS(m)=T_NEXT_FREE(SM_NTH_TRI(m,SM_FREE_TRIS(m))),n))
152 > #define SM_NTH_VERT(m,n)              S_NTH_INFO(SM_SAMP(m),n)
153 >
154 > #define SM_T_ID_VALID(s,t_id) T_IS_VALID(SM_NTH_TRI(s,t_id))
155  
139 #define SM_SAMP_BASE(m)               RS_BASE(SM_SAMP(m))
140 #define SM_SAMP_FREE(m)               RS_FREE(SM_SAMP(m))
141 #define SM_SAMP_EOL(m)                RS_EOL(SM_SAMP(m))
142 #define SM_MAX_SAMP(m)                RS_MAX_SAMP(SM_SAMP(m))
143 #define SM_MAX_AUX_PT(m)              RS_MAX_AUX_PT(SM_SAMP(m))
144 #define SM_NTH_WV(m,i)                RS_NTH_W_PT(SM_SAMP(m),i)
145 #define SM_NTH_W_DIR(m,i)             RS_NTH_W_DIR(SM_SAMP(m),i)
146 #define SM_NTH_RGB(m,i)               RS_NTH_RGB(SM_SAMP(m),i)
147 #define SM_RGB(m)                    RS_RGB(SM_SAMP(m))
148 #define SM_BRT(m)                     RS_BRT(SM_SAMP(m))
149 #define SM_NTH_BRT(m,i)               RS_NTH_BRT(SM_SAMP(m),i)
150 #define SM_CHR(m)                     RS_CHR(SM_SAMP(m))
151 #define SM_NTH_CHR(m,i)               RS_NTH_CHR(SM_SAMP(m),i)
152 #define SM_NUM_SAMP(m)               RS_NUM_SAMP(SM_SAMP(m))
153 #define SM_TONE_MAP(m)               RS_TONE_MAP(SM_SAMP(m))
156  
157 + #define SM_MAX_SAMP(m)                S_MAX_SAMP(SM_SAMP(m))
158 + #define SM_MAX_POINTS(m)              S_MAX_POINTS(SM_SAMP(m))
159 + #define SM_SAMP_BASE(m)               S_BASE(SM_SAMP(m))
160 + #define SM_NTH_WV(m,i)                S_NTH_W_PT(SM_SAMP(m),i)
161 + #define SM_NTH_W_DIR(m,i)             S_NTH_W_DIR(SM_SAMP(m),i)
162 + #define SM_DIR_ID(m,i)            (!SM_BASE_ID(m,i) && SM_NTH_W_DIR(m,i)==-1)
163 + #define SM_NTH_RGB(m,i)               S_NTH_RGB(SM_SAMP(m),i)
164 + #define SM_RGB(m)                    S_RGB(SM_SAMP(m))
165 + #define SM_WP(m)                    S_W_PT(SM_SAMP(m))
166 + #define SM_BRT(m)                     S_BRT(SM_SAMP(m))
167 + #define SM_NTH_BRT(m,i)               S_NTH_BRT(SM_SAMP(m),i)
168 + #define SM_CHR(m)                     S_CHR(SM_SAMP(m))
169 + #define SM_NTH_CHR(m,i)               S_NTH_CHR(SM_SAMP(m),i)
170 + #define SM_NUM_SAMP(m)               S_NUM_SAMP(SM_SAMP(m))
171 + #define SM_TONE_MAP(m)               S_TONE_MAP(SM_SAMP(m))
172 +
173   #define SM_ALLOWED_VIEW_CHANGE(m) (SM_NUM_SAMP(m)/smDist_sum*SM_VIEW_FRAC)
174  
157 #define SM_FOR_ALL_FLAGGED_TRIS(m,i,w,b) for(i=0,i=smNext_tri_flag_set(m,i,w,b);i < SM_TRI_CNT(m);i++,i=smNext_tri_flag_set(m,i,w,b))
158
159 #define SM_FOR_ALL_ACTIVE_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_ACTIVE_FLAG,0)
160 #define SM_FOR_ALL_NEW_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_NEW_FLAG,0)
161 #define SM_FOR_ALL_BASE_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_BASE_FLAG,0)
162 #define SM_FOR_ALL_VALID_TRIS(m,i) for((i)=0,(i)=smNext_valid_tri(m,i);(i)< \
163 SM_TRI_CNT(m); (i)++,(i)= smNext_valid_tri(m,i))
164
165 #define SM_FOR_ALL_ACTIVE_FG_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_ACTIVE_FLAG,1)
166
167 #define SM_FOR_ALL_ACTIVE_BG_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_ACTIVE_FLAG,2)
168
169
175   #define SM_FOR_ALL_ADJACENT_TRIS(sm,id,t) for(t=smTri_next_ccw_nbr(sm,t,id); \
176   t!=SM_NTH_TRI(sm,SM_NTH_VERT(sm,id)); t=smTri_next_ccw_nbr(sm,t,id))
177  
178   #define SM_INVALID_SAMP_ID(sm,id)  (((id) < 0) || ((id) >= SM_MAX_SAMP(sm)))
179 < #define SM_INVALID_POINT_ID(sm,id)  (((id) < 0) || ((id) >= SM_MAX_AUX_PT(sm)))
175 < #define SM_T_CENTROID(sm,t,c)  tri_centroid(SM_NTH_WV(sm,T_NTH_V(t,0)),SM_NTH_WV(sm,T_NTH_V(t,1)),SM_NTH_WV(sm,T_NTH_V(t,2)),c)
179 > #define SM_INVALID_POINT_ID(sm,id)  (((id) < 0) || ((id) >= SM_MAX_POINTS(sm)))
180   #define SM_T_NTH_WV(sm,t,i)  (SM_NTH_WV(sm,T_NTH_V(t,i)))
181  
182   #define SM_BASE_ID(s,i)  \
183 < ((i) >= RS_MAX_SAMP(SM_SAMP(s)) && (i) < RS_MAX_AUX_PT(SM_SAMP(s)))
183 > ((i) >= S_MAX_SAMP(SM_SAMP(s)) && (i) < S_MAX_BASE_PT(SM_SAMP(s)))
184  
185   #define SM_BG_SAMPLE(sm,i)   (SM_NTH_W_DIR(sm,i)==-1)
186  
187 < #define SM_BG_TRI(sm,i)  (SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),0)) || \
187 > #define SM_BG_TRI(sm,i)  (SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),0)) && \
188 >                          SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),1)) && \
189 >                          SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),2)))
190 > #define SM_MIXED_TRI(sm,i)  (SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),0)) || \
191                            SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),1)) || \
192                            SM_BG_SAMPLE(sm,T_NTH_V(SM_NTH_TRI(sm,i),2)))
193  
194   #define SM_FOR_ALL_SAMPLES(sm,i) for((i)=0;i < SM_NUM_SAMP(sm);(i)++)
195  
196 < typedef struct _T_DEPTH {
197 <  int tri;
191 <  double depth;
192 < }T_DEPTH;
196 > #define SM_FOR_ALL_VALID_TRIS(m,i) for((i)=0,(i)=smNext_valid_tri(m,i);(i)< \
197 > SM_NUM_TRI(m); (i)++,(i)= smNext_valid_tri(m,i))
198  
199 + #define SM_FOR_ALL_FLAGGED_TRIS(m,i,w,b) for(i=0,i=smNext_tri_flag_set(m,i,w,b);i < SM_NUM_TRI(m);i++,i=smNext_tri_flag_set(m,i,w,b))
200 + #define SM_FOR_ALL_ACTIVE_TRIS(m,i) SM_FOR_ALL_FLAGGED_TRIS(m,i,T_ACTIVE_FLAG,0)
201 + #define smInit_locator(sm)    stInit(SM_LOCATOR(sm))
202 + #define smAlloc_locator(sm)   stAlloc(SM_LOCATOR(sm))
203 + #define smFree_locator(sm)   stFree(SM_LOCATOR(sm))
204 + #define smUnalloc_samp(sm,id)  sUnalloc_samp(SM_SAMP(sm),id)
205 + #define smPoint_locate_cell(sm,pt)  stPoint_locate(SM_LOCATOR(sm),pt)
206 + #define smFree_samples(sm)     sFree(SM_SAMP(sm))
207 + #define smInit_samples(sm)     sInit(SM_SAMP(sm))
208  
209 + #define SM_S_NTH_QT(sm,s_id)       S_NTH_INFO1(SM_SAMP(sm),s_id)
210 + #define smClear_vert(sm,id)    (SM_NTH_VERT(sm,id) = INVALID)
211 +
212 + #define freebuf(b)  tempbuf(-1)
213 +
214 + typedef struct _RT_ARGS_{
215 +  FVECT orig,dir;
216 +  int t_id;
217 +  S_ID *os;
218 + }RT_ARGS;
219 +
220 + typedef struct _S_ARGS_{
221 +  S_ID s_id;
222 +  S_ID n_id;
223 + }S_ARGS;
224 +
225 +
226 + typedef struct _ADD_ARGS {
227 +  int t_id;
228 +  S_ID *del_set;
229 + }ADD_ARGS;
230 +
231   extern SM *smMesh;
196 extern int smNew_tri_cnt;
232   extern double smDist_sum;
233  
234 +
235   #ifdef TEST_DRIVER
236   extern VIEW View;
237   extern VIEW Current_View;
238 < extern int Pick_tri,Picking;
238 > extern int Pick_tri,Picking,Pick_samp;
239   extern FVECT Pick_point[500],Pick_origin,Pick_dir;
240   extern FVECT Pick_v0[500],Pick_v1[500],Pick_v2[500];
241 + extern int Pick_q[500];
242   extern FVECT P0,P1,P2;
243   extern int Pick_cnt;
244   extern FVECT FrustumNear[4],FrustumFar[4];
245   #endif
246  
210 #ifdef DEBUG
211 extern int Malloc_cnt;
212 #endif
213 #endif
247  
248 + /*
249 + * int
250 + * smInit(n)            : Initialize/clear data structures for n entries
251 + * int  n;
252 + *
253 + * Initialize sampL and other data structures for at least n samples.
254 + * If n is 0, then free data structures.  Return number actually allocated.
255 + *
256 + *
257 + * int
258 + * smNewSamp(c, p, v)   : register new sample point and return index
259 + * COLR c;              : pixel color (RGBE)
260 + * FVECT        p;      : world intersection point
261 + * FVECT        v;      : ray direction vector
262 + *
263 + * Add new sample point to data structures, removing old values as necessary.
264 + * New sample representation will be output in next call to smUpdate().
265 + *
266 + *
267 + * int
268 + * smFindSamp(orig, dir): intersect ray with 3D rep. and find closest sample
269 + * FVECT        orig, dir;
270 + *
271 + * Find the closest sample to the given ray.  Return -1 on failure.
272 + *
273 + */
274  
275 <
276 <
277 <
278 <
220 <
275 > #ifdef __cplusplus
276 > }
277 > #endif
278 > #endif /* define _RAD_SM_H_ */
279  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines