aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03376.html
blob: 94651609c63d4bba856175e4185e83334e43b0a8 (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
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NL3D::CShapeBank class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CShapeBank Class Reference</h1><code>#include &lt;<a class="el" href="a06379.html">shape_bank.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A <a class="el" href="a03376.html">CShapeBank</a> handle all the instance of the shapes and the cache management system. There is a default cache. If the shape is not linked explicitly to any cache it is linked to the default cache. The comportement of this cache is to not do any cache. When the release is called on the last reference to a shape linked to this cache, the shape is removed instantly. This is the behavior of all newly created cache before we call the setShapeCacheSize method.<p>
NB: ShapeCacheName is case-sensitive but shapeName are not (all entry are lwrcased)<p>
<dl compact><dt><b>Author:</b></dt><dd>Matthieu Besson <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00063">63</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Shape/Instances.</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt;<br>
 <a class="el" href="a02539.html">IShape</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_0">PShape</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 <a class="el" href="a03408.html">PShape</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_1">TShapeMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 <a class="el" href="a03379.html">CWaitingShape</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_2">TWaitingShapesMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_3">processWSUploadTexture</a> (<a class="el" href="a03379.html">CWaitingShape</a> &amp;rWS, <a class="el" href="a04558.html#a11">uint32</a> &amp;nTotalUploaded, <a class="el" href="a03487.html">ITexture</a> *pText)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return true if the texture is entirely uploaded  <a href="#NL3D_1_1CShapeBankz914_3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_1">TShapeMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_2">TWaitingShapesMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a></td></tr>

<tr><td colspan=2><br><h2>Shape/Caches.</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 <a class="el" href="a03377.html">CShapeCache</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_0">TShapeCacheMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 std::string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_1">TShapeCacheNameMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; <a class="el" href="a02539.html">IShape</a> *,<br>
 <a class="el" href="a03378.html">CShapeInfo</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_2">TShapeInfoMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_3">checkShapeCache</a> (<a class="el" href="a03377.html">CShapeCache</a> *pShpCache)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03377.html">CShapeCache</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a> (const std::string &amp;shapeCacheName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03377.html">CShapeCache</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_5">getShapeCachePtrFromShapeName</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03377.html">CShapeCache</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_6">getShapeCachePtrFromShapePtr</a> (<a class="el" href="a02539.html">IShape</a> *pShp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::string *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_7">getShapeNameFromShapePtr</a> (<a class="el" href="a02539.html">IShape</a> *pShp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02539.html">IShape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a> (const std::string &amp;pShpName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_0">TShapeCacheMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_1">TShapeCacheNameMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_2">TShapeInfoMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a></td></tr>

<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">State of a shape</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0">TShapeState</a> { <br>
&nbsp;&nbsp;<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw5">NotPresent</a>, 
<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw6">Present</a>, 
<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1">AsyncLoad_Error</a>, 
<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw3">AsyncLoad_Shape</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4">AsyncLoad_Texture</a>, 
<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2">AsyncLoad_Ready</a>, 
<a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0">AsyncLoad_Delete</a>
<br>
 }</td></tr>

<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBanka0">CShapeBank</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBanka1">~CShapeBank</a> ()</td></tr>

<tr><td colspan="2"><div class="groupHeader">Instance Management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_0">add</a> (const std::string &amp;shapeName, <a class="el" href="a02539.html">IShape</a> *shape)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add directly a shape to the bank. If the shape name is already used do nothing.  <a href="#NL3D_1_1CShapeBankz908_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02539.html">IShape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_1">addRef</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a reference to a shape and return the instance created.  <a href="#NL3D_1_1CShapeBankz908_1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_2">cancelLoadAsync</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add directly a shape to the bank. If the shape name is already used do nothing.  <a href="#NL3D_1_1CShapeBankz908_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02539.html">IShape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_3">getShape</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0">TShapeState</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_4">isPresent</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return TRUE if the shape is present in the bank. Process the waiting shapes.  <a href="#NL3D_1_1CShapeBankz908_4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_5">isShapeWaiting</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add directly a shape to the bank. If the shape name is already used do nothing.  <a href="#NL3D_1_1CShapeBankz908_5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_6">load</a> (const std::string &amp;shapeName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load the corresponding file from disk and add it to the bank.  <a href="#NL3D_1_1CShapeBankz908_6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_7">loadAsync</a> (const std::string &amp;shapeName, <a class="el" href="a02434.html">IDriver</a> *pDriver, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;position, bool *bSignal, <a class="el" href="a04558.html#a15">uint</a> selectedTexture)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_8">processWaitingShapes</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">processWaitingShapes must be done one time per frame  <a href="#NL3D_1_1CShapeBankz908_8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_9">release</a> (<a class="el" href="a02539.html">IShape</a> *pShp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz908_10">setMaxBytesToUpload</a> (<a class="el" href="a04558.html#a11">uint32</a> MaxUploadPerFrame)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup the maximum number of bytes to upload for a frame (texture upload from RAM to VRAM).  <a href="#NL3D_1_1CShapeBankz908_10"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Shape cache management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_0">addShapeCache</a> (const std::string &amp;shapeCacheName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new ShapeCache. If already exist do nothing.  <a href="#NL3D_1_1CShapeBankz910_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_1">getShapeCacheFreeSpace</a> (const std::string &amp;shapeCacheName) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return free cache space (maxSize-nbCurrentInCache)  <a href="#NL3D_1_1CShapeBankz910_1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_2">isShapeCache</a> (const std::string &amp;shapeCacheName) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">true if the shape cache exist  <a href="#NL3D_1_1CShapeBankz910_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_3">linkShapeToShapeCache</a> (const std::string &amp;shapeName, const std::string &amp;shapeCacheName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Link a shape to a ShapeCache. The ShapeCache must exist and must not contains the shape.  <a href="#NL3D_1_1CShapeBankz910_3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_4">removeShapeCache</a> (const std::string &amp;shapeCacheName)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_5">reset</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_6">setShapeCacheSize</a> (const std::string &amp;shapeCacheName, <a class="el" href="a04558.html#a10">sint32</a> maxSize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the shapeCache shapeCacheName the new size.(delete shapes if maxsize&lt;shapeCacheSize).  <a href="#NL3D_1_1CShapeBankz910_6"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Tools</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03376.html#NL3D_1_1CShapeBankz912_0">preLoadShapes</a> (const std::string &amp;shapeCacheName, const std::vector&lt; std::string &gt; &amp;listFile, const std::string &amp;wildCardNotLwr, <a class="el" href="a03873.html">NLMISC::IProgressCallback</a> *progress=NULL, bool flushTextures=false, <a class="el" href="a02434.html">IDriver</a> *drv=NULL)</td></tr>

</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="NL3D_1_1CShapeBankz914_0" doxytag="NL3D::CShapeBank::PShape" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt;<a class="el" href="a02539.html">IShape</a>&gt; <a class="el" href="a03408.html">NL3D::CShapeBank::PShape</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00167">167</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_0" doxytag="NL3D::CShapeBank::TShapeCacheMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt;std::string,<a class="el" href="a03377.html">CShapeCache</a>&gt; <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_0">NL3D::CShapeBank::TShapeCacheMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00232">232</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_1" doxytag="NL3D::CShapeBank::TShapeCacheNameMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt;std::string,std::string&gt; <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_1">NL3D::CShapeBank::TShapeCacheNameMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00231">231</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_2" doxytag="NL3D::CShapeBank::TShapeInfoMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt;<a class="el" href="a02539.html">IShape</a>*,<a class="el" href="a03378.html">CShapeInfo</a>&gt; <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_2">NL3D::CShapeBank::TShapeInfoMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00233">233</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_1" doxytag="NL3D::CShapeBank::TShapeMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt;std::string, <a class="el" href="a03408.html">PShape</a>&gt; <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_1">NL3D::CShapeBank::TShapeMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00168">168</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_2" doxytag="NL3D::CShapeBank::TWaitingShapesMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt; std::string, <a class="el" href="a03379.html">CWaitingShape</a> &gt; <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_2">NL3D::CShapeBank::TWaitingShapesMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00192">192</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="NL3D_1_1CShapeBankz906_0" doxytag="NL3D::CShapeBank::TShapeState" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> enum <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0">NL3D::CShapeBank::TShapeState</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
NotPresent : Not present in the bank Present : Present in the bank and ready to be used AsyncLoad_Error : Asynchronous loading failed AsyncLoad_Shape : Asynchronous loading is currently loading the .shape file, textures and lightmaps AsyncLoad_Texture : Asynchronous loading is currently uploading textures and lightmaps to VRAM<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw5" doxytag="NotPresent" ></a>NotPresent</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw6" doxytag="Present" ></a>Present</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1" doxytag="AsyncLoad_Error" ></a>AsyncLoad_Error</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw3" doxytag="AsyncLoad_Shape" ></a>AsyncLoad_Shape</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4" doxytag="AsyncLoad_Texture" ></a>AsyncLoad_Texture</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2" doxytag="AsyncLoad_Ready" ></a>AsyncLoad_Ready</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0" doxytag="AsyncLoad_Delete" ></a>AsyncLoad_Delete</em>&nbsp;</td><td>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="a06379.html#l00075">75</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
<div class="fragment"><pre>00075                          {      <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw5">NotPresent</a>, <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw6">Present</a>, 
00076                                                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1">AsyncLoad_Error</a>, <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw3">AsyncLoad_Shape</a>, <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4">AsyncLoad_Texture</a>, <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2">AsyncLoad_Ready</a>, <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0">AsyncLoad_Delete</a> };
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CShapeBanka0" doxytag="NL3D::CShapeBank::CShapeBank" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CShapeBank::CShapeBank </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00044">44</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00562">addShapeCache()</a>.
<p>
<div class="fragment"><pre>00045 {
00046         <span class="comment">// Default cache creation</span>
00047         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz910_0">addShapeCache</a>( <span class="stringliteral">"default"</span> );
00048         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a> = 16*1024;
00049 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBanka1" doxytag="NL3D::CShapeBank::~CShapeBank" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CShapeBank::~<a class="el" href="a03376.html">CShapeBank</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00053">53</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
<div class="fragment"><pre>00054 {
00055 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CShapeBankz908_0" doxytag="NL3D::CShapeBank::add" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::add </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02539.html">IShape</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>shape</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add directly a shape to the bank. If the shape name is already used do nothing. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00527">527</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06378.html#l00735">getShapeCachePtrFromShapeName()</a>, <a class="el" href="a06379.html#l00217">NL3D::CShapeBank::CShapeInfo::pShpCache</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, <a class="el" href="a06379.html#l00234">ShapeNameToShapeCacheName</a>, <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>, <a class="el" href="a06379.html#l00218">NL3D::CShapeBank::CShapeInfo::sShpName</a>, and <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>.
<p>
Referenced by <a class="el" href="a06250.html#l01110">NL3D::GetDummyMeshFromBank()</a>, <a class="el" href="a06378.html#l00427">load()</a>, <a class="el" href="a06250.html#l00225">NL3D::CPSMesh::newElement()</a>, and <a class="el" href="a06378.html#l00134">processWaitingShapes()</a>.
<p>
<div class="fragment"><pre>00528 {
00529         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00530 
00531         <span class="comment">// Is the shape name already used ?</span>
00532         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find( shapeName );
00533         <span class="keywordflow">if</span>( smIt == <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00534         {
00535                 <span class="comment">// No ok so lets add the smart pointer</span>
00536                 <a class="code" href="a03408.html">CSmartPtr&lt;IShape&gt;</a> spShape = pShp;
00537                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>[shapeName] = spShape;
00538 
00539                 <span class="comment">// create the shape info</span>
00540                 CShapeInfo siTemp;
00541                 siTemp.sShpName = shapeName;
00542                 siTemp.pShpCache = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_5">getShapeCachePtrFromShapeName</a>( shapeName );
00543                 <span class="comment">// Is the shape has a valid shape cache ? </span>
00544                 <span class="keywordflow">if</span>( siTemp.pShpCache == NULL )
00545                 {
00546                         <span class="comment">// No -&gt; link to default (which do the UpdateShapeInfo)</span>
00547                         siTemp.pShpCache = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>( <span class="stringliteral">"default"</span> );
00548                         <span class="comment">// Add the shape to the default shape cache</span>
00549                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>[pShp]= siTemp;
00550                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>[shapeName]= <span class="stringliteral">"default"</span>;
00551                 }
00552                 <span class="keywordflow">else</span>
00553                 {
00554                         <span class="comment">// Yes -&gt; add or replace the shape info</span>
00555                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>[pShp] = siTemp;
00556                 }
00557         }
00558 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_1" doxytag="NL3D::CShapeBank::addRef" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02539.html">IShape</a> * NL3D::CShapeBank::addRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a reference to a shape and return the instance created. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00059">59</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00210">NL3D::CShapeBank::CShapeCache::Elements</a>, <a class="el" href="a06378.html#l00723">getShapeNameFromShapePtr()</a>, <a class="el" href="a06378.html#l00699">getShapePtrFromShapeName()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>, and <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00600">NL3D::CScene::createInstance()</a>, <a class="el" href="a06250.html#l01110">NL3D::GetDummyMeshFromBank()</a>, <a class="el" href="a06378.html#l00771">preLoadShapes()</a>, <a class="el" href="a06250.html#l01134">NL3D::CPSConstraintMesh::update()</a>, and <a class="el" href="a06348.html#l00537">NL3D::CScene::updateWaitingInstances()</a>.
<p>
<div class="fragment"><pre>00060 {       
00061         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00062 
00063         <span class="comment">// If the shape is inserted in a shape cache remove it</span>
00064         TShapeInfoMap::iterator scfpmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.find( <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a>( shapeName ) );
00065         <span class="keywordflow">if</span>( scfpmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.end() )
00066         {
00067                 <span class="keywordflow">if</span>( !scfpmIt-&gt;second.isAdded )
00068                 {
00069                         <span class="comment">// The shape is not inserted into a cache</span>
00070                         <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a>( shapeName );
00071                 }
00072         }
00073         scfpmIt-&gt;second.isAdded = <span class="keyword">false</span>;
00074         CShapeCache *pShpCache = scfpmIt-&gt;second.pShpCache;
00075         <a class="code" href="a04199.html#a6">nlassert</a>( pShpCache != NULL );
00076         <span class="comment">// Search the shape cache for the shape we want to remove</span>
00077         <a class="code" href="a03889.html">list&lt;IShape*&gt;</a>::iterator lsIt = pShpCache-&gt;Elements.begin();
00078         <span class="keywordflow">while</span>(lsIt != pShpCache-&gt;Elements.end())
00079         {
00080                 string *sTemp = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_7">getShapeNameFromShapePtr</a>(*lsIt);
00081                 <span class="keywordflow">if</span>( *sTemp == shapeName )
00082                 {
00083                         <span class="comment">// Ok the shape cache contains the shape remove it and return</span>
00084                         pShpCache-&gt;Elements.erase( lsIt );                              
00085                         <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a>( shapeName );
00086                 }
00087                 ++lsIt;
00088         }
00089         <a class="code" href="a04199.html#a6">nlassert</a>( <span class="keyword">false</span> );
00090         <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a>( shapeName );
00091 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_0" doxytag="NL3D::CShapeBank::addShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::addShapeCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeCacheName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a new ShapeCache. If already exist do nothing. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00562">562</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00042">NL3D::CShapeBankUser::addShapeCache()</a>, <a class="el" href="a06378.html#l00044">CShapeBank()</a>, and <a class="el" href="a06378.html#l00601">reset()</a>.
<p>
<div class="fragment"><pre>00563 {
00564         TShapeCacheMap::iterator scmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.find( shapeCacheName );
00565         <span class="keywordflow">if</span>( scmIt == <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end() )
00566         {
00567                 <span class="comment">// Not found so add it          </span>
00568                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.insert(TShapeCacheMap::value_type(shapeCacheName,CShapeCache()));
00569         }
00570 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_2" doxytag="NL3D::CShapeBank::cancelLoadAsync" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::cancelLoadAsync </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add directly a shape to the bank. If the shape name is already used do nothing. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00497">497</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, and <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
Referenced by <a class="el" href="a06350.html#l00828">NL3D::CInstanceGroup::stopAddToSceneAsync()</a>.
<p>
<div class="fragment"><pre>00498 {
00499         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00500 
00501         TWaitingShapesMap::iterator wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.find(shapeName);
00502         <span class="keywordflow">if</span> (wsmmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end())
00503         {
00504                 wsmmIt-&gt;second.RefCnt -= 1;
00505                 <span class="keywordflow">if</span> (wsmmIt-&gt;second.RefCnt == 0)
00506                 {
00507                         <span class="comment">// nlinfo("unloadasync %s", shapeName);</span>
00508                         CAsyncFileManager3D::getInstance().cancelLoadMesh (shapeName);
00509                         <span class="comment">// TODO : Cancel the texture upload</span>
00510                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.erase (wsmmIt); <span class="comment">// Delete the waiting shape</span>
00511                 }
00512         }
00513 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_3" doxytag="NL3D::CShapeBank::checkShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::checkShapeCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03377.html">CShapeCache</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShpCache</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00747">747</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00210">NL3D::CShapeBank::CShapeCache::Elements</a>, <a class="el" href="a06378.html#l00723">getShapeNameFromShapePtr()</a>, <a class="el" href="a06379.html#l00211">NL3D::CShapeBank::CShapeCache::MaxSize</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00095">release()</a>, <a class="el" href="a06378.html#l00574">removeShapeCache()</a>, <a class="el" href="a06378.html#l00601">reset()</a>, and <a class="el" href="a06378.html#l00622">setShapeCacheSize()</a>.
<p>
<div class="fragment"><pre>00748 {
00749         <span class="keywordflow">if</span>( pShpCache != NULL )
00750         <span class="keywordflow">while</span>( (<a class="code" href="a04558.html#a14">sint</a>)pShpCache-&gt;Elements.size() &gt; pShpCache-&gt;MaxSize )
00751         {
00752                 <span class="comment">// Suppress the last shape of the cache</span>
00753                 IShape *pShp = pShpCache-&gt;Elements.back();
00754                 <span class="comment">// Physical suppression because we own the last smart pointer on the shape</span>
00755                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.erase(*<a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_7">getShapeNameFromShapePtr</a>(pShp));
00756                 <span class="comment">// delete information associated with the shape</span>
00757                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.erase( pShp );
00758                 <span class="comment">// remove from queue</span>
00759                 pShpCache-&gt;Elements.pop_back();
00760         }
00761 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_3" doxytag="NL3D::CShapeBank::getShape" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02539.html">IShape</a> * NL3D::CShapeBank::getShape </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the <a class="el" href="a02539.html">IShape</a> from the bank. Unlike addRef, no reference is added. Thus the returning shape sould be used temporarily <dl compact><dt><b>Returns:</b></dt><dd>NULL if shape not found or not loaded (if being async loaded still return NULL)</dd></dl>

<p>
Definition at line <a class="el" href="a06378.html#l00413">413</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00169">ShapeMap</a>, and <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00107">NL3D::CShapeBankUser::getShape()</a>.
<p>
<div class="fragment"><pre>00414 {
00415         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00416         
00417         <span class="comment">// Is the shape is found in the shape map so return Present</span>
00418         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find (shapeName);
00419         <span class="keywordflow">if</span>( smIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00420                 <span class="keywordflow">return</span> smIt-&gt;second;
00421 
00422         <span class="keywordflow">return</span> NULL;
00423 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_1" doxytag="NL3D::CShapeBank::getShapeCacheFreeSpace" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CShapeBank::getShapeCacheFreeSpace </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeCacheName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return free cache space (maxSize-nbCurrentInCache) 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00633">633</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00771">preLoadShapes()</a>.
<p>
<div class="fragment"><pre>00634 {
00635         TShapeCacheMap::const_iterator scmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.find( shapeCacheName );
00636         <span class="keywordflow">if</span>( scmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end() )
00637         {
00638                 <span class="keywordflow">return</span> scmIt-&gt;second.MaxSize - scmIt-&gt;second.Elements.size();
00639         }
00640         <span class="keywordflow">return</span> 0;
00641 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_4" doxytag="NL3D::CShapeBank::getShapeCachePtrFromShapeCacheName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03377.html">CShapeBank::CShapeCache</a> * NL3D::CShapeBank::getShapeCachePtrFromShapeCacheName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeCacheName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00711">711</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a06378.html#l00735">getShapeCachePtrFromShapeName()</a>, <a class="el" href="a06378.html#l00645">linkShapeToShapeCache()</a>, <a class="el" href="a06378.html#l00574">removeShapeCache()</a>, <a class="el" href="a06378.html#l00601">reset()</a>, and <a class="el" href="a06378.html#l00622">setShapeCacheSize()</a>.
<p>
<div class="fragment"><pre>00712 {
00713         TShapeCacheMap::iterator scmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.find( shapeCacheName );
00714         <span class="keywordflow">if</span>( scmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end())
00715         {
00716                 <span class="keywordflow">return</span> &amp;(scmIt-&gt;second);
00717         }
00718         <span class="keywordflow">return</span> NULL;
00719 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_5" doxytag="NL3D::CShapeBank::getShapeCachePtrFromShapeName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03377.html">CShapeBank::CShapeCache</a> * NL3D::CShapeBank::getShapeCachePtrFromShapeName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00735">735</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, and <a class="el" href="a06379.html#l00234">ShapeNameToShapeCacheName</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00527">add()</a>.
<p>
<div class="fragment"><pre>00736 {
00737         TShapeCacheNameMap::iterator scnIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>.find( shapeName );
00738         <span class="keywordflow">if</span>( scnIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>.end() )
00739         {
00740                 <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>(scnIt-&gt;second);
00741         }
00742         <span class="keywordflow">return</span> NULL;
00743 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_6" doxytag="NL3D::CShapeBank::getShapeCachePtrFromShapePtr" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03377.html">CShapeBank::CShapeCache</a> * NL3D::CShapeBank::getShapeCachePtrFromShapePtr </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02539.html">IShape</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShp</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00687">687</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00095">release()</a>.
<p>
<div class="fragment"><pre>00688 {
00689         TShapeInfoMap::iterator scfpmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.find( pShp );
00690         <span class="keywordflow">if</span>( scfpmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.end() )
00691         {
00692                 <span class="keywordflow">return</span> scfpmIt-&gt;second.pShpCache;
00693         }
00694         <span class="keywordflow">return</span> NULL;
00695 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_7" doxytag="NL3D::CShapeBank::getShapeNameFromShapePtr" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> string * NL3D::CShapeBank::getShapeNameFromShapePtr </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02539.html">IShape</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShp</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00723">723</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00059">addRef()</a>, <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, and <a class="el" href="a06378.html#l00095">release()</a>.
<p>
<div class="fragment"><pre>00724 {
00725         TShapeInfoMap::iterator scfpmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.find( pShp );
00726         <span class="keywordflow">if</span>( scfpmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.end() )
00727         {
00728                 <span class="keywordflow">return</span> &amp;(scfpmIt-&gt;second.sShpName);
00729         }
00730         <span class="keywordflow">return</span> NULL;
00731 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_8" doxytag="NL3D::CShapeBank::getShapePtrFromShapeName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02539.html">IShape</a> * NL3D::CShapeBank::getShapePtrFromShapeName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShpName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06378.html#l00699">699</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00169">ShapeMap</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00059">addRef()</a>, and <a class="el" href="a06378.html#l00645">linkShapeToShapeCache()</a>.
<p>
<div class="fragment"><pre>00700 {
00701         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find(pShpName);
00702         <span class="keywordflow">if</span>( smIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00703         {
00704                 <span class="keywordflow">return</span> (IShape*)(smIt-&gt;second);
00705         }
00706         <span class="keywordflow">return</span> NULL;
00707 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_4" doxytag="NL3D::CShapeBank::isPresent" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0">CShapeBank::TShapeState</a> NL3D::CShapeBank::isPresent </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return TRUE if the shape is present in the bank. Process the waiting shapes. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00397">397</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw5">NotPresent</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw6">Present</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, and <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00600">NL3D::CScene::createInstance()</a>, <a class="el" href="a06348.html#l00674">NL3D::CScene::createInstanceAsync()</a>, <a class="el" href="a06250.html#l01110">NL3D::GetDummyMeshFromBank()</a>, <a class="el" href="a06378.html#l00771">preLoadShapes()</a>, <a class="el" href="a06250.html#l01134">NL3D::CPSConstraintMesh::update()</a>, and <a class="el" href="a06348.html#l00537">NL3D::CScene::updateWaitingInstances()</a>.
<p>
<div class="fragment"><pre>00398 {
00399         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00400 
00401         <span class="comment">// Is the shape is found in the shape map so return Present</span>
00402         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find (shapeName);
00403         <span class="keywordflow">if</span>( smIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00404                 <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw6">Present</a>;
00405         <span class="comment">// Look in the waiting shapes</span>
00406         TWaitingShapesMap::iterator wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.find (shapeName);
00407         <span class="keywordflow">if</span> (wsmmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end())
00408                 <span class="keywordflow">return</span> wsmmIt-&gt;second.State; <span class="comment">// AsyncLoad_*</span>
00409         <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw5">NotPresent</a>;
00410 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_2" doxytag="NL3D::CShapeBank::isShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NL3D::CShapeBank::isShapeCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeCacheName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
true if the shape cache exist 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00765">765</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00771">preLoadShapes()</a>.
<p>
<div class="fragment"><pre>00766 {
00767         <span class="keywordflow">return</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.find(shapeCacheName) != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end();
00768 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_5" doxytag="NL3D::CShapeBank::isShapeWaiting" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NL3D::CShapeBank::isShapeWaiting </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add directly a shape to the bank. If the shape name is already used do nothing. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00517">517</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
<div class="fragment"><pre>00518 {
00519         <span class="keywordflow">if</span> (<a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.size() == 0)
00520                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00521         <span class="keywordflow">else</span>
00522                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00523 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_3" doxytag="NL3D::CShapeBank::linkShapeToShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::linkShapeToShapeCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeCacheName</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Link a shape to a ShapeCache. The ShapeCache must exist and must not contains the shape. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00645">645</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06378.html#l00699">getShapePtrFromShapeName()</a>, <a class="el" href="a06379.html#l00219">NL3D::CShapeBank::CShapeInfo::isAdded</a>, <a class="el" href="a06379.html#l00217">NL3D::CShapeBank::CShapeInfo::pShpCache</a>, <a class="el" href="a06379.html#l00234">ShapeNameToShapeCacheName</a>, <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>, and <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00074">NL3D::CShapeBankUser::linkShapeToShapeCache()</a>, and <a class="el" href="a06378.html#l00771">preLoadShapes()</a>.
<p>
<div class="fragment"><pre>00646 {
00647         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00648 
00649         <span class="keywordtype">bool</span>    canSet= <span class="keyword">true</span>;
00650         <span class="keywordflow">while</span>(1)
00651         {
00652                 <span class="comment">// Shape exist?</span>
00653                 IShape  *shapePtr= <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_8">getShapePtrFromShapeName</a>(shapeName);
00654                 <span class="keywordflow">if</span>(shapePtr == NULL)
00655                         <span class="comment">// No, but still link the shape name to the shapeCache name.</span>
00656                         <span class="keywordflow">break</span>;
00657                 <span class="comment">// Is the shape cache exist ?</span>
00658                 CShapeCache *shapeCachePtr = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>( shapeCacheName );
00659                 <span class="keywordflow">if</span>( shapeCachePtr == NULL )
00660                         <span class="comment">// abort, since cannot correctly link to a valid shapeCache</span>
00661                         <span class="keywordflow">return</span>;
00662 
00663                 <span class="comment">// Try to set to the same shape Cache as before?</span>
00664                 CShapeInfo      &amp;shapeInfo= <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>[shapePtr];
00665                 <span class="keywordflow">if</span>( shapeCachePtr ==  shapeInfo.pShpCache)
00666                         <span class="comment">// abort, since same cache name / cache ptr</span>
00667                         <span class="keywordflow">return</span>;
00668 
00669                 <span class="comment">// If The shape is In the cache of an other Shape Cache, abort.</span>
00670                 <span class="keywordflow">if</span>( shapeInfo.isAdded )
00671                         <span class="comment">// Abort, because impossible.</span>
00672                         <span class="keywordflow">return</span>;
00673                 
00674                 <span class="comment">// Is the shape is present ?</span>
00675                 <span class="comment">// Yes -&gt; Update the ShapeInfo</span>
00676                 shapeInfo.pShpCache= shapeCachePtr;
00677 
00678                 <span class="keywordflow">break</span>;
00679         }
00680 
00681         <span class="comment">// change the cache name of the shape</span>
00682         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>[shapeName] = shapeCacheName;
00683 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_6" doxytag="NL3D::CShapeBank::load" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::load </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the corresponding file from disk and add it to the bank. 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00427">427</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a05708.html#l00255">NLMISC::CIFile::close()</a>, <a class="el" href="a06376.html#l00113">NL3D::CShapeStream::getShapePointer()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05708.html#l00135">NLMISC::CIFile::open()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, and <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00600">NL3D::CScene::createInstance()</a>, <a class="el" href="a06378.html#l00771">preLoadShapes()</a>, and <a class="el" href="a06250.html#l01134">NL3D::CPSConstraintMesh::update()</a>.
<p>
<div class="fragment"><pre>00428 {
00429         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00430 
00431         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find(shapeName);
00432         <span class="keywordflow">if</span>( smIt == <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00433         {
00434                 <span class="comment">// If we are loading it asynchronously so we do not have to try to load it in sync mode</span>
00435                 TWaitingShapesMap::iterator wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.find (shapeName);
00436                 <span class="keywordflow">if</span> (wsmmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end())
00437                         <span class="keywordflow">return</span>;
00438                 <span class="keywordflow">try</span>
00439                 {
00440                         CShapeStream mesh;
00441                         <a class="code" href="a02653.html">CIFile</a> meshfile;
00442                         <span class="keywordflow">if</span> (meshfile.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(CPath::lookup(shapeName)))
00443                         {
00444                                 meshfile.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>( mesh );
00445                                 meshfile.<a class="code" href="a02653.html#NLMISC_1_1CIFilea3">close</a>();
00446                         }
00447                         <span class="keywordflow">else</span>
00448                         {
00449                                 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"CShapeBank::load() : Can't open file %s"</span>, shapeName.c_str());
00450                         }
00451 
00452                         <span class="comment">// Add the shape to the map.</span>
00453                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_0">add</a>( shapeName, mesh.getShapePointer() );
00454                 }
00455                 <span class="keywordflow">catch</span>(<a class="code" href="a02482.html">Exception</a> &amp;e)
00456                 {
00457                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"CShapeBank::load() : %s"</span>, e.what());
00458                         <span class="keywordflow">return</span>;
00459                 }
00460         }       
00461 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_7" doxytag="NL3D::CShapeBank::loadAsync" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::loadAsync </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pDriver</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool *&nbsp;</td>
          <td class="mdname" nowrap> <em>bSignal</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>selectedTexture</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the corresponding file from disk asynchronously and add it to the bank. The driver passed to this function is used to know if we have to load the textures.
<p>
Definition at line <a class="el" href="a06378.html#l00465">465</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06379.html#l00174">NL3D::CShapeBank::CWaitingShape::RefCnt</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, <a class="el" href="a06379.html#l00176">NL3D::CShapeBank::CWaitingShape::Signal</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00674">NL3D::CScene::createInstanceAsync()</a>.
<p>
<div class="fragment"><pre>00466 {
00467         string  shapeName= <a class="code" href="a05378.html#a273">strlwr</a>(shapeNameNotLwr);
00468 
00469         TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find(shapeName);
00470         <span class="keywordflow">if</span> (smIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end())
00471                 <span class="keywordflow">return</span>;
00472         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a> = pDriver; <span class="comment">// Backup the pointer to the driver for later use</span>
00473         TWaitingShapesMap::iterator wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.find (shapeName);
00474         
00475         <span class="comment">// First time this shape is loaded ?</span>
00476         <span class="keywordtype">bool</span> firstTime = wsmmIt == <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end();
00477 
00478         <span class="keywordflow">if</span> (firstTime)
00479                 wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.insert (TWaitingShapesMap::value_type(shapeName, CWaitingShape())).first;
00480 
00481         <span class="comment">// Add a reference to it</span>
00482         CWaitingShape &amp;rWS = wsmmIt-&gt;second;
00483 
00484         <span class="comment">// Insert a new signal pointer</span>
00485         rWS.Signal.insert (bSignal);
00486 
00487         <span class="comment">// Add a signal</span>
00488         rWS.RefCnt += 1;
00489 
00490         <span class="comment">// Launch an async mesh loader the first time</span>
00491         <span class="keywordflow">if</span> (firstTime)
00492                 CAsyncFileManager3D::getInstance().loadMesh (shapeName, &amp;(wsmmIt-&gt;second.ShapePtr), pDriver, position, selectedTexture);
00493 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz912_0" doxytag="NL3D::CShapeBank::preLoadShapes" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::preLoadShapes </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeCacheName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; std::string &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>listFile</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>wildCardNotLwr</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03873.html">NLMISC::IProgressCallback</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>progress</em> = NULL, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>flushTextures</em> = false, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>drv</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
PreLoad all shapes (.shape, .ps, .skel...) files from a list of files Shapes are Loaded if not present, assigned to the given cache, and fit in the cache Size as max possible. NB: crash if you try to load a non shape file (eg: a .dds etc...) <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>shapeCacheName</em>&nbsp;</td><td>name of a shapeCache created with <a class="el" href="a03376.html#NL3D_1_1CShapeBankz910_0">addShapeCache()</a>/setShapeCacheSize(). no-op if don't exist </td></tr>
    <tr><td valign=top><em>fileList</em>&nbsp;</td><td>a list of file names. NB: CPath is used to load the shapes. </td></tr>
    <tr><td valign=top><em>wildcard</em>&nbsp;</td><td>a filter string like: "*.shape", "??_HOM*.shape". NB: strlwr-ed internally </td></tr>
    <tr><td valign=top><em>flushTextures</em>&nbsp;</td><td>if true, then textures are flushed in the driver drv</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06378.html#l00771">771</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00059">addRef()</a>, <a class="el" href="a02539.html#NL3D_1_1IShapea2">NL3D::IShape::flushTextures()</a>, <a class="el" href="a06378.html#l00633">getShapeCacheFreeSpace()</a>, <a class="el" href="a06378.html#l00397">isPresent()</a>, <a class="el" href="a06378.html#l00765">isShapeCache()</a>, <a class="el" href="a06378.html#l00645">linkShapeToShapeCache()</a>, <a class="el" href="a06378.html#l00427">load()</a>, <a class="el" href="a06209.html#l00058">NLMISC::IProgressCallback::progress()</a>, <a class="el" href="a06378.html#l00095">release()</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, <a class="el" href="a05425.html#l00038">NLMISC::testWildCard()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00094">NL3D::CShapeBankUser::preLoadShapesFromBNP()</a>, and <a class="el" href="a06380.html#l00081">NL3D::CShapeBankUser::preLoadShapesFromDirectory()</a>.
<p>
<div class="fragment"><pre>00773 {
00774         <span class="comment">// Abort if cache don't exist.</span>
00775         <span class="keywordflow">if</span>(!<a class="code" href="a03376.html#NL3D_1_1CShapeBankz910_2">isShapeCache</a>(shapeCacheName))
00776                 <span class="keywordflow">return</span>;
00777 
00778         <span class="comment">// strlwr</span>
00779         string wildCard= <a class="code" href="a05378.html#a273">strlwr</a>(wildCardNotLwr);
00780 
00781         <span class="comment">// For all files</span>
00782         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;listFile.size();i++)
00783         {
00784                 <span class="comment">// Progress bar</span>
00785                 <span class="keywordflow">if</span> (progress)
00786                         progress-&gt;<a class="code" href="a03873.html#NLMISC_1_1IProgressCallbacka3">progress</a> ((<span class="keywordtype">float</span>)i/(<span class="keywordtype">float</span>)listFile.size ());
00787 
00788                 string  fileName= CFile::getFilename(listFile[i]);
00789                 <a class="code" href="a05378.html#a273">strlwr</a>(fileName);
00790                 <span class="comment">// if the file is ok for the wildCard, process it</span>
00791                 <span class="keywordflow">if</span>( <a class="code" href="a05378.html#a246">testWildCard</a>(fileName.c_str(), wildCard.c_str()) )
00792                 {
00793                         <span class="comment">// link the shape to the shapeCache</span>
00794                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz910_3">linkShapeToShapeCache</a>(fileName, shapeCacheName);
00795 
00796                         <span class="comment">// If !present in the shapeBank</span>
00797                         <span class="keywordflow">if</span>( <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_4">isPresent</a>(fileName)==CShapeBank::NotPresent )
00798                         {
00799                                 <span class="comment">// Don't load it if no more space in the cache</span>
00800                                 <span class="keywordflow">if</span>( <a class="code" href="a03376.html#NL3D_1_1CShapeBankz910_1">getShapeCacheFreeSpace</a>(shapeCacheName)&gt;0 )
00801                                 {
00802                                         <span class="comment">// load it.</span>
00803                                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_6">load</a>(fileName);
00804 
00805                                         <span class="comment">// If success</span>
00806                                         <span class="keywordflow">if</span>( <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_4">isPresent</a>(fileName)!=CShapeBank::NotPresent )
00807                                         {
00808                                                 <span class="comment">// When a shape is first added to the bank, it is not in the cache. </span>
00809                                                 <span class="comment">// add it and release it to force it to be in the cache.</span>
00810                                                 IShape  *shp= <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_1">addRef</a>(fileName);
00811                                                 <span class="keywordflow">if</span>(shp)
00812                                                 {
00813                                                         <span class="comment">//nlinfo("Loading %s", CPath::lookup(fileName.c_str(), false, false).c_str());</span>
00814                                                         <span class="keywordflow">if</span> (flushTextures &amp;&amp; drv)
00815                                                         {                                                       
00816                                                                 shp-&gt;flushTextures(*drv, 0);
00817                                                         }
00818                                                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_9">release</a>(shp);
00819                                                 }
00820                                         }
00821                                 }
00822                         }
00823                 }
00824         }
00825 
00826 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_8" doxytag="NL3D::CShapeBank::processWaitingShapes" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::processWaitingShapes </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
processWaitingShapes must be done one time per frame 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00134">134</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0">AsyncLoad_Delete</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1">AsyncLoad_Error</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2">AsyncLoad_Ready</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw3">AsyncLoad_Shape</a>, <a class="el" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4">AsyncLoad_Texture</a>, <a class="el" href="a05968.html#l00401">NL3D::CMaterial::getLightMap()</a>, <a class="el" href="a05992.html#l00179">NL3D::CMeshBase::getMaterial()</a>, <a class="el" href="a05992.html#l00173">NL3D::CMeshBase::getNbMaterial()</a>, <a class="el" href="a05969.html#l00254">NL3D::CMaterial::getShader()</a>, <a class="el" href="a05641.html#l00046">NL3D::CMaterial::getTexture()</a>, <a class="el" href="a05969.html#l00047">NL3D::IDRV_MAT_MAXTEXTURES</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera47">NL3D::IDriver::isTextureExist()</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06378.html#l00308">processWSUploadTexture()</a>, <a class="el" href="a06379.html#l00174">NL3D::CShapeBank::CWaitingShape::RefCnt</a>, <a class="el" href="a06379.html#l00173">NL3D::CShapeBank::CWaitingShape::ShapePtr</a>, <a class="el" href="a06379.html#l00176">NL3D::CShapeBank::CWaitingShape::Signal</a>, <a class="el" href="a06379.html#l00175">NL3D::CShapeBank::CWaitingShape::State</a>, <a class="el" href="a05641.html#l00036">NL3D::CMaterial::texturePresent()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06379.html#l00180">NL3D::CShapeBank::CWaitingShape::UpTextLine</a>, <a class="el" href="a06379.html#l00179">NL3D::CShapeBank::CWaitingShape::UpTextMipMap</a>, <a class="el" href="a06379.html#l00178">NL3D::CShapeBank::CWaitingShape::UpTextProgress</a>, and <a class="el" href="a06379.html#l00193">WaitingShapes</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00537">NL3D::CScene::updateWaitingInstances()</a>.
<p>
<div class="fragment"><pre>00135 {
00136         <a class="code" href="a04558.html#a11">uint32</a> nTotalUploaded = 0;
00137         TWaitingShapesMap::iterator wsmmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.begin();
00138         <span class="keywordflow">while</span>( wsmmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end() )
00139         {
00140                 <span class="comment">// Backup next iterator</span>
00141                 TWaitingShapesMap::iterator wsmmItNext = wsmmIt;
00142                 wsmmItNext++;
00143 
00144                 <span class="keyword">const</span> string &amp;shapeName = wsmmIt-&gt;first;
00145                 CWaitingShape &amp;rWS = wsmmIt-&gt;second;
00146                 IShape *pShp = rWS.ShapePtr; <span class="comment">// Take care this value is shared between thread so copy it in a local variable first</span>
00147 
00148                 <span class="keywordflow">switch</span> (rWS.State)
00149                 {
00150                         <span class="keywordflow">case</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw3">AsyncLoad_Shape</a>: <span class="comment">// Check if we can pass to the AsyncLoad_Texture state</span>
00151                                 <span class="keywordflow">if</span> (pShp != NULL)
00152                                 {
00153                                         <span class="keywordflow">if</span> (pShp == (IShape*)-1)
00154                                                 rWS.State = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1">AsyncLoad_Error</a>;
00155                                         <span class="keywordflow">else</span>
00156                                                 rWS.State = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4">AsyncLoad_Texture</a>;
00157                                 }
00158                         <span class="keywordflow">break</span>;
00159 
00160                         <span class="keywordflow">case</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw4">AsyncLoad_Texture</a>:
00161                         {
00162                                 <span class="comment">// Setup all textures and lightmaps of the shape</span>
00163                                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00164                                         <span class="keywordflow">break</span>;
00165 
00166                                 CMesh *pMesh = dynamic_cast&lt;CMesh*&gt;(pShp);
00167                                 <span class="keywordflow">if</span>( pMesh != NULL )
00168                                 {
00169                                         <a class="code" href="a04558.html#a7">uint8</a> j;
00170                                         <a class="code" href="a04558.html#a11">uint32</a> i, CurrentProgress = 0;
00171                                         <a class="code" href="a04558.html#a11">uint32</a> nNbMat = pMesh-&gt;getNbMaterial();
00172 
00173                                         <span class="keywordflow">for</span> (i = 0; i &lt; nNbMat; ++i)
00174                                         {
00175                                                 <span class="keyword">const</span> CMaterial &amp;rMat = pMesh-&gt;getMaterial(i);
00176                                                 <span class="comment">// Parse all textures from this material and setup</span>
00177                                                 <span class="keywordflow">for</span> (j = 0; j &lt; <a class="code" href="a05363.html#a83">IDRV_MAT_MAXTEXTURES</a>; ++j)
00178                                                 {
00179                                                         <span class="keywordflow">if</span> (CurrentProgress &gt;= rWS.UpTextProgress)
00180                                                         {
00181                                                                 <span class="keywordflow">if</span> (rMat.texturePresent(j))
00182                                                                 {
00183                                                                         <span class="keywordflow">if</span> ((!<a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a>-&gt;isTextureExist(*rMat.getTexture(j))) || 
00184                                                                                 (rWS.UpTextLine &gt; 0) || (rWS.UpTextMipMap &gt; 0))
00185                                                                         {
00186                                                                                 <span class="comment">//_pDriver-&gt;setupTexture (*rMat.getTexture(j));</span>
00187 
00188                                                                                 <span class="keywordflow">if</span> (!<a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_3">processWSUploadTexture</a> (rWS, nTotalUploaded, rMat.getTexture(j)))
00189                                                                                         <span class="keywordflow">break</span>;
00190                                                                         }
00191                                                                 }
00192                                                                 ++rWS.UpTextProgress;
00193                                                         }
00194                                                         ++CurrentProgress;
00195                                                         <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00196                                                                 <span class="keywordflow">break</span>;
00197                                                 }
00198 
00199                                                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00200                                                         <span class="keywordflow">break</span>;
00201 
00202                                                 <span class="comment">// Do the same with lightmaps</span>
00203                                                 <span class="keywordflow">if</span> (rMat.getShader() == CMaterial::LightMap)
00204                                                 {
00205                                                         <a class="code" href="a04558.html#a15">uint</a> j = 0; ITexture *pText = rMat.getLightMap (j);
00206                                                         <span class="keywordflow">while</span> (pText != NULL)
00207                                                         {
00208                                                                 <span class="keywordflow">if</span> (CurrentProgress &gt;= rWS.UpTextProgress)
00209                                                                 {
00210                                                                         <span class="keywordflow">if</span> ((!<a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a>-&gt;isTextureExist(*pText)) || 
00211                                                                                 (rWS.UpTextLine &gt; 0) || (rWS.UpTextMipMap &gt; 0))
00212                                                                         {
00213                                                                                 <span class="comment">//_pDriver-&gt;setupTexture (*pText);</span>
00214                                                                                 
00215                                                                                 <span class="keywordflow">if</span> (!<a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_3">processWSUploadTexture</a> (rWS, nTotalUploaded, pText))
00216                                                                                         <span class="keywordflow">break</span>;
00217                                                                         }
00218                                                                         ++rWS.UpTextProgress;
00219                                                                 }
00220                                                                 ++CurrentProgress;
00221                                                                 ++j; pText = rMat.getLightMap (j);
00222                                                                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00223                                                                         <span class="keywordflow">break</span>;
00224                                                         }
00225                                                 }
00226                                                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00227                                                         <span class="keywordflow">break</span>;
00228                                         }
00229                                 }
00230                                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00231                                         <span class="keywordflow">break</span>;
00232 
00233                                 rWS.State = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2">AsyncLoad_Ready</a>;
00234                         }                               
00235                         <span class="keywordflow">break</span>;
00236 
00237                         <span class="keywordflow">case</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw2">AsyncLoad_Ready</a>:
00238                                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz908_0">add</a> (wsmmIt-&gt;first, pShp);
00239                                 rWS.State = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0">AsyncLoad_Delete</a>;
00240                         <span class="keywordflow">break</span>;
00241 
00242                         <span class="comment">// The delete operation can take several frames to complete but this is not a problem</span>
00243 
00244                         <span class="comment">// For error do the same as delete but let the flag to error if a shape is asked just after </span>
00245                         <span class="comment">// the error was found</span>
00246 
00247                         <span class="keywordflow">case</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw1">AsyncLoad_Error</a>:
00248                         <span class="keywordflow">case</span> <a class="code" href="a03376.html#NL3D_1_1CShapeBankz906_0NL3D_1_1CShapeBankw0">AsyncLoad_Delete</a>:
00249                                 rWS.RefCnt -= 1;
00250                                 <span class="keywordflow">if</span> (rWS.RefCnt == 0)
00251                                 {
00252                                         <span class="comment">// We have to signal if we are the last</span>
00253                                         std::set&lt;bool *&gt;::iterator ite = rWS.Signal.begin();
00254                                         <span class="keywordflow">while</span> (ite != rWS.Signal.end())
00255                                         {
00256                                                 <span class="keywordtype">bool</span> *bSignal = *ite;
00257                                                 <span class="keywordflow">if</span> (bSignal != NULL)
00258                                                 {
00259                                                         <span class="keywordtype">bool</span> bFound = <span class="keyword">false</span>;
00260                                                         TWaitingShapesMap::iterator wsmmIt2 = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.begin();
00261                                                         <span class="keywordflow">while</span> (wsmmIt2 != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.end())
00262                                                         {
00263                                                                 <span class="keyword">const</span> string &amp;shapeName2 = wsmmIt2-&gt;first;
00264                                                                 <span class="keywordflow">if</span> (shapeName2 != shapeName)
00265                                                                 {
00266                                                                         std::set&lt;bool *&gt;::iterator ite2 = wsmmIt2-&gt;second.Signal.begin();
00267                                                                         <span class="keywordflow">while</span> (ite2 != wsmmIt2-&gt;second.Signal.end())
00268                                                                         {
00269                                                                                 <span class="keywordflow">if</span> (*ite2 == bSignal)
00270                                                                                 {
00271                                                                                         bFound = <span class="keyword">true</span>;
00272                                                                                         <span class="keywordflow">break</span>;
00273                                                                                 }
00274                                                                                 ite2++;
00275                                                                         }
00276                                                                         <span class="keywordflow">if</span> (ite2 != wsmmIt2-&gt;second.Signal.end())
00277                                                                                 <span class="keywordflow">break</span>;
00278                                                                 }
00279                                                                 ++wsmmIt2;
00280                                                         }
00281                                                         <span class="keywordflow">if</span> (!bFound)
00282                                                                 *bSignal = <span class="keyword">true</span>;
00283                                                 }
00284 
00285                                                 <span class="comment">// Next iterator</span>
00286                                                 ite++;
00287                                         }
00288                                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_7">WaitingShapes</a>.erase (wsmmIt);
00289                                 }
00290                         <span class="keywordflow">break</span>;
00291 
00292                         <span class="keywordflow">default</span>:
00293                                 <a class="code" href="a04199.html#a12">nlstop</a>; <span class="comment">// This must never happen</span>
00294                         <span class="keywordflow">break</span>;
00295                 }
00296 
00297                 wsmmIt = wsmmItNext;
00298         }
00299 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_3" doxytag="NL3D::CShapeBank::processWSUploadTexture" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NL3D::CShapeBank::processWSUploadTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03379.html">CWaitingShape</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>rWS</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>nTotalUploaded</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pText</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return true if the texture is entirely uploaded 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00308">308</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a06506.html#l00267">NL3D::ITexture::getReleasable()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a06506.html#l00376">NL3D::ITexture::isTextureCube()</a>, <a class="el" href="a06506.html#l00217">NL3D::ITexture::mipMapOn()</a>, <a class="el" href="a06506.html#l00327">NL3D::ITexture::release()</a>, <a class="el" href="a06319.html#l00065">NLMISC::CRect::set()</a>, <a class="el" href="a06506.html#l00278">NL3D::ITexture::setReleasable()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera71">NL3D::IDriver::setupTextureEx()</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera82">NL3D::IDriver::uploadTexture()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera83">NL3D::IDriver::uploadTextureCube()</a>, <a class="el" href="a06379.html#l00180">NL3D::CShapeBank::CWaitingShape::UpTextLine</a>, and <a class="el" href="a06379.html#l00179">NL3D::CShapeBank::CWaitingShape::UpTextMipMap</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00134">processWaitingShapes()</a>.
<p>
<div class="fragment"><pre>00309 {
00310         <a class="code" href="a03319.html">CRect</a> zeRect;
00311         <a class="code" href="a04558.html#a11">uint32</a> nFace, nWeight = 0, nMipMap;
00312         
00313         <span class="keywordflow">if</span> ((rWS.UpTextMipMap == 0) &amp;&amp; (rWS.UpTextLine == 0))
00314         {
00315                 <span class="comment">// Create the texture only and do not upload anything</span>
00316                 <span class="keywordtype">bool</span> isRel = pText-&gt;getReleasable ();
00317                 pText-&gt;setReleasable (<span class="keyword">false</span>);
00318                 <span class="keywordtype">bool</span> isAllUploaded = <span class="keyword">false</span>;
00319                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a>-&gt;setupTextureEx (*pText, <span class="keyword">false</span>, isAllUploaded);
00320                 pText-&gt;setReleasable (isRel);
00321                 <span class="keywordflow">if</span> (isAllUploaded)
00322                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00323         }
00324         
00325         <span class="keywordflow">if</span> (pText-&gt;mipMapOn())
00326                 nMipMap = pText-&gt;getMipMapCount();
00327         <span class="keywordflow">else</span>
00328                 nMipMap = 1;
00329         
00330         <span class="comment">// Upload all mipmaps</span>
00331         <span class="keywordflow">for</span> (; rWS.UpTextMipMap &lt; nMipMap; ++rWS.UpTextMipMap)
00332         {
00333                 <a class="code" href="a04558.html#a11">uint32</a> nMM = rWS.UpTextMipMap;
00334                 <span class="comment">// What is left to upload ?</span>
00335                 nWeight = pText-&gt;getSize (nMM) - rWS.UpTextLine*pText-&gt;getWidth(nMM);
00336                 nWeight *= CBitmap::bitPerPixels[pText-&gt;getPixelFormat()]/8;
00337                 <span class="keywordflow">if</span> (pText-&gt;isTextureCube())
00338                         nWeight *= 6;
00339 
00340                 <span class="comment">// Setup rectangle</span>
00341                 <span class="keywordflow">if</span> ((nTotalUploaded + nWeight) &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00342                 {
00343                         <span class="comment">// We cannot upload the whole mipmap -&gt; we have to cut it</span>
00344                         <a class="code" href="a04558.html#a11">uint32</a> nSizeToUpload = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a> - nTotalUploaded;
00345                         <a class="code" href="a04558.html#a11">uint32</a> nLineWeight = pText-&gt;getWidth(nMM)*CBitmap::bitPerPixels[pText-&gt;getPixelFormat()]/8;
00346                         <span class="keywordflow">if</span> (pText-&gt;isTextureCube())
00347                                 nLineWeight *= 6;
00348                         <a class="code" href="a04558.html#a11">uint32</a> nNbLineToUpload = nSizeToUpload / nLineWeight;
00349                         nNbLineToUpload = nNbLineToUpload / 4;
00350                         <span class="keywordflow">if</span> (nNbLineToUpload == 0)
00351                                 nNbLineToUpload = 1;
00352                         nNbLineToUpload *= 4; <span class="comment">// Upload 4 line by 4 line</span>
00353                         <a class="code" href="a04558.html#a11">uint32</a> nNewLine = rWS.UpTextLine + nNbLineToUpload;
00354                         <span class="keywordflow">if</span> (nNewLine &gt; pText-&gt;getHeight(nMM))
00355                                 nNewLine = pText-&gt;getHeight(nMM);
00356                         zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, rWS.UpTextLine, pText-&gt;getWidth(nMM), nNewLine);
00357                         rWS.UpTextLine = nNewLine;
00358                         <span class="keywordflow">if</span> (rWS.UpTextLine == pText-&gt;getHeight(nMM))
00359                         {
00360                                 rWS.UpTextLine = 0;
00361                                 rWS.UpTextMipMap += 1;
00362                         }
00363                 }
00364                 <span class="keywordflow">else</span>
00365                 {
00366                         <span class="comment">// We can upload the whole mipmap (or the whole rest of the mipmap)</span>
00367                         zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, rWS.UpTextLine, pText-&gt;getWidth(nMM), pText-&gt;getHeight(nMM));
00368                         rWS.UpTextLine = 0;
00369                 }
00370 
00371                 <span class="comment">// Upload !</span>
00372                 <span class="keywordflow">if</span> (pText-&gt;isTextureCube())
00373                 {
00374                         <span class="keywordflow">for</span> (nFace = 0; nFace &lt; 6; ++nFace)
00375                                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a>-&gt;uploadTextureCube (*pText, zeRect, (<a class="code" href="a04558.html#a7">uint8</a>)nMM, (<a class="code" href="a04558.html#a7">uint8</a>)nFace);
00376                 }
00377                 <span class="keywordflow">else</span>
00378                 {
00379                         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_5">_pDriver</a>-&gt;uploadTexture (*pText, zeRect, (<a class="code" href="a04558.html#a7">uint8</a>)nMM);
00380                 }
00381 
00382                 nTotalUploaded += nWeight;
00383                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a>)
00384                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00385         }
00386 
00387         <span class="keywordflow">if</span> (pText-&gt;getReleasable())
00388                 pText-&gt;release();
00389 
00390         rWS.UpTextMipMap = 0;
00391         rWS.UpTextLine = 0;
00392         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00393 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_9" doxytag="NL3D::CShapeBank::release" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::release </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02539.html">IShape</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShp</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Release a reference to a shape by its instance. If the shape has no more reference it is added to its own shape cache. When the shape cache is full the last entry is deleted.
<p>
Definition at line <a class="el" href="a06378.html#l00095">95</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06379.html#l00210">NL3D::CShapeBank::CShapeCache::Elements</a>, <a class="el" href="a06378.html#l00687">getShapeCachePtrFromShapePtr()</a>, <a class="el" href="a06378.html#l00723">getShapeNameFromShapePtr()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06379.html#l00169">ShapeMap</a>, and <a class="el" href="a06379.html#l00236">ShapePtrToShapeInfo</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00691">NL3D::CScene::deleteInstance()</a>, <a class="el" href="a06378.html#l00771">preLoadShapes()</a>, <a class="el" href="a06250.html#l01508">NL3D::CPSConstraintMesh::releaseShapes()</a>, and <a class="el" href="a06250.html#l01134">NL3D::CPSConstraintMesh::update()</a>.
<p>
<div class="fragment"><pre>00096 {
00097         <span class="comment">// Do we have the last smartPtr on the shape ?</span>
00098         string* str = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_7">getShapeNameFromShapePtr</a>( pShp );
00099 
00100         <span class="keywordflow">if</span> (str == NULL)
00101         {
00102                 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"Trying to release a mesh that have not be added to the shape bank"</span>);
00103         }
00104         <span class="keywordflow">else</span>
00105         {
00106                 TShapeMap::iterator smIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.find( *str );
00107                 <span class="keywordflow">if</span>( smIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_6">ShapeMap</a>.end() )
00108                 {
00109                         <span class="keywordflow">if</span>( smIt-&gt;second.getNbRef() == 1 )
00110                         {
00111                                 <span class="comment">// Yes -&gt; add the shape to its shapeCache</span>
00112                                 CShapeCache *pShpCache = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_6">getShapeCachePtrFromShapePtr</a>( pShp );
00113                                 pShpCache-&gt;Elements.push_front( pShp );
00114 
00115                                 TShapeInfoMap::iterator scfpmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.find( pShp );
00116                                 <span class="keywordflow">if</span>( scfpmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_11">ShapePtrToShapeInfo</a>.end() )
00117                                 {
00118                                         scfpmIt-&gt;second.isAdded = <span class="keyword">true</span>;
00119                                 }
00120                                 
00121                                 <span class="comment">// check the shape cache</span>
00122                                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_3">checkShapeCache</a>(<a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_6">getShapeCachePtrFromShapePtr</a>(pShp));
00123                         }
00124                 }
00125                 <span class="keywordflow">else</span>
00126                 {
00127                         <a class="code" href="a04199.html#a6">nlassert</a>( <span class="keyword">false</span> );
00128                 }
00129         }
00130 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_4" doxytag="NL3D::CShapeBank::removeShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::removeShapeCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>shapeCacheName</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove a ShapeCache. All shapes in the shape cache are deleted. All links are redirected to the default ShapeCache
<p>
Definition at line <a class="el" href="a06378.html#l00574">574</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06379.html#l00211">NL3D::CShapeBank::CShapeCache::MaxSize</a>, <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>, and <a class="el" href="a06379.html#l00234">ShapeNameToShapeCacheName</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00050">NL3D::CShapeBankUser::removeShapeCache()</a>.
<p>
<div class="fragment"><pre>00575 {
00576         <span class="keywordflow">if</span>( shapeCacheName == <span class="stringliteral">"default"</span> )
00577                 <span class="keywordflow">return</span>;
00578 
00579         <span class="comment">// Free the shape cache</span>
00580         CShapeCache *pShpCache = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>( shapeCacheName );
00581         <span class="keywordflow">if</span>( pShpCache == NULL )
00582                 <span class="keywordflow">return</span>;
00583         pShpCache-&gt;MaxSize = 0;
00584         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_3">checkShapeCache</a>( pShpCache );
00585 
00586         <span class="comment">// Remove it</span>
00587         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.erase( shapeCacheName );
00588 
00589         <span class="comment">// All links are redirected to the default cache</span>
00590         TShapeCacheNameMap::iterator scnIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>.begin();
00591         <span class="keywordflow">while</span>( scnIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>.end() )       
00592         {
00593                 <span class="keywordflow">if</span>( scnIt-&gt;second == shapeCacheName )
00594                         scnIt-&gt;second = <span class="stringliteral">"default"</span>;
00595                 ++scnIt;
00596         }
00597 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_5" doxytag="NL3D::CShapeBank::reset" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::reset </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove all ShapeCache and suppress all links (even the link to the default cache are removed)
<p>
Definition at line <a class="el" href="a06378.html#l00601">601</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00562">addShapeCache()</a>, <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06379.html#l00211">NL3D::CShapeBank::CShapeCache::MaxSize</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>, and <a class="el" href="a06379.html#l00234">ShapeNameToShapeCacheName</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00058">NL3D::CShapeBankUser::reset()</a>.
<p>
<div class="fragment"><pre>00602 {
00603         <span class="comment">// Parse la map ShapeCacheNameToShapeCache pour supprimer tout les caches</span>
00604         TShapeCacheMap::iterator scmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.begin();
00605         <span class="keywordflow">while</span>( scmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end() )
00606         {
00607                 CShapeCache *pShpCache = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>( scmIt-&gt;first );
00608                 <span class="keywordflow">if</span>( pShpCache == NULL )
00609                         <a class="code" href="a04199.html#a12">nlstop</a>; <span class="comment">// Should never happen</span>
00610                 pShpCache-&gt;MaxSize = 0;
00611                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_3">checkShapeCache</a>( pShpCache );
00612 
00613                 ++scmIt;
00614         }
00615         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_10">ShapeNameToShapeCacheName</a>.clear();
00616         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.clear();     
00617         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz910_0">addShapeCache</a>( <span class="stringliteral">"default"</span> );
00618 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz908_10" doxytag="NL3D::CShapeBank::setMaxBytesToUpload" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::setMaxBytesToUpload </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>MaxUploadPerFrame</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Setup the maximum number of bytes to upload for a frame (texture upload from RAM to VRAM). 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00302">302</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06348.html#l00537">NL3D::CScene::updateWaitingInstances()</a>.
<p>
<div class="fragment"><pre>00303 {
00304         <a class="code" href="a03376.html#NL3D_1_1CShapeBankz914_4">_MaxUploadPerFrame</a> = MaxUploadPerFrame;
00305 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz910_6" doxytag="NL3D::CShapeBank::setShapeCacheSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShapeBank::setShapeCacheSize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>shapeCacheName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>maxSize</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the shapeCache shapeCacheName the new size.(delete shapes if maxsize&lt;shapeCacheSize). 
<p>

<p>
Definition at line <a class="el" href="a06378.html#l00622">622</a> of file <a class="el" href="a06378.html">shape_bank.cpp</a>.
<p>
References <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06379.html#l00235">ShapeCacheNameToShapeCache</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
<p>
Referenced by <a class="el" href="a06380.html#l00066">NL3D::CShapeBankUser::setShapeCacheSize()</a>.
<p>
<div class="fragment"><pre>00623 {
00624         TShapeCacheMap::iterator scmIt = <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.find( shapeCacheName );
00625         <span class="keywordflow">if</span>( scmIt != <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_9">ShapeCacheNameToShapeCache</a>.end() )
00626         {
00627                 scmIt-&gt;second.MaxSize = maxSize;
00628                 <a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_3">checkShapeCache</a>(<a class="code" href="a03376.html#NL3D_1_1CShapeBankz916_4">getShapeCachePtrFromShapeCacheName</a>(shapeCacheName));
00629         }
00630 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CShapeBankz914_4" doxytag="NL3D::CShapeBank::_MaxUploadPerFrame" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_4">NL3D::CShapeBank::_MaxUploadPerFrame</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00194">194</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_5" doxytag="NL3D::CShapeBank::_pDriver" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02434.html">IDriver</a>* <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_5">NL3D::CShapeBank::_pDriver</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00203">203</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_9" doxytag="NL3D::CShapeBank::ShapeCacheNameToShapeCache" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_0">TShapeCacheMap</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_9">NL3D::CShapeBank::ShapeCacheNameToShapeCache</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00235">235</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00562">addShapeCache()</a>, <a class="el" href="a06378.html#l00633">getShapeCacheFreeSpace()</a>, <a class="el" href="a06378.html#l00711">getShapeCachePtrFromShapeCacheName()</a>, <a class="el" href="a06378.html#l00765">isShapeCache()</a>, <a class="el" href="a06378.html#l00574">removeShapeCache()</a>, <a class="el" href="a06378.html#l00601">reset()</a>, and <a class="el" href="a06378.html#l00622">setShapeCacheSize()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_6" doxytag="NL3D::CShapeBank::ShapeMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_1">TShapeMap</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_6">NL3D::CShapeBank::ShapeMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00169">169</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06378.html#l00413">getShape()</a>, <a class="el" href="a06378.html#l00699">getShapePtrFromShapeName()</a>, <a class="el" href="a06378.html#l00397">isPresent()</a>, <a class="el" href="a06378.html#l00427">load()</a>, <a class="el" href="a06378.html#l00465">loadAsync()</a>, and <a class="el" href="a06378.html#l00095">release()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_10" doxytag="NL3D::CShapeBank::ShapeNameToShapeCacheName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_1">TShapeCacheNameMap</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_10">NL3D::CShapeBank::ShapeNameToShapeCacheName</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00234">234</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a06378.html#l00735">getShapeCachePtrFromShapeName()</a>, <a class="el" href="a06378.html#l00645">linkShapeToShapeCache()</a>, <a class="el" href="a06378.html#l00574">removeShapeCache()</a>, and <a class="el" href="a06378.html#l00601">reset()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz916_11" doxytag="NL3D::CShapeBank::ShapePtrToShapeInfo" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_2">TShapeInfoMap</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz916_11">NL3D::CShapeBank::ShapePtrToShapeInfo</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00236">236</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00527">add()</a>, <a class="el" href="a06378.html#l00059">addRef()</a>, <a class="el" href="a06378.html#l00747">checkShapeCache()</a>, <a class="el" href="a06378.html#l00687">getShapeCachePtrFromShapePtr()</a>, <a class="el" href="a06378.html#l00723">getShapeNameFromShapePtr()</a>, <a class="el" href="a06378.html#l00645">linkShapeToShapeCache()</a>, and <a class="el" href="a06378.html#l00095">release()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShapeBankz914_7" doxytag="NL3D::CShapeBank::WaitingShapes" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_2">TWaitingShapesMap</a> <a class="el" href="a03376.html#NL3D_1_1CShapeBankz914_7">NL3D::CShapeBank::WaitingShapes</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06379.html#l00193">193</a> of file <a class="el" href="a06379.html">shape_bank.h</a>.
<p>
Referenced by <a class="el" href="a06378.html#l00497">cancelLoadAsync()</a>, <a class="el" href="a06378.html#l00397">isPresent()</a>, <a class="el" href="a06378.html#l00517">isShapeWaiting()</a>, <a class="el" href="a06378.html#l00427">load()</a>, <a class="el" href="a06378.html#l00465">loadAsync()</a>, and <a class="el" href="a06378.html#l00134">processWaitingShapes()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06379.html">shape_bank.h</a><li><a class="el" href="a06378.html">shape_bank.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:44:03 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>