File: CastleArraysGenerator.TArraysGenerator.html

package info (click to toggle)
castle-game-engine 5.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 185,428 kB
  • sloc: pascal: 260,781; cpp: 1,363; objc: 713; makefile: 537; xml: 496; sh: 480; php: 4
file content (494 lines) | stat: -rw-r--r-- 35,336 bytes parent folder | download
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleArraysGenerator: Class TArraysGenerator</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TArraysGenerator"></a><h1 class="cio">Class TArraysGenerator</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td><a class="section" href="#PasDoc-Fields">Fields</a></td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a  href="CastleArraysGenerator.html">CastleArraysGenerator</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TArraysGenerator = class(TObject)</code></p>
<h2 class="description">Description</h2>
<p>
Generate <a class="normal" href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a> for a VRML/X3D shape. This is the basis of our renderer: generate a <a class="normal" href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a> for a shape, then <a class="normal" href="CastleRenderer.TGLRenderer.html">TGLRenderer</a> will pass <a class="normal" href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a> to OpenGL.

<p>Geometry must be based on coordinates when using this, that is <a class="normal" href="X3DNodes.TAbstractGeometryNode.html#Coord">TAbstractGeometryNode.Coord</a> must return <code>True</code>.</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="thisitem">TArraysGenerator</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Fields"></a><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#IndexesFromCoordIndex">IndexesFromCoordIndex</a></b>: <a  href="CastleUtils.TLongIntList.html">TLongIntList</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#ArrayIndexNum">ArrayIndexNum</a></b>: Integer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a></b>: <a  href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#TexCoordsNeeded">TexCoordsNeeded</a></b>: Cardinal;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#MaterialOpacity">MaterialOpacity</a></b>: Single;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#FogVolumetric">FogVolumetric</a></b>: boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#FogVolumetricDirection">FogVolumetricDirection</a></b>: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#FogVolumetricVisibilityStart">FogVolumetricVisibilityStart</a></b>: Single;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#ShapeBumpMappingUsed">ShapeBumpMappingUsed</a></b>: boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#OnRadianceTransfer">OnRadianceTransfer</a></b>: <a  href="CastleArraysGenerator.html#TRadianceTransferFunction">TRadianceTransferFunction</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#OnVertexColor">OnVertexColor</a></b>: <a  href="CastleArraysGenerator.html#TVertexColorFunction">TVertexColorFunction</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><b><a  href="CastleArraysGenerator.TArraysGenerator.html#FacesNeeded">FacesNeeded</a></b>: boolean;</code></td>
</tr>
</table>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#WarningShadingProblems">WarningShadingProblems</a></b>( const ColorPerVertex, NormalPerVertex: boolean);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a></b>(IndexNum: Integer); virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GetVertex">GetVertex</a></b>(IndexNum: integer): <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleArraysGenerator.TArraysGenerator.html#CoordCount">CoordCount</a></b>: Integer;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinate">GenerateCoordinate</a></b>; virtual; abstract;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateBegin">GenerateCoordinateBegin</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateEnd">GenerateCoordinateEnd</a></b>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a></b>( const RangeNumber: Cardinal; BeginIndex, EndIndex: Integer); virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#PrepareIndexesPrimitives">PrepareIndexesPrimitives</a></b>; virtual; abstract;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleArraysGenerator.TArraysGenerator.html#PrepareAttributes">PrepareAttributes</a></b>(var AllowIndexed: boolean); virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="CastleArraysGenerator.TArraysGenerator.html#Create">Create</a></b>(AShape: <a  href="CastleShapes.TShape.html">TShape</a>; AOverTriangulate: boolean); virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleArraysGenerator.TArraysGenerator.html#GenerateArrays">GenerateArrays</a></b>: <a  href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <b><a  href="CastleArraysGenerator.TArraysGenerator.html#BumpMappingAllowed">BumpMappingAllowed</a></b>: boolean; virtual;</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#Shape">Shape</a></b>: <a  href="CastleShapes.TShape.html">TShape</a> read FShape;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#State">State</a></b>: <a  href="X3DNodes.TX3DGraphTraverseState.html">TX3DGraphTraverseState</a> read FState;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#Geometry">Geometry</a></b>: <a  href="X3DNodes.TAbstractGeometryNode.html">TAbstractGeometryNode</a> read FGeometry;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a></b>: <a  href="X3DFields.TMFVec3f.html">TMFVec3f</a> read FCoord;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a></b>: <a  href="X3DFields.TMFLong.html">TMFLong</a> read FCoordIndex;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleArraysGenerator.TArraysGenerator.html#CurrentRangeNumber">CurrentRangeNumber</a></b>: Cardinal read FCurrentRangeNumber;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="IndexesFromCoordIndex"></a><code><b>IndexesFromCoordIndex</b>: <a  href="CastleUtils.TLongIntList.html">TLongIntList</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Indexes, only when Arrays.Indexes = nil but original node was indexed.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="ArrayIndexNum"></a><code><b>ArrayIndexNum</b>: Integer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Index to <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a>. Suitable always to index Arrays.Position / Color / Normal and other <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a> attribute <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">arrays</a>. Calculated in each TAbstractCoordinateGenerator.GenerateVertex, always call &quot;inherited&quot; first fro <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> overrides.

