ReactOS 0.4.15-dev-8236-g99f0937
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
44struct Property;
45struct O_surface;
46struct O_nurbssurface;
47struct O_trim;
48class O_pwlcurve;
49struct O_nurbscurve;
50struct O_curve;
51class Quilt;
52class TrimVertex;
53
54
55struct O_curve : public PooledObj {
56 union {
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
70struct 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
83class O_pwlcurve : public PooledObj {
84public:
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
94struct 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
101struct 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
112struct 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
120struct 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
131class NurbsTessellator;
132#endif /* __glureader_h_ */
int used
Definition: reader.h:88
O_curve * owner
Definition: reader.h:90
int save
Definition: reader.h:89
int npts
Definition: reader.h:86
TrimVertex * pts
Definition: reader.h:85
O_pwlcurve * next
Definition: reader.h:87
Definition: quilt.h:64
Curvetype
Definition: reader.h:42
@ ct_none
Definition: reader.h:42
@ ct_pwlcurve
Definition: reader.h:42
@ ct_nurbscurve
Definition: reader.h:42
#define INREAL
Definition: types.h:40
float REAL
Definition: types.h:41
method
Definition: dragdrop.c:54
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: reader.h:55
Curvetype curvetype
Definition: reader.h:60
int save
Definition: reader.h:64
long nuid
Definition: reader.h:65
O_nurbscurve * o_nurbscurve
Definition: reader.h:57
int used
Definition: reader.h:63
O_surface * owner
Definition: reader.h:62
O_curve * next
Definition: reader.h:61
O_curve()
Definition: reader.h:66
O_pwlcurve * o_pwlcurve
Definition: reader.h:58
union O_curve::@298 curve
long type
Definition: reader.h:72
O_curve * owner
Definition: reader.h:78
int save
Definition: reader.h:77
int used
Definition: reader.h:76
O_nurbscurve * next
Definition: reader.h:75
O_nurbscurve(long _type)
Definition: reader.h:79
REAL tesselation
Definition: reader.h:73
Quilt * bezier_curves
Definition: reader.h:71
int method
Definition: reader.h:74
O_surface * owner
Definition: reader.h:104
O_nurbssurface * next
Definition: reader.h:105
O_nurbssurface(long _type)
Definition: reader.h:108
Quilt * bezier_patches
Definition: reader.h:102
O_nurbssurface * o_nurbssurface
Definition: reader.h:113
O_surface()
Definition: reader.h:117
int save
Definition: reader.h:115
long nuid
Definition: reader.h:116
O_trim * o_trim
Definition: reader.h:114
Definition: reader.h:94
O_curve * o_curve
Definition: reader.h:95
O_trim()
Definition: reader.h:98
int save
Definition: reader.h:97
O_trim * next
Definition: reader.h:96
long tag
Definition: reader.h:122
long type
Definition: reader.h:121
REAL value
Definition: reader.h:123
Property(long _tag, INREAL _value)
Definition: reader.h:127
int save
Definition: reader.h:124
Property(long _type, long _tag, INREAL _value)
Definition: reader.h:125
Definition: ecma_167.h:138
Definition: pdh_main.c:94