• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1XXX - Not complete yet!!!
2Name
3
4    SGIX_nurbs_eval
5
6Name Strings
7
8    GL_SGIX_nurbs_eval
9
10Version
11
12    $Date: 1998/02/12 18:24:45 $ $Revision: 1.6 $
13
14Number
15
16    XXX
17
18Dependencies
19
20    None
21
22Overview
23
24    This extension adds a new evaluators type, NURBS.  NURBS are a compact
25    representation of the datasets that many CAD and entertainment industry
26    customers are already using.  The creation of a new interface allows for
27    levels of performance not achievable with the current evaluators API.
28
29    The current evaluators interface supports only Bezier curves, which suffer
30    from several disadvantages:  Beziers are a wasteful of memory and graphics
31    interface bandwidth; Beziers representations are often larger than
32    the representations of the tesselated surfaces they are used to render;
33    Beziers are not a native format used by CAD and entertainment applications.
34
35    In the new NURBS extension, every effort has been made to extend the
36    existing evaluators interface, rather than define a completely new set of
37    interfaces and state.
38
39Issues
40
41    * Should it be NURB or NURBS?
42
43    I'm choosing NURBS since it matches the GLU spec and glu extensions.
44    This does not agree with Farin's usage in the literature, but does agree
45    with many other authors.
46
47New Procedures and Functions
48
49    void NurbsKnots1SGIX[fd]( enum target,
50			      int uknotcount, T *uknots );
51    void NurbsKnots2SGIX[fd]( enum target,
52			      int uknotcount, int vknotcount,
53			      T *uknots, T *vknots );
54
55New Tokens
56
57    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and
58    by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
59    GetDoublev:
60
61	MAP1_VERTEX_3_NURBS_SGIX	0x81CB
62	MAP1_VERTEX_4_NURBS_SGIX	0x81CC
63	MAP1_INDEX_NURBS_SGIX		0x81CD
64	MAP1_COLOR_4_NURBS_SGIX		0x81CE
65	MAP1_NORMAL_NURBS_SGIX		0x81CF
66	MAP1_TEXTURE_COORD_1_NURBS_SGIX	0x81E0
67	MAP1_TEXTURE_COORD_2_NURBS_SGIX	0x81E1
68	MAP1_TEXTURE_COORD_3_NURBS_SGIX	0x81E2
69	MAP1_TEXTURE_COORD_4_NURBS_SGIX	0x81E3
70	MAP2_VERTEX_3_NURBS_SGIX	0x81E4
71	MAP2_VERTEX_4_NURBS_SGIX	0x81E5
72	MAP2_INDEX_NURBS_SGIX		0x81E6
73	MAP2_COLOR_4_NURBS_SGIX		0x81E7
74	MAP2_NORMAL_NURBS_SGIX		0x81E8
75	MAP2_TEXTURE_COORD_1_NURBS_SGIX	0x81E9
76	MAP2_TEXTURE_COORD_2_NURBS_SGIX	0x81EA
77	MAP2_TEXTURE_COORD_3_NURBS_SGIX	0x81EB
78	MAP2_TEXTURE_COORD_4_NURBS_SGIX	0x81EC
79
80    Accepted by the <value> parameter of GetMap[ifd]v:
81
82	NURBS_KNOT_COUNT_SGIX		0x81ED
83	NURBS_KNOT_VECTOR_SGIX		0x81EE
84
85Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
86
87    None
88
89Additions to Chapter 3 of the 1.0 Specification (Rasterization)
90
91    None
92
93Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
94and the Frame Buffer)
95
96    None
97
98Additions to Chapter 5 of the 1.0 Specification (Special Functions)
99
100    Evaluators are extended to support both the existing specification, which
101    is a Bezier formulation, and a new NURBS formulation.  New enable tokens
102    are used to enable NURBS evaluation when it is desired.
103
104  Basis Functions:
105
106    NURBS polynomials for curves are defined as follows:
107    Consider the R^k-valued polynomial q(u) is defined by
108	 q(u) = sum(i=0,n) N_i^d(u) * R_i
109    with N_i^d(u) =    N_i^(d-1)(u) * (u-u(i-1))/(u(i+d-1)-u(i-1)) +
110		    N(i+1)^(d-1)(u) * (u(i+d)-u)/(u(i+d)-u_i)
111    the i_th NURBS basis polynomial of degree d.
112
113    Each R_i is a control point, and each u_i is a knot-value.
114    The complete set of {u_i} values is called the knot vector.
115
116  Map1[fd]:
117
118    When NURBS evaluation is enabled, the <order> parameter to the Map1[fd]
119    function is not really the mathematical order of the NURBS polynomial.
120    Instead, the <order> parameter merely determines the size of the array
121    given as input to Map1[fd] or Map2[fd].  In other words, the <order>
122    parameter only determines the size of the valid GL state for the map
123    array; it does not really capture the mathematical order of the curve or
124    surface.
125
126    Note that it is still true that the <order> parameter to Map1[fd] is equal
127    to n+1 in the equation defining NURBS polynomials at the beginning of this
128    section.
129
130  Map2[fd]:
131
132    NURBS polynomials for surfaces are defined as bivariate polynomials using
133    the same N_i^d basis functions as NURBS curves:
134	q(u,v) = sum(i=0,n) sum(j=0,m) N_i^d(u) * N_j^c(v) * R_ij
135
136  NurbsKnots1SGIX:
137  NurbsKnots2SGIX:
138
139    The <target> parameter must be one of GL_MAP1_VERTEX_3, GL_MAP1_VERTEX_4,
140    GL_MAP1_COLOR_4, GL_MAP1_INDEX, GL_MAP1_NORMAL, GL_MAP1_TEXTURE_COORD_1,
141    GL_MAP1_TEXTURE_COORD_2, GL_MAP1_TEXTURE_COORD_3, GL_MAP1_TEXTURE_COORD_4,
142    GL_MAP2_VERTEX_3, GL_MAP2_VERTEX_4, GL_MAP2_COLOR_4, GL_MAP2_INDEX,
143    GL_MAP2_NORMAL, GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2,
144    GL_MAP2_TEXTURE_COORD_3, or GL_MAP2_TEXTURE_COORD_4.
145
146    The knots vectors are defined by the new functions NurbsKnots1SGIX and
147    NurbsKnots2SGIX.  The size of the knot vectors, <uknotcount> and
148    <vknotcount> implicitly define the degree of the NURBS curves or surfaces
149    defined.  For curves, the degree is defined as:
150	d = <uknotcount> - <uorder> + 1
151    For surfaces, the second degree is defined as:
152	c = <vknotcount> - <vorder> + 1
153
154    The entries from the <uknots> and <vknots> input arrays are immediately
155    copied by the GL by the completion of this procedure.
156
157  EvalCoord[12][fd]:
158  EvalCoord[12][fd]v:
159  EvalPoint[12]:
160  EvalMesh[12]:
161
162    For all of the new MAP1_XXX_NURBS tokens, when MAP1_XXX_NURBS is disabled,
163    the evaluation functions, EvalCoord1[fd], EvalCoord1[fd]v, EvalPoint1, and
164    EvalMesh1 all evaluate Bezier curves for the given map as usual.  When
165    MAP1_XXX_NURBS is enabled, the evaluation functions instead evaluate NURBS
166    curves.  Similarly, the new MAP2_XXX_NURBS tokens are used to enable NURBS
167    surface evaluation for the functions EvalCoord2[fd], EvalCoord2[fd]v,
168    EvalPoint2, and EvalMesh2.
169
170Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
171
172    None
173
174Additions to the GLX Specification
175
176    None
177
178GLX Protocol
179
180    XXX - Not figured out yet.
181
182Dependencies on other extensions
183
184    None
185
186Errors
187
188    INVALID_VALUE is generated if NurbsKnots[12]SGIX parameter <uknotcount> or
189    <vknotcount> are negative or greater that or equal to MAX_EVAL_ORDER.
190
191    INVALID_VALUE is generated if <uorder> > <uknotcount>+1 when any of
192    EvalCoord1[fd], EvalCoord1[fd]v, EvalPoint1, or EvalMesh1 are called if
193    both of MAP1_XXX and MAP1_XXX_NURBS_SGIX are enabled.
194
195    INVALID_VALUE is generated if <uorder> > <uknotcount>+1 or <vorder> >
196    <vknotcount>+1 when any of EvalCoord2[fd], EvalCoord2[fd]v, EvalPoint2, or
197    EvalMesh2 are called if both of MAP2_XXX and MAP2_XXX_NURBS_SGIX are
198    enabled.
199
200New State
201
202									Initial
203    Get Value				Get Command	Type	Value	Attrib
204    ---------				-----------	----	-------	------
205    MAP1_VERTEX_3_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
206    MAP1_VERTEX_4_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
207    MAP1_INDEX_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
208    MAP1_COLOR_4_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
209    MAP1_NORMAL_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
210    MAP1_TEXTURE_COORD_1_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
211    MAP1_TEXTURE_COORD_2_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
212    MAP1_TEXTURE_COORD_3_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
213    MAP1_TEXTURE_COORD_4_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
214    MAP2_VERTEX_3_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
215    MAP2_VERTEX_4_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
216    MAP2_INDEX_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
217    MAP2_COLOR_4_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
218    MAP2_NORMAL_NURBS_SGIX		glIsEnabled	B	FALSE	eval/enable
219    MAP2_TEXTURE_COORD_1_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
220    MAP2_TEXTURE_COORD_2_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
221    MAP2_TEXTURE_COORD_3_NURBS_SGIX	glIsEnabled	B	FALSE	eval/enable
222    MAP2_TEXTURE_COORD_4_NURBS_SGIX	glIsEnabled	B	FALSE   eval/enable
223
224    NURBS_KNOT_COUNT_SGIX		GetMapiv	9XZ+	 0
225    NURBS_KNOT_COUNT_SGIX		GetMapiv	9X2XZ+	 0,0
226    NURBS_KNOT_VECTOR_SGIX		GetMapdv	9X7*XR	 undef.
227    NURBS_KNOT_VECTOR_SGIX		GetMapdv	9X2X7*XR undef.
228
229
230New Implementation Dependent State
231
232    None
233