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>glEvalMesh
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glEvalMesh"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glEvalMesh — compute a one- or two-dimensional grid of points or lines
</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">glEvalMesh1
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">mode
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">i1
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">i2
</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>mode
</code></em></span></dt><dd><p>
4 In
<code class=
"function">glEvalMesh1
</code>, specifies whether to compute a one-dimensional mesh of points or lines.
6 <code class=
"constant">GL_POINT
</code> and
7 <code class=
"constant">GL_LINE
</code> are accepted.
8 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>i1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>i2
</code></em></span></dt><dd><p>
9 Specify the first and last integer values for grid domain variable
10 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>.
11 </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">glEvalMesh2
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">mode
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">i1
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">i2
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">j1
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">j2
</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>mode
</code></em></span></dt><dd><p>
12 In
<code class=
"function">glEvalMesh2
</code>, specifies whether to compute a two-dimensional mesh of points, lines,
15 <code class=
"constant">GL_POINT
</code>,
16 <code class=
"constant">GL_LINE
</code>, and
17 <code class=
"constant">GL_FILL
</code> are accepted.
18 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>i1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>i2
</code></em></span></dt><dd><p>
19 Specify the first and last integer values for grid domain variable
20 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>.
21 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>j1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>j2
</code></em></span></dt><dd><p>
22 Specify the first and last integer values for grid domain variable
23 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>.
24 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
25 <a class=
"citerefentry" href=
"glMapGrid.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMapGrid
</span></span></a> and
<code class=
"function">glEvalMesh
</code> are used in tandem to efficiently
26 generate and evaluate a series of evenly-spaced map domain values.
27 <code class=
"function">glEvalMesh
</code> steps through the integer domain of a one- or two-dimensional grid,
28 whose range is the domain of the evaluation maps specified by
29 <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>.
30 <em class=
"parameter"><code>mode
</code></em> determines whether the resulting vertices are connected as
35 In the one-dimensional case,
36 <code class=
"function">glEvalMesh1
</code>,
37 the mesh is generated as if the following code fragment were executed:
39 </p><pre class=
"programlisting">
40 glBegin(
<em class=
"parameter"><code>type
</code></em> );
41 for ( i =
<em class=
"parameter"><code>i1
</code></em>; i
<=
<em class=
"parameter"><code>i2
</code></em>; i +=
1 )
42 glEvalCoord1(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
49 <mml:mi mathvariant=
"italic">u
</mml:mi>
53 <mml:mi mathvariant=
"italic">u
</mml:mi>
62 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
67 <mml:mi mathvariant=
"italic">u
</mml:mi>
71 <mml:mfenced open=
"(" close=
")">
74 <mml:mi mathvariant=
"italic">u
</mml:mi>
79 <mml:mi mathvariant=
"italic">u
</mml:mi>
84 <mml:mi mathvariant=
"italic">n
</mml:mi>
90 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>,
91 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
93 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
98 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
100 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
104 are the arguments to the most recent
105 <a class=
"citerefentry" href=
"glMapGrid1.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMapGrid1
</span></span></a> command.
106 <span class=
"emphasis"><em>type
</em></span> is
<code class=
"constant">GL_POINTS
</code> if
<em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_POINT
</code>,
107 or
<code class=
"constant">GL_LINES
</code> if
<em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_LINE
</code>.
109 The one absolute numeric requirement is that if
110 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
113 <mml:mi mathvariant=
"italic">i
</mml:mi>
115 <mml:mi mathvariant=
"italic">n
</mml:mi>
120 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
124 <mml:mi mathvariant=
"italic">i
</mml:mi>
128 <mml:mi mathvariant=
"italic">u
</mml:mi>
132 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
138 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
140 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
145 In the two-dimensional case,
<code class=
"function">glEvalMesh2
</code>, let
147 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
152 <mml:mi mathvariant=
"italic">u
</mml:mi>
156 <mml:mfenced open=
"(" close=
")">
158 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
162 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
167 <mml:mi mathvariant=
"italic">n
</mml:mi>
172 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
177 <mml:mi mathvariant=
"italic">v
</mml:mi>
181 <mml:mfenced open=
"(" close=
")">
183 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
187 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
192 <mml:mi mathvariant=
"italic">m
</mml:mi>
198 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>,
199 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
201 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
205 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
207 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
211 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">m
</mml:mi></mml:math>,
212 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
214 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
219 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
221 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
226 arguments to the most recent
<a class=
"citerefentry" href=
"glMapGrid2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMapGrid2
</span></span></a> command. Then, if
227 <em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_FILL
</code>, the
<code class=
"function">glEvalMesh2
</code> command is equivalent
230 </p><pre class=
"programlisting">
231 for ( j =
<em class=
"parameter"><code>j1
</code></em>; j
< <em class=
"parameter"><code>j2
</code></em>; j +=
1 ) {
232 glBegin( GL_QUAD_STRIP );
233 for ( i =
<em class=
"parameter"><code>i1
</code></em>; i
<=
<em class=
"parameter"><code>i2
</code></em>; i +=
1 ) {
234 glEvalCoord2(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
241 <mml:mi mathvariant=
"italic">u
</mml:mi>
245 <mml:mi mathvariant=
"italic">u
</mml:mi>
254 <mml:mi mathvariant=
"italic">v
</mml:mi>
259 <mml:mi mathvariant=
"italic">v
</mml:mi>
264 glEvalCoord2(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
271 <mml:mi mathvariant=
"italic">u
</mml:mi>
275 <mml:mi mathvariant=
"italic">u
</mml:mi>
282 <mml:mfenced open=
"(" close=
")">
292 <mml:mi mathvariant=
"italic">v
</mml:mi>
296 <mml:mi mathvariant=
"italic">v
</mml:mi>
306 If
<em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_LINE
</code>, then a call to
<code class=
"function">glEvalMesh2
</code> is equivalent to:
308 </p><pre class=
"programlisting">
309 for ( j =
<em class=
"parameter"><code>j1
</code></em>; j
<=
<em class=
"parameter"><code>j2
</code></em>; j +=
1 ) {
310 glBegin( GL_LINE_STRIP );
311 for ( i =
<em class=
"parameter"><code>i1
</code></em>; i
<=
<em class=
"parameter"><code>i2
</code></em>; i +=
1 )
312 glEvalCoord2(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
319 <mml:mi mathvariant=
"italic">u
</mml:mi>
323 <mml:mi mathvariant=
"italic">u
</mml:mi>
332 <mml:mi mathvariant=
"italic">v
</mml:mi>
336 <mml:mi mathvariant=
"italic">v
</mml:mi>
344 for ( i =
<em class=
"parameter"><code>i1
</code></em>; i
<=
<em class=
"parameter"><code>i2
</code></em>; i +=
1 ) {
345 glBegin( GL_LINE_STRIP );
346 for ( j =
<em class=
"parameter"><code>j1
</code></em>; j
<=
<em class=
"parameter"><code>j1
</code></em>; j +=
1 )
347 glEvalCoord2(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
354 <mml:mi mathvariant=
"italic">u
</mml:mi>
358 <mml:mi mathvariant=
"italic">u
</mml:mi>
367 <mml:mi mathvariant=
"italic">v
</mml:mi>
371 <mml:mi mathvariant=
"italic">v
</mml:mi>
380 And finally, if
<em class=
"parameter"><code>mode
</code></em> is
<code class=
"constant">GL_POINT
</code>, then a call to
381 <code class=
"function">glEvalMesh2
</code> is equivalent to:
383 </p><pre class=
"programlisting">
384 glBegin( GL_POINTS );
385 for ( j =
<em class=
"parameter"><code>j1
</code></em>; j
<=
<em class=
"parameter"><code>j2
</code></em>; j +=
1 )
386 for ( i =
<em class=
"parameter"><code>i1
</code></em>; i
<=
<em class=
"parameter"><code>i2
</code></em>; i +=
1 )
387 glEvalCoord2(
<mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
394 <mml:mi mathvariant=
"italic">u
</mml:mi>
398 <mml:mi mathvariant=
"italic">u
</mml:mi>
407 <mml:mi mathvariant=
"italic">v
</mml:mi>
411 <mml:mi mathvariant=
"italic">v
</mml:mi>
419 In all three cases, the only absolute numeric requirements are that if
420 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
423 <mml:mi mathvariant=
"italic">i
</mml:mi>
425 <mml:mi mathvariant=
"italic">n
</mml:mi>
428 then the value computed from
429 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
433 <mml:mi mathvariant=
"italic">i
</mml:mi>
437 <mml:mi mathvariant=
"italic">u
</mml:mi>
441 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
447 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
449 <mml:msub><mml:mi mathvariant=
"italic">u
</mml:mi>
454 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
457 <mml:mi mathvariant=
"italic">j
</mml:mi>
459 <mml:mi mathvariant=
"italic">m
</mml:mi>
462 then the value computed from
463 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
467 <mml:mi mathvariant=
"italic">j
</mml:mi>
471 <mml:mi mathvariant=
"italic">v
</mml:mi>
475 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
481 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
483 <mml:msub><mml:mi mathvariant=
"italic">v
</mml:mi>
487 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
488 <code class=
"constant">GL_INVALID_ENUM
</code> is generated if
<em class=
"parameter"><code>mode
</code></em> is not an accepted value.
490 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glEvalMesh
</code>
491 is executed between the execution of
<a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>
492 and the corresponding execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
493 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
494 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_MAP1_GRID_DOMAIN
</code>
496 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_MAP2_GRID_DOMAIN
</code>
498 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_MAP1_GRID_SEGMENTS
</code>
500 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_MAP2_GRID_SEGMENTS
</code>
501 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
502 <a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>,
503 <a class=
"citerefentry" href=
"glEvalCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord
</span></span></a>,
504 <a class=
"citerefentry" href=
"glEvalPoint.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalPoint
</span></span></a>,
505 <a class=
"citerefentry" href=
"glMap1.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMap1
</span></span></a>,
506 <a class=
"citerefentry" href=
"glMap2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMap2
</span></span></a>,
507 <a class=
"citerefentry" href=
"glMapGrid.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMapGrid
</span></span></a>
508 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
509 Copyright
<span class=
"trademark"></span>©
1991-
2006
510 Silicon Graphics, Inc. This document is licensed under the SGI
511 Free Software B License. For details, see
512 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
513 </p></div></div></body></html>