-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathH3DU.SurfaceEval.html
executable file
·222 lines (161 loc) · 10.6 KB
/
H3DU.SurfaceEval.html
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html><html><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><title>H3DU.SurfaceEval</title><meta name="viewport" content="width=device-width"><link rel=stylesheet type="text/css" href="/style.css"></head><body> <div class="header">
<p><a href="#navigation">Menu</a> - <a href="#top">Top</a> - <a href="/">Home</a> -
<a href="http://peteroupc.github.io/">Donate to Me</a></p></div>
<div class="mainarea" id="top">
<h1>H3DU.SurfaceEval</h1>
<p><a href="index.html">Back to documentation index.</a></p>
<p><a name='H3DU.SurfaceEval'></a></p>
<h3>H3DU.SurfaceEval()</h3>
<p><b>Deprecated: Use <a href="H3DU.SurfaceBuilder.html">H3DU.SurfaceBuilder</a> instead.</b></p>
<p>An evaluator of parametric functions for generating
vertex attributes of a surface.</p>
<p>See the <a href="tutorial-surfaces.html">Parametric Curves and Parametric Surfaces</a> tutorial for more information.</p>
<h4>Parameters</h4>
<h3>Methods</h3>
<ul>
<li><a href="#H3DU.SurfaceEval_color">color</a><br>Specifies a parametric surface function for generating color values.</li>
<li><a href="#H3DU.SurfaceEval_evalOne">evalOne</a><br>Generates vertex positions and attributes based on a point
in a parametric surface.</li>
<li><a href="#H3DU.SurfaceEval_evalSurface">evalSurface</a><br>Generates the vertex positions and attributes of a parametric
surface.</li>
<li><a href="#H3DU.SurfaceEval_normal">normal</a><br>Specifies a parametric surface function for generating normals.</li>
<li><a href="#H3DU.SurfaceEval_setAutoNormal">setAutoNormal</a><br>Sets whether this object will automatically generate
normals rather than use the parametric evaluator
specified for normal generation, if any.</li>
<li><a href="#H3DU.SurfaceEval_texCoord">texCoord</a><br>Specifies a parametric surface function for generating texture coordinates.</li>
<li><a href="#H3DU.SurfaceEval_vertex">vertex</a><br>Specifies a surface evaluator object for generating the vertex positions of a parametric surface.</li>
</ul>
<p><a name='H3DU.SurfaceEval_color'></a></p>
<h3>H3DU.SurfaceEval#color(evaluator)</h3>
<p>Specifies a parametric surface function for generating color values.</p>
<h4>Parameters</h4>
<ul>
<li><code>evaluator</code> (Type: Object)<br>An object that must contain a method named <code>evaluate</code> that takes a u-coordinate and a v-coordinate and returns a 3-element array.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_evalOne'></a></p>
<h3>H3DU.SurfaceEval#evalOne(mesh, u, v)</h3>
<p>Generates vertex positions and attributes based on a point
in a parametric surface.</p>
<h4>Parameters</h4>
<ul>
<li><code>mesh</code> (Type: <a href="H3DU.Mesh.html">H3DU.Mesh</a>)<br>H3DU.Mesh where vertex positions and attributes will be generated. When this method returns, the current color, normal, and texture coordinates will be the same as they were before the method started.</li>
<li><code>u</code> (Type: number)<br>u-coordinate of the surface to evaluate.</li>
<li><code>v</code> (Type: number)<br>v-coordinate of the surface to evaluate.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_evalSurface'></a></p>
<h3>H3DU.SurfaceEval#evalSurface(mesh, [mode], [un], [vn], [u1], [u2], [v1], [v2])</h3>
<p>Generates the vertex positions and attributes of a parametric
surface.</p>
<h4>Parameters</h4>
<ul>
<li><code>mesh</code> (Type: <a href="H3DU.Mesh.html">H3DU.Mesh</a>)<br>The mesh where vertex positions and attributes will be generated. When this method returns, the current color, normal, and texture coordinates will be the same as they were before the method started.</li>
<li><code>mode</code> (Type: number) (optional)<br>If this value is <a href="H3DU.Mesh.html#H3DU.Mesh.TRIANGLES">H3DU.Mesh.TRIANGLES</a>, or is null, undefined, or omitted, generates a series of triangles defining the surface. If this value is <a href="H3DU.Mesh.html#H3DU.Mesh.LINES">H3DU.Mesh.LINES</a>, generates a series of lines defining the surface. If this value is <a href="H3DU.Mesh.html#H3DU.Mesh.POINTS">H3DU.Mesh.POINTS</a>, generates a series of points along the surface. For any other value, this method has no effect.</li>
<li><code>un</code> (Type: number) (optional)<br>Number of subdivisions along the u-axis. Default is 24.</li>
<li><code>vn</code> (Type: number) (optional)<br>Number of subdivisions along the v-axis. Default is 24.</li>
<li><code>u1</code> (Type: number) (optional)<br>Starting u-coordinate of the surface to evaluate. Default is the starting u-coordinate given by the <a href="H3DU.SurfaceEval.html#H3DU.SurfaceEval_vertex">surface evaluator object</a>, or 0 if not given.</li>
<li><code>u2</code> (Type: number) (optional)<br>Ending u-coordinate of the surface to evaluate. Default is the ending u-coordinate given by the <a href="H3DU.SurfaceEval.html#H3DU.SurfaceEval_vertex">surface evaluator object</a>, or 1 if not given.</li>
<li><code>v1</code> (Type: number) (optional)<br>Starting v-coordinate of the surface to evaluate. Default is the starting v-coordinate given by the <a href="H3DU.SurfaceEval.html#H3DU.SurfaceEval_vertex">surface evaluator object</a>, or 0 if not given.</li>
<li><code>v2</code> (Type: number) (optional)<br>Ending v-coordinate of the surface to evaluate. Default is the ending v-coordinate given by the <a href="H3DU.SurfaceEval.html#H3DU.SurfaceEval_vertex">surface evaluator object</a>, or 1 if not given.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_normal'></a></p>
<h3>H3DU.SurfaceEval#normal(evaluator)</h3>
<p>Specifies a parametric surface function for generating normals.</p>
<h4>Parameters</h4>
<ul>
<li><code>evaluator</code> (Type: Object)<br>An object that must contain a method named <code>evaluate</code> that takes a u-coordinate and a v-coordinate and returns a 3-element array.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_setAutoNormal'></a></p>
<h3>H3DU.SurfaceEval#setAutoNormal(value)</h3>
<p>Sets whether this object will automatically generate
normals rather than use the parametric evaluator
specified for normal generation, if any.
By default, normals won't be generated automatically.</p>
<h4>Parameters</h4>
<ul>
<li><code>value</code> (Type: Boolean)<br>Either true or false. True means normals will automatically be generated; false means they won't.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_texCoord'></a></p>
<h3>H3DU.SurfaceEval#texCoord(evaluator)</h3>
<p>Specifies a parametric surface function for generating texture coordinates.</p>
<h4>Parameters</h4>
<ul>
<li><code>evaluator</code> (Type: Object)<br>An object that must contain a method named <code>evaluate</code> that takes a u-coordinate and a v-coordinate and returns a 2-element array.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a name='H3DU.SurfaceEval_vertex'></a></p>
<h3>H3DU.SurfaceEval#vertex(evaluator)</h3>
<p>Specifies a surface evaluator object for generating the vertex positions of a parametric surface.</p>
<h4>Parameters</h4>
<ul>
<li><code>evaluator</code> (Type: <a href="H3DU.Surface.html">H3DU.Surface</a> | Object)<br>An object described in <a href="H3DU.Surface.html">H3DU.Surface</a>. Can be null, in which case, disables generating vertex positions.</li>
</ul>
<h4>Return Value</h4>
<p>This object. (Type: <a href="H3DU.SurfaceEval.html">H3DU.SurfaceEval</a>)</p>
<p><a href="index.html">Back to documentation index.</a></p>
</div><nav id="navigation"><ul>
<li><a href="/">Back to start site.</a>
<li><a href="https://github.com/peteroupc/peteroupc.github.io">This site's repository (source code)</a>
<li><a href="https://github.com/peteroupc/peteroupc.github.io/issues">Post an issue or comment</a></ul>
<p>
<a href="//twitter.com/share">Share via Twitter</a>, <a href="//www.facebook.com/sharer/sharer.php" id="sharer">Share via Facebook</a>
</p>
</div>
<h3>Navigation</h3>
<ul>
<li><a href="DrawingToy.html">DrawingToy</a></li>
<li><a href="Epitrochoid.html">Epitrochoid</a></li>
<li><a href="H3DU.html">H3DU</a></li>
<li><a href="H3DU.BSplineCurve.html">H3DU.BSplineCurve</a></li>
<li><a href="H3DU.BSplineSurface.html">H3DU.BSplineSurface</a></li>
<li><a href="H3DU.BufferAccessor.html">H3DU.BufferAccessor</a></li>
<li><a href="H3DU.Camera.html">H3DU.Camera</a></li>
<li><a href="H3DU.Curve.html">H3DU.Curve</a></li>
<li><a href="H3DU.CurveBuilder.html">H3DU.CurveBuilder</a></li>
<li><a href="H3DU.CurveTube.html">H3DU.CurveTube</a></li>
<li><a href="H3DU.GraphicsPath.html">H3DU.GraphicsPath</a></li>
<li><a href="H3DU.InputTracker.html">H3DU.InputTracker</a></li>
<li><a href="H3DU.MathUtil.html">H3DU.MathUtil</a></li>
<li><a href="H3DU.MeshBuffer.html">H3DU.MeshBuffer</a></li>
<li><a href="H3DU.Meshes.html">H3DU.Meshes</a></li>
<li><a href="H3DU.PiecewiseCurve.html">H3DU.PiecewiseCurve</a></li>
<li><a href="H3DU.Shape.html">H3DU.Shape</a></li>
<li><a href="H3DU.ShapeGroup.html">H3DU.ShapeGroup</a></li>
<li><a href="H3DU.Surface.html">H3DU.Surface</a></li>
<li><a href="H3DU.SurfaceBuilder.html">H3DU.SurfaceBuilder</a></li>
<li><a href="H3DU.TextFont.html">H3DU.TextFont</a></li>
<li><a href="H3DU.TextureAtlas.html">H3DU.TextureAtlas</a></li>
<li><a href="H3DU.Transform.html">H3DU.Transform</a></li>
<li><a href="Hypotrochoid.html">Hypotrochoid</a></li>
<li><a href="MatrixStack.html">MatrixStack</a></li>
<li><a href="Polyhedra.html">Polyhedra</a></li>
<li><a href="Promise.html">Promise</a></li>
<li><a href="Semantic.html">Semantic</a></li>
<li><a href="StarField.html">StarField</a></li>
<li><a href="Superellipsoid.html">Superellipsoid</a></li>
<li><a href="Supertoroid.html">Supertoroid</a></li>
<li><a href="SurfaceOfRevolution.html">SurfaceOfRevolution</a></li>
<li><a href="Trochoid.html">Trochoid</a></li>
<li><a href="curveCatacaustic.html">curveCatacaustic</a></li>
<li><a href="curveEvolute.html">curveEvolute</a></li>
<li><a href="curveInverse.html">curveInverse</a></li>
<li><a href="curveInvolute.html">curveInvolute</a></li>
<li><a href="curveOrthotomic.html">curveOrthotomic</a></li>
<li><a href="curvePedalCurve.html">curvePedalCurve</a></li>
<li><a href="curveRadialCurve.html">curveRadialCurve</a></li>
<li><a href="polarCurve.html">polarCurve</a></li>
<li><a href="ruledSurface.html">ruledSurface</a></li>
<li><a href="spiralCurve.html">spiralCurve</a></li>
</ul>
</nav>
</body></html>