glEvalCoord.3   [plain text]


'\" te  
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp May 22 14:45
.ds Dm 7 May 22 14:
.ds Xs 42414     8
.TH GLEVALCOORD 3G
.SH NAME
.B "glEvalCoord1d, glEvalCoord1f, glEvalCoord2d, glEvalCoord2f, glEvalCoord1dv, glEvalCoord1fv, glEvalCoord2dv, glEvalCoord2fv
\- evaluate enabled one- and two-dimensional maps

.EQ
delim $$
.EN
.SH C SPECIFICATION
void \f3glEvalCoord1d\fP(
GLdouble \fIu\fP )
.nf
.fi
void \f3glEvalCoord1f\fP(
GLfloat \fIu\fP )
.nf
.fi
void \f3glEvalCoord2d\fP(
GLdouble \fIu\fP,
.nf
.ta \w'\f3void \fPglEvalCoord2d( 'u
	GLdouble \fIv\fP )
.fi
void \f3glEvalCoord2f\fP(
GLfloat \fIu\fP,
.nf
.ta \w'\f3void \fPglEvalCoord2f( 'u
	GLfloat \fIv\fP )
.fi

.SH PARAMETERS
.TP \w'\f2u\fP\ \ 'u 
\f2u\fP
Specifies a value that is the domain coordinate $u$ to the basis function
defined in a previous \%\f3glMap1\fP or \%\f3glMap2\fP command.
.TP
\f2v\fP
Specifies a value that is the domain coordinate $v$ to the basis function
defined in a previous \%\f3glMap2\fP command.
This argument is not present in a \%\f3glEvalCoord1\fP command.
.SH C SPECIFICATION
void \f3glEvalCoord1dv\fP(
const GLdouble \fI*u\fP )
.nf
.fi
void \f3glEvalCoord1fv\fP(
const GLfloat \fI*u\fP )
.nf
.fi
void \f3glEvalCoord2dv\fP(
const GLdouble \fI*u\fP )
.nf
.fi
void \f3glEvalCoord2fv\fP(
const GLfloat \fI*u\fP )
.nf
.fi

