rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glMapGrid.xml
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>].
6 Must be positive.
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">
10
11 <mml:mrow>
12 <mml:mi mathvariant="italic">i</mml:mi>
13 <mml:mo>=</mml:mo>
14 <mml:mn>0</mml:mn>
15 </mml:mrow>
16 </mml:math>
17 and
18 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
19
20 <mml:mrow>
21 <mml:mi mathvariant="italic">i</mml:mi>
22 <mml:mo>=</mml:mo>
23 <mml:mi mathvariant="italic">un</mml:mi>
24 </mml:mrow>
25 </mml:math>.
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">
33
34 <mml:mrow>
35 <mml:mi mathvariant="italic">j</mml:mi>
36 <mml:mo>=</mml:mo>
37 <mml:mn>0</mml:mn>
38 </mml:mrow>
39 </mml:math>
40 and
41 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
42
43 <mml:mrow>
44 <mml:mi mathvariant="italic">j</mml:mi>
45 <mml:mo>=</mml:mo>
46 <mml:mi mathvariant="italic">vn</mml:mi>
47 </mml:mrow>
48 </mml:math>
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>.
57 </p><p>
58 <code class="function">glMapGrid1</code> and <code class="function">glMapGrid2</code> specify the linear grid mappings
59 between the
60 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
61 (or
62 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
63 and
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,
66 to the
67 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>
68 (or
69 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">u</mml:mi></mml:math>
70 and
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>
75 and
76 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">v</mml:mi></mml:math>
77 coordinates
78 are evaluated.
79 </p><p>
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>
85 are mapped so that
86 </p><p>
87 </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
88
89 <mml:mrow>
90 <mml:mi mathvariant="italic">u</mml:mi>
91 <mml:mo>=</mml:mo>
92 <mml:mrow>
93 <mml:mfrac>
94 <mml:mrow>
95 <mml:mi mathvariant="italic">i</mml:mi>
96 <mml:mo></mml:mo>
97 <mml:mfenced open="(" close=")">
98 <mml:mrow>
99 <mml:mi mathvariant="italic">u2</mml:mi>
100 <mml:mo>-</mml:mo>
101 <mml:mi mathvariant="italic">u1</mml:mi>
102 </mml:mrow>
103 </mml:mfenced>
104 </mml:mrow>
105 <mml:mi mathvariant="italic">un</mml:mi>
106 </mml:mfrac>
107 <mml:mo>+</mml:mo>
108 <mml:mi mathvariant="italic">u1</mml:mi>
109 </mml:mrow>
110 </mml:mrow>
111 </mml:math></div><p>
112 </p><p>
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">
116
117 <mml:mrow>
118 <mml:mi mathvariant="italic">i</mml:mi>
119 <mml:mo>=</mml:mo>
120 <mml:mn>0</mml:mn>
121 </mml:mrow>
122 </mml:math>
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">
126
127 <mml:mrow>
128 <mml:mi mathvariant="italic">i</mml:mi>
129 <mml:mo>=</mml:mo>
130 <mml:mi mathvariant="italic">un</mml:mi>
131 </mml:mrow>
132 </mml:math>
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">
136
137 <mml:mrow>
138 <mml:mi mathvariant="italic">j</mml:mi>
139 <mml:mo>=</mml:mo>
140 <mml:mn>0</mml:mn>
141 </mml:mrow>
142 </mml:math>
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">
146
147 <mml:mrow>
148 <mml:mi mathvariant="italic">j</mml:mi>
149 <mml:mo>=</mml:mo>
150 <mml:mi mathvariant="italic">vn</mml:mi>
151 </mml:mrow>
152 </mml:math>
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>
156 and
157 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">j</mml:mi></mml:math>
158 are mapped such that
159 </p><p>
160 </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
161
162 <mml:mrow>
163 <mml:mi mathvariant="italic">u</mml:mi>
164 <mml:mo>=</mml:mo>
165 <mml:mrow>
166 <mml:mfrac>
167 <mml:mrow>
168 <mml:mi mathvariant="italic">i</mml:mi>
169 <mml:mo></mml:mo>
170 <mml:mfenced open="(" close=")">
171 <mml:mrow>
172 <mml:mi mathvariant="italic">u2</mml:mi>
173 <mml:mo>-</mml:mo>
174 <mml:mi mathvariant="italic">u1</mml:mi>
175 </mml:mrow>
176 </mml:mfenced>
177 </mml:mrow>
178 <mml:mi mathvariant="italic">un</mml:mi>
179 </mml:mfrac>
180 <mml:mo>+</mml:mo>
181 <mml:mi mathvariant="italic">u1</mml:mi>
182 </mml:mrow>
183 </mml:mrow>
184 </mml:math></div><p>
185 </p><p>
186 </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
187
188 <mml:mrow>
189 <mml:mi mathvariant="italic">v</mml:mi>
190 <mml:mo>=</mml:mo>
191 <mml:mrow>
192 <mml:mfrac>
193 <mml:mrow>
194 <mml:mi mathvariant="italic">j</mml:mi>
195 <mml:mo></mml:mo>
196 <mml:mfenced open="(" close=")">
197 <mml:mrow>
198 <mml:mi mathvariant="italic">v2</mml:mi>
199 <mml:mo>-</mml:mo>
200 <mml:mi mathvariant="italic">v1</mml:mi>
201 </mml:mrow>
202 </mml:mfenced>
203 </mml:mrow>
204 <mml:mi mathvariant="italic">vn</mml:mi>
205 </mml:mfrac>
206 <mml:mo>+</mml:mo>
207 <mml:mi mathvariant="italic">v1</mml:mi>
208 </mml:mrow>
209 </mml:mrow>
210 </mml:math></div><p>
211 </p><p>
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
216 positive.
217 </p><p>
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>
223 </p><p>
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>
225 </p><p>
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>
227 </p><p>
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>