E
glEvalPoint
Chapter 5
146
glEvalPoint
glEvalPoint1, glEvalPoint2: generate and evaluate a single point in a mesh.
C Specification
void glEvalPoint1(
GLint i)
void glEvalPoint2(
GLint i,
GLint j)
Parameters
i Specifies the integer value for grid domain variable i.
j Specifies the integer value for grid domain variable j (glEvalPoint2
only).
Description
glMapGrid and glEvalMesh are used in tandem to efficiently generate and evaluate a
series of evenly spaced map domain values. glEvalPoint can be used to evaluate a single
grid point in the same grid space that is traversed by glEvalMesh. Calling glEvalPoint1
is equivalent to calling
glEvalCoord1(i − ∆u + u
1
);
where
∆u = (u
2
- u
1
) / n
and n, u
1
, and u
2
are the arguments to the most recentglMapGrid1 command. The one
absolute numeric requirement is that if i=n, then the value computed from i −∆u+u
1
is
exactly u
2
.
In the two-dimensional case, glEvalPoint2, let
∆u = (u
2
- u
1
) / n
∆v = (v
2
- v
1
) / m
where n, u
1
, u
2
, m, v
1
, and v
2
are the arguments to the most recent glMapGrid2
command. Then the glEvalPoint2 command is equivalent to calling
glEvalCoord2(i − ∆u + u
1
, j − ∆v + v
1
);
The only absolute numeric requirements are that if i=n, then the value computed from i
−∆u+u
1
is exactly u
2
, and if j=m, then the value computed from j −∆v+v
1
is exactly v
2
.