<p>There are three cases:

<p>1. When <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> &lt;&gt; nil (so we have indexed node) and Arrays.Indexes &lt;&gt; nil (so we can render it by indexes, because AllowIndexed = true) then it's an index to node coordinates. It's equivalent to <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a>[IndexNum], and it can be used to index node's <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a> as well as Arrays.Position (since they are ordered the same in this case).

<p>2. When <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> &lt;&gt; nil (so we have indexed node) and Arrays.Indexes = nil (so we cannot render it by indexes, because AllowIndexed = false) then it's a number of vertex, that is it's incremented in each TAbstractCoordinateGenerator.GenerateVertex call.

<p>In this case <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#IndexesFromCoordIndex">IndexesFromCoordIndex</a> &lt;&gt; nil, and <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a> attributes have the same count as IndexesFromCoordIndex.Count. <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> must be called in exactly the same order as <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#IndexesFromCoordIndex">IndexesFromCoordIndex</a> were generated for this.

<p>3. When <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> = nil (so we don't have an indexed node, also Arrays.Indexes = <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#IndexesFromCoordIndex">IndexesFromCoordIndex</a> = nil always in this case) then it's an index to attributes. This is the trivial case, as <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a> attributes are then ordered just like node's <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a>. It's equal to IndexNum then.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Arrays"></a><code><b>Arrays</b>: <a  href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Generated <a class="normal" href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a> instance, available inside <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinate">GenerateCoordinate</a>*.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TexCoordsNeeded"></a><code><b>TexCoordsNeeded</b>: Cardinal;</code></td>
</tr>
<tr><td colspan="2">
<p>
Assign these before calling <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateArrays">GenerateArrays</a>. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="MaterialOpacity"></a><code><b>MaterialOpacity</b>: Single;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FogVolumetric"></a><code><b>FogVolumetric</b>: boolean;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FogVolumetricDirection"></a><code><b>FogVolumetricDirection</b>: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FogVolumetricVisibilityStart"></a><code><b>FogVolumetricVisibilityStart</b>: Single;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ShapeBumpMappingUsed"></a><code><b>ShapeBumpMappingUsed</b>: boolean;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnRadianceTransfer"></a><code><b>OnRadianceTransfer</b>: <a  href="CastleArraysGenerator.html#TRadianceTransferFunction">TRadianceTransferFunction</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnVertexColor"></a><code><b>OnVertexColor</b>: <a  href="CastleArraysGenerator.html#TVertexColorFunction">TVertexColorFunction</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="FacesNeeded"></a><code><b>FacesNeeded</b>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Do we need <a class="normal" href="CastleGeometryArrays.TGeometryArrays.html#Faces">TGeometryArrays.Faces</a></p>
</td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="WarningShadingProblems"></a><code>procedure <b>WarningShadingProblems</b>( const ColorPerVertex, NormalPerVertex: boolean);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GenerateVertex"></a><code>procedure <b>GenerateVertex</b>(IndexNum: Integer); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Generate <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">arrays</a> content for given vertex. Given IndexNum indexes <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a>, or (if <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> is assigned) indexes <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> (and <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> then indexes actual <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a>).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GetVertex"></a><code>function <b>GetVertex</b>(IndexNum: integer): <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Get vertex coordinate. Returned vertex is in local coordinate space (use State.Transform if you want to get global coordinates).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CoordCount"></a><code>function <b>CoordCount</b>: Integer;</code></td>
</tr>
<tr><td colspan="2">
<p>
Count of indexes. You can pass index between 0 and <code>CoordCount</code> - 1 to various methods taking an index, like <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GenerateCoordinate"></a><code>procedure <b>GenerateCoordinate</b>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
Generate contents of <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a>. These are all called only when <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a> is assigned.

<p><code>GenerateCoordinate</code> can be overridden only by the class that actually knows how to deconstruct (triangulate etc.) this node. It must call <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> (or call <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a>, that has to be then overridden to call <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> after inherited).

<p><a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateBegin">GenerateCoordinateBegin</a>, <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateEnd">GenerateCoordinateEnd</a> will be called before / after <code>GenerateCoordinate</code>. It's useful to override them for intermediate classes in this file, that cannot triangulate, but still want to add something before / after <code>GenerateCoordinate</code>. When overriding <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateBegin">GenerateCoordinateBegin</a>, always call inherited at the begin. When overriding <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordinateEnd">GenerateCoordinateEnd</a>, always call inherited at the end. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GenerateCoordinateBegin"></a><code>procedure <b>GenerateCoordinateBegin</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GenerateCoordinateEnd"></a><code>procedure <b>GenerateCoordinateEnd</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="GenerateCoordsRange"></a><code>procedure <b>GenerateCoordsRange</b>( const RangeNumber: Cardinal; BeginIndex, EndIndex: Integer); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Generate <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">arrays</a> content for one coordinate range (like a face). This is not called, not used, anywhere in this base TAbstractCoordinateGenerator class. In descendants, it may be useful to use this, like Geometry.MakeCoordRanges(State, @<code>GenerateCoordsRange</code>).

<p><code>GenerateCoordsRange</code> is supposed to generate the parts of the mesh between BeginIndex and EndIndex - 1 vertices. BeginIndex and EndIndex are indexes to <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> array, if <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> is assigned, or just indexes to <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PrepareIndexesPrimitives"></a><code>procedure <b>PrepareIndexesPrimitives</b>; virtual; abstract;</code></td>
</tr>
<tr><td colspan="2">
<p>
If <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> assigned (this VRML/X3D node is IndexedXxx) then calculate and set <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#IndexesFromCoordIndex">IndexesFromCoordIndex</a> here. This is also the place to set Arrays.Primitive and Arrays.Counts.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="PrepareAttributes"></a><code>procedure <b>PrepareAttributes</b>(var AllowIndexed: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when constructing <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a>, before the Arrays.Count is set. Descendants can override this to do stuff like Arrays.AddColor or Arrays.AddAttribute('foo'). Descendants can also set AllowIndexed to <code>False</code>, if we can't use indexed rendering (because e.g. we have colors per-face, which means that the same vertex position may have different colors, which means it has to be duplicated in <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">arrays</a> anyway, so there's no point in indexing).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AShape: <a  href="CastleShapes.TShape.html">TShape</a>; AOverTriangulate: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GenerateArrays"></a><code>function <b>GenerateArrays</b>: <a  href="CastleGeometryArrays.TGeometryArrays.html">TGeometryArrays</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Create and generate <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Arrays">Arrays</a> contents.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="BumpMappingAllowed"></a><code>class function <b>BumpMappingAllowed</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Shape"></a><code>property <b>Shape</b>: <a  href="CastleShapes.TShape.html">TShape</a> read FShape;</code></td>
</tr>
<tr><td colspan="2">
<p>
Current shape properties, constant for the whole lifetime of the generator, set in constructor. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="State"></a><code>property <b>State</b>: <a  href="X3DNodes.TX3DGraphTraverseState.html">TX3DGraphTraverseState</a> read FState;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Geometry"></a><code>property <b>Geometry</b>: <a  href="X3DNodes.TAbstractGeometryNode.html">TAbstractGeometryNode</a> read FGeometry;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="Coord"></a><code>property <b>Coord</b>: <a  href="X3DFields.TMFVec3f.html">TMFVec3f</a> read FCoord;</code></td>
</tr>
<tr><td colspan="2">
<p>
Coordinates, taken from Geometry.Coord. Usually coming from (<code>coord</code> as Coordinate).points field. If <code>Nil</code> then nothing will be rendered.

<p>In our constructor we initialize <code>Coord</code> and <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#CoordIndex">CoordIndex</a> from Geometry, using <a class="normal" href="X3DNodes.TAbstractGeometryNode.html#Coord">TAbstractGeometryNode.Coord</a> and <a class="normal" href="X3DNodes.TAbstractGeometryNode.html#CoordIndex">TAbstractGeometryNode.CoordIndex</a> values.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CoordIndex"></a><code>property <b>CoordIndex</b>: <a  href="X3DFields.TMFLong.html">TMFLong</a> read FCoordIndex;</code></td>
</tr>
<tr><td colspan="2">
<p>
Coordinate index, taken from Geometry.CoordIndex.

<p>If <code>Nil</code>, then <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> (and all other routines taking some index) will just directly index <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#Coord">Coord</a> (this is useful for non-indexed geometry, like TriangleSet instead of IndexedTriangleSet).</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><a name="CurrentRangeNumber"></a><code>property <b>CurrentRangeNumber</b>: Cardinal read FCurrentRangeNumber;</code></td>
</tr>
<tr><td colspan="2">
<p>
The number of current range (like a face), equal to RangeNumber passed to <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a>. Read this only while in <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a>. In fact, this is just set by <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a> in this class (so call <code>inherited</code> first when overriding it).

<p>It's comfortable e.g. when you need RangeNumber inside <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a>, and you know that <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateVertex">GenerateVertex</a> will be called only from <a class="normal" href="CastleArraysGenerator.TArraysGenerator.html#GenerateCoordsRange">GenerateCoordsRange</a>.</p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Piwik Code -->

<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:08</em>
</span>
</td></tr></table></body></html>