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.10 by gwlarson, Thu Jun 10 15:22:22 1999 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  
# Line 25 | Line 28
28   #define ON_E 3
29   #define IN_T 4
30  
31 < #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
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 /* minimum sine of between edges angle :amount off
36 <                             180degrees
37 <                             */
38 < #define EQUALITY_EPS 1e-10
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 EV_EPS EDGE_EPS      /* Minimum edge-vertex distance */
# Line 67 | Line 64 | typedef int VERT;  /* One triangle that vertex belongs
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  
# Line 84 | Line 81 | typedef struct _EDGE {
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 110 | Line 107 | typedef struct _SM {
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 <    int4 *flags[T_FLAGS]; /* Bit 0 set if active(in current frustum) */
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;
# Line 217 | Line 214 | SM_NUM_TRI(m); (i)++,(i)= smNext_valid_tri(m,i))
214   typedef struct _RT_ARGS_{
215    FVECT orig,dir;
216    int t_id;
217 <  OBJECT *os;
217 >  S_ID *os;
218   }RT_ARGS;
219  
220   typedef struct _S_ARGS_{
221 <  int s_id,n_id;
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 <  OBJECT *del_set;
228 >  S_ID *del_set;
229   }ADD_ARGS;
230  
231   extern SM *smMesh;
# Line 272 | Line 270 | extern FVECT FrustumNear[4],FrustumFar[4];
270   *
271   * Find the closest sample to the given ray.  Return -1 on failure.
272   *
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.)
273   */
293 #endif
274  
275 <
276 <
277 <
278 <
299 <
300 <
275 > #ifdef __cplusplus
276 > }
277 > #endif
278 > #endif /* define _RAD_SM_H_ */
279  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines