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