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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NL3D::CPointLightNamedArray class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CPointLightNamedArray Class Reference</h1><code>#include <<a class="el" href="a06187.html">point_light_named_array.h</a>></code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A class used bi <a class="el" href="a02671.html">CInstanceGroup</a> and <a class="el" href="a03730.html">CZone</a>. Just a list of pointLights, grouped by name. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00045">45</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya0">build</a> (const std::vector< <a class="el" href="a03094.html">CPointLightNamed</a> > &pointLights, std::vector< <a class="el" href="a04558.html#a15">uint</a> > &indexRemap)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya1">clear</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">clear All: pointLights and map. <a href="#NL3D_1_1CPointLightNamedArraya1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya2">CPointLightNamedArray</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CPointLightNamedArraya2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03094.html">CPointLightNamed</a> > & </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya3">getPointLights</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">get the pointLights sorted (mutable version). Be sure what you do! <a href="#NL3D_1_1CPointLightNamedArraya3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector< <a class="el" href="a03094.html">CPointLightNamed</a> > & </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya4">getPointLights</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">get the pointLights sorted (const version). <a href="#NL3D_1_1CPointLightNamedArraya4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya5">initAnimatedLightIndex</a> (const <a class="el" href="a03348.html">CScene</a> &scene)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya6">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArraya7">setPointLightFactor</a> (const <a class="el" href="a03348.html">CScene</a> &scene)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">update the Light factor for all pointLights (animated and unanimated one) <a href="#NL3D_1_1CPointLightNamedArraya7"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::vector< <a class="el" href="a03096.html">CPointLightGroup</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayy0">TPLGVec</a></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayy0">TPLGVec</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Info for LightGroupName and setPointLightFactor. <a href="#NL3D_1_1CPointLightNamedArrayr0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03094.html">CPointLightNamed</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">List of pointLight. <a href="#NL3D_1_1CPointLightNamedArrayr1"></a><br><br></td></tr>
</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="NL3D_1_1CPointLightNamedArrayy0" doxytag="NL3D::CPointLightNamedArray::TPLGVec" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="a03096.html">CPointLightGroup</a>> <a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayy0">NL3D::CPointLightNamedArray::TPLGVec</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00125">125</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>. </td>
</tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya2" doxytag="NL3D::CPointLightNamedArray::CPointLightNamedArray" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> NL3D::CPointLightNamedArray::CPointLightNamedArray </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructor.
<p>
<p>
Definition at line <a class="el" href="a06186.html#l00040">40</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
<div class="fragment"><pre>00041 {
00042 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya0" doxytag="NL3D::CPointLightNamedArray::build" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void NL3D::CPointLightNamedArray::build </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const std::vector< <a class="el" href="a03094.html">CPointLightNamed</a> > & </td>
<td class="mdname" nowrap> <em>pointLights</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>std::vector< <a class="el" href="a04558.html#a15">uint</a> > & </td>
<td class="mdname" nowrap> <em>indexRemap</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
sort pointLights and make Groups by name for setFactor(). indexRemap gets news Ids for pointLights. eg: old PointLight nb 0 is now at indexRemap[0].
<p>
Definition at line <a class="el" href="a06186.html#l00071">71</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
References <a class="el" href="a06187.html#l00127">_PointLightGroupMap</a>, <a class="el" href="a06187.html#l00084">_PointLights</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06350.html#l01165">NL3D::CInstanceGroup::buildPointLightList()</a>.
<p>
<div class="fragment"><pre>00072 {
00073 <a class="code" href="a04558.html#a15">uint</a> i;
00074
00075 <span class="comment">// sort by name.</span>
00076 <span class="comment">//----------</span>
00077 <span class="comment">// Fill Sort array</span>
00078 vector<CPointLightNamedSort> pointLightSorts;
00079 pointLightSorts.resize(pointLights.size());
00080 <span class="keywordflow">for</span>(i=0; i<pointLightSorts.size(); i++)
00081 {
00082 pointLightSorts[i].PointLight= &pointLights[i];
00083 pointLightSorts[i].SrcId= i;
00084 }
00085 <span class="comment">// sort</span>
00086 sort(pointLightSorts.begin(), pointLightSorts.end());
00087 <span class="comment">// Copy data, and Fill indexRemap array</span>
00088 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>.resize(pointLights.size());
00089 indexRemap.resize(pointLights.size());
00090 <span class="keywordflow">for</span>(i=0; i<pointLightSorts.size(); i++)
00091 {
00092 <span class="comment">// Copy yhe PointLight to its new destination</span>
00093 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>[i]= *pointLightSorts[i].PointLight;
00094 <span class="comment">// set the new index at the old position.</span>
00095 indexRemap[pointLightSorts[i].SrcId]= i;
00096 }
00097
00098 <span class="comment">// Regroup.</span>
00099 <span class="comment">// ---------</span>
00100 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.clear();
00101 <span class="keywordflow">if</span>(<a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>.size() > 0 )
00102 {
00103 <span class="keywordtype">bool</span> first= <span class="keyword">true</span>;
00104 string precName;
00105 <a class="code" href="a04558.html#a15">uint</a> precGroup;
00106 <span class="comment">// for all sorted pointLights</span>
00107 <a class="code" href="a04558.html#a15">uint</a> i;
00108 <span class="keywordflow">for</span>(i=0;i<<a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>.size();i++)
00109 {
00110 <span class="keyword">const</span> std::string &curName = <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>[i].AnimatedLight;
00111 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> curGroup = _PointLights[i].LightGroup;
00112 <span class="keywordflow">if</span> ( first || (precName!=curName) || (precGroup != curGroup) )
00113 {
00114 <span class="comment">// End last group</span>
00115 <span class="keywordflow">if</span>(first)
00116 first= <span class="keyword">false</span>;
00117 <span class="keywordflow">else</span>
00118 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.back ().EndId= i;
00119
00120 <span class="comment">// Start new group</span>
00121 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.push_back (CPointLightGroup ());
00122 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.back ().StartId= i;
00123 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.back ().AnimationLight = curName;
00124 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.back ().LightGroup = curGroup;
00125 precName = curName;
00126 precGroup = curGroup;
00127 }
00128 }
00129 <span class="comment">// End last group.</span>
00130 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.back ().EndId= i;
00131 }
00132 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya1" doxytag="NL3D::CPointLightNamedArray::clear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void NL3D::CPointLightNamedArray::clear </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
clear All: pointLights and map.
<p>
<p>
Definition at line <a class="el" href="a06186.html#l00063">63</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
References <a class="el" href="a06187.html#l00127">_PointLightGroupMap</a>, and <a class="el" href="a06187.html#l00084">_PointLights</a>.
<p>
Referenced by <a class="el" href="a06350.html#l00379">NL3D::CInstanceGroup::serial()</a>.
<p>
<div class="fragment"><pre>00064 {
00065 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>.clear();
00066 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.clear();
00067 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya3" doxytag="NL3D::CPointLightNamedArray::getPointLights" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03094.html">CPointLightNamed</a>>& NL3D::CPointLightNamedArray::getPointLights </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
get the pointLights sorted (mutable version). Be sure what you do!
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00066">66</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>.
<p>
References <a class="el" href="a06187.html#l00084">_PointLights</a>.
<p>
<div class="fragment"><pre>00066 {<span class="keywordflow">return</span> <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>;}
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya4" doxytag="NL3D::CPointLightNamedArray::getPointLights" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const std::vector<<a class="el" href="a03094.html">CPointLightNamed</a>>& NL3D::CPointLightNamedArray::getPointLights </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
get the pointLights sorted (const version).
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00063">63</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>.
<p>
References <a class="el" href="a06187.html#l00084">_PointLights</a>.
<p>
Referenced by <a class="el" href="a06350.html#l00571">NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded()</a>, <a class="el" href="a06157.html#l01543">NL3D::CPatch::appendTileLightInfluences()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06350.html#l01165">NL3D::CInstanceGroup::buildPointLightList()</a>, <a class="el" href="a06157.html#l01655">NL3D::CPatch::getCurrentTileTLIColors()</a>, <a class="el" href="a06351.html#l00341">NL3D::CInstanceGroup::getNumPointLights()</a>, <a class="el" href="a06351.html#l00338">NL3D::CInstanceGroup::getPointLightList()</a>, <a class="el" href="a06351.html#l00344">NL3D::CInstanceGroup::getPointLightNamed()</a>, <a class="el" href="a06350.html#l00935">NL3D::CInstanceGroup::removeFromScene()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.
<p>
<div class="fragment"><pre>00063 {<span class="keywordflow">return</span> <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>;}
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya5" doxytag="NL3D::CPointLightNamedArray::initAnimatedLightIndex" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void NL3D::CPointLightNamedArray::initAnimatedLightIndex </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="a03348.html">CScene</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>scene</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06186.html#l00183">183</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
References <a class="el" href="a06187.html#l00127">_PointLightGroupMap</a>, <a class="el" href="a06187.html#l00089">NL3D::CPointLightNamedArray::CPointLightGroup::AnimationLight</a>, <a class="el" href="a06187.html#l00090">NL3D::CPointLightNamedArray::CPointLightGroup::AnimationLightIndex</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06348.html#l01101">NL3D::CScene::getAnimatedLightNameToIndex()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06350.html#l00503">NL3D::CInstanceGroup::addToScene()</a>, <a class="el" href="a06350.html#l00766">NL3D::CInstanceGroup::addToSceneAsync()</a>, and <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>.
<p>
<div class="fragment"><pre>00184 {
00185 <span class="comment">// Search in the map.</span>
00186 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.size ();
00187 <a class="code" href="a04558.html#a15">uint</a> i;
00188 <span class="keywordflow">for</span> (i=0; i<<a class="code" href="a04223.html#a577">count</a>; i++)
00189 {
00190 <span class="comment">// Ref</span>
00191 CPointLightGroup &lightGroup = <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>[i];
00192 lightGroup.AnimationLightIndex = scene.getAnimatedLightNameToIndex (lightGroup.AnimationLight);
00193 }
00194 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya6" doxytag="NL3D::CPointLightNamedArray::serial" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void NL3D::CPointLightNamedArray::serial </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>f</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a06186.html#l00164">164</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
References <a class="el" href="a06187.html#l00127">_PointLightGroupMap</a>, <a class="el" href="a06187.html#l00084">_PointLights</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
<p>
<div class="fragment"><pre>00165 {
00166 <a class="code" href="a04558.html#a14">sint</a> ver = f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(1);
00167
00168 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_PointLights);
00169
00170 <span class="keywordflow">if</span> (ver == 0)
00171 {
00172 std::map<string, CPointLightGroupV0> oldMap;
00173 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(oldMap);
00174 }
00175 <span class="keywordflow">else</span>
00176 {
00177 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_PointLightGroupMap);
00178 }
00179 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArraya7" doxytag="NL3D::CPointLightNamedArray::setPointLightFactor" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void NL3D::CPointLightNamedArray::setPointLightFactor </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="a03348.html">CScene</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>scene</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
update the Light factor for all pointLights (animated and unanimated one)
<p>
<p>
Definition at line <a class="el" href="a06186.html#l00135">135</a> of file <a class="el" href="a06186.html">point_light_named_array.cpp</a>.
<p>
References <a class="el" href="a06187.html#l00127">_PointLightGroupMap</a>, <a class="el" href="a06187.html#l00084">_PointLights</a>, <a class="el" href="a06187.html#l00090">NL3D::CPointLightNamedArray::CPointLightGroup::AnimationLightIndex</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06187.html#l00093">NL3D::CPointLightNamedArray::CPointLightGroup::EndId</a>, <a class="el" href="a06349.html#l00418">NL3D::CScene::getAnimatedLightFactor()</a>, <a class="el" href="a06349.html#l00410">NL3D::CScene::getLightmapGroupColor()</a>, <a class="el" href="a06187.html#l00091">NL3D::CPointLightNamedArray::CPointLightGroup::LightGroup</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06187.html#l00092">NL3D::CPointLightNamedArray::CPointLightGroup::StartId</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, and <a class="el" href="a06350.html#l01205">NL3D::CInstanceGroup::setPointLightFactor()</a>.
<p>
<div class="fragment"><pre>00136 {
00137 <span class="comment">// Search in the map.</span>
00138 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>.size ();
00139 <a class="code" href="a04558.html#a15">uint</a> i;
00140 <span class="keywordflow">for</span> (i=0; i<<a class="code" href="a04223.html#a577">count</a>; i++)
00141 {
00142 <span class="comment">// Ref</span>
00143 CPointLightGroup &lightGroup = <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">_PointLightGroupMap</a>[i];
00144
00145 <span class="comment">// Get the factor</span>
00146 <a class="code" href="a03337.html">CRGBA</a> factorAnimated= scene.getAnimatedLightFactor (lightGroup.AnimationLightIndex, lightGroup.LightGroup);
00147 <a class="code" href="a03337.html">CRGBA</a> factorNotAnimated= scene.getLightmapGroupColor (lightGroup.LightGroup);;
00148
00149 <span class="comment">// Found the group. what entries in the array?</span>
00150 <a class="code" href="a04558.html#a15">uint</a> startId= lightGroup.StartId;
00151 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> endId= lightGroup.EndId;
00152 <a class="code" href="a04199.html#a6">nlassert</a>(endId<=<a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>.size());
00153
00154 <span class="comment">// for all entries, setLightFactor</span>
00155 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=startId;i<endId;i++)
00156 {
00157 <a class="code" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">_PointLights</a>[i].setLightFactor (factorAnimated, factorNotAnimated);
00158 }
00159 }
00160 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CPointLightNamedArrayr0" doxytag="NL3D::CPointLightNamedArray::_PointLightGroupMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayy0">TPLGVec</a> <a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayr0">NL3D::CPointLightNamedArray::_PointLightGroupMap</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Info for LightGroupName and setPointLightFactor.
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00127">127</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>.
<p>
Referenced by <a class="el" href="a06186.html#l00071">build()</a>, <a class="el" href="a06186.html#l00063">clear()</a>, <a class="el" href="a06186.html#l00183">initAnimatedLightIndex()</a>, <a class="el" href="a06186.html#l00164">serial()</a>, and <a class="el" href="a06186.html#l00135">setPointLightFactor()</a>. </td>
</tr>
</table>
<a class="anchor" name="NL3D_1_1CPointLightNamedArrayr1" doxytag="NL3D::CPointLightNamedArray::_PointLights" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03094.html">CPointLightNamed</a>> <a class="el" href="a03095.html#NL3D_1_1CPointLightNamedArrayr1">NL3D::CPointLightNamedArray::_PointLights</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
List of pointLight.
<p>
<p>
Definition at line <a class="el" href="a06187.html#l00084">84</a> of file <a class="el" href="a06187.html">point_light_named_array.h</a>.
<p>
Referenced by <a class="el" href="a06186.html#l00071">build()</a>, <a class="el" href="a06186.html#l00063">clear()</a>, <a class="el" href="a06187.html#l00063">getPointLights()</a>, <a class="el" href="a06186.html#l00164">serial()</a>, and <a class="el" href="a06186.html#l00135">setPointLightFactor()</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06187.html">point_light_named_array.h</a><li><a class="el" href="a06186.html">point_light_named_array.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:02:33 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>
|