Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
2 | <!-- saved from url=(0013)about:internet --> | |
3 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glEvalCoord</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glEvalCoord"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glEvalCoord — evaluate enabled one- and two-dimensional maps</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord1f</b>(</code></td><td>GLfloat </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord1d</b>(</code></td><td>GLdouble </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord2f</b>(</code></td><td>GLfloat </td><td><var class="pdparam">u</var>, </td></tr><tr><td> </td><td>GLfloat </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord2d</b>(</code></td><td>GLdouble </td><td><var class="pdparam">u</var>, </td></tr><tr><td> </td><td>GLdouble </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>u</code></em></span></dt><dd><p> | |
4 | Specifies a value that is the domain coordinate | |
5 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math> | |
6 | to the basis function | |
7 | defined in a previous <a class="citerefentry" href="glMap1.xml"><span class="citerefentry"><span class="refentrytitle">glMap1</span></span></a> or <a class="citerefentry" href="glMap2.xml"><span class="citerefentry"><span class="refentrytitle">glMap2</span></span></a> command. | |
8 | </p></dd><dt><span class="term"><em class="parameter"><code>v</code></em></span></dt><dd><p> | |
9 | Specifies a value that is the domain coordinate | |
10 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">v</mml:mi></mml:math> | |
11 | to the basis function | |
12 | defined in a previous <a class="citerefentry" href="glMap2.xml"><span class="citerefentry"><span class="refentrytitle">glMap2</span></span></a> command. | |
13 | This argument is not present in a <code class="function">glEvalCoord1</code> command. | |
14 | </p></dd></dl></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord1fv</b>(</code></td><td>const GLfloat * </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord1dv</b>(</code></td><td>const GLdouble * </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord2fv</b>(</code></td><td>const GLfloat * </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glEvalCoord2dv</b>(</code></td><td>const GLdouble * </td><td><var class="pdparam">u</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters2"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>u</code></em></span></dt><dd><p> | |
15 | Specifies a pointer to an array containing | |
16 | either one or two domain coordinates. | |
17 | The first coordinate is | |
18 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>. | |
19 | The second coordinate is | |
20 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">v</mml:mi></mml:math>, | |
21 | which is present only in <code class="function">glEvalCoord2</code> versions. | |
22 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
23 | <code class="function">glEvalCoord1</code> evaluates enabled one-dimensional maps at argument | |
24 | <em class="parameter"><code>u</code></em>. | |
25 | <code class="function">glEvalCoord2</code> does the same for two-dimensional maps using | |
26 | two domain values, | |
27 | <em class="parameter"><code>u</code></em> and <em class="parameter"><code>v</code></em>. | |
28 | To define a map, call <a class="citerefentry" href="glMap1.xml"><span class="citerefentry"><span class="refentrytitle">glMap1</span></span></a> and <a class="citerefentry" href="glMap2.xml"><span class="citerefentry"><span class="refentrytitle">glMap2</span></span></a>; to enable and | |
29 | disable it, call <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>. | |
30 | </p><p> | |
31 | When one of the <code class="function">glEvalCoord</code> commands is issued, | |
32 | all currently enabled maps of the indicated dimension are evaluated. | |
33 | Then, | |
34 | for each enabled map, | |
35 | it is as if the corresponding GL command had been issued with the | |
36 | computed value. | |
37 | That is, | |
38 | if <code class="constant">GL_MAP1_INDEX</code> or | |
39 | <code class="constant">GL_MAP2_INDEX</code> is enabled, | |
40 | a <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a> command is simulated. | |
41 | If <code class="constant">GL_MAP1_COLOR_4</code> or | |
42 | <code class="constant">GL_MAP2_COLOR_4</code> is enabled, | |
43 | a <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a> command is simulated. | |
44 | If <code class="constant">GL_MAP1_NORMAL</code> or <code class="constant">GL_MAP2_NORMAL</code> is enabled, | |
45 | a normal vector is produced, | |
46 | and if any of | |
47 | <code class="constant">GL_MAP1_TEXTURE_COORD_1</code>, | |
48 | <code class="constant">GL_MAP1_TEXTURE_COORD_2</code>, | |
49 | <code class="constant">GL_MAP1_TEXTURE_COORD_3</code>, | |
50 | <code class="constant">GL_MAP1_TEXTURE_COORD_4</code>, | |
51 | <code class="constant">GL_MAP2_TEXTURE_COORD_1</code>, | |
52 | <code class="constant">GL_MAP2_TEXTURE_COORD_2</code>, | |
53 | <code class="constant">GL_MAP2_TEXTURE_COORD_3</code>, or | |
54 | <code class="constant">GL_MAP2_TEXTURE_COORD_4</code> is enabled, then an appropriate <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> command is simulated. | |
55 | </p><p> | |
56 | For color, | |
57 | color index, | |
58 | normal, | |
59 | and texture coordinates the GL uses evaluated values instead of current values for those evaluations | |
60 | that are enabled, | |
61 | and current values otherwise, | |
62 | However, | |
63 | the evaluated values do not update the current values. | |
64 | Thus, if <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a> commands are interspersed with <code class="function">glEvalCoord</code> | |
65 | commands, the color, | |
66 | normal, | |
67 | and texture coordinates associated with the <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a> commands are not | |
68 | affected by the values generated by the <code class="function">glEvalCoord</code> commands, | |
69 | but only by the most recent | |
70 | <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a>, | |
71 | <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a>, | |
72 | <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>, and | |
73 | <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a> commands. | |
74 | </p><p> | |
75 | No commands are issued for maps that are not enabled. | |
76 | If more than one texture evaluation is enabled for a particular dimension | |
77 | (for example, <code class="constant">GL_MAP2_TEXTURE_COORD_1</code> and | |
78 | <code class="constant">GL_MAP2_TEXTURE_COORD_2</code>), | |
79 | then only the evaluation of the map that produces the larger | |
80 | number of coordinates | |
81 | (in this case, <code class="constant">GL_MAP2_TEXTURE_COORD_2</code>) | |
82 | is carried out. | |
83 | <code class="constant">GL_MAP1_VERTEX_4</code> overrides <code class="constant">GL_MAP1_VERTEX_3</code>, | |
84 | and | |
85 | <code class="constant">GL_MAP2_VERTEX_4</code> overrides <code class="constant">GL_MAP2_VERTEX_3</code>, | |
86 | in the same manner. | |
87 | If neither a three- nor a four-component vertex map is enabled for the | |
88 | specified dimension, | |
89 | the <code class="function">glEvalCoord</code> command is ignored. | |
90 | </p><p> | |
91 | If you have enabled automatic normal generation, | |
92 | by calling <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> with argument <code class="constant">GL_AUTO_NORMAL</code>, | |
93 | <code class="function">glEvalCoord2</code> generates surface normals analytically, | |
94 | regardless of the contents or enabling of the <code class="constant">GL_MAP2_NORMAL</code> map. | |
95 | Let | |
96 | </p><p> | |
97 | </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
98 | ||
99 | <mml:mrow> | |
100 | <mml:mi mathvariant="bold">m</mml:mi> | |
101 | <mml:mo>=</mml:mo> | |
102 | <mml:mrow> | |
103 | <mml:mfenced open="" close=""> | |
104 | <mml:mfrac> | |
105 | <mml:mfenced open="" close=""> | |
106 | <mml:mrow> | |
107 | <mml:mo>∂</mml:mo> | |
108 | <mml:mi mathvariant="bold">p</mml:mi> | |
109 | </mml:mrow> | |
110 | </mml:mfenced> | |
111 | <mml:mfenced open="" close=""> | |
112 | <mml:mrow> | |
113 | <mml:mo>∂</mml:mo> | |
114 | <mml:mi mathvariant="italic">u</mml:mi> | |
115 | </mml:mrow> | |
116 | </mml:mfenced> | |
117 | </mml:mfrac> | |
118 | </mml:mfenced> | |
119 | <mml:mo>×</mml:mo> | |
120 | <mml:mfenced open="" close=""> | |
121 | <mml:mfrac> | |
122 | <mml:mfenced open="" close=""> | |
123 | <mml:mrow> | |
124 | <mml:mo>∂</mml:mo> | |
125 | <mml:mi mathvariant="bold">p</mml:mi> | |
126 | </mml:mrow> | |
127 | </mml:mfenced> | |
128 | <mml:mfenced open="" close=""> | |
129 | <mml:mrow> | |
130 | <mml:mo>∂</mml:mo> | |
131 | <mml:mi mathvariant="italic">v</mml:mi> | |
132 | </mml:mrow> | |
133 | </mml:mfenced> | |
134 | </mml:mfrac> | |
135 | </mml:mfenced> | |
136 | </mml:mrow> | |
137 | </mml:mrow> | |
138 | </mml:math></div><p> | |
139 | </p><p> | |
140 | Then the generated normal | |
141 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
142 | ||
143 | <mml:mi mathvariant="bold">n</mml:mi> | |
144 | </mml:math> | |
145 | is | |
146 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
147 | ||
148 | <mml:mrow> | |
149 | <mml:mi mathvariant="bold">n</mml:mi> | |
150 | <mml:mo>=</mml:mo> | |
151 | <mml:mfrac> | |
152 | <mml:mi mathvariant="bold">m</mml:mi> | |
153 | <mml:mfenced open="" close=""> | |
154 | <mml:mfenced open="∥" close="∥"> | |
155 | <mml:mi mathvariant="bold">m</mml:mi> | |
156 | </mml:mfenced> | |
157 | </mml:mfenced> | |
158 | </mml:mfrac> | |
159 | </mml:mrow> | |
160 | </mml:math> | |
161 | </p><p> | |
162 | If automatic normal generation is disabled, | |
163 | the corresponding normal map <code class="constant">GL_MAP2_NORMAL</code>, | |
164 | if enabled, | |
165 | is used to produce a normal. | |
166 | If neither automatic normal generation nor a normal map is enabled, | |
167 | no normal is generated for | |
168 | <code class="function">glEvalCoord2</code> commands. | |
169 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
170 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_VERTEX_3</code> | |
171 | </p><p> | |
172 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_VERTEX_4</code> | |
173 | </p><p> | |
174 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_INDEX</code> | |
175 | </p><p> | |
176 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_COLOR_4</code> | |
177 | </p><p> | |
178 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_NORMAL</code> | |
179 | </p><p> | |
180 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_1</code> | |
181 | </p><p> | |
182 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_2</code> | |
183 | </p><p> | |
184 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_3</code> | |
185 | </p><p> | |
186 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP1_TEXTURE_COORD_4</code> | |
187 | </p><p> | |
188 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_VERTEX_3</code> | |
189 | </p><p> | |
190 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_VERTEX_4</code> | |
191 | </p><p> | |
192 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_INDEX</code> | |
193 | </p><p> | |
194 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_COLOR_4</code> | |
195 | </p><p> | |
196 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_NORMAL</code> | |
197 | </p><p> | |
198 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_1</code> | |
199 | </p><p> | |
200 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_2</code> | |
201 | </p><p> | |
202 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_3</code> | |
203 | </p><p> | |
204 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_MAP2_TEXTURE_COORD_4</code> | |
205 | </p><p> | |
206 | <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_AUTO_NORMAL</code> | |
207 | </p><p> | |
208 | <a class="citerefentry" href="glGetMap.xml"><span class="citerefentry"><span class="refentrytitle">glGetMap</span></span></a> | |
209 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
210 | <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>, | |
211 | <a class="citerefentry" href="glColor.xml"><span class="citerefentry"><span class="refentrytitle">glColor</span></span></a>, | |
212 | <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>, | |
213 | <a class="citerefentry" href="glEvalMesh.xml"><span class="citerefentry"><span class="refentrytitle">glEvalMesh</span></span></a>, | |
214 | <a class="citerefentry" href="glEvalPoint.xml"><span class="citerefentry"><span class="refentrytitle">glEvalPoint</span></span></a>, | |
215 | <a class="citerefentry" href="glIndex.xml"><span class="citerefentry"><span class="refentrytitle">glIndex</span></span></a>, | |
216 | <a class="citerefentry" href="glMap1.xml"><span class="citerefentry"><span class="refentrytitle">glMap1</span></span></a>, | |
217 | <a class="citerefentry" href="glMap2.xml"><span class="citerefentry"><span class="refentrytitle">glMap2</span></span></a>, | |
218 | <a class="citerefentry" href="glMapGrid.xml"><span class="citerefentry"><span class="refentrytitle">glMapGrid</span></span></a>, | |
219 | <a class="citerefentry" href="glNormal.xml"><span class="citerefentry"><span class="refentrytitle">glNormal</span></span></a>, | |
220 | <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>, | |
221 | <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a> | |
222 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
223 | Copyright <span class="trademark"></span>© 1991-2006 | |
224 | Silicon Graphics, Inc. This document is licensed under the SGI | |
225 | Free Software B License. For details, see | |
226 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
227 | </p></div></div></body></html> |