Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" |
||
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> |
||
| 4 | <refentry id="glMap2"> |
||
| 5 | <refmeta> |
||
| 6 | <refmetainfo> |
||
| 7 | <copyright> |
||
| 8 | <year>1991-2006</year> |
||
| 9 | <holder>Silicon Graphics, Inc.</holder> |
||
| 10 | </copyright> |
||
| 11 | </refmetainfo> |
||
| 12 | <refentrytitle>glMap2</refentrytitle> |
||
| 13 | <manvolnum>3G</manvolnum> |
||
| 14 | </refmeta> |
||
| 15 | <refnamediv> |
||
| 16 | <refname>glMap2</refname> |
||
| 17 | <refpurpose>define a two-dimensional evaluator</refpurpose> |
||
| 18 | </refnamediv> |
||
| 19 | <refsynopsisdiv><title>C Specification</title> |
||
| 20 | <funcsynopsis> |
||
| 21 | <funcprototype> |
||
| 22 | <funcdef>void <function>glMap2f</function></funcdef> |
||
| 23 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
||
| 24 | <paramdef>GLfloat <parameter>u1</parameter></paramdef> |
||
| 25 | <paramdef>GLfloat <parameter>u2</parameter></paramdef> |
||
| 26 | <paramdef>GLint <parameter>ustride</parameter></paramdef> |
||
| 27 | <paramdef>GLint <parameter>uorder</parameter></paramdef> |
||
| 28 | <paramdef>GLfloat <parameter>v1</parameter></paramdef> |
||
| 29 | <paramdef>GLfloat <parameter>v2</parameter></paramdef> |
||
| 30 | <paramdef>GLint <parameter>vstride</parameter></paramdef> |
||
| 31 | <paramdef>GLint <parameter>vorder</parameter></paramdef> |
||
| 32 | <paramdef>const GLfloat * <parameter>points</parameter></paramdef> |
||
| 33 | </funcprototype> |
||
| 34 | </funcsynopsis> |
||
| 35 | <funcsynopsis> |
||
| 36 | <funcprototype> |
||
| 37 | <funcdef>void <function>glMap2d</function></funcdef> |
||
| 38 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
||
| 39 | <paramdef>GLdouble <parameter>u1</parameter></paramdef> |
||
| 40 | <paramdef>GLdouble <parameter>u2</parameter></paramdef> |
||
| 41 | <paramdef>GLint <parameter>ustride</parameter></paramdef> |
||
| 42 | <paramdef>GLint <parameter>uorder</parameter></paramdef> |
||
| 43 | <paramdef>GLdouble <parameter>v1</parameter></paramdef> |
||
| 44 | <paramdef>GLdouble <parameter>v2</parameter></paramdef> |
||
| 45 | <paramdef>GLint <parameter>vstride</parameter></paramdef> |
||
| 46 | <paramdef>GLint <parameter>vorder</parameter></paramdef> |
||
| 47 | <paramdef>const GLdouble * <parameter>points</parameter></paramdef> |
||
| 48 | </funcprototype> |
||
| 49 | </funcsynopsis> |
||
| 50 | </refsynopsisdiv> |
||
| 51 | <!-- eqn: ignoring delim $$ --> |
||
| 52 | <refsect1 id="parameters"><title>Parameters</title> |
||
| 53 | <variablelist> |
||
| 54 | <varlistentry> |
||
| 55 | <term><parameter>target</parameter></term> |
||
| 56 | <listitem> |
||
| 57 | <para> |
||
| 58 | Specifies the kind of values that are generated by the evaluator. |
||
| 59 | Symbolic constants |
||
| 60 | <constant>GL_MAP2_VERTEX_3</constant>, |
||
| 61 | <constant>GL_MAP2_VERTEX_4</constant>, |
||
| 62 | <constant>GL_MAP2_INDEX</constant>, |
||
| 63 | <constant>GL_MAP2_COLOR_4</constant>, |
||
| 64 | <constant>GL_MAP2_NORMAL</constant>, |
||
| 65 | <constant>GL_MAP2_TEXTURE_COORD_1</constant>, |
||
| 66 | <constant>GL_MAP2_TEXTURE_COORD_2</constant>, |
||
| 67 | <constant>GL_MAP2_TEXTURE_COORD_3</constant>, and |
||
| 68 | <constant>GL_MAP2_TEXTURE_COORD_4</constant> are accepted. |
||
| 69 | </para> |
||
| 70 | </listitem> |
||
| 71 | </varlistentry> |
||
| 72 | <varlistentry> |
||
| 73 | <term><parameter>u1</parameter></term> |
||
| 74 | <term><parameter>u2</parameter></term> |
||
| 75 | <listitem> |
||
| 76 | <para> |
||
| 77 | Specify a linear mapping of |
||
| 78 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation>, |
||
| 79 | as presented to <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>, |
||
| 80 | to |
||
| 81 | <inlineequation><mml:math> |
||
| 82 | <!-- eqn: u hat:--> |
||
| 83 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 84 | </mml:math></inlineequation>, |
||
| 85 | one of the two variables that are evaluated by the equations specified |
||
| 86 | by this command. Initially, <parameter>u1</parameter> is 0 and <parameter>u2</parameter> is 1. |
||
| 87 | </para> |
||
| 88 | </listitem> |
||
| 89 | </varlistentry> |
||
| 90 | <varlistentry> |
||
| 91 | <term><parameter>ustride</parameter></term> |
||
| 92 | <listitem> |
||
| 93 | <para> |
||
| 94 | Specifies the number of floats or doubles between |
||
| 95 | the beginning of control point |
||
| 96 | <inlineequation><mml:math> |
||
| 97 | <!-- eqn: R sub ij:--> |
||
| 98 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 99 | <mml:mi mathvariant="italic">ij</mml:mi> |
||
| 100 | </mml:msub> |
||
| 101 | </mml:math></inlineequation> |
||
| 102 | and the beginning of control point |
||
| 103 | <inlineequation><mml:math> |
||
| 104 | <!-- eqn: R sub { (i+1) j }:--> |
||
| 105 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 106 | <mml:mfenced open="" close=""> |
||
| 107 | <mml:mrow> |
||
| 108 | <mml:mfenced open="(" close=")"> |
||
| 109 | <mml:mrow> |
||
| 110 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 111 | <mml:mo>+</mml:mo> |
||
| 112 | <mml:mn>1</mml:mn> |
||
| 113 | </mml:mrow> |
||
| 114 | </mml:mfenced> |
||
| 115 | <mml:mo>⁢</mml:mo> |
||
| 116 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 117 | </mml:mrow> |
||
| 118 | </mml:mfenced> |
||
| 119 | </mml:msub> |
||
| 120 | </mml:math></inlineequation>, |
||
| 121 | where |
||
| 122 | <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation> |
||
| 123 | and |
||
| 124 | <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation> |
||
| 125 | are the |
||
| 126 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation> |
||
| 127 | and |
||
| 128 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation> |
||
| 129 | control point indices, respectively. |
||
| 130 | This allows control points to be embedded in arbitrary data structures. |
||
| 131 | The only constraint is that the values for a particular control point |
||
| 132 | must occupy contiguous memory locations. The initial value of <parameter>ustride</parameter> is 0. |
||
| 133 | </para> |
||
| 134 | </listitem> |
||
| 135 | </varlistentry> |
||
| 136 | <varlistentry> |
||
| 137 | <term><parameter>uorder</parameter></term> |
||
| 138 | <listitem> |
||
| 139 | <para> |
||
| 140 | Specifies the dimension of the control point array in the |
||
| 141 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation> |
||
| 142 | axis. |
||
| 143 | Must be positive. The initial value is 1. |
||
| 144 | </para> |
||
| 145 | </listitem> |
||
| 146 | </varlistentry> |
||
| 147 | <varlistentry> |
||
| 148 | <term><parameter>v1</parameter></term> |
||
| 149 | <term><parameter>v2</parameter></term> |
||
| 150 | <listitem> |
||
| 151 | <para> |
||
| 152 | Specify a linear mapping of |
||
| 153 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation>, |
||
| 154 | as presented to <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>, |
||
| 155 | to |
||
| 156 | <inlineequation><mml:math> |
||
| 157 | <!-- eqn: v hat:--> |
||
| 158 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 159 | </mml:math></inlineequation>, |
||
| 160 | one of the two variables that are evaluated by the equations specified |
||
| 161 | by this command. Initially, <parameter>v1</parameter> is 0 and <parameter>v2</parameter> is 1. |
||
| 162 | </para> |
||
| 163 | </listitem> |
||
| 164 | </varlistentry> |
||
| 165 | <varlistentry> |
||
| 166 | <term><parameter>vstride</parameter></term> |
||
| 167 | <listitem> |
||
| 168 | <para> |
||
| 169 | Specifies the number of floats or doubles between |
||
| 170 | the beginning of control point |
||
| 171 | <inlineequation><mml:math> |
||
| 172 | <!-- eqn: R sub ij:--> |
||
| 173 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 174 | <mml:mi mathvariant="italic">ij</mml:mi> |
||
| 175 | </mml:msub> |
||
| 176 | </mml:math></inlineequation> |
||
| 177 | and the beginning of control point |
||
| 178 | <inlineequation><mml:math> |
||
| 179 | <!-- eqn: R sub { i (j+1) }:--> |
||
| 180 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 181 | <mml:mfenced open="" close=""> |
||
| 182 | <mml:mrow> |
||
| 183 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 184 | <mml:mo>⁡</mml:mo> |
||
| 185 | <mml:mfenced open="(" close=")"> |
||
| 186 | <mml:mrow> |
||
| 187 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 188 | <mml:mo>+</mml:mo> |
||
| 189 | <mml:mn>1</mml:mn> |
||
| 190 | </mml:mrow> |
||
| 191 | </mml:mfenced> |
||
| 192 | </mml:mrow> |
||
| 193 | </mml:mfenced> |
||
| 194 | </mml:msub> |
||
| 195 | </mml:math></inlineequation>, |
||
| 196 | where |
||
| 197 | <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation> |
||
| 198 | and |
||
| 199 | <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation> |
||
| 200 | are the |
||
| 201 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation> |
||
| 202 | and |
||
| 203 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation> |
||
| 204 | control point indices, respectively. |
||
| 205 | This allows control points to be embedded in arbitrary data structures. |
||
| 206 | The only constraint is that the values for a particular control point |
||
| 207 | must occupy contiguous memory locations. The initial value of <parameter>vstride</parameter> is 0. |
||
| 208 | </para> |
||
| 209 | </listitem> |
||
| 210 | </varlistentry> |
||
| 211 | <varlistentry> |
||
| 212 | <term><parameter>vorder</parameter></term> |
||
| 213 | <listitem> |
||
| 214 | <para> |
||
| 215 | Specifies the dimension of the control point array in the |
||
| 216 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation> |
||
| 217 | axis. |
||
| 218 | Must be positive. The initial value is 1. |
||
| 219 | </para> |
||
| 220 | </listitem> |
||
| 221 | </varlistentry> |
||
| 222 | <varlistentry> |
||
| 223 | <term><parameter>points</parameter></term> |
||
| 224 | <listitem> |
||
| 225 | <para> |
||
| 226 | Specifies a pointer to the array of control points. |
||
| 227 | </para> |
||
| 228 | </listitem> |
||
| 229 | </varlistentry> |
||
| 230 | </variablelist> |
||
| 231 | </refsect1> |
||
| 232 | <refsect1 id="description"><title>Description</title> |
||
| 233 | <para> |
||
| 234 | Evaluators provide a way to use polynomial or rational polynomial mapping |
||
| 235 | to produce vertices, |
||
| 236 | normals, |
||
| 237 | texture coordinates, |
||
| 238 | and colors. |
||
| 239 | The values produced by an evaluator are sent on to further stages |
||
| 240 | of GL processing just as if they had been presented using |
||
| 241 | <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry>, |
||
| 242 | <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>, |
||
| 243 | <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>, and |
||
| 244 | <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry> commands, |
||
| 245 | except that the generated values do not update the current normal, |
||
| 246 | texture coordinates, |
||
| 247 | or color. |
||
| 248 | </para> |
||
| 249 | <para> |
||
| 250 | All polynomial or rational polynomial splines of any degree |
||
| 251 | (up to the maximum degree supported by the GL implementation) |
||
| 252 | can be described using evaluators. |
||
| 253 | These include almost all surfaces used in computer graphics, |
||
| 254 | including B-spline surfaces, |
||
| 255 | NURBS surfaces, |
||
| 256 | Bezier surfaces, and so on. |
||
| 257 | </para> |
||
| 258 | <para> |
||
| 259 | Evaluators define surfaces based on bivariate Bernstein polynomials. |
||
| 260 | Define |
||
| 261 | <inlineequation><mml:math> |
||
| 262 | <!-- eqn: p(u hat, v hat):--> |
||
| 263 | <mml:mrow> |
||
| 264 | <mml:mi mathvariant="italic">p</mml:mi> |
||
| 265 | <mml:mo>⁡</mml:mo> |
||
| 266 | <mml:mfenced open="(" close=")"> |
||
| 267 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 268 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 269 | </mml:mfenced> |
||
| 270 | </mml:mrow> |
||
| 271 | </mml:math></inlineequation> |
||
| 272 | as |
||
| 273 | </para> |
||
| 274 | <para> |
||
| 275 | <informalequation><mml:math> |
||
| 276 | <!-- eqn: p(u hat, v hat) = sum from {i = 0} to {n} { sum from {j = 0} to {m} { {B sub i} sup n ( u hat ) {B sub j} sup m ( v hat ) R sub ij } }:--> |
||
| 277 | <mml:mrow> |
||
| 278 | <mml:mrow> |
||
| 279 | <mml:mi mathvariant="italic">p</mml:mi> |
||
| 280 | <mml:mo>⁡</mml:mo> |
||
| 281 | <mml:mfenced open="(" close=")"> |
||
| 282 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 283 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 284 | </mml:mfenced> |
||
| 285 | </mml:mrow> |
||
| 286 | <mml:mo>=</mml:mo> |
||
| 287 | <mml:mrow> |
||
| 288 | <mml:munderover> |
||
| 289 | <mml:mo>Σ</mml:mo> |
||
| 290 | <mml:mrow> |
||
| 291 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 292 | <mml:mo>=</mml:mo> |
||
| 293 | <mml:mn>0</mml:mn> |
||
| 294 | </mml:mrow> |
||
| 295 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 296 | </mml:munderover> |
||
| 297 | <mml:mrow> |
||
| 298 | <mml:munderover> |
||
| 299 | <mml:mo>Σ</mml:mo> |
||
| 300 | <mml:mrow> |
||
| 301 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 302 | <mml:mo>=</mml:mo> |
||
| 303 | <mml:mn>0</mml:mn> |
||
| 304 | </mml:mrow> |
||
| 305 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 306 | </mml:munderover> |
||
| 307 | <mml:mrow> |
||
| 308 | <mml:mrow> |
||
| 309 | <mml:msup><mml:mfenced open="" close=""> |
||
| 310 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 311 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 312 | </mml:msub> |
||
| 313 | </mml:mfenced> |
||
| 314 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 315 | </mml:msup> |
||
| 316 | <mml:mo>⁡</mml:mo> |
||
| 317 | <mml:mfenced open="(" close=")"> |
||
| 318 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 319 | </mml:mfenced> |
||
| 320 | </mml:mrow> |
||
| 321 | <mml:mo>⁢</mml:mo> |
||
| 322 | <mml:mrow> |
||
| 323 | <mml:msup><mml:mfenced open="" close=""> |
||
| 324 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 325 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 326 | </mml:msub> |
||
| 327 | </mml:mfenced> |
||
| 328 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 329 | </mml:msup> |
||
| 330 | <mml:mo>⁡</mml:mo> |
||
| 331 | <mml:mfenced open="(" close=")"> |
||
| 332 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 333 | </mml:mfenced> |
||
| 334 | </mml:mrow> |
||
| 335 | <mml:mo>⁢</mml:mo> |
||
| 336 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 337 | <mml:mi mathvariant="italic">ij</mml:mi> |
||
| 338 | </mml:msub> |
||
| 339 | </mml:mrow> |
||
| 340 | </mml:mrow> |
||
| 341 | </mml:mrow> |
||
| 342 | </mml:mrow> |
||
| 343 | </mml:math></informalequation> |
||
| 344 | </para> |
||
| 345 | <para> |
||
| 346 | </para> |
||
| 347 | <para> |
||
| 348 | where |
||
| 349 | <inlineequation><mml:math> |
||
| 350 | <!-- eqn: R sub ij:--> |
||
| 351 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 352 | <mml:mi mathvariant="italic">ij</mml:mi> |
||
| 353 | </mml:msub> |
||
| 354 | </mml:math></inlineequation> |
||
| 355 | is a control point, |
||
| 356 | <inlineequation><mml:math> |
||
| 357 | <!-- eqn: {B sub i} sup n ( u hat ):--> |
||
| 358 | <mml:mrow> |
||
| 359 | <mml:msup><mml:mfenced open="" close=""> |
||
| 360 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 361 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 362 | </mml:msub> |
||
| 363 | </mml:mfenced> |
||
| 364 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 365 | </mml:msup> |
||
| 366 | <mml:mo>⁡</mml:mo> |
||
| 367 | <mml:mfenced open="(" close=")"> |
||
| 368 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 369 | </mml:mfenced> |
||
| 370 | </mml:mrow> |
||
| 371 | </mml:math></inlineequation> |
||
| 372 | is the |
||
| 373 | <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>th |
||
| 374 | Bernstein polynomial of degree |
||
| 375 | <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation> |
||
| 376 | (<parameter>uorder</parameter> = |
||
| 377 | <inlineequation><mml:math> |
||
| 378 | <!-- eqn: n + 1:--> |
||
| 379 | <mml:mrow> |
||
| 380 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 381 | <mml:mo>+</mml:mo> |
||
| 382 | <mml:mn>1</mml:mn> |
||
| 383 | </mml:mrow> |
||
| 384 | </mml:math></inlineequation>) |
||
| 385 | </para> |
||
| 386 | <para> |
||
| 387 | <informalequation><mml:math> |
||
| 388 | <!-- eqn: {B sub i} sup n ( u hat ) = left ( {cpile { n above i }} right) {u hat} sup i { ( 1 - u hat ) sup { n - i } }:--> |
||
| 389 | <mml:mrow> |
||
| 390 | <mml:mrow> |
||
| 391 | <mml:msup><mml:mfenced open="" close=""> |
||
| 392 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 393 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 394 | </mml:msub> |
||
| 395 | </mml:mfenced> |
||
| 396 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 397 | </mml:msup> |
||
| 398 | <mml:mo>⁡</mml:mo> |
||
| 399 | <mml:mfenced open="(" close=")"> |
||
| 400 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 401 | </mml:mfenced> |
||
| 402 | </mml:mrow> |
||
| 403 | <mml:mo>=</mml:mo> |
||
| 404 | <mml:mrow> |
||
| 405 | <mml:mfenced open="(" close=")"> |
||
| 406 | <mml:mfenced open="" close=""> |
||
| 407 | <mml:mtable> |
||
| 408 | <mml:mtr><mml:mtd> |
||
| 409 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 410 | </mml:mtd></mml:mtr> |
||
| 411 | <mml:mtr><mml:mtd> |
||
| 412 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 413 | </mml:mtd></mml:mtr> |
||
| 414 | </mml:mtable> |
||
| 415 | </mml:mfenced> |
||
| 416 | </mml:mfenced> |
||
| 417 | <mml:mo>⁢</mml:mo> |
||
| 418 | <mml:msup><mml:mfenced open="" close=""> |
||
| 419 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 420 | </mml:mfenced> |
||
| 421 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 422 | </mml:msup> |
||
| 423 | <mml:mo>⁢</mml:mo> |
||
| 424 | <mml:mfenced open="" close=""> |
||
| 425 | <mml:msup><mml:mfenced open="(" close=")"> |
||
| 426 | <mml:mrow> |
||
| 427 | <mml:mn>1</mml:mn> |
||
| 428 | <mml:mo>-</mml:mo> |
||
| 429 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 430 | </mml:mrow> |
||
| 431 | </mml:mfenced> |
||
| 432 | <mml:mfenced open="" close=""> |
||
| 433 | <mml:mrow> |
||
| 434 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 435 | <mml:mo>-</mml:mo> |
||
| 436 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 437 | </mml:mrow> |
||
| 438 | </mml:mfenced> |
||
| 439 | </mml:msup> |
||
| 440 | </mml:mfenced> |
||
| 441 | </mml:mrow> |
||
| 442 | </mml:mrow> |
||
| 443 | </mml:math></informalequation> |
||
| 444 | </para> |
||
| 445 | <para> |
||
| 446 | and |
||
| 447 | <inlineequation><mml:math> |
||
| 448 | <!-- eqn: {B sub j} sup m ( v hat ):--> |
||
| 449 | <mml:mrow> |
||
| 450 | <mml:msup><mml:mfenced open="" close=""> |
||
| 451 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 452 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 453 | </mml:msub> |
||
| 454 | </mml:mfenced> |
||
| 455 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 456 | </mml:msup> |
||
| 457 | <mml:mo>⁡</mml:mo> |
||
| 458 | <mml:mfenced open="(" close=")"> |
||
| 459 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 460 | </mml:mfenced> |
||
| 461 | </mml:mrow> |
||
| 462 | </mml:math></inlineequation> |
||
| 463 | is the |
||
| 464 | <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>th |
||
| 465 | Bernstein polynomial of degree |
||
| 466 | <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation> |
||
| 467 | (<parameter>vorder</parameter> = |
||
| 468 | <inlineequation><mml:math> |
||
| 469 | <!-- eqn: m + 1:--> |
||
| 470 | <mml:mrow> |
||
| 471 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 472 | <mml:mo>+</mml:mo> |
||
| 473 | <mml:mn>1</mml:mn> |
||
| 474 | </mml:mrow> |
||
| 475 | </mml:math></inlineequation>) |
||
| 476 | </para> |
||
| 477 | <para> |
||
| 478 | <informalequation><mml:math> |
||
| 479 | <!-- eqn: {B sub j} sup m ( v hat ) = left ( {cpile { m above j }} right ) {v hat} sup j { ( 1 - v hat ) sup { m - j } }:--> |
||
| 480 | <mml:mrow> |
||
| 481 | <mml:mrow> |
||
| 482 | <mml:msup><mml:mfenced open="" close=""> |
||
| 483 | <mml:msub><mml:mi mathvariant="italic">B</mml:mi> |
||
| 484 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 485 | </mml:msub> |
||
| 486 | </mml:mfenced> |
||
| 487 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 488 | </mml:msup> |
||
| 489 | <mml:mo>⁡</mml:mo> |
||
| 490 | <mml:mfenced open="(" close=")"> |
||
| 491 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 492 | </mml:mfenced> |
||
| 493 | </mml:mrow> |
||
| 494 | <mml:mo>=</mml:mo> |
||
| 495 | <mml:mrow> |
||
| 496 | <mml:mfenced open="(" close=")"> |
||
| 497 | <mml:mfenced open="" close=""> |
||
| 498 | <mml:mtable> |
||
| 499 | <mml:mtr><mml:mtd> |
||
| 500 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 501 | </mml:mtd></mml:mtr> |
||
| 502 | <mml:mtr><mml:mtd> |
||
| 503 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 504 | </mml:mtd></mml:mtr> |
||
| 505 | </mml:mtable> |
||
| 506 | </mml:mfenced> |
||
| 507 | </mml:mfenced> |
||
| 508 | <mml:mo>⁢</mml:mo> |
||
| 509 | <mml:msup><mml:mfenced open="" close=""> |
||
| 510 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 511 | </mml:mfenced> |
||
| 512 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 513 | </mml:msup> |
||
| 514 | <mml:mo>⁢</mml:mo> |
||
| 515 | <mml:mfenced open="" close=""> |
||
| 516 | <mml:msup><mml:mfenced open="(" close=")"> |
||
| 517 | <mml:mrow> |
||
| 518 | <mml:mn>1</mml:mn> |
||
| 519 | <mml:mo>-</mml:mo> |
||
| 520 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 521 | </mml:mrow> |
||
| 522 | </mml:mfenced> |
||
| 523 | <mml:mfenced open="" close=""> |
||
| 524 | <mml:mrow> |
||
| 525 | <mml:mi mathvariant="italic">m</mml:mi> |
||
| 526 | <mml:mo>-</mml:mo> |
||
| 527 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 528 | </mml:mrow> |
||
| 529 | </mml:mfenced> |
||
| 530 | </mml:msup> |
||
| 531 | </mml:mfenced> |
||
| 532 | </mml:mrow> |
||
| 533 | </mml:mrow> |
||
| 534 | </mml:math></informalequation> |
||
| 535 | </para> |
||
| 536 | <para> |
||
| 537 | Recall that |
||
| 538 | <inlineequation><mml:math> |
||
| 539 | <!-- eqn: 0 sup 0 == 1:--> |
||
| 540 | <mml:mrow> |
||
| 541 | <mml:msup><mml:mn>0</mml:mn> |
||
| 542 | <mml:mn>0</mml:mn> |
||
| 543 | </mml:msup> |
||
| 544 | <mml:mo>==</mml:mo> |
||
| 545 | <mml:mn>1</mml:mn> |
||
| 546 | </mml:mrow> |
||
| 547 | </mml:math></inlineequation> |
||
| 548 | and |
||
| 549 | <inlineequation><mml:math> |
||
| 550 | <!-- eqn: left ( {cpile { n above 0 }} right ) == 1:--> |
||
| 551 | <mml:mrow> |
||
| 552 | <mml:mfenced open="(" close=")"> |
||
| 553 | <mml:mfenced open="" close=""> |
||
| 554 | <mml:mtable> |
||
| 555 | <mml:mtr><mml:mtd> |
||
| 556 | <mml:mi mathvariant="italic">n</mml:mi> |
||
| 557 | </mml:mtd></mml:mtr> |
||
| 558 | <mml:mtr><mml:mtd> |
||
| 559 | <mml:mn>0</mml:mn> |
||
| 560 | </mml:mtd></mml:mtr> |
||
| 561 | </mml:mtable> |
||
| 562 | </mml:mfenced> |
||
| 563 | </mml:mfenced> |
||
| 564 | <mml:mo>==</mml:mo> |
||
| 565 | <mml:mn>1</mml:mn> |
||
| 566 | </mml:mrow> |
||
| 567 | </mml:math></inlineequation> |
||
| 568 | </para> |
||
| 569 | <para> |
||
| 570 | <function>glMap2</function> is used to define the basis and to specify what kind of values |
||
| 571 | are produced. |
||
| 572 | Once defined, |
||
| 573 | a map can be enabled and disabled by calling <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> |
||
| 574 | with the map name, one of the nine predefined values for <parameter>target</parameter>, |
||
| 575 | described below. |
||
| 576 | When <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry> presents values |
||
| 577 | <inlineequation><mml:math><mml:mi mathvariant="italic">u</mml:mi></mml:math></inlineequation> |
||
| 578 | and |
||
| 579 | <inlineequation><mml:math><mml:mi mathvariant="italic">v</mml:mi></mml:math></inlineequation>, |
||
| 580 | the bivariate Bernstein polynomials are evaluated using |
||
| 581 | <inlineequation><mml:math> |
||
| 582 | <!-- eqn: u hat:--> |
||
| 583 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 584 | </mml:math></inlineequation> |
||
| 585 | and |
||
| 586 | <inlineequation><mml:math> |
||
| 587 | <!-- eqn: v hat:--> |
||
| 588 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 589 | </mml:math></inlineequation>, |
||
| 590 | where |
||
| 591 | </para> |
||
| 592 | <para> |
||
| 593 | <inlineequation><mml:math> |
||
| 594 | <!-- eqn: u hat = {u - u1} over {u2 - u1}:--> |
||
| 595 | <mml:mrow> |
||
| 596 | <mml:mover><mml:mi mathvariant="italic">u</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 597 | <mml:mo>=</mml:mo> |
||
| 598 | <mml:mfrac> |
||
| 599 | <mml:mfenced open="" close=""> |
||
| 600 | <mml:mrow> |
||
| 601 | <mml:mi mathvariant="italic">u</mml:mi> |
||
| 602 | <mml:mo>-</mml:mo> |
||
| 603 | <mml:mi mathvariant="italic">u1</mml:mi> |
||
| 604 | </mml:mrow> |
||
| 605 | </mml:mfenced> |
||
| 606 | <mml:mfenced open="" close=""> |
||
| 607 | <mml:mrow> |
||
| 608 | <mml:mi mathvariant="italic">u2</mml:mi> |
||
| 609 | <mml:mo>-</mml:mo> |
||
| 610 | <mml:mi mathvariant="italic">u1</mml:mi> |
||
| 611 | </mml:mrow> |
||
| 612 | </mml:mfenced> |
||
| 613 | </mml:mfrac> |
||
| 614 | </mml:mrow> |
||
| 615 | </mml:math></inlineequation> |
||
| 616 | </para> |
||
| 617 | <para> |
||
| 618 | <inlineequation><mml:math> |
||
| 619 | <!-- eqn: v hat = {v - v1} over {v2 - v1}:--> |
||
| 620 | <mml:mrow> |
||
| 621 | <mml:mover><mml:mi mathvariant="italic">v</mml:mi><mml:mo>^</mml:mo></mml:mover> |
||
| 622 | <mml:mo>=</mml:mo> |
||
| 623 | <mml:mfrac> |
||
| 624 | <mml:mfenced open="" close=""> |
||
| 625 | <mml:mrow> |
||
| 626 | <mml:mi mathvariant="italic">v</mml:mi> |
||
| 627 | <mml:mo>-</mml:mo> |
||
| 628 | <mml:mi mathvariant="italic">v1</mml:mi> |
||
| 629 | </mml:mrow> |
||
| 630 | </mml:mfenced> |
||
| 631 | <mml:mfenced open="" close=""> |
||
| 632 | <mml:mrow> |
||
| 633 | <mml:mi mathvariant="italic">v2</mml:mi> |
||
| 634 | <mml:mo>-</mml:mo> |
||
| 635 | <mml:mi mathvariant="italic">v1</mml:mi> |
||
| 636 | </mml:mrow> |
||
| 637 | </mml:mfenced> |
||
| 638 | </mml:mfrac> |
||
| 639 | </mml:mrow> |
||
| 640 | </mml:math></inlineequation> |
||
| 641 | </para> |
||
| 642 | <para> |
||
| 643 | <parameter>target</parameter> is a symbolic constant that indicates what kind of control points |
||
| 644 | are provided in <parameter>points</parameter>, |
||
| 645 | and what output is generated when the map is evaluated. |
||
| 646 | It can assume one of nine predefined values: |
||
| 647 | </para> |
||
| 648 | <variablelist> |
||
| 649 | <varlistentry> |
||
| 650 | <term><constant>GL_MAP2_VERTEX_3</constant></term> |
||
| 651 | <listitem> |
||
| 652 | <para> |
||
| 653 | Each control point is three floating-point values representing |
||
| 654 | <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>, |
||
| 655 | <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>, |
||
| 656 | and |
||
| 657 | <inlineequation><mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math></inlineequation>. |
||
| 658 | Internal <citerefentry><refentrytitle>glVertex3</refentrytitle></citerefentry> commands are generated when the map is evaluated. |
||
| 659 | </para> |
||
| 660 | </listitem> |
||
| 661 | </varlistentry> |
||
| 662 | <varlistentry> |
||
| 663 | <term><constant>GL_MAP2_VERTEX_4</constant></term> |
||
| 664 | <listitem> |
||
| 665 | <para> |
||
| 666 | Each control point is four floating-point values representing |
||
| 667 | <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>, |
||
| 668 | <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>, |
||
| 669 | <inlineequation><mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math></inlineequation>, |
||
| 670 | and |
||
| 671 | <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>. |
||
| 672 | Internal <citerefentry><refentrytitle>glVertex4</refentrytitle></citerefentry> commands are generated when the map is evaluated. |
||
| 673 | </para> |
||
| 674 | </listitem> |
||
| 675 | </varlistentry> |
||
| 676 | <varlistentry> |
||
| 677 | <term><constant>GL_MAP2_INDEX</constant></term> |
||
| 678 | <listitem> |
||
| 679 | <para> |
||
| 680 | Each control point is a single floating-point value representing a color index. |
||
| 681 | Internal <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry> commands are generated when the map is evaluated |
||
| 682 | but the current index is not updated with the value of these |
||
| 683 | <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry> commands. |
||
| 684 | </para> |
||
| 685 | </listitem> |
||
| 686 | </varlistentry> |
||
| 687 | <varlistentry> |
||
| 688 | <term><constant>GL_MAP2_COLOR_4</constant></term> |
||
| 689 | <listitem> |
||
| 690 | <para> |
||
| 691 | Each control point is four floating-point values representing |
||
| 692 | red, green, blue, and alpha. |
||
| 693 | Internal <citerefentry><refentrytitle>glColor4</refentrytitle></citerefentry> commands are generated when the map is |
||
| 694 | evaluated but the current color is not updated with the value of |
||
| 695 | these <citerefentry><refentrytitle>glColor4</refentrytitle></citerefentry> commands. |
||
| 696 | </para> |
||
| 697 | </listitem> |
||
| 698 | </varlistentry> |
||
| 699 | <varlistentry> |
||
| 700 | <term><constant>GL_MAP2_NORMAL</constant></term> |
||
| 701 | <listitem> |
||
| 702 | <para> |
||
| 703 | Each control point is three floating-point values representing |
||
| 704 | the |
||
| 705 | <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>, |
||
| 706 | <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>, |
||
| 707 | and |
||
| 708 | <inlineequation><mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math></inlineequation> |
||
| 709 | components of a normal vector. |
||
| 710 | Internal <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry> commands are generated when the map is |
||
| 711 | evaluated but the current normal is not updated with the value of |
||
| 712 | these <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry> commands. |
||
| 713 | </para> |
||
| 714 | </listitem> |
||
| 715 | </varlistentry> |
||
| 716 | <varlistentry> |
||
| 717 | <term><constant>GL_MAP2_TEXTURE_COORD_1</constant></term> |
||
| 718 | <listitem> |
||
| 719 | <para> |
||
| 720 | Each control point is a single floating-point value representing |
||
| 721 | the |
||
| 722 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation> |
||
| 723 | texture coordinate. |
||
| 724 | Internal |
||
| 725 | <citerefentry><refentrytitle>glTexCoord1</refentrytitle></citerefentry> commands are generated when the map is evaluated but |
||
| 726 | the current texture coordinates are not updated with the value |
||
| 727 | of these <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> commands. |
||
| 728 | </para> |
||
| 729 | </listitem> |
||
| 730 | </varlistentry> |
||
| 731 | <varlistentry> |
||
| 732 | <term><constant>GL_MAP2_TEXTURE_COORD_2</constant></term> |
||
| 733 | <listitem> |
||
| 734 | <para> |
||
| 735 | Each control point is two floating-point values representing |
||
| 736 | the |
||
| 737 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation> |
||
| 738 | and |
||
| 739 | <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation> |
||
| 740 | texture coordinates. |
||
| 741 | Internal |
||
| 742 | <citerefentry><refentrytitle>glTexCoord2</refentrytitle></citerefentry> commands are generated when the map is evaluated but |
||
| 743 | the current texture coordinates are not updated with the value |
||
| 744 | of these <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> commands. |
||
| 745 | </para> |
||
| 746 | </listitem> |
||
| 747 | </varlistentry> |
||
| 748 | <varlistentry> |
||
| 749 | <term><constant>GL_MAP2_TEXTURE_COORD_3</constant></term> |
||
| 750 | <listitem> |
||
| 751 | <para> |
||
| 752 | Each control point is three floating-point values representing |
||
| 753 | the |
||
| 754 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>, |
||
| 755 | <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>, |
||
| 756 | and |
||
| 757 | <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation> |
||
| 758 | texture coordinates. |
||
| 759 | Internal <citerefentry><refentrytitle>glTexCoord3</refentrytitle></citerefentry> commands are generated when the map is |
||
| 760 | evaluated but the current texture coordinates are not updated with the value |
||
| 761 | of these <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> commands. |
||
| 762 | </para> |
||
| 763 | </listitem> |
||
| 764 | </varlistentry> |
||
| 765 | <varlistentry> |
||
| 766 | <term><constant>GL_MAP2_TEXTURE_COORD_4</constant></term> |
||
| 767 | <listitem> |
||
| 768 | <para> |
||
| 769 | Each control point is four floating-point values representing |
||
| 770 | the |
||
| 771 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>, |
||
| 772 | <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>, |
||
| 773 | <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>, |
||
| 774 | and |
||
| 775 | <inlineequation><mml:math><mml:mi mathvariant="italic">q</mml:mi></mml:math></inlineequation> |
||
| 776 | texture coordinates. |
||
| 777 | Internal |
||
| 778 | <citerefentry><refentrytitle>glTexCoord4</refentrytitle></citerefentry> commands are generated when the map is evaluated but the current texture coordinates are not updated with the value |
||
| 779 | of these <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry> commands. |
||
| 780 | </para> |
||
| 781 | </listitem> |
||
| 782 | </varlistentry> |
||
| 783 | </variablelist> |
||
| 784 | <para> |
||
| 785 | <parameter>ustride</parameter>, |
||
| 786 | <parameter>uorder</parameter>, |
||
| 787 | <parameter>vstride</parameter>, |
||
| 788 | <parameter>vorder</parameter>, and |
||
| 789 | <parameter>points</parameter> define the array addressing for accessing the control points. |
||
| 790 | <parameter>points</parameter> is the location of the first control point, |
||
| 791 | which occupies one, two, three, or four contiguous memory locations, |
||
| 792 | depending on which map is being defined. |
||
| 793 | There are |
||
| 794 | <inlineequation><mml:math> |
||
| 795 | <!-- eqn: uorder times vorder:--> |
||
| 796 | <mml:mrow> |
||
| 797 | <mml:mi mathvariant="italic">uorder</mml:mi> |
||
| 798 | <mml:mo>×</mml:mo> |
||
| 799 | <mml:mi mathvariant="italic">vorder</mml:mi> |
||
| 800 | </mml:mrow> |
||
| 801 | </mml:math></inlineequation> |
||
| 802 | control points in the array. |
||
| 803 | <parameter>ustride</parameter> specifies how many float or double locations are skipped to advance |
||
| 804 | the internal memory pointer from control point |
||
| 805 | <inlineequation><mml:math> |
||
| 806 | <!-- eqn: R sub {i j}:--> |
||
| 807 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 808 | <mml:mfenced open="" close=""> |
||
| 809 | <mml:mrow> |
||
| 810 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 811 | <mml:mo>⁢</mml:mo> |
||
| 812 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 813 | </mml:mrow> |
||
| 814 | </mml:mfenced> |
||
| 815 | </mml:msub> |
||
| 816 | </mml:math></inlineequation> |
||
| 817 | to control point |
||
| 818 | <inlineequation><mml:math> |
||
| 819 | <!-- eqn: R sub {(i+1) j}:--> |
||
| 820 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 821 | <mml:mfenced open="" close=""> |
||
| 822 | <mml:mrow> |
||
| 823 | <mml:mfenced open="(" close=")"> |
||
| 824 | <mml:mrow> |
||
| 825 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 826 | <mml:mo>+</mml:mo> |
||
| 827 | <mml:mn>1</mml:mn> |
||
| 828 | </mml:mrow> |
||
| 829 | </mml:mfenced> |
||
| 830 | <mml:mo>⁢</mml:mo> |
||
| 831 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 832 | </mml:mrow> |
||
| 833 | </mml:mfenced> |
||
| 834 | </mml:msub> |
||
| 835 | </mml:math></inlineequation>. |
||
| 836 | <parameter>vstride</parameter> specifies how many float or double locations are skipped to advance |
||
| 837 | the internal memory pointer from control point |
||
| 838 | <inlineequation><mml:math> |
||
| 839 | <!-- eqn: R sub {i j}:--> |
||
| 840 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 841 | <mml:mfenced open="" close=""> |
||
| 842 | <mml:mrow> |
||
| 843 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 844 | <mml:mo>⁢</mml:mo> |
||
| 845 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 846 | </mml:mrow> |
||
| 847 | </mml:mfenced> |
||
| 848 | </mml:msub> |
||
| 849 | </mml:math></inlineequation> |
||
| 850 | to control point |
||
| 851 | <inlineequation><mml:math> |
||
| 852 | <!-- eqn: R sub {i (j+1) }:--> |
||
| 853 | <mml:msub><mml:mi mathvariant="italic">R</mml:mi> |
||
| 854 | <mml:mfenced open="" close=""> |
||
| 855 | <mml:mrow> |
||
| 856 | <mml:mi mathvariant="italic">i</mml:mi> |
||
| 857 | <mml:mo>⁡</mml:mo> |
||
| 858 | <mml:mfenced open="(" close=")"> |
||
| 859 | <mml:mrow> |
||
| 860 | <mml:mi mathvariant="italic">j</mml:mi> |
||
| 861 | <mml:mo>+</mml:mo> |
||
| 862 | <mml:mn>1</mml:mn> |
||
| 863 | </mml:mrow> |
||
| 864 | </mml:mfenced> |
||
| 865 | </mml:mrow> |
||
| 866 | </mml:mfenced> |
||
| 867 | </mml:msub> |
||
| 868 | </mml:math></inlineequation>. |
||
| 869 | </para> |
||
| 870 | </refsect1> |
||
| 871 | <refsect1 id="notes"><title>Notes</title> |
||
| 872 | <para> |
||
| 873 | As is the case with all GL commands that accept pointers to data, |
||
| 874 | it is as if the contents of <parameter>points</parameter> were copied by <function>glMap2</function> before <function>glMap2</function> |
||
| 875 | returns. |
||
| 876 | Changes to the contents of <parameter>points</parameter> have no effect after <function>glMap2</function> is called. |
||
| 877 | </para> |
||
| 878 | <para> |
||
| 879 | Initially, <constant>GL_AUTO_NORMAL</constant> is enabled. If <constant>GL_AUTO_NORMAL</constant> is enabled, |
||
| 880 | normal vectors are generated when either |
||
| 881 | <constant>GL_MAP2_VERTEX_3</constant> or <constant>GL_MAP2_VERTEX_4</constant> is used to generate |
||
| 882 | vertices. |
||
| 883 | </para> |
||
| 884 | </refsect1> |
||
| 885 | <refsect1 id="errors"><title>Errors</title> |
||
| 886 | <para> |
||
| 887 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not an accepted value. |
||
| 888 | </para> |
||
| 889 | <para> |
||
| 890 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>u1</parameter> is equal to <parameter>u2</parameter>, |
||
| 891 | or if <parameter>v1</parameter> is equal to <parameter>v2</parameter>. |
||
| 892 | </para> |
||
| 893 | <para> |
||
| 894 | <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>ustride</parameter> or <parameter>vstride</parameter> |
||
| 895 | is less than the number of values in a control point. |
||
| 896 | </para> |
||
| 897 | <para> |
||
| 898 | <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>uorder</parameter> or <parameter>vorder</parameter> |
||
| 899 | is less than 1 or greater than the return value of <constant>GL_MAX_EVAL_ORDER</constant>. |
||
| 900 | </para> |
||
| 901 | <para> |
||
| 902 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMap2</function> |
||
| 903 | is executed between the execution of |
||
| 904 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> |
||
| 905 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
||
| 906 | </para> |
||
| 907 | <para> |
||
| 908 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMap2</function> is called and the value |
||
| 909 | of <constant>GL_ACTIVE_TEXTURE</constant> is not <constant>GL_TEXTURE0</constant>. |
||
| 910 | </para> |
||
| 911 | </refsect1> |
||
| 912 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
||
| 913 | <para> |
||
| 914 | <citerefentry><refentrytitle>glGetMap</refentrytitle></citerefentry> |
||
| 915 | </para> |
||
| 916 | <para> |
||
| 917 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_EVAL_ORDER</constant> |
||
| 918 | </para> |
||
| 919 | <para> |
||
| 920 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_VERTEX_3</constant> |
||
| 921 | </para> |
||
| 922 | <para> |
||
| 923 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_VERTEX_4</constant> |
||
| 924 | </para> |
||
| 925 | <para> |
||
| 926 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_INDEX</constant> |
||
| 927 | </para> |
||
| 928 | <para> |
||
| 929 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_COLOR_4</constant> |
||
| 930 | </para> |
||
| 931 | <para> |
||
| 932 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_NORMAL</constant> |
||
| 933 | </para> |
||
| 934 | <para> |
||
| 935 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_1</constant> |
||
| 936 | </para> |
||
| 937 | <para> |
||
| 938 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_2</constant> |
||
| 939 | </para> |
||
| 940 | <para> |
||
| 941 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_3</constant> |
||
| 942 | </para> |
||
| 943 | <para> |
||
| 944 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MAP2_TEXTURE_COORD_4</constant> |
||
| 945 | </para> |
||
| 946 | </refsect1> |
||
| 947 | <refsect1 id="seealso"><title>See Also</title> |
||
| 948 | <para> |
||
| 949 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>, |
||
| 950 | <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>, |
||
| 951 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, |
||
| 952 | <citerefentry><refentrytitle>glEvalCoord</refentrytitle></citerefentry>, |
||
| 953 | <citerefentry><refentrytitle>glEvalMesh</refentrytitle></citerefentry>, |
||
| 954 | <citerefentry><refentrytitle>glEvalPoint</refentrytitle></citerefentry>, |
||
| 955 | <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>, |
||
| 956 | <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>, |
||
| 957 | <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>, |
||
| 958 | <citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>, |
||
| 959 | <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry> |
||
| 960 | </para> |
||
| 961 | </refsect1> |
||
| 962 | <refsect1 id="Copyright"><title>Copyright</title> |
||
| 963 | <para> |
||
| 964 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
||
| 965 | Silicon Graphics, Inc. This document is licensed under the SGI |
||
| 966 | Free Software B License. For details, see |
||
| 967 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
||
| 968 | </para> |
||
| 969 | </refsect1> |
||
| 970 | </refentry> |