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
|
'\" te
'\"! tbl|eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 mapgrid.g
.ds Xs 53033 5 mapgrid.gl
.TH GLMAPGRID 3G
.SH NAME
.B "glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f
\- define a one- or two-dimensional mesh
.SH C SPECIFICATION
void \f3glMapGrid1d\fP(
GLint \fIun\fP,
.nf
.ta \w'\f3void \fPglMapGrid1d( 'u
GLdouble \fIu1\fP,
GLdouble \fIu2\fP )
.fi
void \f3glMapGrid1f\fP(
GLint \fIun\fP,
.nf
.ta \w'\f3void \fPglMapGrid1f( 'u
GLfloat \fIu1\fP,
GLfloat \fIu2\fP )
.fi
void \f3glMapGrid2d\fP(
GLint \fIun\fP,
.nf
.ta \w'\f3void \fPglMapGrid2d( 'u
GLdouble \fIu1\fP,
GLdouble \fIu2\fP,
GLint \fIvn\fP,
GLdouble \fIv1\fP,
GLdouble \fIv2\fP )
.fi
void \f3glMapGrid2f\fP(
GLint \fIun\fP,
.nf
.ta \w'\f3void \fPglMapGrid2f( 'u
GLfloat \fIu1\fP,
GLfloat \fIu2\fP,
GLint \fIvn\fP,
GLfloat \fIv1\fP,
GLfloat \fIv2\fP )
.fi
.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\f2un\fP\ \ 'u
\f2un\fP
Specifies the number of partitions in the grid range interval
[\f2u1\fP, \f2u2\fP].
Must be positive.
.TP
\f2u1\fP, \f2u2\fP
Specify the mappings for integer grid domain values $i~=~0$ and $i~=~"un"$.
.TP
\f2vn\fP
Specifies the number of partitions in the grid range interval
[\f2v1\fP, \f2v2\fP]
.br
(\%\f3glMapGrid2\fP only).
.TP
\f2v1\fP, \f2v2\fP
Specify the mappings for integer grid domain values $j~=~0$ and $j~=~"vn"$
.br
(\%\f3glMapGrid2\fP only).
.SH DESCRIPTION
\%\f3glMapGrid\fP and \%\f3glEvalMesh\fP are used together to efficiently
generate and evaluate a series of evenly-spaced map domain values.
\%\f3glEvalMesh\fP steps through the integer domain
of a one- or two-dimensional grid,
whose range is the domain of the evaluation maps specified by
\%\f3glMap1\fP and \%\f3glMap2\fP.
.P
\%\f3glMapGrid1\fP and \%\f3glMapGrid2\fP specify the linear grid mappings
between the $i$
(or $i$ and $j$)
integer grid coordinates,
to the $u$
(or $u$ and $v$)
floating-point evaluation map coordinates.
See \%\f3glMap1\fP and \%\f3glMap2\fP for details of how $u$ and $v$ coordinates
are evaluated.
.P
\%\f3glMapGrid1\fP specifies a single linear mapping
such that integer grid coordinate 0 maps exactly to \f2u1\fP,
and integer grid coordinate \f2un\fP maps exactly to \f2u2\fP.
All other integer grid coordinates $i$ are mapped so that
.sp
.ce
.EQ
u ~=~ i ("u2" - "u1") / "un" ~+~ "u1"
.EN
.sp
\%\f3glMapGrid2\fP specifies two such linear mappings.
One maps integer grid coordinate $i~=~0$ exactly to \f2u1\fP,
and integer grid coordinate $i~=~"un"$ exactly to \f2u2\fP.
The other maps integer grid coordinate $j~=~0$ exactly to \f2v1\fP,
and integer grid coordinate $j~=~"vn"$ exactly to \f2v2\fP.
Other integer grid coordinates $i$ and $j$ are mapped such that
.P
.ce
.EQ
u ~=~ i ("u2" - "u1") / "un" ~+~ "u1"
.EN
.P
.ce
.EQ
v ~=~ j ("v2" - "v1") / "vn" ~+~ "v1"
.EN
.P
The mappings specified by \%\f3glMapGrid\fP are used identically by
\%\f3glEvalMesh\fP and \%\f3glEvalPoint\fP.
.SH ERRORS
\%\f3GL_INVALID_VALUE\fP is generated if either \f2un\fP or \f2vn\fP is not
positive.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glMapGrid\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_MAP1_GRID_DOMAIN\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAP2_GRID_DOMAIN\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAP1_GRID_SEGMENTS\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAP2_GRID_SEGMENTS\fP
.SH SEE ALSO
\%\f3glEvalCoord(3G)\fP,
\%\f3glEvalMesh(3G)\fP,
\%\f3glEvalPoint(3G)\fP,
\%\f3glMap1(3G)\fP,
\%\f3glMap2(3G)\fP
|