1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ SGI" */ |
4 |
< |
|
1 |
> |
/* RCSid: $Id$ */ |
2 |
|
/* |
3 |
|
* sm.h |
4 |
|
*/ |
22 |
|
#define ON_E 3 |
23 |
|
#define IN_T 4 |
24 |
|
|
25 |
< |
#ifndef LOWRES |
29 |
< |
#define VERT_EPS 5e-4 /* min edge length in radians */ |
30 |
< |
#define COS_VERT_EPS 0.999999875 /* cos min edge length in radians */ |
31 |
< |
#define EDGE_EPS 2e-7 /* min distance until considered "on-edge"*/ |
32 |
< |
#define COLINEAR_EPS 1e-10 /* minimum sine of between edges angle :amount off |
33 |
< |
180degrees |
34 |
< |
*/ |
35 |
< |
#define EQUALITY_EPS 1e-10 |
36 |
< |
#else |
25 |
> |
#ifdef SMLFLT |
26 |
|
#define VERT_EPS 2e-3 /* min edge length in radians */ |
27 |
|
#define COS_VERT_EPS 0.999998 /* cos min edge length in radians */ |
28 |
|
#define EDGE_EPS 2e-5 /* min distance until considered "on-edge"*/ |
29 |
< |
#define COLINEAR_EPS 1e-10 /* minimum sine of between edges angle :amount off |
30 |
< |
180degrees |
31 |
< |
*/ |
32 |
< |
#define EQUALITY_EPS 1e-10 |
29 |
> |
#define COLINEAR_EPS 1e-10 /* min sine of between edges angle :amount off PI */ |
30 |
> |
#else |
31 |
> |
#define VERT_EPS 5e-4 /* min edge length in radians */ |
32 |
> |
#define COS_VERT_EPS 0.999999875 /* cos min edge length in radians */ |
33 |
> |
#define EDGE_EPS 2e-7 /* min distance until considered "on-edge"*/ |
34 |
> |
#define COLINEAR_EPS 1e-10 /* min sine of between edges angle :amount off PI*/ |
35 |
|
#endif |
36 |
|
|
37 |
|
#define EV_EPS EDGE_EPS /* Minimum edge-vertex distance */ |
58 |
|
are derived by traversing neighbors */ |
59 |
|
|
60 |
|
typedef struct _EDGE { |
61 |
< |
int verts[2]; |
61 |
> |
S_ID verts[2]; |
62 |
|
int tris[2]; |
63 |
|
} EDGE; |
64 |
|
|
75 |
|
|
76 |
|
|
77 |
|
typedef struct _TRI { |
78 |
< |
int verts[3]; /* Ids into sample and vertex array for each vertex*/ |
78 |
> |
S_ID verts[3]; /* Ids into sample and vertex array for each vertex*/ |
79 |
|
int nbrs[3]; /* Ids for neighboring triangles: -1 if invalid */ |
80 |
|
}TRI; |
81 |
|
|
208 |
|
typedef struct _RT_ARGS_{ |
209 |
|
FVECT orig,dir; |
210 |
|
int t_id; |
211 |
< |
OBJECT *os; |
211 |
> |
S_ID *os; |
212 |
|
}RT_ARGS; |
213 |
|
|
214 |
|
typedef struct _S_ARGS_{ |
215 |
< |
int s_id,n_id; |
215 |
> |
S_ID s_id; |
216 |
> |
S_ID n_id; |
217 |
|
}S_ARGS; |
218 |
|
|
219 |
|
|
220 |
|
typedef struct _ADD_ARGS { |
221 |
|
int t_id; |
222 |
< |
OBJECT *del_set; |
222 |
> |
S_ID *del_set; |
223 |
|
}ADD_ARGS; |
224 |
|
|
225 |
|
extern SM *smMesh; |
264 |
|
* |
265 |
|
* Find the closest sample to the given ray. Return -1 on failure. |
266 |
|
* |
275 |
– |
* |
276 |
– |
* smClean() : display has been wiped clean |
277 |
– |
* |
278 |
– |
* Called after display has been effectively cleared, meaning that all |
279 |
– |
* geometry must be resent down the pipeline in the next call to smUpdate(). |
280 |
– |
* |
281 |
– |
* |
282 |
– |
* smUpdate(vp, qua) : update OpenGL output geometry for view vp |
283 |
– |
* VIEW *vp; : desired view |
284 |
– |
* int qua; : quality level (percentage on linear time scale) |
285 |
– |
* |
286 |
– |
* Draw new geometric representation using OpenGL calls. Assume that the |
287 |
– |
* view has already been set up and the correct frame buffer has been |
288 |
– |
* selected for drawing. The quality level is on a linear scale, where 100% |
289 |
– |
* is full (final) quality. It is not necessary to redraw geometry that has |
290 |
– |
* been output since the last call to smClean(). (The last view drawn will |
291 |
– |
* be vp==&odev.v each time.) |
267 |
|
*/ |
268 |
|
#endif |
269 |
|
|