Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glEvalCoord"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glEvalCoord</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glEvalCoord</refname> | |
17 | <refpurpose>evaluate enabled one- and two-dimensional maps</refpurpose> | |
18 | </refnamediv> | |
19 | <!-- eqn: ignoring delim $$ --> | |
20 | <refsynopsisdiv><title>C Specification</title> | |
21 | <funcsynopsis> | |
22 | <funcprototype> | |
23 | <funcdef>void <function>glEvalCoord1f</function></funcdef> | |
24 | <paramdef>GLfloat <parameter>u</parameter></paramdef> | |
25 | </funcprototype> | |
26 | </funcsynopsis> | |
27 | <funcsynopsis> | |
28 | <funcprototype> | |
29 | <funcdef>void <function>glEvalCoord1d</function></funcdef> | |
30 | <paramdef>GLdouble <parameter>u</parameter></paramdef> | |
31 | </funcprototype> | |
32 | </funcsynopsis> | |
33 | <funcsynopsis> | |
34 | <funcprototype> | |
35 | <funcdef>void <function>glEvalCoord2f</function></funcdef> | |
36 | <paramdef>GLfloat <parameter>u</parameter></paramdef> | |
37 | <paramdef>GLfloat <parameter>v</parameter></paramdef> | |
38 | </funcprototype> | |
39 | </funcsynopsis> | |
40 | <funcsynopsis> | |
41 | <funcprototype> | |
42 | <funcdef>void <function>glEvalCoord2d</function></funcdef> | |
43 | <paramdef>GLdouble <parameter>u</parameter></paramdef> | |
44 | <paramdef>GLdouble <parameter>v</parameter></paramdef> | |
45 | </funcprototype> | |
46 | </funcsynopsis> | |
47 | </refsynopsisdiv> | |
48 | <refsect1 id="parameters"><title>Parameters</title> | |
49 | <variablelist> | |
50 | <varlistentry> | |
51 | <term><parameter>u</parameter></term> | |
52 | <listitem> | |
53 | <para> | |
54 | Specifies a value that is the domain coordinate | |
55 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation> | |
56 | to the basis function | |
57 | defined in a previous <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry> command. | |
58 | </para> | |
59 | </listitem> | |
60 | </varlistentry> | |
61 | <varlistentry> | |
62 | <term><parameter>v</parameter></term> | |
63 | <listitem> | |
64 | <para> | |
65 | Specifies a value that is the domain coordinate | |
66 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation> | |
67 | to the basis function | |
68 | defined in a previous <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry> command. | |
69 | This argument is not present in a <function>glEvalCoord1</function> command. | |
70 | </para> | |
71 | </listitem> | |
72 | </varlistentry> | |
73 | </variablelist> | |
74 | </refsect1> | |
75 | <refsynopsisdiv><title>C Specification</title> | |
76 | <funcsynopsis> | |
77 | <funcprototype> | |
78 | <funcdef>void <function>glEvalCoord1fv</function></funcdef> | |
79 | <paramdef>const GLfloat * <parameter>u</parameter></paramdef> | |
80 | </funcprototype> | |
81 | </funcsynopsis> | |
82 | <funcsynopsis> | |
83 | <funcprototype> | |
84 | <funcdef>void <function>glEvalCoord1dv</function></funcdef> | |
85 | <paramdef>const GLdouble * <parameter>u</parameter></paramdef> | |
86 | </funcprototype> | |
87 | </funcsynopsis> | |
88 | <funcsynopsis> | |
89 | <funcprototype> | |
90 | <funcdef>void <function>glEvalCoord2fv</function></funcdef> | |
91 | <paramdef>const GLfloat * <parameter>u</parameter></paramdef> | |
92 | </funcprototype> | |
93 | </funcsynopsis> | |
94 | <funcsynopsis> | |
95 | <funcprototype> | |
96 | <funcdef>void <function>glEvalCoord2dv</function></funcdef> | |
97 | <paramdef>const GLdouble * <parameter>u</parameter></paramdef> | |
98 | </funcprototype> | |
99 | </funcsynopsis> | |
100 | </refsynopsisdiv> | |
101 | <refsect1 id="parameters2"><title>Parameters</title> | |
102 | <variablelist> | |
103 | <varlistentry> | |
104 | <term><parameter>u</parameter></term> | |
105 | <listitem> | |
106 | <para> | |
107 | Specifies a pointer to an array containing | |
108 | either one or two domain coordinates. | |
109 | The first coordinate is | |
110 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation>. | |
111 | The second coordinate is | |
112 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation>, | |
113 | which is present only in <function>glEvalCoord2</function> versions. | |
114 | </para> | |
115 | </listitem> | |
116 | </varlistentry> | |
117 | </variablelist> | |
118 | </refsect1> | |
119 | <refsect1 id="description"><title>Description</title> | |
120 | <para> | |
121 | <function>glEvalCoord1</function> evaluates enabled one-dimensional maps at argument | |
122 | <parameter>u</parameter>. | |
123 | <function>glEvalCoord2</function> does the same for two-dimensional maps using | |
124 | two domain values, | |
125 | <parameter>u</parameter> and <parameter>v</parameter>. | |
126 | To define a map, call <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>; to enable and | |
127 | disable it, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>. | |
128 | </para> | |
129 | <para> | |
130 | When one of the <function>glEvalCoord</function> commands is issued, | |
131 | all currently enabled maps of the indicated dimension are evaluated. | |
132 | Then, | |
133 | for each enabled map, | |
134 | it is as if the corresponding GL command had been issued with the | |
135 | computed value. | |
136 | That is, | |
137 | if <constant>GL_MAP1_INDEX</constant> or | |
138 | <constant>GL_MAP2_INDEX</constant> is enabled, | |
139 | a <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry> command is simulated. | |
140 | If <constant>GL_MAP1_COLOR_4</constant> or | |
141 | <constant>GL_MAP2_COLOR_4</constant> is enabled, | |
142 | a <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry> command is simulated. | |
143 | If <constant>GL_MAP1_NORMAL</constant> or <constant>GL_MAP2_NORMAL</constant> is enabled, | |
144 | a normal vector is produced, | |
145 | and if any of | |
146 | <constant>GL_MAP1_TEXTURE_COORD_1</constant>, | |
147 | <constant>GL_MAP1_TEXTURE_COORD_2</constant>, | |
148 | <constant>GL_MAP1_TEXTURE_COORD_3</constant>, | |
149 | <constant>GL_MAP1_TEXTURE_COORD_4</constant>, | |
150 | <constant>GL_MAP2_TEXTURE_COORD_1</constant>, | |
151 | <constant>GL_MAP2_TEXTURE_COORD_2</constant>, | |
152 | <constant>GL_MAP2_TEXTURE_COORD_3</constant>, or | |
153 | <constant>GL_MAP2_TEXTURE_COORD_4</constant> is enabled, then an appropriate <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> command is simulated. | |
154 | </para> | |
155 | <para> | |
156 | For color, | |
157 | color index, | |
158 | normal, | |
159 | and texture coordinates the GL uses evaluated values instead of current values for those evaluations | |
160 | that are enabled, | |
161 | and current values otherwise, | |
162 | However, | |
163 | the evaluated values do not update the current values. | |
164 | Thus, if <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry> commands are interspersed with <function>glEvalCoord</function> | |
165 | commands, the color, | |
166 | normal, | |
167 | and texture coordinates associated with the <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry> commands are not | |
168 | affected by the values generated by the <function>glEvalCoord</function> commands, | |
169 | but only by the most recent | |
170 | <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>, | |
171 | <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>, | |
172 | <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>, and | |
173 | <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> commands. | |
174 | </para> | |
175 | <para> | |
176 | No commands are issued for maps that are not enabled. | |
177 | If more than one texture evaluation is enabled for a particular dimension | |
178 | (for example, <constant>GL_MAP2_TEXTURE_COORD_1</constant> and | |
179 | <constant>GL_MAP2_TEXTURE_COORD_2</constant>), | |
180 | then only the evaluation of the map that produces the larger | |
181 | number of coordinates | |
182 | (in this case, <constant>GL_MAP2_TEXTURE_COORD_2</constant>) | |
183 | is carried out. | |
184 | <constant>GL_MAP1_VERTEX_4</constant> overrides <constant>GL_MAP1_VERTEX_3</constant>, | |
185 | and | |
186 | <constant>GL_MAP2_VERTEX_4</constant> overrides <constant>GL_MAP2_VERTEX_3</constant>, | |
187 | in the same manner. | |
188 | If neither a three- nor a four-component vertex map is enabled for the | |
189 | specified dimension, | |
190 | the <function>glEvalCoord</function> command is ignored. | |
191 | </para> | |
192 | <para> | |
193 | If you have enabled automatic normal generation, | |
194 | by calling <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> with argument <constant>GL_AUTO_NORMAL</constant>, | |
195 | <function>glEvalCoord2</function> generates surface normals analytically, | |
196 | regardless of the contents or enabling of the <constant>GL_MAP2_NORMAL</constant> map. | |
197 | Let | |
198 | </para> | |
199 | <para> | |
200 | <informalequation><mml:math> | |
201 | <!-- eqn: bold m = { {partial bold p} over {partial u} } times { {partial bold p} over {partial v} }:--> | |
202 | <mml:mrow> | |
203 | <mml:mi mathvariant="bold">m</mml:mi> | |
204 | <mml:mo>=</mml:mo> | |
205 | <mml:mrow> | |
206 | <mml:mfenced open="" close=""> | |
207 | <mml:mfrac> | |
208 | <mml:mfenced open="" close=""> | |
209 | <mml:mrow> | |
210 | <mml:mo>∂</mml:mo> | |
211 | <mml:mi mathvariant="bold">p</mml:mi> | |
212 | </mml:mrow> | |
213 | </mml:mfenced> | |
214 | <mml:mfenced open="" close=""> | |
215 | <mml:mrow> | |
216 | <mml:mo>∂</mml:mo> | |
217 | <mml:mi mathvariant="italic">u</mml:mi> | |
218 | </mml:mrow> | |
219 | </mml:mfenced> | |
220 | </mml:mfrac> | |
221 | </mml:mfenced> | |
222 | <mml:mo>×</mml:mo> | |
223 | <mml:mfenced open="" close=""> | |
224 | <mml:mfrac> | |
225 | <mml:mfenced open="" close=""> | |
226 | <mml:mrow> | |
227 | <mml:mo>∂</mml:mo> | |
228 | <mml:mi mathvariant="bold">p</mml:mi> | |
229 | </mml:mrow> | |
230 | </mml:mfenced> | |
231 | <mml:mfenced open="" close=""> | |
232 | <mml:mrow> | |
233 | <mml:mo>∂</mml:mo> | |
234 | <mml:mi mathvariant="italic">v</mml:mi> | |
235 | </mml:mrow> | |
236 | </mml:mfenced> | |
237 | </mml:mfrac> | |
238 | </mml:mfenced> | |
239 | </mml:mrow> | |
240 | </mml:mrow> | |
241 | </mml:math></informalequation> | |
242 | </para> | |
243 | <para> | |
244 | Then the generated normal | |
245 | <inlineequation><mml:math> | |
246 | <!-- eqn: bold n:--> | |
247 | <mml:mi mathvariant="bold">n</mml:mi> | |
248 | </mml:math></inlineequation> | |
249 | is | |
250 | <inlineequation><mml:math> | |
251 | <!-- eqn: bold n = bold m over { || bold m || }:--> | |
252 | <mml:mrow> | |
253 | <mml:mi mathvariant="bold">n</mml:mi> | |
254 | <mml:mo>=</mml:mo> | |
255 | <mml:mfrac> | |
256 | <mml:mi mathvariant="bold">m</mml:mi> | |
257 | <mml:mfenced open="" close=""> | |
258 | <mml:mfenced open="∥" close="∥"> | |
259 | <mml:mi mathvariant="bold">m</mml:mi> | |
260 | </mml:mfenced> | |
261 | </mml:mfenced> | |
262 | </mml:mfrac> | |
263 | </mml:mrow> | |
264 | </mml:math></inlineequation> | |
265 | </para> | |
266 | <para> | |
267 | If automatic normal generation is disabled, | |
268 | the corresponding normal map <constant>GL_MAP2_NORMAL</constant>, | |
269 | if enabled, | |
270 | is used to produce a normal. | |
271 | If neither automatic normal generation nor a normal map is enabled, | |
272 | no normal is generated for | |
273 | <function>glEvalCoord2</function> commands. | |
274 | </para> | |
275 | </refsect1> | |
276 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
277 | <para> | |
278 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_VERTEX_3</constant> | |
279 | </para> | |
280 | <para> | |
281 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_VERTEX_4</constant> | |
282 | </para> | |
283 | <para> | |
284 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_INDEX</constant> | |
285 | </para> | |
286 | <para> | |
287 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_COLOR_4</constant> | |
288 | </para> | |
289 | <para> | |
290 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_NORMAL</constant> | |
291 | </para> | |
292 | <para> | |
293 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_TEXTURE_COORD_1</constant> | |
294 | </para> | |
295 | <para> | |
296 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_TEXTURE_COORD_2</constant> | |
297 | </para> | |
298 | <para> | |
299 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_TEXTURE_COORD_3</constant> | |
300 | </para> | |
301 | <para> | |
302 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP1_TEXTURE_COORD_4</constant> | |
303 | </para> | |
304 | <para> | |
305 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_VERTEX_3</constant> | |
306 | </para> | |
307 | <para> | |
308 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_VERTEX_4</constant> | |
309 | </para> | |
310 | <para> | |
311 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_INDEX</constant> | |
312 | </para> | |
313 | <para> | |
314 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_COLOR_4</constant> | |
315 | </para> | |
316 | <para> | |
317 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_NORMAL</constant> | |
318 | </para> | |
319 | <para> | |
320 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_1</constant> | |
321 | </para> | |
322 | <para> | |
323 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_2</constant> | |
324 | </para> | |
325 | <para> | |
326 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_3</constant> | |
327 | </para> | |
328 | <para> | |
329 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_4</constant> | |
330 | </para> | |
331 | <para> | |
332 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_AUTO_NORMAL</constant> | |
333 | </para> | |
334 | <para> | |
335 | <citerefentry><refentrytitle>glGetMap</refentrytitle></citerefentry> | |
336 | </para> | |
337 | </refsect1> | |
338 | <refsect1 id="seealso"><title>See Also</title> | |
339 | <para> | |
340 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>, | |
341 | <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>, | |
342 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, | |
343 | <citerefentry><refentrytitle>glEvalMesh</refentrytitle></citerefentry>, | |
344 | <citerefentry><refentrytitle>glEvalPoint</refentrytitle></citerefentry>, | |
345 | <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>, | |
346 | <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>, | |
347 | <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>, | |
348 | <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>, | |
349 | <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>, | |
350 | <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>, | |
351 | <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry> | |
352 | </para> | |
353 | </refsect1> | |
354 | <refsect1 id="Copyright"><title>Copyright</title> | |
355 | <para> | |
356 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
357 | Silicon Graphics, Inc. This document is licensed under the SGI | |
358 | Free Software B License. For details, see | |
359 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
360 | </para> | |
361 | </refsect1> | |
362 | </refentry> |