aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/scene__user_8cpp-source.html
blob: 2e23784c1c895ffc958274c3db5a9f075ca39158 (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
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
<!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=http://www.nevrax.com><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>scene_user.cpp</h1><a href="scene__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="scene__user_8h.html">3d/scene_user.h</a>"</font>
00029 <font class="preprocessor">#include "<a class="code" href="coarse__mesh__manager_8h.html">3d/coarse_mesh_manager.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="point__light__user_8h.html">3d/point_light_user.h</a>"</font>
00031 <font class="preprocessor">#include "<a class="code" href="point__light__model_8h.html">3d/point_light_model.h</a>"</font>
00032 <font class="preprocessor">#include "<a class="code" href="lod__character__manager_8h.html">3d/lod_character_manager.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="lod__character__shape_8h.html">3d/lod_character_shape.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="lod__character__shape__bank_8h.html">3d/lod_character_shape_bank.h</a>"</font>
00035 <font class="preprocessor">#include "<a class="code" href="hierarchical__timer_8h.html">nel/misc/hierarchical_timer.h</a>"</font>
00036 <font class="preprocessor">#include "<a class="code" href="async__texture__manager_8h.html">3d/async_texture_manager.h</a>"</font>
00037 
00038 <font class="keyword">using</font> <font class="keyword">namespace </font>NLMISC;
00039 
00040 <font class="keyword">namespace </font>NL3D 
00041 {
00042 
00043 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_UI_Scene )
00044 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Misc_Scene_CreateDel_Element )
00045 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Load_AnimationSet )
00046 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_CreateOrLoad_Instance )
00047 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_CreateOrLoad_Skeleton )
00048 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Load_CLodOrCoarseMesh )
00049 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Load_AsyncIG )
00050 
<a name="l00051"></a><a class="code" href="scene__user_8cpp.html#a0">00051</a> <font class="preprocessor">#define NL3D_HAUTO_UI_SCENE                                             H_AUTO_USE( NL3D_UI_Scene )</font>
<a name="l00052"></a><a class="code" href="scene__user_8cpp.html#a1">00052</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_ELT_SCENE                                    H_AUTO_USE( NL3D_Misc_Scene_CreateDel_Element )</font>
<a name="l00053"></a><a class="code" href="scene__user_8cpp.html#a2">00053</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_LOAD_ANIMSET                                 H_AUTO_USE( NL3D_Load_AnimationSet )</font>
<a name="l00054"></a><a class="code" href="scene__user_8cpp.html#a3">00054</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_CREATE_INSTANCE                              H_AUTO_USE( NL3D_CreateOrLoad_Instance )</font>
<a name="l00055"></a><a class="code" href="scene__user_8cpp.html#a4">00055</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_CREATE_SKELETON                              H_AUTO_USE( NL3D_CreateOrLoad_Skeleton )</font>
<a name="l00056"></a><a class="code" href="scene__user_8cpp.html#a5">00056</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_LOAD_LOD                                             H_AUTO_USE( NL3D_Load_CLodOrCoarseMesh )</font>
<a name="l00057"></a><a class="code" href="scene__user_8cpp.html#a6">00057</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_ASYNC_IG                                             H_AUTO_USE( NL3D_Load_AsyncIG )</font>
00058 <font class="preprocessor"></font>
00059 <font class="comment">// Render/Animate.</font>
00060 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Render_Scene )
00061 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Render_Animate_Scene )
00062 
<a name="l00063"></a><a class="code" href="scene__user_8cpp.html#a7">00063</a> <font class="preprocessor">#define NL3D_HAUTO_RENDER_SCENE                                 H_AUTO_USE( NL3D_Render_Scene )</font>
<a name="l00064"></a><a class="code" href="scene__user_8cpp.html#a8">00064</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_RENDER_SCENE_ANIMATE                 H_AUTO_USE( NL3D_Render_Animate_Scene )</font>
00065 <font class="preprocessor"></font>
<a name="l00066"></a><a class="code" href="scene__user_8cpp.html#a9">00066</a> <font class="preprocessor">#define NL3D_MEM_LIGHT                                          NL_ALLOC_CONTEXT( 3dLight )</font>
<a name="l00067"></a><a class="code" href="scene__user_8cpp.html#a10">00067</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_IG                                                     NL_ALLOC_CONTEXT( 3dIg )</font>
<a name="l00068"></a><a class="code" href="scene__user_8cpp.html#a11">00068</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_LOD                                            NL_ALLOC_CONTEXT( 3dLod )</font>
<a name="l00069"></a><a class="code" href="scene__user_8cpp.html#a12">00069</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_SCENE_RENDER                           NL_ALLOC_CONTEXT( 3dScRdr )</font>
<a name="l00070"></a><a class="code" href="scene__user_8cpp.html#a13">00070</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_INSTANCE                                       NL_ALLOC_CONTEXT( 3dInst )</font>
<a name="l00071"></a><a class="code" href="scene__user_8cpp.html#a14">00071</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_LANDSCAPE                                      NL_ALLOC_CONTEXT( 3dLand )</font>
<a name="l00072"></a><a class="code" href="scene__user_8cpp.html#a15">00072</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_CLOUDS                                         NL_ALLOC_CONTEXT( 3dCloud )</font>
<a name="l00073"></a><a class="code" href="scene__user_8cpp.html#a16">00073</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_MEM_VISUAL_COLLISION                       NL_ALLOC_CONTEXT( 3dVsCol )</font>
00074 <font class="preprocessor"></font>
00075 <font class="comment">// ***************************************************************************</font>
<a name="l00076"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_0">00076</a> UAnimationSet                   *CSceneUser::createAnimationSet() 
00077 {
00078         NL_ALLOC_CONTEXT( 3dAnmSt )
00079         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00080 
00081         <font class="keywordflow">return</font> <font class="keyword">new</font> CAnimationSetUser();
00082 }
00083 <font class="comment">// ***************************************************************************</font>
<a name="l00084"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_1">00084</a> UAnimationSet                   *CSceneUser::createAnimationSet(<font class="keyword">const</font> std::string &amp;animationSetFile) 
00085 {
00086         NL_ALLOC_CONTEXT( 3dAnmSt )
00087         <a class="code" href="scene__user_8cpp.html#a2">NL3D_HAUTO_LOAD_ANIMSET</a>;
00088 
00089         <a class="code" href="classNLMISC_1_1CIFile.html">NLMISC::CIFile</a>  f;
00090         <font class="comment">// throw exception if not found.</font>
00091         std::string     path= CPath::lookup(animationSetFile);
00092         f.<a class="code" href="classNLMISC_1_1CIFile.html#a3">open</a>(path);
00093         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n8">_AnimationSets</a>.insert(<font class="keyword">new</font> CAnimationSetUser(f));
00094 }
00095 <font class="comment">// ***************************************************************************</font>
<a name="l00096"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_2">00096</a> <font class="keywordtype">void</font>                    CSceneUser::deleteAnimationSet(UAnimationSet    *animationSet) 
00097 {
00098         NL_ALLOC_CONTEXT( 3dAnmSt )
00099         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00100 
00101         <a class="code" href="classNL3D_1_1CSceneUser.html#n8">_AnimationSets</a>.erase((CAnimationSetUser*)animationSet, <font class="stringliteral">"deleteAnimationSet(): Bad AnimationSet ptr"</font>);
00102 }
00103 
00104 <font class="comment">// ***************************************************************************</font>
<a name="l00105"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_3">00105</a> <font class="keywordtype">void</font>                    CSceneUser::setAutomaticAnimationSet(UAnimationSet *as)
00106 {
00107         NL_ALLOC_CONTEXT( 3dAnmSt )
00108         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00109 
00110         <a class="code" href="debug_8h.html#a6">nlassert</a>(as);
00111         as-&gt;build();
00112         CAnimationSetUser *asu = NLMISC::safe_cast&lt;CAnimationSetUser *&gt;(as);
00113         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setAutomaticAnimationSet(asu-&gt;_AnimationSet);
00114 }
00115 
00116 <font class="comment">// ***************************************************************************</font>
<a name="l00117"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_4">00117</a> UPlayListManager                        *CSceneUser::createPlayListManager() 
00118 {
00119         NL_ALLOC_CONTEXT( 3dAnim )
00120         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00121 
00122         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n9">_PlayListManagers</a>.insert(<font class="keyword">new</font> CPlayListManagerUser());
00123 }
00124 <font class="comment">// ***************************************************************************</font>
<a name="l00125"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z778_5">00125</a> <font class="keywordtype">void</font>                    CSceneUser::deletePlayListManager(UPlayListManager      *playListManager) 
00126 {
00127         NL_ALLOC_CONTEXT( 3dAnim )
00128         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00129 
00130         <a class="code" href="classNL3D_1_1CSceneUser.html#n9">_PlayListManagers</a>.erase((CPlayListManagerUser*)playListManager, <font class="stringliteral">"deletePlayListManager(): Bad PlayListManager ptr"</font>);
00131 }
00132 
00133 <font class="comment">// ***************************************************************************</font>
00134 
<a name="l00135"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_0">00135</a> <font class="keywordtype">void</font>                    CSceneUser::setPolygonBalancingMode(CSceneUser::TPolygonBalancingMode polBalMode)
00136 {
00137         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00138         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00139 
00140         <a class="code" href="debug_8h.html#a6">nlassert</a>( (uint)CScene::CountPolygonBalancing == (uint)CSceneUser::CountPolygonBalancing );
00141         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setPolygonBalancingMode((CScene::TPolygonBalancingMode)(uint)(polBalMode));
00142 }
00143 
00144 <font class="comment">// ***************************************************************************</font>
00145 
<a name="l00146"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_1">00146</a> CSceneUser::TPolygonBalancingMode       CSceneUser::getPolygonBalancingMode()<font class="keyword"> const</font>
00147 <font class="keyword"></font>{
00148         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00149         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00150 
00151         <a class="code" href="debug_8h.html#a6">nlassert</a>( (uint)CScene::CountPolygonBalancing == (uint)CSceneUser::CountPolygonBalancing );
00152         <font class="keywordflow">return</font> (CSceneUser::TPolygonBalancingMode)(uint)<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getPolygonBalancingMode();
00153 }
00154 
00155 
00156 <font class="comment">// ***************************************************************************</font>
<a name="l00157"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_2">00157</a> <font class="keywordtype">float</font>                   CSceneUser::getNbFaceAsked ()<font class="keyword"> const</font>
00158 <font class="keyword"></font>{
00159         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00160         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00161 
00162         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getNbFaceAsked ();
00163 }
00164 
00165 <font class="comment">// ***************************************************************************</font>
<a name="l00166"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_3">00166</a> <font class="keywordtype">void</font>                    CSceneUser::setGroupLoadMaxPolygon(<font class="keyword">const</font> std::string &amp;group, uint nFaces)
00167 {
00168         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00169         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00170 
00171         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setGroupLoadMaxPolygon(group, nFaces);
00172 }
00173 <font class="comment">// ***************************************************************************</font>
<a name="l00174"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_4">00174</a> uint                    CSceneUser::getGroupLoadMaxPolygon(<font class="keyword">const</font> std::string &amp;group)
00175 {
00176         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00177         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00178 
00179         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getGroupLoadMaxPolygon(group);
00180 }
00181 <font class="comment">// ***************************************************************************</font>
<a name="l00182"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_5">00182</a> <font class="keywordtype">float</font>                   CSceneUser::getGroupNbFaceAsked (<font class="keyword">const</font> std::string &amp;group)<font class="keyword"> const</font>
00183 <font class="keyword"></font>{
00184         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00185         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00186 
00187         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getGroupNbFaceAsked (group);
00188 }
00189 
00190 
00191 <font class="comment">// ***************************************************************************</font>
00192 
<a name="l00193"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z781_0">00193</a> <font class="keywordtype">void</font> CSceneUser::setStaticCoarseMeshManagerTexture (<font class="keyword">const</font> <font class="keywordtype">char</font> *sPath)
00194 {
00195         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00196         <a class="code" href="scene__user_8cpp.html#a5">NL3D_HAUTO_LOAD_LOD</a>;
00197 
00198         <font class="comment">// Get the manager</font>
00199         CCoarseMeshManager *manager=<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getStaticCoarseMeshManager ();
00200 
00201         <font class="comment">// Does it exist ?</font>
00202         <font class="keywordflow">if</font> (manager)
00203         {
00204                 <font class="comment">// Set the texture</font>
00205                 manager-&gt;setTextureFile (sPath);
00206         }
00207 }
00208 
00209 <font class="comment">// ***************************************************************************</font>
00210 
<a name="l00211"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z781_1">00211</a> <font class="keywordtype">void</font> CSceneUser::setDynamicCoarseMeshManagerTexture (<font class="keyword">const</font> <font class="keywordtype">char</font> *sPath)
00212 {
00213         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00214         <a class="code" href="scene__user_8cpp.html#a5">NL3D_HAUTO_LOAD_LOD</a>;
00215 
00216         <font class="comment">// Get the manager</font>
00217         CCoarseMeshManager *manager=<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getDynamicCoarseMeshManager ();
00218 
00219         <font class="comment">// Does it exist ?</font>
00220         <font class="keywordflow">if</font> (manager)
00221         {
00222                 <font class="comment">// Set the texture</font>
00223                 manager-&gt;setTextureFile (sPath);
00224         }
00225 }
00226 
00227 <font class="comment">// ***************************************************************************</font>
<a name="l00228"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z781_2">00228</a> <font class="keywordtype">void</font>                            CSceneUser::setCoarseMeshLightingUpdate(uint8 period)
00229 {
00230         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00231         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00232 
00233         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setCoarseMeshLightingUpdate(period);
00234 }
00235 
00236 <font class="comment">// ***************************************************************************</font>
<a name="l00237"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z781_3">00237</a> uint8                           CSceneUser::getCoarseMeshLightingUpdate()<font class="keyword"> const</font>
00238 <font class="keyword"></font>{
00239         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00240         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00241 
00242         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getCoarseMeshLightingUpdate();
00243 }
00244 
00245 <font class="comment">// ***************************************************************************</font>
<a name="l00246"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_0">00246</a> <font class="keywordtype">void</font>                            CSceneUser::enableLightingSystem(<font class="keywordtype">bool</font> enable)
00247 {
00248         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00249         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00250 
00251         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.enableLightingSystem(enable);
00252 }
00253 
00254 <font class="comment">// ***************************************************************************</font>
<a name="l00255"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_1">00255</a> <font class="keywordtype">void</font>                            CSceneUser::setAmbientGlobal(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> ambient)
00256 {
00257         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00258         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00259 
00260         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setAmbientGlobal(ambient);
00261 }
<a name="l00262"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_2">00262</a> <font class="keywordtype">void</font>                            CSceneUser::setSunAmbient(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> ambient)
00263 {
00264         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00265         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00266 
00267         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setSunAmbient(ambient);
00268 }
<a name="l00269"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_3">00269</a> <font class="keywordtype">void</font>                            CSceneUser::setSunDiffuse(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> diffuse)
00270 {
00271         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00272         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00273 
00274         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setSunDiffuse(diffuse);
00275 }
<a name="l00276"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_4">00276</a> <font class="keywordtype">void</font>                            CSceneUser::setSunSpecular(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> specular)
00277 {
00278         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00279         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00280 
00281         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setSunSpecular(specular);
00282 }
<a name="l00283"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_5">00283</a> <font class="keywordtype">void</font>                            CSceneUser::setSunDirection(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &amp;direction)
00284 {
00285         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00286         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00287 
00288         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setSunDirection(direction);
00289 }
00290 
00291 
00292 <font class="comment">// ***************************************************************************</font>
<a name="l00293"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_6">00293</a> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>           CSceneUser::getAmbientGlobal()<font class="keyword"> const</font>
00294 <font class="keyword"></font>{
00295         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00296         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00297 
00298         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getAmbientGlobal();
00299 }
<a name="l00300"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_7">00300</a> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>           CSceneUser::getSunAmbient()<font class="keyword"> const</font>
00301 <font class="keyword"></font>{
00302         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00303         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00304 
00305         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getSunAmbient();
00306 }
<a name="l00307"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_8">00307</a> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>           CSceneUser::getSunDiffuse()<font class="keyword"> const</font>
00308 <font class="keyword"></font>{
00309         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00310         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00311 
00312         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getSunDiffuse();
00313 }
<a name="l00314"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_9">00314</a> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>           CSceneUser::getSunSpecular()<font class="keyword"> const</font>
00315 <font class="keyword"></font>{
00316         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00317         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00318 
00319         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getSunSpecular();
00320 }
<a name="l00321"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_10">00321</a> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>         CSceneUser::getSunDirection()<font class="keyword"> const</font>
00322 <font class="keyword"></font>{
00323         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00324         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00325 
00326         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getSunDirection();
00327 }
00328 
00329 
00330 <font class="comment">// ***************************************************************************</font>
<a name="l00331"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_11">00331</a> <font class="keywordtype">void</font>                            CSceneUser::setMaxLightContribution(uint nlights)
00332 {
00333         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00334         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00335 
00336         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setMaxLightContribution(nlights);
00337 }
<a name="l00338"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_12">00338</a> uint                            CSceneUser::getMaxLightContribution()<font class="keyword"> const</font>
00339 <font class="keyword"></font>{
00340         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00341         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00342 
00343         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getMaxLightContribution();
00344 }
00345 
<a name="l00346"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_13">00346</a> <font class="keywordtype">void</font>                            CSceneUser::setLightTransitionThreshold(<font class="keywordtype">float</font> lightTransitionThreshold)
00347 {
00348         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00349         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00350 
00351         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setLightTransitionThreshold(lightTransitionThreshold);
00352 }
<a name="l00353"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z783_14">00353</a> <font class="keywordtype">float</font>                           CSceneUser::getLightTransitionThreshold()<font class="keyword"> const</font>
00354 <font class="keyword"></font>{
00355         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00356         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00357 
00358         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLightTransitionThreshold();
00359 }
00360 
00361 
00362 <font class="comment">// ***************************************************************************</font>
<a name="l00363"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_17">00363</a> UPointLight             *CSceneUser::createPointLight()
00364 {
00365         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00366         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00367 
00368         IModel  *model= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.createModel(<a class="code" href="namespaceNL3D.html#a179">PointLightModelId</a>);
00369         <font class="comment">// If not found, return NULL.</font>
00370         <font class="keywordflow">if</font>(model==NULL)
00371                 <font class="keywordflow">return</font> NULL;
00372 
00373         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00374         <font class="keywordflow">return</font> dynamic_cast&lt;UPointLight*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CPointLightUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, model)) );
00375 }
00376 <font class="comment">// ***************************************************************************</font>
<a name="l00377"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_18">00377</a> <font class="keywordtype">void</font>                    CSceneUser::deletePointLight(UPointLight *light)
00378 {
00379         <a class="code" href="scene__user_8cpp.html#a9">NL3D_MEM_LIGHT</a>
00380         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00381 
00382         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00383         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.erase(dynamic_cast&lt;CTransformUser*&gt;(light));
00384 }
00385 
00386 
00387 <font class="comment">// ***************************************************************************</font>
<a name="l00388"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z784_0">00388</a> <font class="keywordtype">void</font>                    CSceneUser::setGlobalWindPower(<font class="keywordtype">float</font> gwp)
00389 {
00390         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00391         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00392 
00393         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setGlobalWindPower(gwp);
00394 }
00395 <font class="comment">// ***************************************************************************</font>
<a name="l00396"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z784_1">00396</a> <font class="keywordtype">float</font>                   CSceneUser::getGlobalWindPower()<font class="keyword"> const</font>
00397 <font class="keyword"></font>{
00398         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00399         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00400 
00401         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getGlobalWindPower();
00402 }
00403 <font class="comment">// ***************************************************************************</font>
<a name="l00404"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z784_2">00404</a> <font class="keywordtype">void</font>                    CSceneUser::setGlobalWindDirection(<font class="keyword">const</font> CVector &amp;gwd)
00405 {
00406         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setGlobalWindDirection(gwd);
00407 }
00408 <font class="comment">// ***************************************************************************</font>
<a name="l00409"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z784_3">00409</a> <font class="keyword">const</font> CVector   &amp;CSceneUser::getGlobalWindDirection()<font class="keyword"> const</font>
00410 <font class="keyword"></font>{
00411         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00412         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00413 
00414         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getGlobalWindDirection();
00415 }
00416 
00417 <font class="comment">// ***************************************************************************</font>
<a name="l00418"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_7">00418</a> <font class="keywordtype">void</font> CSceneUser::updateWaitingIG()
00419 {
00420         <a class="code" href="scene__user_8cpp.html#a10">NL3D_MEM_IG</a>
00421         <font class="keywordflow">for</font>(TWaitingIGList::iterator it = <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.begin(); it != <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.end();)
00422         {
00423                 <font class="keywordtype">bool</font>    erased= <font class="keyword">false</font>;
00424                 <font class="keywordflow">if</font> (it-&gt;IGToLoad != NULL) <font class="comment">// ig loaded ?</font>
00425                 {                       
00426                         <font class="keywordflow">if</font> (it-&gt;IGToLoad != (UInstanceGroup *) -1)
00427                         {                               
00428                                 <font class="keywordflow">switch</font> (it-&gt;IGToLoad-&gt;getAddToSceneState())
00429                                 {
00430                                         <font class="keywordflow">case</font> UInstanceGroup::StateNotAdded:
00431                                                 <font class="comment">// start loading                                                                                </font>
00432                                                 it-&gt;IGToLoad-&gt;addToSceneAsync(*<font class="keyword">this</font>, <a class="code" href="classNL3D_1_1CSceneUser.html#n0">_DriverUser</a>);
00433                                         <font class="keywordflow">break</font>;
00434                                         <font class="keywordflow">case</font> UInstanceGroup::StateAdded:
00435                                                 it-&gt;IGToLoad-&gt;setPos(it-&gt;Offset);
00436                                                 this-&gt;<a class="code" href="classNL3D_1_1CSceneUser.html#z776_16">setToGlobalInstanceGroup</a>(it-&gt;IGToLoad);
00437                                                 *it-&gt;CallerPtr = it-&gt;IGToLoad;
00438                                                 <font class="comment">// remove from list</font>
00439                                                 it = <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.erase(it);
00440                                                 erased= <font class="keyword">true</font>;
00441                                         <font class="keywordflow">break</font>;
00442                                         <font class="keywordflow">default</font>:
00443                                         <font class="keywordflow">break</font>;
00444                                 }
00445                         }
00446                         <font class="keywordflow">else</font>
00447                         {
00448                                 <font class="comment">// loading failed</font>
00449                                 *it-&gt;CallerPtr = it-&gt;IGToLoad;
00450                                 it = <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.erase(it);
00451                                 erased= <font class="keyword">true</font>;
00452                         }
00453                 }
00454                 <font class="comment">// next IG.</font>
00455                 <font class="keywordflow">if</font>(!erased)
00456                         it++;
00457         }
00458 }
00459 
00460 
00461 <font class="comment">// ***************************************************************************</font>
<a name="l00462"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z785_0">00462</a> <font class="keywordtype">void</font>                            CSceneUser::resetCLodManager()
00463 {
00464         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00465         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00466 
00467         <font class="comment">// DriverUser always setup the lod manager</font>
00468         <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager());
00469 
00470         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;reset();
00471 }
00472 
00473 <font class="comment">// ***************************************************************************</font>
<a name="l00474"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z785_1">00474</a> uint32                          CSceneUser::loadCLodShapeBank(<font class="keyword">const</font> std::string &amp;fileName)
00475 {
00476         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00477         <a class="code" href="scene__user_8cpp.html#a5">NL3D_HAUTO_LOAD_LOD</a>;
00478 
00479         <font class="comment">// DriverUser always setup the lod manager</font>
00480         <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager());
00481 
00482         <font class="comment">// Open the file</font>
00483         CIFile  <a class="code" href="cf__lexical_8cpp.html#a95">file</a>(CPath::lookup(fileName));
00484 
00485         <font class="comment">// create the shape bank</font>
00486         uint32  bankId= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;createShapeBank();
00487 
00488         <font class="comment">// get the bank</font>
00489         CLodCharacterShapeBank  *bank= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;getShapeBank(bankId);
00490         <a class="code" href="debug_8h.html#a6">nlassert</a>(bank);
00491 
00492         <font class="comment">// read the bank.</font>
00493         <a class="code" href="cf__lexical_8cpp.html#a95">file</a>.serial(*bank);
00494 
00495         <font class="comment">// recompile the shape Map.</font>
00496         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;compile();
00497 
00498         <font class="keywordflow">return</font> bankId;
00499 }
00500 
00501 <font class="comment">// ***************************************************************************</font>
<a name="l00502"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z785_2">00502</a> <font class="keywordtype">void</font>                            CSceneUser::deleteCLodShapeBank(uint32 bankId)
00503 {
00504         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00505         <a class="code" href="scene__user_8cpp.html#a5">NL3D_HAUTO_LOAD_LOD</a>;
00506 
00507         <font class="comment">// DriverUser always setup the lod manager</font>
00508         <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager());
00509 
00510         <font class="comment">// delete the bank</font>
00511         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;deleteShapeBank(bankId);
00512 
00513         <font class="comment">// recompile the shape Map.</font>
00514         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;compile();
00515 }
00516 
00517 <font class="comment">// ***************************************************************************</font>
<a name="l00518"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z785_3">00518</a> sint32                          CSceneUser::getCLodShapeIdByName(<font class="keyword">const</font> std::string &amp;name)<font class="keyword"> const</font>
00519 <font class="keyword"></font>{
00520         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00521         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00522 
00523         <font class="comment">// DriverUser always setup the lod manager</font>
00524         <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager());
00525 
00526         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;getShapeIdByName(name);
00527 }
00528 
00529 <font class="comment">// ***************************************************************************</font>
<a name="l00530"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z785_4">00530</a> sint32                          CSceneUser::getCLodAnimIdByName(uint32 shapeId, <font class="keyword">const</font> std::string &amp;name)<font class="keyword"> const</font>
00531 <font class="keyword"></font>{
00532         <a class="code" href="scene__user_8cpp.html#a11">NL3D_MEM_LOD</a>
00533         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00534 
00535         <font class="comment">// DriverUser always setup the lod manager</font>
00536         <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager());
00537 
00538         <font class="keyword">const</font> CLodCharacterShape        *shape= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getLodCharacterManager()-&gt;getShape(shapeId);
00539         <font class="keywordflow">if</font>(shape)
00540                 <font class="keywordflow">return</font> shape-&gt;getAnimIdByName(name);
00541         <font class="keywordflow">else</font>
00542                 <font class="keywordflow">return</font> -1;
00543 }
00544 
00545 
00546 <font class="comment">// ***************************************************************************</font>
<a name="l00547"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z774_0">00547</a> <font class="keywordtype">void</font>                    CSceneUser::render()
00548 {       
00549         <a class="code" href="scene__user_8cpp.html#a12">NL3D_MEM_SCENE_RENDER</a>
00550 
00551         <font class="comment">// render the scene.</font>
00552         {
00553                 <a class="code" href="scene__user_8cpp.html#a7">NL3D_HAUTO_RENDER_SCENE</a>
00554 
00555                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a>==NULL)
00556                         <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"render(): try to render with no camera linked (may have been deleted)"</font>);
00557                 <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.render();
00558         }
00559 
00560         <a class="code" href="classNL3D_1_1CSceneUser.html#c0">updateWaitingInstances</a>();
00561 
00562         <font class="comment">// Must restore the matrix context, so 2D/3D interface not disturbed.</font>
00563         <a class="code" href="classNL3D_1_1CSceneUser.html#n0">_DriverUser</a>-&gt;restoreMatrixContext();
00564 }
00565 
00566 
00567 <font class="comment">// ***************************************************************************</font>
<a name="l00568"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z774_1">00568</a> <font class="comment">/*virtual*/</font> <font class="keywordtype">void</font> CSceneUser::updateWaitingInstances(<font class="keywordtype">double</font> ellapsedTime)
00569 {
00570         <a class="code" href="scene__user_8cpp.html#a13">NL3D_MEM_INSTANCE</a>
00571         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.updateWaitingInstances(ellapsedTime);
00572         <a class="code" href="classNL3D_1_1CSceneUser.html#c0">updateWaitingInstances</a>();
00573 }
00574 
00575 
00576 <font class="comment">// ***************************************************************************</font>
<a name="l00577"></a><a class="code" href="classNL3D_1_1CSceneUser.html#c0">00577</a> <font class="keywordtype">void</font> CSceneUser::updateWaitingInstances()
00578 {
00579         <a class="code" href="scene__user_8cpp.html#a13">NL3D_MEM_INSTANCE</a>
00580         <font class="comment">// Update waiting instances</font>
00581         {
00582                 <a class="code" href="scene__user_8cpp.html#a6">NL3D_HAUTO_ASYNC_IG</a>
00583 
00584                 <font class="comment">// Done after the _Scene.render because in this method the instance are checked for creation</font>
00585                 std::map&lt;UInstance**,CTransformShape*&gt;::iterator it = <a class="code" href="classNL3D_1_1CSceneUser.html#n10">_WaitingInstances</a>.begin();
00586                 <font class="keywordflow">while</font>( it != <a class="code" href="classNL3D_1_1CSceneUser.html#n10">_WaitingInstances</a>.end() )
00587                 {
00588                         <font class="keywordflow">if</font>( it-&gt;second != NULL )
00589                         {
00590                                 *(it-&gt;first) = dynamic_cast&lt;UInstance*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CInstanceUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, it-&gt;second)) );
00591                                 std::map&lt;UInstance**,CTransformShape*&gt;::iterator delIt = it;
00592                                 ++it;
00593                                 <a class="code" href="classNL3D_1_1CSceneUser.html#n10">_WaitingInstances</a>.erase(delIt);
00594                         }
00595                         <font class="keywordflow">else</font>
00596                         {
00597                                 ++it;
00598                         }
00599                 }
00600         }
00601 
00602         <font class="comment">// update waiting instances groups;</font>
00603         {
00604                 <a class="code" href="scene__user_8cpp.html#a6">NL3D_HAUTO_ASYNC_IG</a>
00605 
00606                 <a class="code" href="classNL3D_1_1CSceneUser.html#z776_7">updateWaitingIG</a>();
00607         }       
00608 }
00609 
00610 
<a name="l00611"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z774_2">00611</a> <font class="keywordtype">void</font>                    CSceneUser::animate(<a class="code" href="namespaceNL3D.html#a2">TGlobalAnimationTime</a> time)
00612 {
00613         NL_ALLOC_CONTEXT( 3dAnim )
00614         <a class="code" href="scene__user_8cpp.html#a8">NL3D_HAUTO_RENDER_SCENE_ANIMATE</a>;
00615 
00616         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.animate(time);
00617 }
00618 
00619 
00620 <font class="comment">// ***************************************************************************</font>
<a name="l00621"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z775_0">00621</a> <font class="keywordtype">void</font>                    CSceneUser::setCam(UCamera *cam)
00622 {
00623         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00624         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00625 
00626         <font class="keywordflow">if</font>(!cam)
00627                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"setCam(): cannot set a NULL camera"</font>);
00628         CCameraUser             *newCam= dynamic_cast&lt;CCameraUser*&gt;(cam);
00629         <font class="keywordflow">if</font>( newCam-&gt;getScene() != &amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>)
00630                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"setCam(): try to set a current camera not created from this scene"</font>);
00631 
00632         <a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a>= newCam;
00633         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setCam(newCam-&gt;getCamera());
00634 }
<a name="l00635"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z775_1">00635</a> UCamera                 *CSceneUser::getCam()
00636 {
00637         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00638         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00639 
00640         <font class="keywordflow">return</font> dynamic_cast&lt;UCamera*&gt;(_CurrentCamera);
00641 }
<a name="l00642"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z775_2">00642</a> <font class="keywordtype">void</font>                    CSceneUser::setViewport(<font class="keyword">const</font> <font class="keyword">class</font> CViewport&amp; viewport)
00643 {
00644         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00645         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00646 
00647         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setViewport(viewport);
00648 }
<a name="l00649"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z775_3">00649</a> CViewport               CSceneUser::getViewport()
00650 {
00651         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00652         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00653 
00654         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getViewport();
00655 }
00656 
00657 <font class="comment">// ***************************************************************************</font>
<a name="l00658"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_0">00658</a> UCamera                 *CSceneUser::createCamera()
00659 {
00660         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00661         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00662 
00663         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00664         <font class="keywordflow">return</font> dynamic_cast&lt;UCamera*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CCameraUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>)) );
00665 }
<a name="l00666"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_1">00666</a> <font class="keywordtype">void</font>                    CSceneUser::deleteCamera(UCamera *cam)
00667 {
00668         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00669         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00670 
00671         CCameraUser             *oldCam= dynamic_cast&lt;CCameraUser*&gt;(cam);
00672         <font class="comment">// Is this the current camera??</font>
00673         <font class="keywordflow">if</font>(oldCam==<a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a>)
00674                 <a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a>=NULL;
00675 
00676         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00677         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.erase(oldCam);
00678 }
00679 
<a name="l00680"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_2">00680</a> UInstance               *CSceneUser::createInstance(<font class="keyword">const</font> std::string &amp;shapeName)
00681 {
00682         <a class="code" href="scene__user_8cpp.html#a13">NL3D_MEM_INSTANCE</a>
00683         <a class="code" href="scene__user_8cpp.html#a3">NL3D_HAUTO_CREATE_INSTANCE</a>;
00684 
00685         IModel  *model= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.createInstance(shapeName);
00686         <font class="comment">// If not found, return NULL.</font>
00687         <font class="keywordflow">if</font>(model==NULL)
00688                 <font class="keywordflow">return</font> NULL;
00689 
00690         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00691         <font class="keywordflow">if</font> (dynamic_cast&lt;CParticleSystemModel *&gt;(model))
00692         {
00694                 <font class="keywordflow">return</font> dynamic_cast&lt;UInstance*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CParticleSystemInstanceUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, model)) );
00695         }
00696         <font class="keywordflow">else</font>
00697         {
00699                 <font class="keywordflow">return</font> dynamic_cast&lt;UInstance*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CInstanceUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, model)) );
00700         }
00701 }
00702 
00703 
<a name="l00704"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_3">00704</a> <font class="keywordtype">void</font> CSceneUser::createInstanceAsync(<font class="keyword">const</font> std::string &amp;shapeName, UInstance**ppInstance)
00705 {
00706         <a class="code" href="scene__user_8cpp.html#a13">NL3D_MEM_INSTANCE</a>
00707         <a class="code" href="scene__user_8cpp.html#a3">NL3D_HAUTO_CREATE_INSTANCE</a>;
00708 
00709         <a class="code" href="classNL3D_1_1CSceneUser.html#n10">_WaitingInstances</a>[ppInstance] = NULL;
00710         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.createInstanceAsync(shapeName,&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n10">_WaitingInstances</a>[ppInstance]);
00711 <font class="comment">//              IModel  *model= _Scene.createInstance(shapeName);</font>
00712         <font class="comment">// If not found, return NULL.</font>
00713 <font class="comment">//              if(model==NULL)</font>
00714 <font class="comment">//                      return NULL;</font>
00715 
00716 <font class="comment">//              if( dynamic_cast&lt;CMeshInstance*&gt;(model)==NULL )</font>
00717 <font class="comment">//                      nlerror("UScene::createInstance(): shape is not a mesh");</font>
00718 
00719         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00720 <font class="comment">//              return dynamic_cast&lt;UInstance*&gt;( _Transforms.insert(new CInstanceUser(&amp;_Scene, model)) );</font>
00721 }
00722 
<a name="l00723"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_4">00723</a> <font class="keywordtype">void</font>                    CSceneUser::deleteInstance(UInstance *inst)
00724 {
00725         <a class="code" href="scene__user_8cpp.html#a13">NL3D_MEM_INSTANCE</a>
00726         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00727 
00728         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00729         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.erase(dynamic_cast&lt;CTransformUser*&gt;(inst));
00730 }
00731 
00732 
<a name="l00733"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_5">00733</a> <font class="keywordtype">void</font> CSceneUser::createInstanceGroupAndAddToSceneAsync (<font class="keyword">const</font> std::string &amp;instanceGroup, UInstanceGroup **pIG, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a378">offset</a>)
00734 {
00735         <a class="code" href="scene__user_8cpp.html#a10">NL3D_MEM_IG</a>
00736         <a class="code" href="scene__user_8cpp.html#a6">NL3D_HAUTO_ASYNC_IG</a>;
00737 
00738         <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.push_front(CWaitingIG(pIG, offset));
00739         UInstanceGroup::createInstanceGroupAsync(instanceGroup, &amp;(<a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.begin()-&gt;IGToLoad));
00740         <font class="comment">// this list updat will be performed at each render, see updateWaitingIG</font>
00741 }
00742 
<a name="l00743"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_6">00743</a> <font class="keywordtype">void</font> CSceneUser::stopCreatingAndAddingIG(UInstanceGroup **pIG)
00744 {
00745         <a class="code" href="scene__user_8cpp.html#a10">NL3D_MEM_IG</a>
00746         <a class="code" href="scene__user_8cpp.html#a6">NL3D_HAUTO_ASYNC_IG</a>;
00747 
00748         <font class="keywordflow">for</font>(TWaitingIGList::iterator it = <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.begin(); it != <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.end(); ++it)
00749         {
00750                 <font class="keywordflow">if</font> (it-&gt;CallerPtr == pIG)
00751                 {
00752                         <font class="keywordflow">if</font> (!it-&gt;IGToLoad)
00753                         {
00754                                 UInstanceGroup::stopCreateInstanceGroupAsync(pIG);                                                                              
00755                         }
00756                         <font class="keywordflow">else</font>
00757                         {
00758                                 <font class="keywordflow">switch</font>(it-&gt;IGToLoad-&gt;getAddToSceneState())
00759                                 {
00760                                         <font class="keywordflow">case</font> UInstanceGroup::StateAdding:
00761                                                 it-&gt;IGToLoad-&gt;stopAddToSceneAsync();
00762                                         <font class="keywordflow">break</font>;
00763                                         <font class="keywordflow">case</font> UInstanceGroup::StateAdded:
00764                                                 it-&gt;IGToLoad-&gt;removeFromScene(*<font class="keyword">this</font>);
00765                                                 <font class="keyword">delete</font> it-&gt;IGToLoad;
00766                                         <font class="keywordflow">break</font>;
00767                                         <font class="keywordflow">case</font> UInstanceGroup::StateNotAdded:
00768                                                 <font class="keyword">delete</font> it-&gt;IGToLoad;
00769                                         <font class="keywordflow">break</font>;
00770                                 }
00771                         }
00772                         <a class="code" href="classNL3D_1_1CSceneUser.html#n11">_WaitingIGs</a>.erase(it);
00773                         <font class="keywordflow">return</font>;
00774                 }
00775         }               
00776 }
00777 
00778 
<a name="l00779"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_8">00779</a> UTransform *CSceneUser::createTransform()
00780 {
00781         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00782         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00783 
00784         IModel  *model= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.createModel(<a class="code" href="namespaceNL3D.html#a276">TransformId</a>);
00785         <font class="comment">// If not found, return NULL.</font>
00786         <font class="keywordflow">if</font>(model==NULL)
00787                 <font class="keywordflow">return</font> NULL;
00788 
00789         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00790         <font class="keywordflow">return</font> dynamic_cast&lt;UTransform*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CTransformUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, model)) );
00791 }
00792 
<a name="l00793"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_9">00793</a> <font class="keywordtype">void</font>                    CSceneUser::deleteTransform(UTransform *tr)
00794 {
00795         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00796         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00797 
00798         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00799         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.erase(dynamic_cast&lt;CTransformUser*&gt;(tr));
00800 }
00801 
00802 
<a name="l00803"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_10">00803</a> USkeleton               *CSceneUser::createSkeleton(<font class="keyword">const</font> std::string &amp;shapeName)
00804 {
00805         <a class="code" href="skeleton__user_8h.html#a0">NL3D_MEM_SKELETON</a>
00806         <a class="code" href="scene__user_8cpp.html#a4">NL3D_HAUTO_CREATE_SKELETON</a>;
00807 
00808         IModel  *model= <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.createInstance(shapeName);
00809         <font class="comment">// If not found, return NULL.</font>
00810         <font class="keywordflow">if</font>(model==NULL)
00811                 <font class="keywordflow">return</font> NULL;
00812 
00813         <font class="keywordflow">if</font>( dynamic_cast&lt;CSkeletonModel*&gt;(model)==NULL )
00814                 <a class="code" href="debug_8h.html#a3">nlerror</a>(<font class="stringliteral">"UScene::createSkeleton(): shape is not a skeletonShape"</font>);
00815 
00816         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00817         <font class="keywordflow">return</font> dynamic_cast&lt;USkeleton*&gt;( <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.insert(<font class="keyword">new</font> CSkeletonUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>, model)) );
00818 }
<a name="l00819"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_11">00819</a> <font class="keywordtype">void</font>                    CSceneUser::deleteSkeleton(USkeleton *skel)
00820 {
00821         <a class="code" href="skeleton__user_8h.html#a0">NL3D_MEM_SKELETON</a>
00822         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00823 
00824         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00825         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.erase(dynamic_cast&lt;CTransformUser*&gt;(skel));
00826 }
00827 
00828 
<a name="l00829"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_12">00829</a> ULandscape              *CSceneUser::createLandscape()
00830 {
00831         <a class="code" href="scene__user_8cpp.html#a14">NL3D_MEM_LANDSCAPE</a>
00832         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00833 
00834         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00835         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n4">_Landscapes</a>.insert(<font class="keyword">new</font> CLandscapeUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>));
00836 }
<a name="l00837"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_13">00837</a> <font class="keywordtype">void</font>                    CSceneUser::deleteLandscape(ULandscape *land)
00838 {
00839         <a class="code" href="scene__user_8cpp.html#a14">NL3D_MEM_LANDSCAPE</a>
00840         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00841 
00842         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00843         <a class="code" href="classNL3D_1_1CSceneUser.html#n4">_Landscapes</a>.erase((CLandscapeUser*) land);
00844 }
00845 
<a name="l00846"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_14">00846</a> UCloudScape *CSceneUser::createCloudScape()
00847 {
00848         <a class="code" href="scene__user_8cpp.html#a15">NL3D_MEM_CLOUDS</a>
00849         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00850 
00851         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00852         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n5">_CloudScapes</a>.insert(<font class="keyword">new</font> CCloudScapeUser(&amp;<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>));
00853 }
<a name="l00854"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_15">00854</a> <font class="keywordtype">void</font> CSceneUser::deleteCloudScape(UCloudScape *cs)
00855 {
00856         <a class="code" href="scene__user_8cpp.html#a15">NL3D_MEM_CLOUDS</a>
00857 
00858         <font class="comment">// The component is auto added/deleted to _Scene in ctor/dtor.</font>
00859         <a class="code" href="classNL3D_1_1CSceneUser.html#n5">_CloudScapes</a>.erase((CCloudScapeUser*) cs);
00860 }
00861 <font class="comment">/*</font>
00862 <font class="comment"></font>
00863 <font class="comment">UInstanceGroup  *CSceneUser::createInstanceGroup (const std::string &amp;instanceGroup)</font>
00864 <font class="comment">{</font>
00865 <font class="comment">        // Create the instance group</font>
00866 <font class="comment">        CInstanceGroupUser *user=new CInstanceGroupUser;</font>
00867 <font class="comment"></font>
00868 <font class="comment">        // Init the class</font>
00869 <font class="comment">        if (!user-&gt;load (instanceGroup))</font>
00870 <font class="comment">        {</font>
00871 <font class="comment">                // Prb, erase it</font>
00872 <font class="comment">                delete user;</font>
00873 <font class="comment"></font>
00874 <font class="comment">                // Return error code</font>
00875 <font class="comment">                return NULL;</font>
00876 <font class="comment">        }</font>
00877 <font class="comment"></font>
00878 <font class="comment">        // Insert the pointer in the pointer list</font>
00879 <font class="comment">        _InstanceGroups.insert (user);</font>
00880 <font class="comment"></font>
00881 <font class="comment">        // return the good value</font>
00882 <font class="comment">        return user;</font>
00883 <font class="comment">}</font>
00884 <font class="comment"></font>
00885 <font class="comment">void                    CSceneUser::deleteInstanceGroup (UInstanceGroup *group)</font>
00886 <font class="comment">{</font>
00887 <font class="comment">        // The component is auto added/deleted to _Scene in ctor/dtor.</font>
00888 <font class="comment">        _InstanceGroups.erase (dynamic_cast&lt;CInstanceGroupUser*&gt;(group));</font>
00889 <font class="comment">}</font>
00890 <font class="comment">*/</font>
00891 
<a name="l00892"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z776_16">00892</a> <font class="keywordtype">void</font> CSceneUser::setToGlobalInstanceGroup(UInstanceGroup *pIG)
00893 {
00894         <a class="code" href="scene__user_8cpp.html#a10">NL3D_MEM_IG</a>
00895         <a class="code" href="scene__user_8cpp.html#a0">NL3D_HAUTO_UI_SCENE</a>;
00896 
00897         CInstanceGroupUser *pIGU = (CInstanceGroupUser*)pIG;
00898         pIGU-&gt;_InstanceGroup.setClusterSystem (<a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getGlobalInstanceGroup());
00899 }
00900 
00901 <font class="comment">// ***************************************************************************</font>
<a name="l00902"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z779_0">00902</a> UVisualCollisionManager         *CSceneUser::createVisualCollisionManager()
00903 {
00904         <a class="code" href="scene__user_8cpp.html#a16">NL3D_MEM_VISUAL_COLLISION</a>
00905         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00906 
00907         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n7">_VisualCollisionManagers</a>.insert(<font class="keyword">new</font> CVisualCollisionManagerUser);
00908 }
<a name="l00909"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z779_1">00909</a> <font class="keywordtype">void</font>                                            CSceneUser::deleteVisualCollisionManager(UVisualCollisionManager *mgr)
00910 {
00911         <a class="code" href="scene__user_8cpp.html#a16">NL3D_MEM_VISUAL_COLLISION</a>
00912         <a class="code" href="scene__user_8cpp.html#a1">NL3D_HAUTO_ELT_SCENE</a>;
00913 
00914         <a class="code" href="classNL3D_1_1CSceneUser.html#n7">_VisualCollisionManagers</a>.erase(dynamic_cast&lt;CVisualCollisionManagerUser*&gt;(mgr));
00915 }
00916 
00917 
00918 <font class="comment">// ***************************************************************************</font>
<a name="l00919"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z773_0">00919</a> CSceneUser::CSceneUser(CDriverUser *drv)
00920 {
00921         <a class="code" href="scene__user_8h.html#a1">NL3D_MEM_SCENE_INIT</a>
00922         <a class="code" href="debug_8h.html#a6">nlassert</a>(drv);
00923         <a class="code" href="classNL3D_1_1CSceneUser.html#n0">_DriverUser</a>= drv;
00924         <a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a> = NULL;
00925 
00926         <font class="comment">// Init Scene.</font>
00927         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.initDefaultTravs();
00928 
00929         <font class="comment">// Don't add any user trav.</font>
00930         <font class="comment">// init default Roots.</font>
00931         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.initDefaultRoots();
00932 
00933         <font class="comment">// Set driver.</font>
00934         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setDriver(<a class="code" href="classNL3D_1_1CSceneUser.html#n0">_DriverUser</a>-&gt;getDriver());
00935 
00936         <font class="comment">// Set viewport</font>
00937         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setViewport (CViewport());
00938 
00939         <font class="comment">// Init the world instance group</font>
00940         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.initGlobalnstanceGroup();
00941 
00942         <font class="comment">// Init coarse mesh manager</font>
00943         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.initCoarseMeshManager ();
00944 
00945         <font class="comment">// init QuadGridClipManager</font>
00946         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.initQuadGridClipManager ();
00947 
00948         <font class="comment">// Create default camera, and active!!</font>
00949         <a class="code" href="classNL3D_1_1CSceneUser.html#z775_0">setCam</a>(<a class="code" href="classNL3D_1_1CSceneUser.html#z776_0">createCamera</a>());
00950 }
00951 
<a name="l00952"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z773_1">00952</a> CSceneUser::~CSceneUser()
00953 {
00954         <a class="code" href="scene__user_8h.html#a0">NL3D_MEM_SCENE</a>
00955         <a class="code" href="classNL3D_1_1CSceneUser.html#n7">_VisualCollisionManagers</a>.clear();
00956         <a class="code" href="classNL3D_1_1CSceneUser.html#n3">_Transforms</a>.clear();
00957         <a class="code" href="classNL3D_1_1CSceneUser.html#n4">_Landscapes</a>.clear();
00958         <a class="code" href="classNL3D_1_1CSceneUser.html#n5">_CloudScapes</a>.clear();
00959         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.release();
00960         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setDriver(NULL);
00961         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setCam(NULL);
00962         <a class="code" href="classNL3D_1_1CSceneUser.html#n2">_CurrentCamera</a>= NULL;
00963         <a class="code" href="classNL3D_1_1CSceneUser.html#n0">_DriverUser</a>= NULL;
00964 }
00965 
00966 <font class="comment">// ***************************************************************************</font>
<a name="l00967"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_6">00967</a> <font class="keywordtype">void</font>            CSceneUser::setMaxSkeletonsInNotCLodForm(uint m)
00968 {
00969         <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.setMaxSkeletonsInNotCLodForm(m);
00970 }
00971 
00972 <font class="comment">// ***************************************************************************</font>
<a name="l00973"></a><a class="code" href="classNL3D_1_1CSceneUser.html#z780_7">00973</a> uint            CSceneUser::getMaxSkeletonsInNotCLodForm()<font class="keyword"> const</font>
00974 <font class="keyword"></font>{
00975         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CSceneUser.html#n1">_Scene</a>.getMaxSkeletonsInNotCLodForm();
00976 }
00977 
00978 
00979 } <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>