aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/instance__group__user_8cpp-source.html
blob: ac1f6af23b4654bf1a7a66661b8589b3cc2c5eec (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
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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
	<TITLE>nevrax.org : docs</TITLE>
	<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">

<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0>
 <TR>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>

<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 height=100%>
 <TR>
	<TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

		<!------ Begin Box ------>
		<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0  cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
		<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td  colspan=2 bgcolor=#FFFFFF>
		<TABLE cellspacing=0 cellpadding=1 border=0>
			<tr><td ALIGN=middle><a  class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- block -->
<TABLE  bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>instance_group_user.cpp</h1><a href="instance__group__user_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#include "<a class="code" href="std3d_8h.html">std3d.h</a>"</font>
00027 
00028 <font class="preprocessor">#include "<a class="code" href="instance__user_8h.html">3d/instance_user.h</a>"</font>
00029 <font class="preprocessor">#include "<a class="code" href="debug_8h.html">nel/misc/debug.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="instance__group__user_8h.html">3d/instance_group_user.h</a>"</font>
00031 <font class="preprocessor">#include "<a class="code" href="scene__user_8h.html">3d/scene_user.h</a>"</font>
00032 <font class="preprocessor">#include "<a class="code" href="mesh__multi__lod__instance_8h.html">3d/mesh_multi_lod_instance.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="path_8h.html">nel/misc/path.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="file_8h.html">nel/misc/file.h</a>"</font>
00035 
00036 <font class="keyword">using</font> <font class="keyword">namespace </font>NLMISC;
00037 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00038 
00039 <font class="keyword">namespace </font>NL3D 
00040 {
00041 
00042 <font class="comment">// ***************************************************************************</font>
00043 
<a name="l00044"></a><a class="code" href="classNL3D_1_1UInstanceGroup.html#d0">00044</a> UInstanceGroup  *UInstanceGroup::createInstanceGroup (<font class="keyword">const</font> std::string &amp;instanceGroup)
00045 {
00046         NL3D_MEM_IG
00047         <font class="comment">// Create the instance group</font>
00048         CInstanceGroupUser *user=<font class="keyword">new</font> CInstanceGroupUser;
00049 
00050         <font class="comment">// Init the class</font>
00051         <font class="keywordflow">if</font> (!user-&gt;init (instanceGroup))
00052         {
00053                 <font class="comment">// Prb, erase it</font>
00054                 <font class="keyword">delete</font> user;
00055 
00056                 <font class="comment">// Return error code</font>
00057                 <font class="keywordflow">return</font> NULL;
00058         }
00059 
00060         <font class="comment">// return the good value</font>
00061         <font class="keywordflow">return</font> user;
00062 }
00063 
00064 <font class="comment">// ***************************************************************************</font>
00065 
<a name="l00066"></a><a class="code" href="classNL3D_1_1UInstanceGroup.html#d1">00066</a> <font class="keywordtype">void</font> UInstanceGroup::createInstanceGroupAsync (<font class="keyword">const</font> std::string &amp;instanceGroup, UInstanceGroup **pIG)
00067 {
00068         NL3D_MEM_IG
00069         CAsyncFileManager3D::getInstance().loadIGUser (instanceGroup, pIG);
00070 }
00071 
00072 <font class="comment">// ***************************************************************************</font>
00073 
<a name="l00074"></a><a class="code" href="classNL3D_1_1UInstanceGroup.html#d2">00074</a> <font class="keywordtype">void</font> UInstanceGroup::stopCreateInstanceGroupAsync (UInstanceGroup **ppIG)
00075 {
00076         NL3D_MEM_IG
00077         <font class="comment">// Theorically should stop the async file manager but the async file manager can only be stopped</font>
00078         <font class="comment">// between tasks (a file reading) so that is no sense to do anything here</font>
00079         <font class="keywordflow">while</font> (*ppIG == NULL)
00080         {
00081                 <a class="code" href="namespaceNLMISC.html#a236">nlSleep</a> (2);
00082         }
00083         <font class="keywordflow">if</font> (*ppIG != (UInstanceGroup*)-1)
00084         {
00085                 <font class="keyword">delete</font> *ppIG;
00086         }
00087 }
00088 
00089 <font class="comment">// ***************************************************************************</font>
<a name="l00090"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#a0">00090</a> CInstanceGroupUser::CInstanceGroupUser()
00091 {
00092         NL3D_MEM_IG
00093         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o2">_AddToSceneState</a> = <a class="code" href="classNL3D_1_1UInstanceGroup.html#s3s0">StateNotAdded</a>;
00094 }
00095 
00096 <font class="comment">// ***************************************************************************</font>
<a name="l00097"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#a1">00097</a> <font class="keywordtype">bool</font> CInstanceGroupUser::init (<font class="keyword">const</font> std::string &amp;instanceGroup)
00098 {
00099         NL3D_MEM_IG
00100         <font class="comment">// Create a file</font>
00101         CIFile <a class="code" href="cf__lexical_8cpp.html#a95">file</a>;
00102         std::string path = CPath::lookup (instanceGroup, <font class="keyword">false</font>);
00103         <font class="keywordflow">if</font> (!path.empty() &amp;&amp; <a class="code" href="cf__lexical_8cpp.html#a95">file</a>.open (path))
00104         {
00105                 <font class="comment">// Serialize this class</font>
00106                 <font class="keywordflow">try</font>
00107                 {
00108                         <font class="comment">// Read the class</font>
00109                         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.serial (<a class="code" href="cf__lexical_8cpp.html#a95">file</a>);
00110                 }
00111                 <font class="keywordflow">catch</font> (EStream&amp; e)
00112                 {
00113                         <font class="comment">// Avoid visual warning</font>
00114                         EStream ee=e;
00115 
00116                         <font class="comment">// Serial problem</font>
00117                         <font class="keywordflow">return</font> <font class="keyword">false</font>;
00118                 }
00119         }
00120         <font class="keywordflow">else</font>
00121         {
00122                 <font class="comment">// Failed.</font>
00123                 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00124         }
00125 
00126         <font class="comment">// Ok</font>
00127         <font class="keywordflow">return</font> <font class="keyword">true</font>;
00128 }
00129 
00130 <font class="comment">// ***************************************************************************</font>
<a name="l00131"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c0">00131</a> <font class="keywordtype">void</font> CInstanceGroupUser::setTransformNameCallback (ITransformName *pTN)
00132 {
00133         NL3D_MEM_IG
00134         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setTransformNameCallback (pTN);
00135 }
00136 
00137 
00138 <font class="comment">// ***************************************************************************</font>
<a name="l00139"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c1">00139</a> <font class="keywordtype">void</font> CInstanceGroupUser::setAddRemoveInstanceCallback(IAddRemoveInstance *callback)
00140 {
00141         NL3D_MEM_IG
00142         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setAddRemoveInstanceCallback(callback);
00143 }
00144 
00145 
00146 <font class="comment">// ***************************************************************************</font>
<a name="l00147"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c2">00147</a> <font class="keywordtype">void</font> CInstanceGroupUser::setIGAddBeginCallback(IIGAddBegin *callback)
00148 {
00149         NL3D_MEM_IG
00150         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setIGAddBeginCallback(callback);
00151 }
00152 
00153 
00154 
00155 <font class="comment">// ***************************************************************************</font>
<a name="l00156"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c3">00156</a> <font class="keywordtype">void</font> CInstanceGroupUser::addToScene (<font class="keyword">class</font> UScene&amp; scene, UDriver *driver)
00157 {
00158         NL3D_MEM_IG
00159         <font class="comment">// Get driver pointer</font>
00160         IDriver *cDriver= driver ? NLMISC::safe_cast&lt;CDriverUser*&gt;(driver)-&gt;getDriver() : NULL;
00161 
00162         <font class="comment">// Add to the scene</font>
00163         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c3">addToScene</a> (((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#l1">CSceneUser</a>*)&amp;scene)-&gt;getScene(), cDriver);
00164 }
00165 
00166 <font class="comment">// ***************************************************************************</font>
<a name="l00167"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c16">00167</a> <font class="keywordtype">void</font> CInstanceGroupUser::getInstanceMatrix(uint instanceNb,<a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a> &amp;dest)<font class="keyword"> const</font>
00168 <font class="keyword"></font>{
00169         NL3D_MEM_IG
00170         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceMatrix(instanceNb, dest);     
00171 }
00172 
00173 
00174 <font class="comment">// ***************************************************************************</font>
<a name="l00175"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c4">00175</a> <font class="keywordtype">void</font> CInstanceGroupUser::addToScene (<font class="keyword">class</font> CScene&amp; scene, IDriver *driver)
00176 {
00177         NL3D_MEM_IG
00178         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.addToScene (scene, driver);
00179         <font class="comment">// Fill in the map accelerating search of instance by names</font>
00180         <font class="keywordflow">for</font>( uint32 i = 0; i &lt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances.size(); ++i)
00181         {
00182                 CInstanceUser *pIU = NULL;
00183                 string stmp;
00184                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[i] != NULL)
00185                 {
00186                         pIU = <font class="keyword">new</font> CInstanceUser (&amp;scene, <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[i]);
00187                         stmp = <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceName (i);
00188                         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.insert (map&lt;string,CInstanceUser*&gt;::value_type(stmp, pIU));
00189                 }
00190         }
00191 }
00192 
00193 <font class="comment">// ***************************************************************************</font>
<a name="l00194"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c5">00194</a> <font class="keywordtype">void</font> CInstanceGroupUser::addToSceneAsync (<font class="keyword">class</font> UScene&amp; scene, UDriver *driver)
00195 {
00196         NL3D_MEM_IG
00197         IDriver *cDriver= driver ? NLMISC::safe_cast&lt;CDriverUser*&gt;(driver)-&gt;getDriver() : NULL;
00198         <font class="comment">// Add to the scene</font>
00199         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.addToSceneAsync (((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#l1">CSceneUser</a>*)&amp;scene)-&gt;getScene(), cDriver);
00200         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o2">_AddToSceneState</a> = <a class="code" href="classNL3D_1_1UInstanceGroup.html#s3s1">StateAdding</a>;
00201         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o3">_AddToSceneTempScene</a> = &amp;scene;
00202         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o4">_AddToSceneTempDriver</a> = driver;
00203 }
00204 
00205 <font class="comment">// ***************************************************************************</font>
<a name="l00206"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c7">00206</a> <font class="keywordtype">void</font> CInstanceGroupUser::stopAddToSceneAsync ()
00207 {
00208         NL3D_MEM_IG
00209         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.stopAddToSceneAsync ();
00210 }
00211 
00212 <font class="comment">// ***************************************************************************</font>
<a name="l00213"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c6">00213</a> UInstanceGroup::TState CInstanceGroupUser::getAddToSceneState ()
00214 {
00215         NL3D_MEM_IG
00216         UInstanceGroup::TState newState = (UInstanceGroup::TState)<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getAddToSceneState ();
00217         <font class="keywordflow">if</font> ((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o2">_AddToSceneState</a> == <a class="code" href="classNL3D_1_1UInstanceGroup.html#s3s1">StateAdding</a>) &amp;&amp; (newState == <a class="code" href="classNL3D_1_1UInstanceGroup.html#s3s2">StateAdded</a>))
00218         {
00219                 <font class="comment">// Fill in the map accelerating search of instance by names</font>
00220                 <font class="keywordflow">for</font>( uint32 i = 0; i &lt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances.size(); ++i)
00221                 {
00222                         CInstanceUser *pIU = NULL;
00223                         string stmp;
00224                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[i] != NULL)
00225                         {
00226                                 pIU = <font class="keyword">new</font> CInstanceUser (&amp;((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#l1">CSceneUser</a>*)<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o3">_AddToSceneTempScene</a>)-&gt;getScene(), <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[i]);
00227                                 stmp = <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceName (i);
00228                                 <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.insert (map&lt;string,CInstanceUser*&gt;::value_type(stmp, pIU));
00229                         }
00230                 }
00231                 <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o2">_AddToSceneState</a> = <a class="code" href="classNL3D_1_1UInstanceGroup.html#s3s2">StateAdded</a>;
00232         }
00233         <font class="keywordflow">return</font> newState;
00234 }
00235 
00236 <font class="comment">// ***************************************************************************</font>
<a name="l00237"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c12">00237</a> <font class="keywordtype">void</font> CInstanceGroupUser::removeFromScene (<font class="keyword">class</font> UScene&amp; scene)
00238 {
00239         NL3D_MEM_IG
00240         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.removeFromScene (((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#l1">CSceneUser</a>*)&amp;scene)-&gt;getScene());
00241         <font class="comment">// Remove all instance in the map</font>
00242         map&lt;string,CInstanceUser*&gt;::iterator it = <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.begin();
00243         <font class="keywordflow">while</font> (it != <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.end())
00244         {
00245                 map&lt;string,CInstanceUser*&gt;::iterator itDel = it;
00246                 ++it;
00247                 <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.erase (itDel);
00248         }
00249 }
00250 
00251 <font class="comment">// ***************************************************************************</font>
<a name="l00252"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c13">00252</a> uint CInstanceGroupUser::getNumInstance ()<font class="keyword"> const</font>
00253 <font class="keyword"></font>{
00254         NL3D_MEM_IG
00255         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ();
00256 }
00257 
00258 <font class="comment">// ***************************************************************************</font>
00259 
<a name="l00260"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c14">00260</a> <font class="keyword">const</font> std::string&amp; CInstanceGroupUser::getShapeName (uint instanceNb)<font class="keyword"> const</font>
00261 <font class="keyword"></font>{
00262         NL3D_MEM_IG
00263         <font class="comment">// Check args</font>
00264         <font class="keywordflow">if</font> (instanceNb&gt;=<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ())
00265                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"getShapeName*(): bad instance Id"</font>);
00266         
00267         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getShapeName (instanceNb);
00268 }
00269 
00270 <font class="comment">// ***************************************************************************</font>
<a name="l00271"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c15">00271</a> <font class="keyword">const</font> std::string&amp; CInstanceGroupUser::getInstanceName (uint instanceNb)<font class="keyword"> const</font>
00272 <font class="keyword"></font>{
00273         NL3D_MEM_IG
00274         <font class="comment">// Check args</font>
00275         <font class="keywordflow">if</font> (instanceNb&gt;=<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ())
00276                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"getInstanceName*(): bad instance Id"</font>);
00277         
00278         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceName (instanceNb);
00279 }
00280 
00281 <font class="comment">// ***************************************************************************</font>
<a name="l00282"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c17">00282</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>&amp; CInstanceGroupUser::getInstancePos (uint instanceNb)<font class="keyword"> const</font>
00283 <font class="keyword"></font>{
00284         NL3D_MEM_IG
00285         <font class="comment">// Check args</font>
00286         <font class="keywordflow">if</font> (instanceNb&gt;=<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ())
00287                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"getInstancePos*(): bad instance Id"</font>);
00288         
00289         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstancePos (instanceNb);
00290 }
00291 
00292 <font class="comment">// ***************************************************************************</font>
<a name="l00293"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c18">00293</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuat.html">NLMISC::CQuat</a>&amp; CInstanceGroupUser::getInstanceRot (uint instanceNb)<font class="keyword"> const</font>
00294 <font class="keyword"></font>{
00295         NL3D_MEM_IG
00296         <font class="comment">// Check args</font>
00297         <font class="keywordflow">if</font> (instanceNb&gt;=<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ())
00298                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"getInstanceRot*(): bad instance Id"</font>);
00299         
00300         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceRot (instanceNb);
00301 }
00302 
00303 <font class="comment">// ***************************************************************************</font>
<a name="l00304"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c19">00304</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>&amp; CInstanceGroupUser::getInstanceScale (uint instanceNb)<font class="keyword"> const</font>
00305 <font class="keyword"></font>{
00306         NL3D_MEM_IG
00307         <font class="comment">// Check args</font>
00308         <font class="keywordflow">if</font> (instanceNb&gt;=<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance ())
00309                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"getInstanceScale*(): bad instance Id"</font>);
00310         
00311         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getInstanceScale (instanceNb);
00312 }
00313 
00314 
00315 
00316 <font class="comment">// ***************************************************************************</font>
<a name="l00317"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c20">00317</a> UInstance *CInstanceGroupUser::getByName (std::string &amp;name)
00318 {
00319         NL3D_MEM_IG
00320         map&lt;string,CInstanceUser*&gt;::iterator it = <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.find (name);
00321         <font class="keywordflow">if</font> (it != <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.end())
00322                 <font class="keywordflow">return</font> it-&gt;second;
00323         <font class="keywordflow">else</font>
00324                 <font class="keywordflow">return</font> NULL;
00325 }
00326 
00327 <font class="comment">// ***************************************************************************</font>
00328 
<a name="l00329"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c21">00329</a> <font class="keyword">const</font> UInstance *CInstanceGroupUser::getByName (std::string &amp;name)<font class="keyword"> const</font>
00330 <font class="keyword"></font>{
00331         NL3D_MEM_IG
00332         map&lt;string,CInstanceUser*&gt;::const_iterator it = <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.find (name);
00333         <font class="keywordflow">if</font> (it != <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o1">_Instances</a>.end())
00334                 <font class="keywordflow">return</font> it-&gt;second;
00335         <font class="keywordflow">else</font>
00336                 <font class="keywordflow">return</font> NULL;
00337 }
00338 
00339 <font class="comment">// ***************************************************************************</font>
00340 
<a name="l00341"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c22">00341</a> <font class="keywordtype">void</font> CInstanceGroupUser::setLightFactor (<font class="keyword">const</font> std::string &amp;LightName, CRGBA nFactor)
00342 {
00343         NL3D_MEM_IG
00344         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setLightFactor (LightName, nFactor);
00345 }
00346 
00347 <font class="comment">// ***************************************************************************</font>
<a name="l00348"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c23">00348</a> <font class="keywordtype">void</font> CInstanceGroupUser::setBlendShapeFactor (<font class="keyword">const</font> std::string &amp;bsName, <font class="keywordtype">float</font> rFactor)
00349 {
00350         NL3D_MEM_IG
00351         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setBlendShapeFactor (bsName, rFactor);
00352 }
00353 
00354 <font class="comment">// ***************************************************************************</font>
00355 
<a name="l00356"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c24">00356</a> <font class="keywordtype">void</font> CInstanceGroupUser::createRoot (UScene &amp;scene)
00357 {
00358         NL3D_MEM_IG
00359         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.createRoot (((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#l1">CSceneUser</a>*)&amp;scene)-&gt;getScene());
00360 }
00361 
00362 <font class="comment">// ***************************************************************************</font>
<a name="l00363"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c25">00363</a> <font class="keywordtype">void</font> CInstanceGroupUser::setClusterSystem (UInstanceGroup *pClusterSystem)
00364 {
00365         NL3D_MEM_IG
00366         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setClusterSystem (&amp;((<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#a0">CInstanceGroupUser</a>*)pClusterSystem)-&gt;<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>);
00367 }
00368 
00369 <font class="comment">// ***************************************************************************</font>
<a name="l00370"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c26">00370</a> <font class="keywordtype">bool</font> CInstanceGroupUser::linkToParentCluster(UInstanceGroup *father)
00371 {
00372         NL3D_MEM_IG
00373         <font class="keywordflow">if</font> (father)
00374                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.linkToParent(&amp;(NLMISC::safe_cast&lt;CInstanceGroupUser *&gt;(father)-&gt;_InstanceGroup));
00375         <font class="keywordflow">else</font>
00376         {
00377                 <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"Trying to link a cluster system to a NULL parent cluster"</font>);
00378                 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00379         }
00380 }
00381 
00382 <font class="comment">// ***************************************************************************</font>
<a name="l00383"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c27">00383</a> <font class="keywordtype">void</font> CInstanceGroupUser::getDynamicPortals (std::vector&lt;std::string&gt; &amp;names)
00384 {
00385         NL3D_MEM_IG
00386         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getDynamicPortals (names);
00387 }
00388 
00389 <font class="comment">// ***************************************************************************</font>
<a name="l00390"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c28">00390</a> <font class="keywordtype">void</font> CInstanceGroupUser::setDynamicPortal (std::string&amp; name, <font class="keywordtype">bool</font> opened)
00391 {
00392         NL3D_MEM_IG
00393         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setDynamicPortal (name, opened);
00394 }
00395 
00396 <font class="comment">// ***************************************************************************</font>
<a name="l00397"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c29">00397</a> <font class="keywordtype">bool</font> CInstanceGroupUser::getDynamicPortal (std::string&amp; name)
00398 {
00399         NL3D_MEM_IG
00400         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getDynamicPortal (name);
00401 }
00402 
00403 <font class="comment">// ***************************************************************************</font>
<a name="l00404"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c30">00404</a> <font class="keywordtype">void</font> CInstanceGroupUser::setPos (<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &amp;pos)
00405 {
00406         NL3D_MEM_IG
00407         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setPos (pos);
00408 }
00409 
00410 <font class="comment">// ***************************************************************************</font>
<a name="l00411"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c31">00411</a> <font class="keywordtype">void</font> CInstanceGroupUser::setRotQuat (<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuat.html">NLMISC::CQuat</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>)
00412 {
00413         NL3D_MEM_IG
00414         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setRotQuat (q);
00415 }
00416 
00417 <font class="comment">// ***************************************************************************</font>
<a name="l00418"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c34">00418</a> CVector CInstanceGroupUser::getPos ()
00419 {
00420         NL3D_MEM_IG
00421         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getPos ();
00422 }
00423 
00424 <font class="comment">// ***************************************************************************</font>
<a name="l00425"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c35">00425</a> CQuat CInstanceGroupUser::getRotQuat ()
00426 {
00427         NL3D_MEM_IG
00428         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getRotQuat();
00429 }
00430 
00431 
00432 <font class="comment">// ***************************************************************************</font>
<a name="l00433"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c36">00433</a> <font class="keywordtype">void</font>                    CInstanceGroupUser::freezeHRC()
00434 {
00435         NL3D_MEM_IG
00436         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.freezeHRC();
00437 }
00438 
00439 <font class="comment">// ***************************************************************************</font>
<a name="l00440"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c37">00440</a> <font class="keywordtype">void</font>                    CInstanceGroupUser::unfreezeHRC()
00441 {
00442         NL3D_MEM_IG
00443         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.unfreezeHRC();
00444 }
00445 
00446 
00447 <font class="comment">// ***************************************************************************</font>
<a name="l00448"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c32">00448</a> <font class="keywordtype">void</font>                    CInstanceGroupUser::setPointLightFactor(<font class="keyword">const</font> std::string &amp;lightGroupName, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> nFactor)
00449 {
00450         NL3D_MEM_IG
00451         <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.setPointLightFactor(lightGroupName, nFactor);
00452 }
00453 
00454 <font class="comment">// ***************************************************************************</font>
<a name="l00455"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c33">00455</a> <font class="keywordtype">bool</font>                    CInstanceGroupUser::getStaticLightSetup(
00456                 <font class="keyword">const</font> std::string &amp;retrieverIdentifier, sint surfaceId, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &amp;localPos, 
00457                 std::vector&lt;CPointLightInfluence&gt; &amp;pointLightList, uint8 &amp;sunContribution, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &amp;localAmbient)
00458 {
00459         NL3D_MEM_IG
00460         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getStaticLightSetup(retrieverIdentifier, surfaceId, localPos, pointLightList, 
00461                 sunContribution, localAmbient);
00462 }
00463 
00464 <font class="comment">// ***************************************************************************</font>
<a name="l00465"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c8">00465</a> <font class="comment">/*virtual*/</font> <font class="keywordtype">void</font> CInstanceGroupUser::setDistMax(uint instance, <font class="keywordtype">float</font> dist)
00466 {
00467         <font class="keywordflow">if</font> (instance &gt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance())
00468         {
00469                 <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"CInstanceGroupUser::setDistMax : instance index %d is invalid"</font>, instance);
00470                 <font class="keywordflow">return</font>;
00471         }
00472         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]) <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]-&gt;setDistMax(dist); 
00473 }
00474 
00475 <font class="comment">// ***************************************************************************</font>
<a name="l00476"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c9">00476</a> <font class="comment">/*virtual*/</font> <font class="keywordtype">float</font> CInstanceGroupUser::getDistMax(uint instance)<font class="keyword"> const</font>
00477 <font class="keyword"></font>{
00478         <font class="keywordflow">if</font> (instance &gt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance())
00479         {
00480                 <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"CInstanceGroupUser::getDistMax : instance index %d is invalid"</font>, instance);
00481                 <font class="keywordflow">return</font> -1.f;
00482         }
00483         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]) <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]-&gt;getDistMax();
00484         <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1.f;
00485 }
00486 
00487 <font class="comment">// ***************************************************************************</font>
<a name="l00488"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c10">00488</a> <font class="comment">/*virtual*/</font> <font class="keywordtype">void</font> CInstanceGroupUser::setCoarseMeshDist(uint instance, <font class="keywordtype">float</font> dist)
00489 {
00490         <font class="keywordflow">if</font> (instance &gt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance())
00491         {
00492                 <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"CInstanceGroupUser::setCoarseMeshDist : instance index %d is invalid"</font>, instance);
00493                 <font class="keywordflow">return</font>;
00494         }
00495         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]) 
00496         {       
00497                 CMeshMultiLodInstance *mmli = dynamic_cast&lt;CMeshMultiLodInstance *&gt;(<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]);
00498                 <font class="keywordflow">if</font> (mmli) mmli-&gt;setCoarseMeshDist(dist);
00499         }
00500 }
00501 
00502 <font class="comment">// ***************************************************************************</font>
<a name="l00503"></a><a class="code" href="classNL3D_1_1CInstanceGroupUser.html#c11">00503</a> <font class="comment">/*virtual*/</font> <font class="keywordtype">float</font> CInstanceGroupUser::getCoarseMeshDist(uint instance)<font class="keyword"> const</font>
00504 <font class="keyword"></font>{
00505         <font class="keywordflow">if</font> (instance &gt; <a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>.getNumInstance())
00506         {
00507                 <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"getCoarseMeshDist::getDistMax : instance index %d is invalid"</font>, instance);
00508                 <font class="keywordflow">return</font> -1.f;
00509         }
00510         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]) 
00511         {
00512                 CMeshMultiLodInstance *mmli = dynamic_cast&lt;CMeshMultiLodInstance *&gt;(<a class="code" href="classNL3D_1_1CInstanceGroupUser.html#o0">_InstanceGroup</a>._Instances[instance]);
00513                 <font class="keywordflow">if</font> (mmli) <font class="keywordflow">return</font> mmli-&gt;getCoarseMeshDist();
00514                 <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1.f;
00515         }               
00516         <font class="keywordflow">else</font> <font class="keywordflow">return</font> -1.f;
00517 }
00518 
00519 
00520 } <font class="comment">// NL3D</font>
</pre></div>

<!-- footer -->
<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>