aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/ogl-sample/main/doc/man/mangl/standard/evalcoord.gl
blob: bf4e76425a05ef9dc1becfd36de1850acb7e10a5 (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
_C_ License Applicability. Except to the extent portions of this file are
_C_ made subject to an alternative license as permitted in the SGI Free
_C_ Software License B, Version 1.1 (the "License"), the contents of this
_C_ file are subject only to the provisions of the License. You may not use
_C_ this file except in compliance with the License. You may obtain a copy
_C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
_C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
_C_ 
_C_ http://oss.sgi.com/projects/FreeB
_C_ 
_C_ Note that, as provided in the License, the Software is distributed on an
_C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
_C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
_C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
_C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
_C_ 
_C_ Original Code. The Original Code is: OpenGL Sample Implementation,
_C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
_C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
_C_ Copyright in any portions created by third parties is as indicated
_C_ elsewhere herein. All Rights Reserved.
_C_ 
_C_ Additional Notice Provisions: The application programming interfaces
_C_ established by SGI in conjunction with the Original Code are The
_C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
_C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
_C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
_C_ Window System(R) (Version 1.3), released October 19, 1998. This software
_C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation
_C_ published by SGI, but has not been independently verified as being
_C_ compliant with the OpenGL(R) version 1.2.1 Specification.
_C_
_C_ The first character in this file must be an '_'!
_C_ Anything on a line after _C_ is ignored
_define(_filters,tbl|eqn)_C_
_C_      eqn is automatically replaced with neqn for nroff
_header(EvalCoord,evaluate enabled one- and two-dimensional maps)
.EQ
delim $$
.EN
_names(EvalCoord,[1-2][fd])
.SH PARAMETERS
_phead(_param1)
Specifies a value that is the domain coordinate $u$ to the basis function
defined in a previous _cmnd(Map1) or _cmnd(Map2) command.
_phead(_param2)
Specifies a value that is the domain coordinate $v$ to the basis function
defined in a previous _cmnd(Map2) command.
This argument is not present in a _cmnd(EvalCoord1) command.
_names(EvalCoord,[1-2][fd]v)
.SH PARAMETERS
_phead(_param1)
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 _cmnd(EvalCoord2) versions.
.SH DESCRIPTION
_cmnd(EvalCoord1) evaluates enabled one-dimensional maps at argument
_param1(1).
_cmnd(EvalCoord2) does the same for two-dimensional maps using
two domain values,
_param1(1) and _param2(1).
To define a map, call _cmnd(Map1) and _cmnd(Map2); to enable and
disable it, call _cmnd(Enable) and _cmnd(Disable).
.P
When one of the _cmnd(EvalCoord) 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 _const(MAP1_INDEX) or
_const(MAP2_INDEX) is enabled,
a _cmnd(Index) command is simulated.
If _const(MAP1_COLOR_4) or
_const(MAP2_COLOR_4) is enabled,
a _cmnd(Color) command is simulated.
If _const(MAP1_NORMAL) or _const(MAP2_NORMAL) is enabled,
a normal vector is produced,
and if any of
_const(MAP1_TEXTURE_COORD_1),
_const(MAP1_TEXTURE_COORD_2),
_const(MAP1_TEXTURE_COORD_3), 
_const(MAP1_TEXTURE_COORD_4),
_const(MAP2_TEXTURE_COORD_1),
_const(MAP2_TEXTURE_COORD_2),
_const(MAP2_TEXTURE_COORD_3), or
_const(MAP2_TEXTURE_COORD_4) is enabled, then an appropriate _cmnd(TexCoord) 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 _cmnd(Vertex) commands are interspersed with _cmnd(EvalCoord)
commands, the color,
normal,
and texture coordinates associated with the _cmnd(Vertex) commands are not
affected by the values generated by the _cmnd(EvalCoord) commands,
but only by the most recent
_cmnd(Color),
_cmnd(Index),
_cmnd(Normal), and
_cmnd(TexCoord) 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, _const(MAP2_TEXTURE_COORD_1) and
_const(MAP2_TEXTURE_COORD_2)),
then only the evaluation of the map that produces the larger
number of coordinates
(in this case, _const(MAP2_TEXTURE_COORD_2))
is carried out.
_const(MAP1_VERTEX_4) overrides _const(MAP1_VERTEX_3),
and
_const(MAP2_VERTEX_4) overrides _const(MAP2_VERTEX_3),
in the same manner.
If neither a three- nor a four-component vertex map is enabled for the
specified dimension,
the _cmnd(EvalCoord) command is ignored.
.P
If you have enabled automatic normal generation,
by calling _cmnd(Enable) with argument _const(AUTO_NORMAL),
_cmnd(EvalCoord2) generates surface normals analytically,
regardless of the contents or enabling of the _const(MAP2_NORMAL) 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 _const(MAP2_NORMAL),
if enabled,
is used to produce a normal.
If neither automatic normal generation nor a normal map is enabled,
no normal is generated for 
_cmnd(EvalCoord2) commands.
.SH ASSOCIATED GETS
.nf
_cmnd(IsEnabled) with argument _const(MAP1_VERTEX_3)
.br
_cmnd(IsEnabled) with argument _const(MAP1_VERTEX_4)
.br
_cmnd(IsEnabled) with argument _const(MAP1_INDEX)
.br
_cmnd(IsEnabled) with argument _const(MAP1_COLOR_4)
.br
_cmnd(IsEnabled) with argument _const(MAP1_NORMAL)
.br
_cmnd(IsEnabled) with argument _const(MAP1_TEXTURE_COORD_1)
.br
_cmnd(IsEnabled) with argument _const(MAP1_TEXTURE_COORD_2)
.br
_cmnd(IsEnabled) with argument _const(MAP1_TEXTURE_COORD_3)
.br
_cmnd(IsEnabled) with argument _const(MAP1_TEXTURE_COORD_4)
.br
_cmnd(IsEnabled) with argument _const(MAP2_VERTEX_3)
.br
_cmnd(IsEnabled) with argument _const(MAP2_VERTEX_4)
.br
_cmnd(IsEnabled) with argument _const(MAP2_INDEX)
.br
_cmnd(IsEnabled) with argument _const(MAP2_COLOR_4)
.br
_cmnd(IsEnabled) with argument _const(MAP2_NORMAL)
.br
_cmnd(IsEnabled) with argument _const(MAP2_TEXTURE_COORD_1)
.br
_cmnd(IsEnabled) with argument _const(MAP2_TEXTURE_COORD_2)
.br
_cmnd(IsEnabled) with argument _const(MAP2_TEXTURE_COORD_3)
.br
_cmnd(IsEnabled) with argument _const(MAP2_TEXTURE_COORD_4)
.br
_cmnd(IsEnabled) with argument _const(AUTO_NORMAL)
.br
_cmnd(GetMap)
.SH SEE ALSO
_cmnd(Begin),
_cmnd(Color),
_cmnd(Enable),
_cmnd(EvalMesh),
_cmnd(EvalPoint),
_cmnd(Index),
_cmnd(Map1),
_cmnd(Map2), 
_cmnd(MapGrid),
_cmnd(Normal),
_cmnd(TexCoord),
_cmnd(Vertex)