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>glMapGrid
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glMapGrid"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glMapGrid — define a one- or two-dimensional mesh
</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">glMapGrid1d
</b>(
</code></td><td>GLint
</td><td><var class=
"pdparam">un
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">u1
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">u2
</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">glMapGrid1f
</b>(
</code></td><td>GLint
</td><td><var class=
"pdparam">un
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">u1
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">u2
</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">glMapGrid2d
</b>(
</code></td><td>GLint
</td><td><var class=
"pdparam">un
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">u1
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">u2
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vn
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">v1
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">v2
</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">glMapGrid2f
</b>(
</code></td><td>GLint
</td><td><var class=
"pdparam">un
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">u1
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">u2
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">vn
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">v1
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">v2
</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>un
</code></em></span></dt><dd><p>
4 Specifies the number of partitions in the grid range interval
5 [
<em class=
"parameter"><code>u1
</code></em>,
<em class=
"parameter"><code>u2
</code></em>].
7 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>u1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>u2
</code></em></span></dt><dd><p>
8 Specify the mappings for integer grid domain values
9 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
12 <mml:mi mathvariant=
"italic">i
</mml:mi>
18 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
21 <mml:mi mathvariant=
"italic">i
</mml:mi>
23 <mml:mi mathvariant=
"italic">un
</mml:mi>
26 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>vn
</code></em></span></dt><dd><p>
27 Specifies the number of partitions in the grid range interval
28 [
<em class=
"parameter"><code>v1
</code></em>,
<em class=
"parameter"><code>v2
</code></em>]
29 (
<code class=
"function">glMapGrid2
</code> only).
30 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>v1
</code></em>,
</span><span class=
"term"><em class=
"parameter"><code>v2
</code></em></span></dt><dd><p>
31 Specify the mappings for integer grid domain values
32 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
35 <mml:mi mathvariant=
"italic">j
</mml:mi>
41 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
44 <mml:mi mathvariant=
"italic">j
</mml:mi>
46 <mml:mi mathvariant=
"italic">vn
</mml:mi>
49 (
<code class=
"function">glMapGrid2
</code> only).
50 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
51 <code class=
"function">glMapGrid
</code> and
<a class=
"citerefentry" href=
"glEvalMesh.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalMesh
</span></span></a> are used together to efficiently
52 generate and evaluate a series of evenly-spaced map domain values.
53 <a class=
"citerefentry" href=
"glEvalMesh.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalMesh
</span></span></a> steps through the integer domain
54 of a one- or two-dimensional grid,
55 whose range is the domain of the evaluation maps specified by
56 <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>.
58 <code class=
"function">glMapGrid1
</code> and
<code class=
"function">glMapGrid2
</code> specify the linear grid mappings
60 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
62 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
64 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>)
65 integer grid coordinates,
67 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
69 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
71 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>)
72 floating-point evaluation map coordinates.
73 See
<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> for details of how
74 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">u
</mml:mi></mml:math>
76 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>
80 <code class=
"function">glMapGrid1
</code> specifies a single linear mapping
81 such that integer grid coordinate
0 maps exactly to
<em class=
"parameter"><code>u1
</code></em>,
82 and integer grid coordinate
<em class=
"parameter"><code>un
</code></em> maps exactly to
<em class=
"parameter"><code>u2
</code></em>.
83 All other integer grid coordinates
84 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
87 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
90 <mml:mi mathvariant=
"italic">u
</mml:mi>
95 <mml:mi mathvariant=
"italic">i
</mml:mi>
97 <mml:mfenced open=
"(" close=
")">
99 <mml:mi mathvariant=
"italic">u2
</mml:mi>
101 <mml:mi mathvariant=
"italic">u1
</mml:mi>
105 <mml:mi mathvariant=
"italic">un
</mml:mi>
108 <mml:mi mathvariant=
"italic">u1
</mml:mi>
113 <code class=
"function">glMapGrid2
</code> specifies two such linear mappings.
114 One maps integer grid coordinate
115 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
118 <mml:mi mathvariant=
"italic">i
</mml:mi>
123 exactly to
<em class=
"parameter"><code>u1
</code></em>,
124 and integer grid coordinate
125 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
128 <mml:mi mathvariant=
"italic">i
</mml:mi>
130 <mml:mi mathvariant=
"italic">un
</mml:mi>
133 exactly to
<em class=
"parameter"><code>u2
</code></em>.
134 The other maps integer grid coordinate
135 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
138 <mml:mi mathvariant=
"italic">j
</mml:mi>
143 exactly to
<em class=
"parameter"><code>v1
</code></em>,
144 and integer grid coordinate
145 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
148 <mml:mi mathvariant=
"italic">j
</mml:mi>
150 <mml:mi mathvariant=
"italic">vn
</mml:mi>
153 exactly to
<em class=
"parameter"><code>v2
</code></em>.
154 Other integer grid coordinates
155 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
157 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>
160 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
163 <mml:mi mathvariant=
"italic">u
</mml:mi>
168 <mml:mi mathvariant=
"italic">i
</mml:mi>
170 <mml:mfenced open=
"(" close=
")">
172 <mml:mi mathvariant=
"italic">u2
</mml:mi>
174 <mml:mi mathvariant=
"italic">u1
</mml:mi>
178 <mml:mi mathvariant=
"italic">un
</mml:mi>
181 <mml:mi mathvariant=
"italic">u1
</mml:mi>
186 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
189 <mml:mi mathvariant=
"italic">v
</mml:mi>
194 <mml:mi mathvariant=
"italic">j
</mml:mi>
196 <mml:mfenced open=
"(" close=
")">
198 <mml:mi mathvariant=
"italic">v2
</mml:mi>
200 <mml:mi mathvariant=
"italic">v1
</mml:mi>
204 <mml:mi mathvariant=
"italic">vn
</mml:mi>
207 <mml:mi mathvariant=
"italic">v1
</mml:mi>
212 The mappings specified by
<code class=
"function">glMapGrid
</code> are used identically by
213 <a class=
"citerefentry" href=
"glEvalMesh.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalMesh
</span></span></a> and
<a class=
"citerefentry" href=
"glEvalPoint.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalPoint
</span></span></a>.
214 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
215 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if either
<em class=
"parameter"><code>un
</code></em> or
<em class=
"parameter"><code>vn
</code></em> is not
218 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glMapGrid
</code>
219 is executed between the execution of
<a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>
220 and the corresponding execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
221 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
222 <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>
224 <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>
226 <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>
228 <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>
229 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
230 <a class=
"citerefentry" href=
"glEvalCoord.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalCoord
</span></span></a>,
231 <a class=
"citerefentry" href=
"glEvalMesh.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalMesh
</span></span></a>,
232 <a class=
"citerefentry" href=
"glEvalPoint.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEvalPoint
</span></span></a>,
233 <a class=
"citerefentry" href=
"glMap1.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMap1
</span></span></a>,
234 <a class=
"citerefentry" href=
"glMap2.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMap2
</span></span></a>
235 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
236 Copyright
<span class=
"trademark"></span>©
1991-
2006
237 Silicon Graphics, Inc. This document is licensed under the SGI
238 Free Software B License. For details, see
239 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
240 </p></div></div></body></html>