aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/ps__attrib__maker__helper_8h-source.html
blob: 82bb42490f65e05f029445fab884bc462a34e520 (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
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
<!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>ps_attrib_maker_helper.h</h1><a href="ps__attrib__maker__helper_8h.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">#ifndef NL_PS_ATTRIB_MAKER_HELPER_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_PS_ATTRIB_MAKER_HELPER_H</font>
00028 <font class="preprocessor"></font>
00029 <font class="preprocessor">#include "<a class="code" href="ps__attrib__maker_8h.html">3d/ps_attrib_maker.h</a>"</font>
00030 
00031 <font class="preprocessor">#include "<a class="code" href="fast__floor_8h.html">fast_floor.h</a>"</font> <font class="comment">// inline assembly for fast float&lt;-&gt;int conversions</font>
00032 <font class="preprocessor">#include "<a class="code" href="ps__attrib__maker__iterators_8h.html">ps_attrib_maker_iterators.h</a>"</font> <font class="comment">// some iterators we use </font>
00033 
00034 <font class="keyword">namespace </font>NL3D 
00035 {
00036 
00037 
00038 
00039 
00040 
00041 
<a name="l00051"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html">00051</a> <font class="keyword">template</font> &lt;<font class="keyword">typename</font> T, <font class="keyword">class</font> F&gt; <font class="keyword">class </font>CPSAttribMakerT : <font class="keyword">public</font> CPSAttribMaker&lt;T&gt;
00052 {
00053         <font class="keyword">public</font>:
<a name="l00055"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">00055</a>                 F <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>;   
00056 
00058                 <font class="keyword">virtual</font> T <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a0">get</a>(CPSLocated *loc, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
00059 
<a name="l00060"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a1">00060</a>                 <font class="keyword">virtual</font> T <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a0">get</a>(<font class="keywordtype">float</font> input)
00061                 {
00062                         <a class="code" href="namespaceNL3D.html#a360">OptFastFloorBegin</a>();
00063                         <a class="code" href="debug_8h.html#a6">nlassert</a>(input &gt;= 0.f &amp;&amp; input &lt;= 1.f);
00064                         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(input);
00065                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
00066                 }
00067                 
00071                 <font class="comment">/*  virtual void *make(CPSLocated *loc,</font>
00072 <font class="comment">                                                         uint32 startIndex,</font>
00073 <font class="comment">                                                         void *tab, uint32 stride,</font>
00074 <font class="comment">                                                         uint32 numAttrib,</font>
00075 <font class="comment">                                                         bool allowNoCopy = false,</font>
00076 <font class="comment">                                                         uint32 srcStep = (1 &lt;&lt; 16)</font>
00077 <font class="comment">                                                                                         ) const;*/</font>
00078 
00082                  <font class="comment">/* virtual void make4(CPSLocated *loc,</font>
00083 <font class="comment">                                                         uint32 startIndex,</font>
00084 <font class="comment">                                                         void *tab,</font>
00085 <font class="comment">                                                         uint32 stride,</font>
00086 <font class="comment">                                                         uint32 numAttrib,</font>
00087 <font class="comment">                                                         uint32 srcStep = (1 &lt;&lt; 16)</font>
00088 <font class="comment">                                                        ) const;*/</font>
00089 
00093                 <font class="comment">/* virtual void makeN(CPSLocated *loc,</font>
00094 <font class="comment">                                                        uint32 startIndex,</font>
00095 <font class="comment">                                                        void *tab,</font>
00096 <font class="comment">                                                        uint32 stride,</font>
00097 <font class="comment">                                                        uint32 numAttrib,</font>
00098 <font class="comment">                                                        uint32 nbReplicate,</font>
00099 <font class="comment">                                                        uint32 srcStep = (1 &lt;&lt; 16)</font>
00100 <font class="comment">                                                ) const;*/</font>
00101 
00102 
<a name="l00104"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a2">00104</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a2">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f) <font class="keywordflow">throw</font>(NLMISC::EStream)
00105                 {
00106                         sint ver = f.serialVersion(2);
00107                         CPSAttribMaker&lt;T&gt;::serial(f);
00108                     f.serial(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>);
00109                         <font class="keywordflow">switch</font> (ver)
00110                         {
00111                                 <font class="keywordflow">case</font> 1:
00112                                 {
00113                                         CPSInputType it;
00114                                         f.serialEnum(it.InputType);
00115                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a> = it;
00116                                 }
00117                                 <font class="keywordflow">break</font>;
00118                                 <font class="keywordflow">case</font> 2:
00119                                         f.serial(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>);
00120                                 <font class="keywordflow">break</font>;
00121                         }
00122                         f.serial(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>);
00123                 }
00124 
<a name="l00128"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a3">00128</a>                 <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a3">CPSAttribMakerT</a>(<font class="keywordtype">float</font> nbCycles) : <a class="code" href="classNL3D_1_1CPSAttribMaker.html#z706_0">CPSAttribMaker</a>&lt;T&gt;(nbCycles)
00129                                                                                   , <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>(false)
00130                 {}
00131 
<a name="l00133"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a4">00133</a>                   <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a4">~CPSAttribMakerT</a>() {}
00134 
00135 
<a name="l00139"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a5">00139</a>                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a5">hasCustomInput</a>(<font class="keywordtype">void</font>) { <font class="keywordflow">return</font> <font class="keyword">true</font>; } 
00140                 
00141 
<a name="l00144"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a6">00144</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a6">setInput</a>(<font class="keyword">const</font> CPSInputType &amp;input) { <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a> = input; }
00145 
00146 
<a name="l00150"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a7">00150</a>                 <font class="keyword">virtual</font> CPSInputType <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a7">getInput</a>(<font class="keywordtype">void</font>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>; }
00151 
00152 
<a name="l00155"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a8">00155</a>                 <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a8">isClampingSupported</a>(<font class="keywordtype">void</font>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <font class="keyword">true</font>; }
00156 
00157 
<a name="l00161"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a9">00161</a>                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a9">setClamping</a>(<font class="keywordtype">bool</font> enable = <font class="keyword">true</font>) { <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a> = enable; };
00162 
00163 
<a name="l00167"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a10">00167</a>                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a10">getClamping</a>(<font class="keywordtype">void</font>)<font class="keyword"> const  </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>; };
00168 
00169 
<a name="l00171"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#s0">00171</a>                   <font class="keyword">typedef</font> T <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#s0">value_type</a>;
00172 
<a name="l00174"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#s1">00174</a>                   <font class="keyword">typedef</font> F <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#s1">functor_type</a>;
00175 
00176         <font class="keyword">private</font>:                
00177 
00178                 <font class="comment">// type of the input</font>
<a name="l00179"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">00179</a>                 CPSInputType <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>;
00180 
00181                 <font class="comment">// clamping on/ off</font>
<a name="l00182"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">00182</a>                 <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>;
00183 
00184                 
00185 
<a name="l00191"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">00191</a>                  <font class="keyword">template</font> &lt;<font class="keyword">typename</font> It&gt; <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(It it,
00192                                                                                                          <font class="keywordtype">void</font> *tab,
00193                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
00194                                                                                                          uint32 numAttrib,
00195                                                                                                          <font class="keywordtype">bool</font> canOverlapOne
00196                                                                                                          )<font class="keyword"> const</font>
00197 <font class="keyword">                 </font>{                                              
00198                         uint8 *pt = (uint8 *) tab;
00199 
00200                         
00201                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> &gt; 1 || canOverlapOne)
00202                         {
00203                                 <font class="comment">// the value could cycle, so we need to clamp it to 0.0f 1.0f</font>
00204 
00205                                 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>)
00206                                 {
00207                                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00208                                         {
00209                                                 <font class="keywordflow">while</font> (numAttrib --)
00210                                                 {       
00211                                                         *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(it.get())); 
00212                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00213                                                         it.advance();
00214                                                 }
00215                                         }
00216                                         <font class="keywordflow">else</font>
00217                                         {
00218                                                 <font class="keywordflow">while</font> (numAttrib --)
00219                                                 {
00220                                                         <font class="keyword">const</font> <font class="keywordtype">float</font> time =  <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00221                                                         *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(time)); 
00222                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00223                                                         it.advance();
00224                                                 }       
00225                                         }
00226                                 }
00227                                 <font class="keywordflow">else</font>
00228                                 {
00229                                         <font class="comment">// clamping is on</font>
00230 
00231                                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00232 
00233                                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00234                                         {
00235                                                 <font class="keywordflow">while</font> (numAttrib --)
00236                                                 {       
00237                                                         <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = (it.get());
00238                                                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00239                                                         {
00240                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00241                                                         }
00242                                                         *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>); 
00243                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00244                                                         it.advance();
00245                                                 }
00246                                         }
00247                                         <font class="keywordflow">else</font>
00248                                         {
00249                                                 <font class="keywordflow">while</font> (numAttrib --)
00250                                                 {
00251                                                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> =  <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00252                                                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00253                                                         {
00254                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00255                                                         }                                                                                                               
00256                                                         *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>); 
00257                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00258                                                         it.advance();
00259                                                 }       
00260                                         }
00261                                 }
00262                         }
00263                         <font class="keywordflow">else</font>
00264                         {
00265                                 <font class="comment">// the fastest case : it match the particle's life perfeclty</font>
00266 
00267                                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00268                                 {
00269                                         <font class="keywordflow">while</font> (numAttrib --)
00270                                         {
00271                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(it.get()); 
00272                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00273                                                 it.advance();
00274                                         }
00275                                 }
00276                                 <font class="keywordflow">else</font>
00277                                 {
00278                                         <font class="comment">// the particle won't cover the whole pattern durin his life</font>
00279                                         <font class="keywordflow">while</font> (numAttrib --)
00280                                         {
00281                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a>  * (it.get())); 
00282                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00283                                                 it.advance();
00284                                         }
00285                                 }
00286                         }                                               
00287                 }
00288 
<a name="l00293"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">00293</a>                  <font class="keyword">template</font> &lt;<font class="keyword">typename</font> It&gt; <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(It it,
00294                                                                                                          <font class="keywordtype">void</font> *tab,
00295                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
00296                                                                                                      uint32 numAttrib,
00297                                                                                                          <font class="keywordtype">bool</font> canOverlapOne)<font class="keyword"> const</font>
00298 <font class="keyword">                 </font>{
00299                         
00300 
00301                         uint8 *pt = (uint8 *) tab;
00302 
00303 
00304                         <font class="comment">// first precompute the various strides (stride * 2, 3 and 4)</font>
00305                         <font class="comment">// const uint32 stride2 = stride &lt;&lt; 1, stride3 = stride + stride2, stride4 = stride2 &lt;&lt; 1;</font>
00306 
00307                         <font class="keyword">const</font> uint32 stride2 = <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> &lt;&lt; 1;
00308 
00309                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> &gt; 1 || canOverlapOne)
00310                         {
00311                                 
00312                                 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>)
00313                                 {
00314                                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00315                                         {                       
00316                                                 <font class="keywordflow">while</font> (numAttrib --)
00317                                                 {               
00318                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00319                                                         <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(OptFastFractionnalPart(it.get()));         </font>
00320                                                         *(T *) pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(it.get()));
00321                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00322                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00323                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00324                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00325                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00326                                                         pt += stride2;                                                  
00327                                                         it.advance();
00328                                                 }
00329                                         }
00330                                         <font class="keywordflow">else</font>
00331                                         {                       
00332                                                 <font class="keywordflow">while</font> (numAttrib --)
00333                                                 {               
00334                                                         <font class="keyword">const</font> <font class="keywordtype">float</font> time =  <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00335                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00336                                                         <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(OptFastFractionnalPart(time));             </font>
00337                                                         *(T *) pt =     <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(time));
00338                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00339                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00340                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00341                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00342                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00343                                                         pt += stride2;                                                  
00344                                                 
00345                                                         it.advance();
00346                                                 }
00347                                         }
00348                                 }
00349                                 <font class="keywordflow">else</font>
00350                                 {
00351                                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00352 
00353                                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00354                                         {                       
00355                                                 <font class="keywordflow">while</font> (numAttrib --)
00356                                                 {               
00357                                                         <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = it.get();
00358                                                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00359                                                         {
00360                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00361                                                         }
00362                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00363                                                         <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(value);            </font>
00364                                                         *(T *) pt =     <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
00365                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00366                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00367                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00368                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00369                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00370                                                         pt += stride2;                                                  
00371                                                 
00372                                                         it.advance();
00373                                                 }
00374                                         }
00375                                         <font class="keywordflow">else</font>
00376                                         {                       
00377                                                 <font class="keywordflow">while</font> (numAttrib --)
00378                                                 {               
00379                                                         <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> =   <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00380                                                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00381                                                         {
00382                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00383                                                         }
00384                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00385                                                         <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(value);            </font>
00386                                                         *(T *) pt =     <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
00387                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00388                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00389                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00390                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00391                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00392                                                         pt += stride2;                                                  
00393                                                         <font class="comment">//pt += stride4; // advance of 4 </font>
00394                                                         it.advance();
00395                                                 }
00396                                         }                                       
00397                                 }
00398                         }
00399                         <font class="keywordflow">else</font>
00400                         {
00401                                 <font class="comment">// the fastest case : it match the particle's life perfeclty</font>
00402 
00403                                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00404                                 {
00405                                         <font class="keywordflow">while</font> (numAttrib --)
00406                                         {               
00407                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00408                                                 <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(it.get());         </font>
00409                                                 *(T *) pt =     <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(it.get());
00410                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00411                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00412                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00413                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00414                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00415                                                 pt += stride2;                                                  
00416 
00417                                                 <font class="comment">//pt += stride4; // advance of 4 </font>
00418                                                 it.advance();
00419                                         }
00420                                 }
00421                                 <font class="keywordflow">else</font>
00422                                 {
00423                                         <font class="comment">// the particle won't cover the whole pattern durin his life</font>
00424 
00425                                         <font class="keywordflow">while</font> (numAttrib --)
00426                                         {               
00427                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00428                                                 *(T *) pt =     <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * it.get());
00429                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00430                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00431                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00432                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00433                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00434                                                 pt += stride2;  
00435                                                 <font class="comment">//*(T *)pt = *(T *)(pt + stride) = *(T *)(pt + stride2)  = *(T *)(pt + stride3) = _F(_NbCycles * it.get());             </font>
00436                                                 <font class="comment">//pt += stride4; // advance of 4 </font>
00437                                                 it.advance();
00438                                         }
00439                                 }
00440                         }       
00441                  }
00442 
00443 
<a name="l00448"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">00448</a>                  <font class="keyword">template</font> &lt;<font class="keyword">typename</font> It&gt; <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(It it, <font class="keywordtype">void</font> *tab, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, uint32 numAttrib
00449                                                                                                   , uint32 nbReplicate, <font class="keywordtype">bool</font> canOverlapOne)<font class="keyword"> const</font>
00450 <font class="keyword">                 </font>{
00451                                 
00452                                 <a class="code" href="debug_8h.html#a6">nlassert</a>(nbReplicate &gt; 1);                              
00453 
00454                                 uint8 *pt = (uint8 *) tab;
00455 
00456                                 <font class="comment">// loop counter</font>
00457                                 uint k;
00458 
00459 
00460                                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> &gt; 1 || canOverlapOne)
00461                                 {
00462                                         
00463                                         <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o1">_Clamp</a>)
00464                                         {
00465                                                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00466                                                 {                       
00467                                                         <font class="keywordflow">while</font> (numAttrib --)
00468                                                         {               
00469                                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00470                                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(it.get()));                                                
00471                                                                 k = nbReplicate - 1;
00472                                                                 <font class="keywordflow">do</font> 
00473                                                                 {
00474                                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00475                                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00476                                                                 }
00477                                                                 <font class="keywordflow">while</font> (--k);
00478                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00479                                                                 it.advance();
00480                                                         }
00481                                                 }
00482                                                 <font class="keywordflow">else</font>
00483                                                 {                       
00484                                                         <font class="keywordflow">while</font> (numAttrib --)
00485                                                         {               
00486                                                                 <font class="keyword">const</font> <font class="keywordtype">float</font> time =  <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00487                                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00488                                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(time));                                    
00489                                                                 k = nbReplicate - 1;
00490                                                                 <font class="keywordflow">do</font> 
00491                                                                 {
00492                                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00493                                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00494                                                                 }
00495                                                                 <font class="keywordflow">while</font> (--k);
00496                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00497                                                                 it.advance();
00498                                                         }
00499                                                 }
00500                                         }
00501                                         <font class="keywordflow">else</font>
00502                                         {
00503                                                 <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00504                                                 <font class="comment">// clamping is on</font>
00505                                                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00506                                                 {                       
00507                                                         <font class="keywordflow">while</font> (numAttrib --)
00508                                                         {               
00509                                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00510                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = it.get();
00511                                                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00512                                                                 {
00513                                                                         <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00514                                                                 }
00515                                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);                                           
00516                                                                 k = nbReplicate - 1;
00517                                                                 <font class="keywordflow">do</font> 
00518                                                                 {
00519                                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00520                                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00521                                                                 }
00522                                                                 <font class="keywordflow">while</font> (--k);
00523                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00524                                                                 it.advance();
00525                                                         }
00526                                                 }
00527                                                 <font class="keywordflow">else</font>
00528                                                 {                       
00529                                                         <font class="keywordflow">while</font> (numAttrib --)
00530                                                         {               
00531                                                                 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> =  <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (it.get());
00532                                                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>)
00533                                                                 {
00534                                                                         <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
00535                                                                 }
00536                                                                 <font class="comment">// fill 4 attrib with the same value at once </font>
00537                                                                 *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);                                   
00538                                                                 k = nbReplicate - 1;
00539                                                                 <font class="keywordflow">do</font> 
00540                                                                 {
00541                                                                         *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00542                                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00543                                                                 }
00544                                                                 <font class="keywordflow">while</font> (--k);
00545                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00546                                                                 it.advance();
00547                                                         }
00548                                                 }
00549                                         }
00550                                 }
00551                                 <font class="keywordflow">else</font>
00552                                 {
00553                                         <font class="comment">// the fastest case : it match the particle's life perfeclty</font>
00554 
00555                                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> == 1)
00556                                         {
00557                                                 <font class="keywordflow">while</font> (numAttrib --)
00558                                                 {               
00559                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00560                                                         *(T *)pt = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(it.get());                                                
00561                                                         k = nbReplicate - 1;
00562                                                         <font class="keywordflow">do</font> 
00563                                                         {
00564                                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00565                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00566                                                         }
00567                                                         <font class="keywordflow">while</font> (--k);
00568                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00569                                                         it.advance();
00570                                                 }
00571                                         }
00572                                         <font class="keywordflow">else</font>
00573                                         {
00574                                                 <font class="comment">// the particle won't cover the whole pattern durin his life</font>
00575 
00576                                                 <font class="keywordflow">while</font> (numAttrib --)
00577                                                 {               
00578                                                         <font class="comment">// fill 4 attrib with the same value at once </font>
00579                                                         *(T *)pt =  <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * it.get());                                   
00580                                                         k = nbReplicate - 1;
00581                                                         <font class="keywordflow">do</font> 
00582                                                         {
00583                                                                 *(T *) (pt + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) pt;
00584                                                                 pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00585                                                         }
00586                                                         <font class="keywordflow">while</font> (--k);
00587                                                         pt += <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
00588                                                         it.advance();
00589                                                 }
00590                                         }
00591                                 }       
00592                         }
00593 
00594         
00595                         <font class="comment">/* template &lt;typename T, class F&gt; */</font>
<a name="l00596"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c3">00596</a>                         <font class="keywordtype">void</font> <font class="comment">/*CPSAttribMakerT&lt;T, F&gt;::*/</font> *<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c3">make</a>(CPSLocated *loc,
00597                                                                                           uint32 startIndex,
00598                                                                                           <font class="keywordtype">void</font> *tab,
00599                                                                                           uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
00600                                                                                           uint32 numAttrib,
00601                                                                                           <font class="keywordtype">bool</font> allowNoCopy <font class="comment">/* = false */</font>,
00602                                                                                           uint32 srcStep <font class="comment">/*= (1 &lt;&lt; 16)*/</font>
00603                                                                                          )<font class="keyword"> const</font>
00604 <font class="keyword">                        </font>{
00605 
00606                                 <a class="code" href="namespaceNL3D.html#a360">OptFastFloorBegin</a>();
00607                                 <a class="code" href="debug_8h.html#a6">nlassert</a>(loc);
00608 
00609                                 <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
00610                                 {                                       
00611                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
00612                                         {
00613                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
00614                                                 {
00615                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
00616                                                                 it(<a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>(loc-&gt;getTime().begin(), startIndex));
00617                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, loc-&gt;getLastForever());
00618                                                 }
00619                                                 <font class="keywordflow">break</font>;
00620                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
00621                                                 {
00622                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
00623                                                                 it(<a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>(loc-&gt;getInvMass().begin() , startIndex));
00624                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00625                                                 }
00626                                                 <font class="keywordflow">break</font>;          
00627                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
00628                                                 {
00629                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
00630                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getSpeed().begin(), startIndex));
00631                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00632                                                 }
00633                                                 <font class="keywordflow">break</font>;
00634 
00635                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
00636                                                 {
00637                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
00638                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex) );
00639                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00640                                                 }
00641                                                 <font class="keywordflow">break</font>;
00642                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
00643                                                 {
00644                                                         CRandomIterator it;
00645                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00646                                                 }
00647                                                 <font class="keywordflow">break</font>;
00648                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
00649                                                 {                       
00650                                                         CDecalIterator it;
00651                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
00652                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00653                                                 }
00654                                                 <font class="keywordflow">break</font>;
00655                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
00656                                                 {       
00657                                                         
00658                                                         CFDot3AddIterator&lt;TIteratorVectStep1&gt; 
00659                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00660                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00661                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00662                                                 }
00663                                                 <font class="keywordflow">break</font>;  
00664                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
00665                                                 {       
00666                                                         
00667                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
00668                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00669                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00670                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00671                                                 }
00672                                                 <font class="keywordflow">break</font>;  
00673                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
00674                                                 {       
00675                                                         
00676                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1&gt; 
00677                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00678                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00679                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00680                                                 }
00681                                                 <font class="keywordflow">break</font>;
00682                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
00683                                                 {       
00684                                                         
00685                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
00686                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00687                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00688                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00689                                                 }
00690                                                 <font class="keywordflow">break</font>;
00691                                         }
00692 
00693                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
00694                                         <font class="comment">// we must alway copy the data there ...</font>
00695                                         <font class="keywordflow">return</font> tab;
00696                                 }
00697                                 <font class="keywordflow">else</font> <font class="comment">// fixed point steps</font>
00698                                 {
00699                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
00700                                         {
00701                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
00702                                                 {
00703                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
00704                                                                 it(<a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getTime().begin(), startIndex, srcStep));
00705                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, loc-&gt;getLastForever());
00706                                                 }
00707                                                 <font class="keywordflow">break</font>;
00708                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
00709                                                 {
00710                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
00711                                                                 it( <a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getInvMass().begin(), startIndex, srcStep));
00712                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00713                                                 }
00714                                                 <font class="keywordflow">break</font>;          
00715                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
00716                                                 {
00717                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
00718                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getSpeed().begin(), startIndex, srcStep) );
00719                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00720                                                 }
00721                                                 <font class="keywordflow">break</font>;
00722 
00723                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
00724                                                 {
00725                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
00726                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00727                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00728                                                 }
00729                                                 <font class="keywordflow">break</font>;
00730                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
00731                                                 {
00732                                                         CRandomIterator it;
00733                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00734                                                 }
00735                                                 <font class="keywordflow">break</font>;
00736                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
00737                                                 {                       
00738                                                         CDecalIterator it;
00739                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
00740                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00741                                                 }
00742                                                 <font class="keywordflow">break</font>;
00743                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
00744                                                 {       
00745                                                         
00746                                                         CFDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00747                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00748                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00749                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00750                                                 }
00751                                                 <font class="keywordflow">break</font>;  
00752                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
00753                                                 {       
00754                                                         
00755                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00756                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00757                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00758                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00759                                                 }
00760                                                 <font class="keywordflow">break</font>;  
00761                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
00762                                                 {       
00763                                                         
00764                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00765                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00766                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00767                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00768                                                 }
00769                                                 <font class="keywordflow">break</font>;
00770                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
00771                                                 {       
00772                                                         
00773                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00774                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00775                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00776                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c0">makeByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00777                                                 }
00778                                                 <font class="keywordflow">break</font>;
00779                                         }
00780 
00781                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
00782                                         <font class="comment">// we must alway copy the data there ...</font>
00783                                         <font class="keywordflow">return</font> tab;
00784                                 }
00785                         }
00786 
00787 
00788 
00789                         <font class="comment">/* template &lt;typename T, class F&gt; */</font>
<a name="l00790"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c4">00790</a>                         <font class="keywordtype">void</font> <font class="comment">/*CPSAttribMakerT&lt;T, F&gt;::*/</font><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c4">make4</a>(CPSLocated *loc,
00791                                                                                            uint32 startIndex,
00792                                                                                            <font class="keywordtype">void</font> *tab,
00793                                                                                            uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
00794                                                                                            uint32 numAttrib,    
00795                                                                                            uint32 srcStep <font class="comment">/*= (1 &lt;&lt; 16)*/</font>
00796                                                                                           )<font class="keyword"> const</font>
00797 <font class="keyword">                        </font>{
00798                                 <a class="code" href="namespaceNL3D.html#a360">OptFastFloorBegin</a>();
00799                                 <a class="code" href="debug_8h.html#a6">nlassert</a>(loc);
00800 
00801                                 <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
00802                                 {
00803                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
00804                                         {
00805                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
00806                                                 {
00807                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
00808                                                                 it(<a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>( loc-&gt;getTime().begin(), startIndex) );
00809                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, loc-&gt;getLastForever());
00810                                                 }
00811                                                 <font class="keywordflow">break</font>;
00812                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
00813                                                 {
00814                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
00815                                                                 it( <a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>(loc-&gt;getInvMass().begin(), startIndex) );
00816                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00817                                                 }
00818                                                 <font class="keywordflow">break</font>;          
00819                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
00820                                                 {
00821                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
00822                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getSpeed().begin(), startIndex) );
00823                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00824                                                 }
00825                                                 <font class="keywordflow">break</font>;
00826 
00827                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
00828                                                 {
00829                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
00830                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin() , startIndex) );
00831                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00832                                                 }
00833                                                 <font class="keywordflow">break</font>;
00834                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
00835                                                 {
00836                                                         CRandomIterator it;
00837                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00838                                                 }
00839                                                 <font class="keywordflow">break</font>;
00840                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
00841                                                 {                       
00842                                                         CDecalIterator it;
00843                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
00844                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00845                                                 }
00846                                                 <font class="keywordflow">break</font>;
00847                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
00848                                                 {       
00849                                                         
00850                                                         CFDot3AddIterator&lt;TIteratorVectStep1&gt; 
00851                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex) );
00852                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00853                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00854                                                 }
00855                                                 <font class="keywordflow">break</font>;  
00856                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
00857                                                 {       
00858                                                         
00859                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
00860                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00861                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00862                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00863                                                 }
00864                                                 <font class="keywordflow">break</font>;  
00865                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
00866                                                 {       
00867                                                         
00868                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1&gt; 
00869                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00870                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00871                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00872                                                 }
00873                                                 <font class="keywordflow">break</font>;
00874                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
00875                                                 {       
00876                                                         
00877                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
00878                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
00879                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00880                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00881                                                 }
00882                                                 <font class="keywordflow">break</font>;
00883                                         }
00884 
00885                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
00886                                 }
00887                                 <font class="keywordflow">else</font> <font class="comment">// fixed point steps</font>
00888                                 {
00889                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
00890                                         {
00891                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
00892                                                 {
00893                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
00894                                                                 it(<a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getTime().begin(), startIndex, srcStep));
00895                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, loc-&gt;getLastForever());
00896                                                 }
00897                                                 <font class="keywordflow">break</font>;
00898                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
00899                                                 {
00900                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
00901                                                                 it( <a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getInvMass().begin() , startIndex, srcStep));
00902                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00903                                                 }
00904                                                 <font class="keywordflow">break</font>;          
00905                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
00906                                                 {
00907                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
00908                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getSpeed().begin(), startIndex, srcStep) );
00909                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00910                                                 }
00911                                                 <font class="keywordflow">break</font>;
00912 
00913                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
00914                                                 {
00915                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
00916                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin() , startIndex, srcStep) );
00917                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00918                                                 }
00919                                                 <font class="keywordflow">break</font>;
00920                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
00921                                                 {
00922                                                         CRandomIterator it;
00923                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">true</font>);
00924                                                 }
00925                                                 <font class="keywordflow">break</font>;
00926                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
00927                                                 {                       
00928                                                         CDecalIterator it;
00929                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
00930                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00931                                                 }
00932                                                 <font class="keywordflow">break</font>;
00933                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
00934                                                 {       
00935                                                         
00936                                                         CFDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00937                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00938                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00939                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00940                                                 }
00941                                                 <font class="keywordflow">break</font>;  
00942                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
00943                                                 {       
00944                                                         
00945                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00946                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00947                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00948                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00949                                                 }
00950                                                 <font class="keywordflow">break</font>;  
00951                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
00952                                                 {       
00953                                                         
00954                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00955                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00956                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00957                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00958                                                 }
00959                                                 <font class="keywordflow">break</font>;
00960                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
00961                                                 {       
00962                                                         
00963                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
00964                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
00965                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
00966                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c1">make4ByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, <font class="keyword">false</font>);
00967                                                 }
00968                                                 <font class="keywordflow">break</font>;
00969                                         }
00970 
00971                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
00972                                 
00973                                 }
00974                         }
00975 
00976 
00977                         <font class="comment">/* template &lt;typename T, class F&gt; */</font>
<a name="l00978"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c5">00978</a>                         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <font class="comment">/*CPSAttribMakerT&lt;T, F&gt;::*/</font><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c5">makeN</a>(CPSLocated *loc,
00979                                                                                 uint32 startIndex,
00980                                                                                 <font class="keywordtype">void</font> *tab,
00981                                                                                 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
00982                                                                                 uint32 numAttrib,
00983                                                                                 uint32 nbReplicate,
00984                                                                                 uint32 srcStep <font class="comment">/* = (1 &lt;&lt; 16)*/</font>                                                                         
00985                                                                         )<font class="keyword"> const</font>
00986 <font class="keyword">                        </font>{
00987                                 <a class="code" href="namespaceNL3D.html#a360">OptFastFloorBegin</a>();
00988                                 <a class="code" href="debug_8h.html#a6">nlassert</a>(loc);
00989                                 <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
00990                                 {                                       
00991                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
00992                                         {
00993                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
00994                                                 {
00995                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
00996                                                                 it(<a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>(loc-&gt;getTime().begin(), startIndex) );
00997                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, loc-&gt;getLastForever());
00998                                                 }
00999                                                 <font class="keywordflow">break</font>;
01000                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
01001                                                 {
01002                                                         CPSBaseIterator&lt;TIteratorFloatStep1&gt; 
01003                                                                 it( <a class="code" href="namespaceNL3D.html#a195">TIteratorFloatStep1</a>(loc-&gt;getInvMass().begin() , startIndex) );
01004                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01005                                                 }
01006                                                 <font class="keywordflow">break</font>;          
01007                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
01008                                                 {
01009                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
01010                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getSpeed().begin(), startIndex) );
01011                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01012                                                 }
01013                                                 <font class="keywordflow">break</font>;
01014 
01015                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
01016                                                 {
01017                                                         CVectNormIterator&lt;TIteratorVectStep1&gt; 
01018                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>( loc-&gt;getPos().begin() , startIndex ) );
01019                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01020                                                 }
01021                                                 <font class="keywordflow">break</font>;
01022                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
01023                                                 {
01024                                                         CRandomIterator it;
01025                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01026                                                 }
01027                                                 <font class="keywordflow">break</font>;
01028                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
01029                                                 {                       
01030                                                         CDecalIterator it;
01031                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
01032                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01033                                                 }
01034                                                 <font class="keywordflow">break</font>;
01035                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
01036                                                 {       
01037                                                         
01038                                                         CFDot3AddIterator&lt;TIteratorVectStep1&gt; 
01039                                                                 it( <a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex) );
01040                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01041                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01042                                                 }
01043                                                 <font class="keywordflow">break</font>;  
01044                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
01045                                                 {       
01046                                                         
01047                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
01048                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
01049                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01050                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01051                                                 }
01052                                                 <font class="keywordflow">break</font>;  
01053                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
01054                                                 {       
01055                                                         
01056                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1&gt;
01057                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
01058                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01059                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01060                                                 }
01061                                                 <font class="keywordflow">break</font>;
01062                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
01063                                                 {       
01064                                                         
01065                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1&gt; 
01066                                                                 it(<a class="code" href="namespaceNL3D.html#a196">TIteratorVectStep1</a>(loc-&gt;getPos().begin(), startIndex));
01067                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01068                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01069                                                 }
01070                                                 <font class="keywordflow">break</font>;
01071                                         }
01072 
01073                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();                                      
01074                                 }
01075                                 <font class="keywordflow">else</font> <font class="comment">// fixed point steps</font>
01076                                 {
01077                                         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
01078                                         {
01079                                                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
01080                                                 {
01081                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
01082                                                                 it(<a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getTime().begin(), startIndex, srcStep));
01083                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, loc-&gt;getLastForever());
01084                                                 }
01085                                                 <font class="keywordflow">break</font>;
01086                                                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
01087                                                 {
01088                                                         CPSBaseIterator&lt;TIteratorFloatStep1616&gt; 
01089                                                                 it( <a class="code" href="namespaceNL3D.html#a197">TIteratorFloatStep1616</a>(loc-&gt;getInvMass().begin() , startIndex, srcStep) );
01090                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01091                                                 }
01092                                                 <font class="keywordflow">break</font>;          
01093                                                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
01094                                                 {
01095                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
01096                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getSpeed().begin(), startIndex, srcStep) );
01097                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01098                                                 }
01099                                                 <font class="keywordflow">break</font>;
01100 
01101                                                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
01102                                                 {
01103                                                         CVectNormIterator&lt;TIteratorVectStep1616&gt; 
01104                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
01105                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01106                                                 }
01107                                                 <font class="keywordflow">break</font>;
01108                                                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
01109                                                 {
01110                                                         CRandomIterator it;
01111                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">true</font>);
01112                                                 }
01113                                                 <font class="keywordflow">break</font>;
01114                                                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
01115                                                 {                       
01116                                                         CDecalIterator it;
01117                                                         it.Value = loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
01118                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01119                                                 }
01120                                                 <font class="keywordflow">break</font>;
01121                                                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
01122                                                 {       
01123                                                         
01124                                                         CFDot3AddIterator&lt;TIteratorVectStep1616&gt; 
01125                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
01126                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01127                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01128                                                 }
01129                                                 <font class="keywordflow">break</font>;  
01130                                                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
01131                                                 {       
01132                                                         
01133                                                         CFSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
01134                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>(loc-&gt;getPos().begin(), startIndex, srcStep) );
01135                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01136                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01137                                                 }
01138                                                 <font class="keywordflow">break</font>;  
01139                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
01140                                                 {       
01141                                                         
01142                                                         CFClampDot3AddIterator&lt;TIteratorVectStep1616&gt; 
01143                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>( loc-&gt;getPos().begin(), startIndex, srcStep) );
01144                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01145                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01146                                                 }
01147                                                 <font class="keywordflow">break</font>;
01148                                                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
01149                                                 {       
01150                                                         
01151                                                         CFClampSquareDot3AddIterator&lt;TIteratorVectStep1616&gt; 
01152                                                                 it( <a class="code" href="namespaceNL3D.html#a199">TIteratorVectStep1616</a>( loc-&gt;getPos().begin(), startIndex,  srcStep) );
01153                                                         loc-&gt;getLODVect(it.V, it.Offset, loc-&gt;isInSystemBasis());                       
01154                                                         <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#c2">makeNByIterator</a>(it, tab, <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, numAttrib, nbReplicate, <font class="keyword">false</font>);
01155                                                 }
01156                                                 <font class="keywordflow">break</font>;
01157                                         }
01158 
01159                                         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();                              
01160                                 }       
01161                         }
01162 
01163 
01164 };
01165 
01167 <font class="comment">// implementation of CPSAttribMakerT methods //</font>
01169 <font class="comment"></font>
01170 
01171 <font class="keyword">template</font> &lt;<font class="keyword">typename</font> T, <font class="keyword">class</font> F&gt; 
<a name="l01172"></a><a class="code" href="classNL3D_1_1CPSAttribMakerT.html#a0">01172</a> T  CPSAttribMakerT&lt;T, F&gt;::get(CPSLocated *loc, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>)
01173 {       
01174         <a class="code" href="namespaceNL3D.html#a360">OptFastFloorBegin</a>();
01175         T result;
01176         <a class="code" href="debug_8h.html#a6">nlassert</a>(loc);
01177         <font class="keywordflow">switch</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.InputType)
01178         {
01179                 <font class="keywordflow">case</font> CPSInputType::attrDate:    
01180                 {
01181                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * loc-&gt;getTime()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>];
01182                         <font class="keywordflow">if</font> (_Clamp)
01183                         {
01184                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>) <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
01185                         }
01186 
01187                         result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>));
01188                 }
01189                 <font class="keywordflow">break</font>;
01190                 <font class="keywordflow">case</font> CPSInputType::attrInverseMass:     
01191                 {
01192                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * loc-&gt;getInvMass()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>];
01193                         <font class="keywordflow">if</font> (_Clamp)
01194                         {
01195                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>) <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
01196                         }
01197                         result =  <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>));
01198                 }
01199                 <font class="keywordflow">break</font>;          
01200                 <font class="keywordflow">case</font> CPSInputType::attrSpeed:   
01201                 {
01202                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * loc-&gt;getSpeed()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>].norm();
01203                         <font class="keywordflow">if</font> (_Clamp)
01204                         {
01205                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>) <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
01206                         }
01207                         result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>));
01208                 }
01209                 <font class="keywordflow">break</font>;
01210 
01211                 <font class="keywordflow">case</font> CPSInputType::attrPosition:        
01212                 {
01213                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * loc-&gt;getPos()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>].norm();
01214                         <font class="keywordflow">if</font> (_Clamp)
01215                         {
01216                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>) <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
01217                         }
01218                         result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a363">OptFastFractionnalPart</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>));
01219                 }
01220                 <font class="keywordflow">break</font>;
01221                 <font class="keywordflow">case</font> CPSInputType::attrUniformRandom:   
01222                 {
01223                         result =  <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<font class="keywordtype">float</font>(rand() * (1 / <font class="keywordtype">double</font>(RAND_MAX))));
01224                 }
01225                 <font class="keywordflow">break</font>;
01226                 <font class="keywordflow">case</font> CPSInputType::attrUserParam:
01227                 {                       
01228                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * loc-&gt;getUserParam(<a class="code" href="classNL3D_1_1CPSAttribMakerT.html#o0">_InputType</a>.UserParamNum); 
01229                         <font class="keywordflow">if</font> (_Clamp)
01230                         {
01231                                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>) <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a> = <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>;
01232                         }
01233                         result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>);
01234                 }
01235                 <font class="keywordflow">break</font>;
01236                 <font class="keywordflow">case</font> CPSInputType::attrLOD:
01237                 {       
01238                         <font class="keyword">static</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> lodVect;
01239                         <font class="keywordtype">float</font> lodOffset;                        
01240                         loc-&gt;getLODVect(lodVect, lodOffset, loc-&gt;isInSystemBasis());                                            
01241                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = fabsf(loc-&gt;getPos()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>] * lodVect + lodOffset);
01242                         <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>;                  
01243                         <font class="keywordflow">if</font> (_Clamp)
01244                         {
01245                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);
01246                         }
01247                         <font class="keywordflow">else</font> result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> - <a class="code" href="memory__common_8h.html#a11">uint32</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>));                                                
01248                 }
01249                 <font class="keywordflow">break</font>;
01250                 <font class="keywordflow">case</font> CPSInputType::attrSquareLOD:
01251                 {       
01252                         <font class="keyword">static</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> lodVect;
01253                         <font class="keywordtype">float</font> lodOffset;                        
01254                         loc-&gt;getLODVect(lodVect, lodOffset, loc-&gt;isInSystemBasis());                                            
01255                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = loc-&gt;getPos()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>] * lodVect + lodOffset;
01256                         <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> * <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);
01257 
01258                         <font class="keywordflow">if</font> (_Clamp)
01259                         {
01260                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);
01261                         }
01262                         <font class="keywordflow">else</font> result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> - <a class="code" href="memory__common_8h.html#a11">uint32</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>));                                                
01263                 }
01264                 <font class="keywordflow">break</font>;
01265                 <font class="keywordflow">case</font> CPSInputType::attrClampedLOD:
01266                 {       
01267                         <font class="keyword">static</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> lodVect;
01268                         <font class="keywordtype">float</font> lodOffset;                        
01269                         loc-&gt;getLODVect(lodVect, lodOffset, loc-&gt;isInSystemBasis());                                            
01270 
01271                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = loc-&gt;getPos()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>] * lodVect + lodOffset;
01272                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &lt; 0) 
01273                         {
01274                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>);
01275                                 <font class="keywordflow">break</font>;
01276                         }
01277                         <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);                                                                        
01278                         <font class="keywordflow">if</font> (_Clamp)
01279                         {
01280                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);
01281                         }
01282                         <font class="keywordflow">else</font> result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> - <a class="code" href="memory__common_8h.html#a11">uint32</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>));                                                
01283                 }
01284                 <font class="keywordflow">break</font>;
01285                 <font class="keywordflow">case</font> CPSInputType::attrClampedSquareLOD:
01286                 {       
01287                         <font class="keyword">static</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> lodVect;
01288                         <font class="keywordtype">float</font> lodOffset;                        
01289                         loc-&gt;getLODVect(lodVect, lodOffset, loc-&gt;isInSystemBasis());                                            
01290 
01291                         <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = loc-&gt;getPos()[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>] * lodVect + lodOffset;
01292                         <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &lt; 0) 
01293                         {
01294                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a>);
01295                                 <font class="keywordflow">break</font>; 
01296                         }
01297                         <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n0">_NbCycles</a> * (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> * <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);                                                                    
01298                         <font class="keywordflow">if</font> (_Clamp)
01299                         {
01300                                 result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> &gt; <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> ? <a class="code" href="namespaceNL3D.html#a186">MaxInputValue</a> : <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>);
01301                         }
01302                         <font class="keywordflow">else</font> result = <a class="code" href="classNL3D_1_1CPSAttribMakerT.html#m0">_F</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> - <a class="code" href="memory__common_8h.html#a11">uint32</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>));                                                
01303                 }
01304                 <font class="keywordflow">break</font>;  
01305                 <font class="keywordflow">default</font>:
01306                         result = T();
01307                 <font class="keywordflow">break</font>;          
01308         }
01309 
01310         <a class="code" href="namespaceNL3D.html#a361">OptFastFloorEnd</a>();
01311         <font class="keywordflow">return</font> result;
01312         
01313 }
01314 
01315 
<a name="l01324"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html">01324</a> <font class="keyword">template</font> &lt;<font class="keyword">typename</font> T&gt; <font class="keyword">class </font>CPSAttribMakerMemory : <font class="keyword">public</font> CPSAttribMaker&lt;T&gt;
01325 {
01326 <font class="keyword">public</font>: 
01327 
<a name="l01330"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a0">01330</a>         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a0">CPSAttribMakerMemory</a>() : <a class="code" href="classNL3D_1_1CPSAttribMaker.html#z706_0">CPSAttribMaker</a>&lt;T&gt;(1.f), <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>(NULL)
01331         {
01332                 <a class="code" href="classNL3D_1_1CPSAttribMaker.html#n1">_HasMemory</a> = <font class="keyword">true</font>;
01333         }
01334 
<a name="l01353"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a1">01353</a>     <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a1">setDefaultValue</a>(T defaultValue) { <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a> = defaultValue;}
01354 
<a name="l01356"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a2">01356</a>         T <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a2">getDefaultValue</a>(<font class="keywordtype">void</font>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>; }
01357 
01358 
01359 
<a name="l01363"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a3">01363</a>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a3">setScheme</a>(CPSAttribMaker&lt;T&gt; *scheme)
01364         {
01365                 <a class="code" href="debug_8h.html#a6">nlassert</a>(scheme);
01366                 <font class="keywordflow">if</font> (_Scheme) <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>;
01367                 <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a> = scheme;
01368                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;hasMemory())
01369                 {
01370                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;resize(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getMaxSize(), <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize());
01371                 }
01372         }
01373 
<a name="l01375"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a4">01375</a>         CPSAttribMaker&lt;T&gt; *<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a4">getScheme</a>(<font class="keywordtype">void</font>) { <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>; }
<a name="l01377"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a5">01377</a>         <font class="keyword">const</font> CPSAttribMaker&lt;T&gt; *<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a4">getScheme</a>(<font class="keywordtype">void</font>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>; }
01378 
01379 
01380         <font class="comment">// copy ctor</font>
<a name="l01381"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a6">01381</a>         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a0">CPSAttribMakerMemory</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a0">CPSAttribMakerMemory</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>) : <a class="code" href="classNL3D_1_1CPSAttribMaker.html#z706_0">CPSAttribMaker</a>&lt;T&gt;(<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>) <font class="comment">// parent copy ctor</font>
01382         {
01383                 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>._Scheme);
01384                 std::auto_ptr&lt;CPSAttribMaker&lt;T&gt; &gt; <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>(NLMISC::safe_cast&lt;CPSAttribMaker&lt;T&gt; *&gt;(<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>._Scheme-&gt;clone()));
01385                 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>._T;
01386                 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>._DefaultValue;
01387                 this-&gt;<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>.release();
01388         }
<a name="l01390"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a7">01390</a>         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a7">~CPSAttribMakerMemory</a>()
01391         {
01392                 <font class="keywordflow">if</font> (_Scheme)
01393                 {
01394                         <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>;
01395                 }
01396         }
01397 
<a name="l01399"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a8">01399</a>         <font class="keyword">virtual</font> T <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a8">get</a>(CPSLocated *loc, uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) 
01400         { 
01401                 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> &lt; <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize()) <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>[<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>];
01402                 <font class="keywordflow">else</font> <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>;
01403         }
01404 
<a name="l01406"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a9">01406</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> *<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a9">make</a>(CPSLocated *loc,
01407                                            uint32 startIndex,
01408                                            <font class="keywordtype">void</font> *output,
01409                                            uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
01410                                            uint32 numAttrib,
01411                                            <font class="keywordtype">bool</font> allowNoCopy = <font class="keyword">false</font>,
01412                                            uint32 srcStep = (1 &lt;&lt; 16)
01413                                           )<font class="keyword"> const</font>
01414 <font class="keyword">        </font>{
01415                 <font class="keywordflow">if</font> (!numAttrib) <font class="keywordflow">return</font> output;
01416                 <font class="keywordtype">void</font> *tab = output;
01417                 <font class="keywordflow">if</font> (!allowNoCopy || srcStep != (1 &lt;&lt; 16) || <font class="keyword">sizeof</font>(T) != <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>)
01418                 {
01419                         <font class="comment">// we just copy what we have memorized</font>
01420                         <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
01421                         {
01422                                 CPSAttrib&lt;T&gt;::const_iterator it = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex, endIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex + numAttrib;
01423                                 <font class="keywordflow">do</font>
01424                                 {
01425                                         *(T *) tab = *it;
01426                                         ++it;
01427                                         tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01428                                 }
01429                                 <font class="keywordflow">while</font> (it != endIt);
01430                         }
01431                         <font class="keywordflow">else</font> <font class="comment">// no constant step</font>
01432                         {
01433                                 uint32 fpIndex = startIndex * srcStep;
01434                                 CPSAttrib&lt;T&gt;::const_iterator startIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin();
01435                                 <font class="keywordflow">while</font> (numAttrib --)
01436                                 {
01437                                         *(T *) tab = *(startIt + (fpIndex &gt;&gt; 16));                                      
01438                                         tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01439                                         fpIndex += srcStep;
01440                                 }                               
01441                         }
01442                         <font class="keywordflow">return</font> output;
01443                 }
01444                 <font class="keywordflow">else</font>
01445                 {
01446                         <font class="comment">// the caller will read data directly in the vector ...</font>
01447                         <font class="keywordflow">return</font> (<font class="keywordtype">void</font> *) &amp;(*(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex));
01448                 }
01449         }       
01450 
<a name="l01452"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a10">01452</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a10">make4</a>(CPSLocated *loc,
01453                                            uint32 startIndex,
01454                                            <font class="keywordtype">void</font> *tab,
01455                                            uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
01456                                            uint32 numAttrib,
01457                                            uint32 srcStep = (1 &lt;&lt; 16)
01458                                            )<font class="keyword"> const</font>
01459 <font class="keyword">        </font>{
01460                 <font class="comment">// we just copy what we have memorized</font>
01461                 <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
01462                 {
01463                         CPSAttrib&lt;T&gt;::const_iterator it = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex, endIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex + numAttrib;
01464                         <font class="keywordflow">while</font> (it != endIt)
01465                         {
01466                                 *(T *) tab = *it;
01467                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01468                                 *(T *) tab = *it;
01469                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01470                                 *(T *) tab = *it;
01471                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01472                                 *(T *) tab = *it;
01473                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01474                                 ++it;                   
01475                         }
01476                 }
01477                 <font class="keywordflow">else</font>
01478                 {
01479                         uint32 fpIndex = startIndex * srcStep;
01480                         CPSAttrib&lt;T&gt;::const_iterator startIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin();
01481                         <font class="keywordflow">while</font> (numAttrib --)
01482                         {
01483                                 *(T *) tab = *(startIt + (fpIndex &gt;&gt; 16));                                      
01484                                 *(T *) ((uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) tab;
01485                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01486                                 *(T *) ((uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) tab;
01487                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01488                                 *(T *) ((uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) tab;
01489 
01490                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a> + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01491                                 fpIndex += srcStep;
01492                         }       
01493                 }
01494         }
01495 
<a name="l01497"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a11">01497</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a11">makeN</a>(CPSLocated *loc,
01498                                            uint32 startIndex,
01499                                            <font class="keywordtype">void</font> *tab,
01500                                            uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>,
01501                                            uint32 numAttrib,
01502                                            uint32 nbReplicate,
01503                                            uint32 srcStep = (1 &lt;&lt; 16)
01504                                           )<font class="keyword"> const</font>
01505 <font class="keyword">        </font>{
01506                 <font class="comment">// we just copy what we have memorized</font>
01507                 uint k;
01508                 CPSAttrib&lt;T&gt;::const_iterator it = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex, endIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin() + startIndex + numAttrib;
01509                 <font class="keywordflow">if</font> (srcStep == (1 &lt;&lt; 16))
01510                 {
01511                         <font class="keywordflow">while</font> (it != endIt)
01512                         {
01513                         
01514                                 <font class="keywordflow">for</font> (k = 0; k &lt; nbReplicate; ++k)
01515                                 {
01516                                         *(T *) tab = *it;
01517                                         tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01518                                 }                       
01519                                 ++it;
01520                         }
01521                 }
01522                 <font class="keywordflow">else</font>
01523                 {
01524                         uint32 fpIndex = startIndex * srcStep;
01525                         CPSAttrib&lt;T&gt;::const_iterator startIt = <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.begin();      
01526 
01527                         <font class="keywordflow">while</font> (numAttrib --)
01528                         {               
01529                                 *(T *) tab = *(startIt + (fpIndex &gt;&gt; 16));
01530                                 <font class="keywordflow">for</font> (k = 1; k &lt; nbReplicate; ++k)
01531                                 {
01532                                         *(T *) ((uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>) = *(T *) tab;
01533                                         tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01534                                 }
01535                                 tab = (uint8 *) tab + <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>;
01536                                 fpIndex += srcStep;
01537                         }
01538 
01539                 }               
01540         }
01541 
<a name="l01543"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a12">01543</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a12">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f) <font class="keywordflow">throw</font>(NLMISC::EStream)
01544         {
01545                 
01546                 f.serialVersion(1);
01547                 CPSAttribMaker&lt;T&gt;::serial(f);
01548                 <font class="keywordflow">if</font> (f.isReading())
01549                 {
01550                         <font class="keywordflow">if</font> (_Scheme) <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>;
01551                 }
01552                 f.serialPolyPtr(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>);
01553                 f.serial(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>);
01554                 f.serial(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>);
01555         }
01556         
<a name="l01558"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a13">01558</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a13">deleteElement</a>(uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) 
01559         { 
01560                 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>); <font class="comment">// you should have called setScheme !</font>
01561                 <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.remove(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>); 
01562                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;hasMemory())
01563                 {
01564                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;deleteElement(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>);
01565                 }
01566         }
<a name="l01568"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a14">01568</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a14">newElement</a>(CPSLocated *emitterLocated, uint32 emitterIndex) 
01569         { 
01570                 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>); <font class="comment">// you should have called setScheme !</font>
01571 
01572                 <font class="comment">// we should create the contained scheme before this one if it has memory...</font>
01573                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;hasMemory())
01574                 {
01575                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;newElement(emitterLocated, emitterIndex);
01576                 }
01577 
01578                 <font class="keywordflow">if</font> (emitterLocated)
01579                 {
01580                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.insert(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;get(emitterLocated, emitterIndex));
01581                 }
01582                 <font class="keywordflow">else</font>
01583                 {                       
01588                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.insert(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>);
01589                 }               
01590         }
<a name="l01591"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a15">01591</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#a15">resize</a>(uint32 capacity, uint32 nbPresentElements)
01592         {
01593                 <a class="code" href="debug_8h.html#a6">nlassert</a>(capacity &lt; (1 &lt;&lt; 16));
01594                 <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.resize(capacity);
01595                 <font class="keywordflow">if</font> (nbPresentElements &gt; <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize())
01596                 {
01597                         <font class="keywordflow">while</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize() != nbPresentElements)
01598                         {
01599                                 <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.insert(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>);
01600                         }
01601                 }
01602                 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (nbPresentElements &lt; <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize())
01603                 {
01604                         <font class="keywordflow">while</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize() != nbPresentElements)
01605                         {
01606                                 <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.remove(<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>.getSize() - 1);
01607                         }
01608                 }
01609 
01610 
01611                 <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a> &amp;&amp; <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;hasMemory())
01612                 {
01613                         <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>-&gt;resize(capacity,   nbPresentElements);
01614                 }
01615 
01616         }       
01617 
01618 
01619 <font class="keyword">protected</font>:
01620         <font class="comment">// the attribute we memorize</font>
<a name="l01621"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">01621</a>         CPSAttrib&lt;T&gt; <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n0">_T</a>;
01622 
01623         <font class="comment">// the default value for generation (when no emitter can be used)</font>
<a name="l01624"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">01624</a>         T <a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n1">_DefaultValue</a>;
01625 
<a name="l01630"></a><a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">01630</a>         CPSAttribMaker&lt;T&gt; *<a class="code" href="classNL3D_1_1CPSAttribMakerMemory.html#n2">_Scheme</a>;
01631 
01632 };
01633 
01634 
01635 
01636 } <font class="comment">// NL3D</font>
01637 
01638 
01639 <font class="preprocessor">#endif // NL_PS_ATTRIB_MAKER_HELPER_H</font>
01640 <font class="preprocessor"></font>
01641 <font class="comment">/* End of ps_attrib_maker_helper.h */</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>