.SH PARAMETERS
.TP
\f2u\fP
Specifies a pointer to an array containing
either one or two domain coordinates.
The first coordinate is $u$.
The second coordinate is $v$,
which is present only in \%\f3glEvalCoord2\fP versions.
.SH DESCRIPTION
\%\f3glEvalCoord1\fP evaluates enabled one-dimensional maps at argument
\f2u\fP.
\%\f3glEvalCoord2\fP does the same for two-dimensional maps using
two domain values,
\f2u\fP and \f2v\fP.
To define a map, call \%\f3glMap1\fP and \%\f3glMap2\fP; to enable and
disable it, call \%\f3glEnable\fP and \%\f3glDisable\fP.
.P
When one of the \%\f3glEvalCoord\fP commands is issued,
all currently enabled maps of the indicated dimension are evaluated.
Then,
for each enabled map,
it is as if the corresponding GL command had been issued with the
computed value.
That is,
if \%\f3GL_MAP1_INDEX\fP or
\%\f3GL_MAP2_INDEX\fP is enabled,
a \%\f3glIndex\fP command is simulated.
If \%\f3GL_MAP1_COLOR_4\fP or
\%\f3GL_MAP2_COLOR_4\fP is enabled,
a \%\f3glColor\fP command is simulated.
If \%\f3GL_MAP1_NORMAL\fP or \%\f3GL_MAP2_NORMAL\fP is enabled,
a normal vector is produced,
and if any of
\%\f3GL_MAP1_TEXTURE_COORD_1\fP,
\%\f3GL_MAP1_TEXTURE_COORD_2\fP,
\%\f3GL_MAP1_TEXTURE_COORD_3\fP, 
\%\f3GL_MAP1_TEXTURE_COORD_4\fP,
\%\f3GL_MAP2_TEXTURE_COORD_1\fP,
\%\f3GL_MAP2_TEXTURE_COORD_2\fP,
\%\f3GL_MAP2_TEXTURE_COORD_3\fP, or
\%\f3GL_MAP2_TEXTURE_COORD_4\fP is enabled, then an appropriate \%\f3glTexCoord\fP command is simulated.
.P
For color,
color index,
normal,
and texture coordinates the GL uses evaluated values instead of current values for those evaluations
that are enabled,
and current values otherwise,
However,
the evaluated values do not update the current values.
Thus, if \%\f3glVertex\fP commands are interspersed with \%\f3glEvalCoord\fP
commands, the color,
normal,
and texture coordinates associated with the \%\f3glVertex\fP commands are not
affected by the values generated by the \%\f3glEvalCoord\fP commands,
but only by the most recent
\%\f3glColor\fP,
\%\f3glIndex\fP,
\%\f3glNormal\fP, and
\%\f3glTexCoord\fP commands.
.P
No commands are issued for maps that are not enabled.
If more than one texture evaluation is enabled for a particular dimension
(for example, \%\f3GL_MAP2_TEXTURE_COORD_1\fP and
\%\f3GL_MAP2_TEXTURE_COORD_2\fP),
then only the evaluation of the map that produces the larger
number of coordinates
(in this case, \%\f3GL_MAP2_TEXTURE_COORD_2\fP)
is carried out.
\%\f3GL_MAP1_VERTEX_4\fP overrides \%\f3GL_MAP1_VERTEX_3\fP,
and
\%\f3GL_MAP2_VERTEX_4\fP overrides \%\f3GL_MAP2_VERTEX_3\fP,
in the same manner.
If neither a three- nor a four-component vertex map is enabled for the
specified dimension,
the \%\f3glEvalCoord\fP command is ignored.
.P
If you have enabled automatic normal generation,
by calling \%\f3glEnable\fP with argument \%\f3GL_AUTO_NORMAL\fP,
\%\f3glEvalCoord2\fP generates surface normals analytically,
regardless of the contents or enabling of the \%\f3GL_MAP2_NORMAL\fP map.
Let
.sp
.ce
.EQ
bold m ~=~ {partial bold p} over {partial u} ~times~
  {partial bold p} over {partial v}
.EN 
.ce 0
.sp
.br
Then the generated normal $ bold n $ is 
.br
.ce
$bold n ~=~ bold m over { || bold m || }$
.ce 0
.sp
.br
If automatic normal generation is disabled,
the corresponding normal map \%\f3GL_MAP2_NORMAL\fP,
if enabled,
is used to produce a normal.
If neither automatic normal generation nor a normal map is enabled,
no normal is generated for 
\%\f3glEvalCoord2\fP commands.
.SH ASSOCIATED GETS
.nf
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_VERTEX_3\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_VERTEX_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_INDEX\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_COLOR_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_NORMAL\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_TEXTURE_COORD_1\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_TEXTURE_COORD_2\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_TEXTURE_COORD_3\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP1_TEXTURE_COORD_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_VERTEX_3\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_VERTEX_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_INDEX\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_COLOR_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_NORMAL\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_TEXTURE_COORD_1\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_TEXTURE_COORD_2\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_TEXTURE_COORD_3\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_MAP2_TEXTURE_COORD_4\fP
.br
\%\f3glIsEnabled\fP with argument \%\f3GL_AUTO_NORMAL\fP
.br
\%\f3glGetMap\fP
.SH SEE ALSO
\%\f3glBegin\fP,
\%\f3glColor\fP,
\%\f3glEnable\fP,
\%\f3glEvalMesh\fP,
\%\f3glEvalPoint\fP,
\%\f3glIndex\fP,
\%\f3glMap1\fP,
\%\f3glMap2\fP, 
\%\f3glMapGrid\fP,
\%\f3glNormal\fP,
\%\f3glTexCoord\fP,
\%\f3glVertex\fP