ReactOS  0.4.14-dev-608-gd495a4f
reader.h
Go to the documentation of this file.
1 /*
2  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice including the dates of first publication and
13  * either this permission notice or a reference to
14  * http://oss.sgi.com/projects/FreeB/
15  * shall be included in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  *
25  * Except as contained in this notice, the name of Silicon Graphics, Inc.
26  * shall not be used in advertising or otherwise to promote the sale, use or
27  * other dealings in this Software without prior written authorization from
28  * Silicon Graphics, Inc.
29  */
30 
31 /*
32  * reader.h
33  *
34  */
35 
36 #ifndef __glureader_h_
37 #define __glureader_h_
38 
39 #include "bufpool.h"
40 #include "types.h"
41 
43 
44 struct Property;
45 struct O_surface;
46 struct O_nurbssurface;
47 struct O_trim;
48 class O_pwlcurve;
49 struct O_nurbscurve;
50 struct O_curve;
51 class Quilt;
52 class TrimVertex;
53 
54 
55 struct O_curve : public PooledObj {
56  union {
59  } curve;
60  Curvetype curvetype; /* arc type: pwl or nurbs */
61  O_curve * next; /* next arc in loop */
62  O_surface * owner; /* owning surface */
63  int used; /* curve called in cur surf */
64  int save; /* 1 if in display list */
65  long nuid;
66  O_curve() { next = 0; used = 0; owner = 0;
67  curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; }
68  };
69 
70 struct O_nurbscurve : public PooledObj {
71  Quilt *bezier_curves; /* array of bezier curves */
72  long type; /* range descriptor */
73  REAL tesselation; /* tesselation tolerance */
74  int method; /* tesselation method */
75  O_nurbscurve * next; /* next curve in list */
76  int used; /* curve called in cur surf */
77  int save; /* 1 if in display list */
78  O_curve * owner; /* owning curve */
79  O_nurbscurve( long _type )
80  { bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; }
81  };
82 
83 class O_pwlcurve : public PooledObj {
84 public:
85  TrimVertex *pts; /* array of trim vertices */
86  int npts; /* number of trim vertices */
87  O_pwlcurve * next; /* next curve in list */
88  int used; /* curve called in cur surf */
89  int save; /* 1 if in display list */
90  O_curve * owner; /* owning curve */
91  O_pwlcurve( long, long, INREAL *, long, TrimVertex * );
92  };
93 
94 struct O_trim : public PooledObj {
95  O_curve *o_curve; /* closed trim loop */
96  O_trim * next; /* next loop along trim */
97  int save; /* 1 if in display list */
98  O_trim() { next = 0; o_curve = 0; save = 0; }
99  };
100 
101 struct O_nurbssurface : public PooledObj {
102  Quilt * bezier_patches;/* array of bezier patches */
103  long type; /* range descriptor */
104  O_surface * owner; /* owning surface */
105  O_nurbssurface * next; /* next surface in chain */
106  int save; /* 1 if in display list */
107  int used; /* 1 if prev called in block */
108  O_nurbssurface( long _type )
109  { bezier_patches = 0; type = _type; owner = 0; next = 0; save = 0; used = 0; }
110  };
111 
112 struct O_surface : public PooledObj {
113  O_nurbssurface * o_nurbssurface; /* linked list of surfaces */
114  O_trim * o_trim; /* list of trim loops */
115  int save; /* 1 if in display list */
116  long nuid;
117  O_surface() { o_trim = 0; o_nurbssurface = 0; save = 0; nuid = 0; }
118  };
119 
120 struct Property : public PooledObj {
121  long type;
122  long tag;
124  int save; /* 1 if in display list */
125  Property( long _type, long _tag, INREAL _value )
126  { type = _type; tag = _tag; value = (REAL) _value; save = 0; }
127  Property( long _tag, INREAL _value )
128  { type = 0; tag = _tag; value = (REAL) _value; save = 0; }
129  };
130 
131 class NurbsTessellator;
132 #endif /* __glureader_h_ */
Definition: quilt.h:64
REAL value
Definition: reader.h:123
int save
Definition: reader.h:124
O_curve * owner
Definition: reader.h:78
long type
Definition: reader.h:121
int save
Definition: reader.h:64
int save
Definition: reader.h:89
Quilt * bezier_curves
Definition: reader.h:71
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
O_curve * owner
Definition: reader.h:90
Definition: ecma_167.h:138
int used
Definition: reader.h:63
long tag
Definition: reader.h:122
Definition: reader.h:55
long type
Definition: reader.h:72
int save
Definition: reader.h:97
Property(long _tag, INREAL _value)
Definition: reader.h:127
O_pwlcurve * next
Definition: reader.h:87
O_surface * owner
Definition: reader.h:104
O_surface * owner
Definition: reader.h:62
int npts
Definition: reader.h:86
int used
Definition: reader.h:76
O_nurbssurface * o_nurbssurface
Definition: reader.h:113
O_pwlcurve(long, long, INREAL *, long, TrimVertex *)
Definition: reader.cc:60
Quilt * bezier_patches
Definition: reader.h:102
O_pwlcurve * o_pwlcurve
Definition: reader.h:58
TrimVertex * pts
Definition: reader.h:85
int used
Definition: reader.h:88
Curvetype curvetype
Definition: reader.h:60
O_surface()
Definition: reader.h:117
O_trim * o_trim
Definition: reader.h:114
int save
Definition: reader.h:77
O_curve * o_curve
Definition: reader.h:95
O_nurbscurve * o_nurbscurve
Definition: reader.h:57
method
Definition: dragdrop.c:53
Definition: reader.h:94
#define INREAL
Definition: types.h:40
int save
Definition: reader.h:115
Definition: reader.h:42
O_nurbscurve(long _type)
Definition: reader.h:79
O_nurbssurface(long _type)
Definition: reader.h:108
union O_curve::@285 curve
O_curve * next
Definition: reader.h:61
O_trim()
Definition: reader.h:98
int method
Definition: reader.h:74
Curvetype
Definition: reader.h:42
O_nurbscurve * next
Definition: reader.h:75
REAL tesselation
Definition: reader.h:73
O_trim * next
Definition: reader.h:96
O_nurbssurface * next
Definition: reader.h:105
O_curve()
Definition: reader.h:66
long nuid
Definition: reader.h:116
float REAL
Definition: types.h:41
long nuid
Definition: reader.h:65
Property(long _type, long _tag, INREAL _value)
Definition: reader.h:125