aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03680.html
blob: 3ca233d3c10ee248cfb9501f5be704c076ee3d98 (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
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
<!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::CVegetableManager 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::CVegetableManager Class Reference</h1><code>#include &lt;<a class="el" href="a06699.html">vegetable_manager.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Manager of vegetable. Instance Factory and rendering. A VegetableManager should be put into a <a class="el" href="a03348.html">CScene</a> model which is Opaque (ie rendered in Opaque pass), and call vegetableManager::render() at this time. a good example is <a class="el" href="a02702.html">CLandscape</a>.<p>
Because during <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render()</a>, it uses and setup special "Vegetable Blend Layer models" to render transparents alpha blended vegetables. Toses models are transparent so they are drawn during the transparent pass of the renderTrav's <a class="el" href="a03348.html">CScene</a> (so after the Opaque pass).<p>
<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06699.html#l00075">75</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>UpdateLighting management</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate  <a href="#NL3D_1_1CVegetableManagerz1128_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_1">updateInstanceLighting</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, <a class="el" href="a04558.html#a15">uint</a> rdrPassId, <a class="el" href="a04558.html#a15">uint</a> instanceId)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_2">updateLightingIGPart</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate  <a href="#NL3D_1_1CVegetableManagerz1128_3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current instance to render in the first ig to update: rdrpass/instanceId.  <a href="#NL3D_1_1CVegetableManagerz1128_4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frequency of update.  <a href="#NL3D_1_1CVegetableManagerz1128_5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sum of all ig vertices to update.  <a href="#NL3D_1_1CVegetableManagerz1128_6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current number of vertices to update. If negative, I have some advance.  <a href="#NL3D_1_1CVegetableManagerz1128_7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate  <a href="#NL3D_1_1CVegetableManagerz1128_9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the priority list of ig to update  <a href="#NL3D_1_1CVegetableManagerz1128_10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate  <a href="#NL3D_1_1CVegetableManagerz1128_11"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>CVegetableBlendLayerModel mgt.</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_0">exitRenderStateForBlendLayerModel</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_1">setupRenderStateForBlendLayerModel</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">called by <a class="el" href="a03672.html">CVegetableBlendLayerModel</a>.  <a href="#NL3D_1_1CVegetableManagerz1126_1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For Alpha Blend rdrPass, ordering into layers.  <a href="#NL3D_1_1CVegetableManagerz1126_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03672.html">CVegetableBlendLayerModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03672.html">CVegetableBlendLayerModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03348.html">CScene</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a></td></tr>

<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> { <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a> =  0, 
<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>, 
<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>, 
<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4">VegetInfoLast</a>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Micro vegetation position against Water. Above water is the default.  <a href="#NL3D_1_1CVegetableManagerw2">More...</a><br><br></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagera0">createVegetableBlendLayersModels</a> (<a class="el" href="a03348.html">CScene</a> *scene)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagera1">CVegetableManager</a> (<a class="el" href="a04558.html#a15">uint</a> maxVertexVbHardUnlit, <a class="el" href="a04558.html#a15">uint</a> maxVertexVbHardLighted, <a class="el" href="a04558.html#a15">uint</a> nbBlendLayers=20, float blendLayerDistMax=60.f)</td></tr>

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

<tr><td colspan="2"><div class="groupHeader">Adding Instances to an Ig.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, <a class="el" href="a03682.html">CVegetableShape</a> *shape, const <a class="el" href="a02851.html">NLMISC::CMatrix</a> &amp;mat, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;ambientColor, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;diffuseColor, float bendFactor, float bendPhase, float bendFreqFactor, float blendDistMax, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, <a class="el" href="a03685.html">CVegetableUV8</a> dlmUV)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances</a> (<a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;vegetIgReserve, <a class="el" href="a03682.html">CVegetableShape</a> *shape, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, <a class="el" href="a04558.html#a15">uint</a> numInstances)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, const <a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;vegetIgReserve)</td></tr>

<tr><td colspan="2"><div class="groupHeader">instance management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_0">createClipBlock</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a clipBlock where SortBlock will be created.  <a href="#NL3D_1_1CVegetableManagerz1110_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_1">createIg</a> (<a class="el" href="a03684.html">CVegetableSortBlock</a> *sortBlock)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_2">createSortBlock</a> (<a class="el" href="a03673.html">CVegetableClipBlock</a> *clipBlock, const <a class="el" href="a03128.html">CVector</a> &amp;center, float radius)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_3">deleteClipBlock</a> (<a class="el" href="a03673.html">CVegetableClipBlock</a> *clipBlock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete such a clipBlock. all sortBlocks and so all ig must be deleted before.  <a href="#NL3D_1_1CVegetableManagerz1110_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="a03680.html#NL3D_1_1CVegetableManagerz1110_4">deleteIg</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_5">deleteSortBlock</a> (<a class="el" href="a03684.html">CVegetableSortBlock</a> *sortBlock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete such a SortBlock. all ig must be deleted before.  <a href="#NL3D_1_1CVegetableManagerz1110_5"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Profile</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1120_0">getNumVegetableFaceRendered</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the number of faces rendered by the vegetable manager  <a href="#NL3D_1_1CVegetableManagerz1120_0"></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="a03680.html#NL3D_1_1CVegetableManagerz1120_1">resetNumVegetableFaceRendered</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set to 0 the number of faces rendered  <a href="#NL3D_1_1CVegetableManagerz1120_1"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Shape management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1108_0">getVegetableShape</a> (const std::string &amp;shape)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load a shape if necessary, and return a shapeId for this shape.  <a href="#NL3D_1_1CVegetableManagerz1108_0"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">render</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_0">loadTexture</a> (<a class="el" href="a03487.html">ITexture</a> *itex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup a global texture used for all vegetables (smartPtr-ized).  <a href="#NL3D_1_1CVegetableManagerz1114_0"></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="a03680.html#NL3D_1_1CVegetableManagerz1114_1">loadTexture</a> (const std::string &amp;texName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load a global texture used for all vegetables (lookup into CPath).  <a href="#NL3D_1_1CVegetableManagerz1114_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="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render</a> (const <a class="el" href="a03128.html">CVector</a> &amp;viewCenter, const <a class="el" href="a03128.html">CVector</a> &amp;frontVector, const std::vector&lt; <a class="el" href="a03082.html">CPlane</a> &gt; &amp;pyramid, <a class="el" href="a03487.html">ITexture</a> *textureDLM, <a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_4">setDirectionalLight</a> (const <a class="el" href="a03337.html">CRGBA</a> &amp;ambient, const <a class="el" href="a03337.html">CRGBA</a> &amp;diffuse, const <a class="el" href="a03128.html">CVector</a> &amp;light)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup the directional light  <a href="#NL3D_1_1CVegetableManagerz1114_4"></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="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">unlock any AGP vertex buffers  <a href="#NL3D_1_1CVegetableManagerz1114_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="a03680.html#NL3D_1_1CVegetableManagerz1114_6">updateDriver</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">must give a driver to the vegetableManager, before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a>.  <a href="#NL3D_1_1CVegetableManagerz1114_6"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Wind animation</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_0">setTime</a> (double time)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_1">setWind</a> (const <a class="el" href="a03128.html">CVector</a> &amp;windDir, float windFreq, float windPower, float windBendMin)</td></tr>

<tr><td colspan="2"><div class="groupHeader">UpdateLighting 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="a03680.html#NL3D_1_1CVegetableManagerz1118_0">setUpdateLightingFrequency</a> (float freq)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_1">setUpdateLightingTime</a> (double time)</td></tr>

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

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

<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef TShapeMap::iterator&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagery0">ItShapeMap</a></td></tr>

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

<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a> (<a class="el" href="a03682.html">CVegetableShape</a> *shape, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, bool &amp;instanceLighted, bool &amp;instanceDoubleSided, bool &amp;instanceZSort, bool &amp;destLighted, bool &amp;precomputeLighting)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the rdrPass and other info for a given shape.  <a href="#NL3D_1_1CVegetableManagerd0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a> (<a class="el" href="a04558.html#a15">uint</a> rdrPass, <a class="el" href="a04558.html#a15">uint</a> vbHardMode)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the good allocator for the appropriate rdr pass.  <a href="#NL3D_1_1CVegetableManagerd1"></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="a03680.html#NL3D_1_1CVegetableManagerd2">initVertexProgram</a> (<a class="el" href="a04558.html#a15">uint</a> vpType)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">init the ith vertexProgram.  <a href="#NL3D_1_1CVegetableManagerd2"></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="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup the vertexProgram constants.  <a href="#NL3D_1_1CVegetableManagerd3"></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="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *, <a class="el" href="a04558.html#a15">uint</a> rdrPass)</td></tr>

<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a> (<a class="el" href="a04558.html#a15">uint</a> rdrPass)</td></tr>

<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03674.html">CVegetableInstanceGroup</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03321.html">NLMISC::CRefPtr</a>&lt; <a class="el" href="a02434.html">IDriver</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">profile  <a href="#NL3D_1_1CVegetableManagerr8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03680.html#NL3D_1_1CVegetableManagery1">TShapeMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03684.html">CVegetableSortBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a> [CVegetableVBAllocator::VBTypeCount]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a> [CVegetableVBAllocator::VBTypeCount]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02839.html">CMaterial</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03702.html">CVertexProgram</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a> [NL3D_VEGETABLE_NRDRPASS]</td></tr>

<tr><td colspan="2"><div class="groupHeader">Misc data to setup renderState (computed at each render())</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_1">_BkupFog</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02851.html">NLMISC::CMatrix</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">_ViewCenter</a></td></tr>

<tr><td colspan="2"><div class="groupHeader">Wind animation</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03660.html">NLMISC::CVector2f</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03660.html">NLMISC::CVector2f</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>

<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a></td></tr>

</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagery0" doxytag="NL3D::CVegetableManager::ItShapeMap" ></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 TShapeMap::iterator <a class="el" href="a03680.html#NL3D_1_1CVegetableManagery0">NL3D::CVegetableManager::ItShapeMap</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="a06699.html#l00301">301</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00781">getVegetableShape()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagery1" doxytag="NL3D::CVegetableManager::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="a03682.html">CVegetableShape</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagery1">NL3D::CVegetableManager::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="a06699.html#l00300">300</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagerw2" doxytag="NL3D::CVegetableManager::TVegetableWater" ></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="a03680.html#NL3D_1_1CVegetableManagerw2">NL3D::CVegetableManager::TVegetableWater</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Micro vegetation position against Water. Above water is the default. 
<p>
<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_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0" doxytag="AboveWater" ></a>AboveWater</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3" doxytag="UnderWater" ></a>UnderWater</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1" doxytag="IntersectWater" ></a>IntersectWater</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4" doxytag="VegetInfoLast" ></a>VegetInfoLast</em>&nbsp;</td><td>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="a06699.html#l00079">79</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
<div class="fragment"><pre>00079 { <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a> = 0, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4">VegetInfoLast</a> };
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagera1" doxytag="NL3D::CVegetableManager::CVegetableManager" ></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::CVegetableManager::CVegetableManager </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>maxVertexVbHardUnlit</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>maxVertexVbHardLighted</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>nbBlendLayers</em> = 20, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>blendLayerDistMax</em> = 60.f</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>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>maxVertexVbHardUnlit</em>&nbsp;</td><td>maximum VertexCount in VBHard for Unlit (or precomputed lighted) vegetables </td></tr>
    <tr><td valign=top><em>maxVertexVbHardLighted</em>&nbsp;</td><td>maximum VertexCount in VBHard for Lighted vegetables </td></tr>
    <tr><td valign=top><em>nbBlendLayers</em>&nbsp;</td><td>for ZSort/AlphaBlend rdrPass: number of layers of vegetables rendered independently. </td></tr>
    <tr><td valign=top><em>blendLayerDistMax</em>&nbsp;</td><td>for ZSort/AlphaBlend rdrPass: distance of the farest layer.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06698.html#l00058">58</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00361">_WindPrecRenderTime</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06708.html#l00072">NL3D::CVegetableVBAllocator::init()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a06698.html#l00052">NL3D_VEGETABLE_CLIP_BLOCK_BLOCKSIZE</a>, <a class="el" href="a06698.html#l00054">NL3D_VEGETABLE_INSTANCE_GROUP_BLOCKSIZE</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06698.html#l00053">NL3D_VEGETABLE_SORT_BLOCK_BLOCKSIZE</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a06339.html#l00066">NLMISC::CRGBA::set()</a>, <a class="el" href="a05641.html#l00078">NL3D::CMaterial::setAlphaTest()</a>, <a class="el" href="a05641.html#l00091">NL3D::CMaterial::setBlendFunc()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00059                                                      : 
00060         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>(NL3D_VEGETABLE_CLIP_BLOCK_BLOCKSIZE),
00061         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>(NL3D_VEGETABLE_SORT_BLOCK_BLOCKSIZE),
00062         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>(NL3D_VEGETABLE_INSTANCE_GROUP_BLOCKSIZE),
00063         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>(nbBlendLayers), <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a>(blendLayerDistMax),
00064         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>(NULL)
00065 {
00066         <a class="code" href="a04558.html#a15">uint</a>    i;
00067 
00068         <span class="comment">// Init all the allocators</span>
00069         <a class="code" href="a04199.html#a6">nlassert</a>((<a class="code" href="a04558.html#a15">uint</a>)(CVegetableVBAllocator::VBTypeCount) == 2);
00070         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted].init( CVegetableVBAllocator::VBTypeLighted, maxVertexVbHardLighted );
00071         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit].init( CVegetableVBAllocator::VBTypeUnlit, maxVertexVbHardUnlit );
00072         <span class="comment">// Init soft one, with no vbHard vertices.</span>
00073         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted].init( CVegetableVBAllocator::VBTypeLighted, 0 );
00074         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit].init( CVegetableVBAllocator::VBTypeUnlit, 0 );
00075 
00076         <span class="comment">// NB Vertex programs are initilized during the first call to update driver.</span>
00077 
00078         <span class="comment">// setup the material. Unlit (doesn't matter, lighting in VP) Alpha Test.</span>
00079         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.initUnlit();
00080         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTest(<span class="keyword">true</span>);
00081         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlendFunc(CMaterial::srcalpha, CMaterial::invsrcalpha);
00082 
00083         <span class="comment">// default light.</span>
00084         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>= (CVector(0,1, -1)).normed();
00085         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a>.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(64, 64, 64, 255);
00086         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a>.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(150, 150, 150, 255);
00087 
00088         <span class="comment">// Wind.</span>
00089         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.set(1,0,0);
00090         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>= 1;
00091         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>= 1;
00092         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>= 0;
00093         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>= 0;
00094         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>= 0;
00095         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>= 0;
00096 
00097         <span class="comment">// Init CosTable.</span>
00098         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
00099         {
00100                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a>[i]= (<span class="keywordtype">float</span>)cos( i*2*Pi / NL3D_VEGETABLE_VP_LUT_SIZE );
00101         }
00102 
00103         <span class="comment">// init to NULL _ZSortModelLayers.</span>
00104         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>= max(1U, _NumZSortBlendLayers);
00105         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>.resize(_NumZSortBlendLayers, NULL);
00106         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>.resize(_NumZSortBlendLayers, NULL);
00107 
00108 
00109         <span class="comment">// UL</span>
00110         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a>= 0;
00111         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>=0;
00112         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>= 0;
00113         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= NULL;
00114         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
00115         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
00116         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= 0;
00117         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>= <span class="keyword">false</span>;
00118         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>= 0;
00119 
00120         <span class="comment">// Misc.</span>
00121         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= 0;
00122 
00123         std::fill(_VertexProgram, _VertexProgram + NL3D_VEGETABLE_NRDRPASS, (CVertexProgram *) NULL);
00124 
00125 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagera2" doxytag="NL3D::CVegetableManager::~CVegetableManager" ></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::CVegetableManager::~<a class="el" href="a03680.html">CVegetableManager</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="a06698.html#l00129">129</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06699.html#l00394">_ZSortScene</a>, <a class="el" href="a06348.html#l01053">NL3D::CScene::deleteModel()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00130 {
00131         <span class="comment">// delete All VP</span>
00132         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i &lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; i++)
00133         {
00134                 <span class="keyword">delete</span>  <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[i];
00135                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[i]= NULL;
00136         }
00137 
00138         <span class="comment">// delete ZSort models.</span>
00139         <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>)
00140         {
00141                 <span class="comment">// remove models from scene.</span>
00142                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i= 0; i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>; i++)
00143                 {
00144                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>-&gt;deleteModel(_ZSortModelLayers[i]);
00145                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]= NULL;
00146                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>-&gt;deleteModel(_ZSortModelLayersUW[i]);
00147                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]= NULL;
00148                 }
00149 
00150                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>= NULL;
00151         }
00152 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_0" doxytag="NL3D::CVegetableManager::addInstance" ></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::CVegetableManager::addInstance </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ig</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>shape</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02851.html">NLMISC::CMatrix</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mat</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>ambientColor</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>diffuseColor</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>bendFactor</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>bendPhase</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>bendFreqFactor</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>blendDistMax</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>vegetWaterState</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03685.html">CVegetableUV8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>dlmUV</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 an instance to an ig, enlarging the associated clipBlock bbox. If the shape is not lighted, then only diffuseColor is used, to setup color per vertex. Warning! Use OptFastFloor()! So call must be enclosed with a OptFastFloorBegin()/OptFastFloorEnd().<p>
Also, buffer must be locked.<p>
ambientColor and diffuseColor should be in [0..1] (no clamp), else uint8 will wrap...<p>
<a class="el" href="a04199.html#a6">nlassert()</a> if no sufficient space reserved in <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>dlmUV</em>&nbsp;</td><td>is the dynamic lightmap UV for this vegetable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances()</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06698.html#l01036">1036</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06705.html#l00088">NL3D::CVegetableSortBlock::_Dirty</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06695.html#l00146">NL3D::CVegetableInstanceGroup::_HasZSortPassInstances</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a06695.html#l00143">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderNumTriangles</a>, <a class="el" href="a06695.html#l00144">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrders</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06695.html#l00156">NL3D::CVegetableInstanceGroup::_ULNumVertices</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06705.html#l00091">NL3D::CVegetableSortBlock::_UnderWater</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06708.html#l00185">NL3D::CVegetableVBAllocator::allocateVertex()</a>, <a class="el" href="a06340.html#l00659">NLMISC::CRGBAF::B</a>, <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::begin()</a>, <a class="el" href="a06703.html#l00134">NL3D::CVegetableShape::BendCenterMode</a>, <a class="el" href="a06703.html#l00133">NL3D::CVegetableShape::BestSidedPreComputeLighting</a>, <a class="el" href="a06697.html#l00065">NL3D::CVegetableLightEx::Color</a>, <a class="el" href="a06698.html#l00939">NL3D::computeVegetVertexLighting()</a>, <a class="el" href="a06698.html#l00986">NL3D::computeVegetVertexLightingForceBestSided()</a>, <a class="el" href="a06116.html#l00206">NLMISC::CObjectVector&lt; uint32, false &gt;::copy()</a>, <a class="el" href="a06695.html#l00100">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::DlmUV</a>, <a class="el" href="a06708.html#l00178">NL3D::CVegetableVBAllocator::exceedMaxVertexInBufferHard()</a>, <a class="el" href="a06690.html#l00045">NL3D::CVegetableClipBlock::extendBBoxOnly()</a>, <a class="el" href="a06690.html#l00062">NL3D::CVegetableClipBlock::extendSphere()</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06340.html#l00657">NLMISC::CRGBAF::G</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06711.html#l00338">NL3D::CVertexBuffer::getNormalOff()</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a06698.html#l00817">getRdrPassInfoForShape()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06711.html#l00339">NL3D::CVertexBuffer::getTexCoordOff()</a>, <a class="el" href="a06711.html#l00441">NL3D::CVertexBuffer::getValueOffEx()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06710.html#l00438">NL3D::CVertexBuffer::getVertexCoordPointer()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06703.html#l00147">NL3D::CVegetableShape::InstanceVertices</a>, <a class="el" href="a05972.html#l00914">NLMISC::CMatrix::invert()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06694.html#l00056">NL3D::CVegetableInstanceGroup::linkBeforeUL()</a>, <a class="el" href="a06695.html#l00097">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatAmbient</a>, <a class="el" href="a06695.html#l00098">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatDiffuse</a>, <a class="el" href="a06340.html#l00243">NLMISC::CRGBA::modulateFromColorRGBOnly()</a>, <a class="el" href="a05972.html#l01244">NLMISC::CMatrix::mulVector()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06693.html#l00053">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>, <a class="el" href="a06693.html#l00061">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06709.html#l00044">NL3D_VEGETABLE_VPPOS_BENDINFO</a>, <a class="el" href="a06709.html#l00045">NL3D_VEGETABLE_VPPOS_CENTER</a>, <a class="el" href="a06709.html#l00041">NL3D_VEGETABLE_VPPOS_COLOR0</a>, <a class="el" href="a06709.html#l00042">NL3D_VEGETABLE_VPPOS_COLOR1</a>, <a class="el" href="a06709.html#l00040">NL3D_VEGETABLE_VPPOS_NORMAL</a>, <a class="el" href="a06709.html#l00043">NL3D_VEGETABLE_VPPOS_TEX0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00124">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NLightedInstances</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a06695.html#l00095">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::NormalMat</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a06340.html#l00655">NLMISC::CRGBAF::R</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a06695.html#l00093">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::Shape</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00102">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::StartIdInRdrPass</a>, <a class="el" href="a06698.html#l01496">swapIgRdrPassHardMode()</a>, <a class="el" href="a05972.html#l00935">NLMISC::CMatrix::transpose()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06703.html#l00140">NL3D::CVegetableShape::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06690.html#l00055">NL3D::CVegetableClipBlock::updateSphere()</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>, <a class="el" href="a06681.html#l00048">NLMISC::CVectorH::w</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>, and <a class="el" href="a06705.html#l00122">NL3D::CVegetableSortBlock::ZSortHardMode</a>.
<p>
Referenced by <a class="el" href="a06686.html#l00306">NL3D::CVegetable::generateInstance()</a>.
<p>
<div class="fragment"><pre>01041 {
01042         <a class="code" href="a04558.html#a14">sint</a>    i;
01043 
01044 
01045         <span class="comment">// Some setup.</span>
01046         <span class="comment">//--------------------</span>
01047         <span class="keywordtype">bool</span>    instanceLighted;
01048         <span class="keywordtype">bool</span>    instanceDoubleSided;
01049         <span class="keywordtype">bool</span>    instanceZSort;
01050         <span class="keywordtype">bool</span>    destLighted;
01051         <span class="keywordtype">bool</span>    precomputeLighting;
01052 
01053         <span class="comment">// get correct rdrPass / info</span>
01054         <a class="code" href="a04558.html#a15">uint</a>    rdrPass;
01055         rdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a>(shape, vegetWaterState, instanceLighted, instanceDoubleSided, 
01056                 instanceZSort, destLighted, precomputeLighting);
01057         <span class="comment">// bestSided Precompute lighting or not??</span>
01058         <span class="keywordtype">bool</span>    bestSidedPrecomputeLighting= precomputeLighting &amp;&amp; shape-&gt;BestSidedPreComputeLighting;
01059 
01060 
01061         <span class="comment">// veget rdrPass</span>
01062         CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
01063 
01064         <span class="comment">// color.</span>
01065         <span class="comment">// setup using OptFastFloor.</span>
01066         <a class="code" href="a03337.html">CRGBA</a>           ambientRGBA, diffuseRGBA;
01067         <a class="code" href="a03337.html">CRGBA</a>           primaryRGBA, secondaryRGBA;
01068         <span class="comment">// diffuseColor</span>
01069         diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>*255);
01070         diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>*255);
01071         diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>*255);
01072         diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= 255;
01073         <span class="comment">// ambientColor</span>
01074         ambientRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>*255);
01075         ambientRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>*255);
01076         ambientRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>*255);
01077         ambientRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= 255;
01078 
01079         <span class="comment">// For Lighted, modulate with global light.</span>
01080         <span class="keywordflow">if</span>(instanceLighted)
01081         {
01082                 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, _GlobalDiffuse);
01083                 secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(ambientRGBA, _GlobalAmbient);
01084         }
01085         <span class="comment">// if the instance is not lighted, then don't take care of lighting</span>
01086         <span class="keywordflow">else</span>
01087         {
01088                 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>;
01089                 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>;
01090                 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>;
01091                 <span class="comment">// may not be useFull (2Sided lighting no more supported)</span>
01092                 secondaryRGBA= primaryRGBA;
01093         }
01094 
01095         <span class="comment">// Copy Dynamic Lightmap UV in Alpha part (save memory for an extra cost of 1 VP instruction)</span>
01096         primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= dlmUV.U;
01097         secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= dlmUV.V;
01098 
01099         <span class="comment">// get ref on the vegetLex.</span>
01100         CVegetableLightEx       &amp;vegetLex= ig-&gt;VegetableLightEx;
01101         <span class="comment">// Color of pointLights modulated by diffuse.</span>
01102         <a class="code" href="a03337.html">CRGBA</a>   diffusePL[2];
01103         <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=1)
01104         {
01105                 diffusePL[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, vegetLex.Color[0]);
01106                 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=2)
01107                 {
01108                         diffusePL[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, vegetLex.Color[1]);
01109                 }
01110         }
01111 
01112         <span class="comment">// normalize bendFreqFactor</span>
01113         bendFreqFactor*= <a class="code" href="a05270.html#a11">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>;
01114         bendFreqFactor= (<span class="keywordtype">float</span>)floor(bendFreqFactor + 0.5f);
01115         bendFreqFactor/= <a class="code" href="a05270.html#a11">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>;
01116 
01117 
01118         <span class="comment">// Get allocator, and manage VBhard overriding.</span>
01119         <span class="comment">//--------------------</span>
01120         CVegetableVBAllocator   *allocator;
01121         <span class="comment">// if still in Sfot mode, keep it.</span>
01122         <span class="keywordflow">if</span>(!vegetRdrPass.HardMode)
01123         {
01124                 <span class="comment">// get the soft allocator.</span>
01125                 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 0);
01126         }
01127         <span class="keywordflow">else</span>
01128         {
01129                 <span class="comment">// Get VB allocator Hard for this rdrPass</span>
01130                 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 1);
01131                 <span class="comment">// Test if the instance don't add too many vertices for this VBHard</span>
01132                 <span class="keywordflow">if</span>(allocator-&gt;exceedMaxVertexInBufferHard(shape-&gt;VB.getNumVertices()))
01133                 {
01134                         <span class="comment">// if exceed, then must pass ALL the IG in software mode. vertices/faces are correclty updated.</span>
01135                         <span class="comment">// special: if rdrPass is the ZSort one, </span>
01136                         <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01137                         {
01138                                 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_SortOwner-&gt;ZSortHardMode);
01139 
01140                                 <span class="comment">// must do it on ALL igs of the sortBlock, for less VBuffer mode switching.</span>
01141                                 CVegetableInstanceGroup         *pIg= ig-&gt;_SortOwner-&gt;_InstanceGroupList.begin();
01142                                 <span class="keywordflow">while</span>(pIg)
01143                                 {
01144                                         <span class="comment">// let's pass them in software mode.</span>
01145                                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a>(pIg, rdrPass);
01146                                         <span class="comment">// next</span>
01147                                         pIg= (CVegetableInstanceGroup*)pIg-&gt;Next;
01148                                 }
01149 
01150                                 <span class="comment">// Then all The sortBlock is in SoftMode.</span>
01151                                 ig-&gt;_SortOwner-&gt;ZSortHardMode= <span class="keyword">false</span>;
01152                         }
01153                         <span class="keywordflow">else</span>
01154                         {
01155                                 <span class="comment">// just do it on this Ig (can mix hardMode in a SortBlock for normal rdrPass)</span>
01156                                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a>(ig, rdrPass);
01157                         }
01158 
01159                         <span class="comment">// now, we can use the software only Allocator to append our instance</span>
01160                         allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 0);
01161                 }
01162         }
01163 
01164 
01165         <span class="comment">// get correct dstVB</span>
01166         <span class="keyword">const</span> CVertexBuffer     &amp;dstVBInfo= allocator-&gt;getSoftwareVertexBuffer();
01167 
01168 
01169         <span class="comment">// Transform vertices to a vegetable instance, and enlarge clipBlock</span>
01170         <span class="comment">//--------------------</span>
01171         <span class="comment">// compute matrix to multiply normals, ie (M-1)t</span>
01172         <a class="code" href="a02851.html">CMatrix</a>         normalMat;
01173         <span class="comment">// need just rotation scale matrix.</span>
01174         normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_10">setRot</a>(mat);
01175         normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1967_0">invert</a>();
01176         normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1967_7">transpose</a>();
01177         <span class="comment">// compute Instance position</span>
01178         CVector         instancePos;
01179         mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1963_6">getPos</a>(instancePos);
01180 
01181 
01182         <span class="comment">// At least, the bbox of the clipBlock must include the center of the shape.</span>
01183         ig-&gt;_ClipOwner-&gt;extendSphere(instancePos);
01184 
01185 
01186         <span class="comment">// Vertex/triangle Info.</span>
01187         <a class="code" href="a04558.html#a15">uint</a>    numNewVertices= shape-&gt;VB.getNumVertices();
01188         <a class="code" href="a04558.html#a15">uint</a>    numNewTris= shape-&gt;TriangleIndices.size()/3;
01189         <a class="code" href="a04558.html#a15">uint</a>    numNewIndices= shape-&gt;TriangleIndices.size();
01190 
01191         <span class="comment">// src info.</span>
01192         <a class="code" href="a04558.html#a15">uint</a>    srcNormalOff= (instanceLighted? shape-&gt;VB.getNormalOff() : 0);
01193         <a class="code" href="a04558.html#a15">uint</a>    srcTex0Off= shape-&gt;VB.getTexCoordOff(0);
01194         <a class="code" href="a04558.html#a15">uint</a>    srcTex1Off= shape-&gt;VB.getTexCoordOff(1);
01195 
01196         <span class="comment">// dst info</span>
01197         <a class="code" href="a04558.html#a15">uint</a>    dstNormalOff= (destLighted? dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_NORMAL) : 0);
01198         <a class="code" href="a04558.html#a15">uint</a>    dstColor0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR0);
01199         <a class="code" href="a04558.html#a15">uint</a>    dstColor1Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR1);
01200         <a class="code" href="a04558.html#a15">uint</a>    dstTex0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_TEX0);
01201         <a class="code" href="a04558.html#a15">uint</a>    dstBendOff= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_BENDINFO);
01202         <a class="code" href="a04558.html#a15">uint</a>    dstCenterOff= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_CENTER);
01203 
01204 
01205         <span class="comment">// Usefull For !destLighted only.</span>
01206         CVector         deltaPos;
01207         <span class="keywordtype">float</span>           deltaPosNorm=0.0;
01208 
01209 
01210         <span class="comment">// UseFull for ZSORT rdrPass, the worldVertices.</span>
01211         <span class="keyword">static</span>  vector&lt;CVector&gt;         worldVertices;
01212         <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01213         {
01214                 worldVertices.resize(numNewVertices);
01215         }
01216 
01217 
01218         <span class="comment">// For all vertices of shape, transform and store manager indices in temp shape.</span>
01219         <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numNewVertices;i++)
01220         {
01221                 <span class="comment">// allocate a Vertex</span>
01222                 <a class="code" href="a04558.html#a15">uint</a>    vid= allocator-&gt;allocateVertex();
01223                 <span class="comment">// store in tmp shape.</span>
01224                 shape-&gt;InstanceVertices[i]= vid;
01225 
01226                 <span class="comment">// Fill this vertex.</span>
01227                 <a class="code" href="a04558.html#a7">uint8</a>   *srcPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)shape-&gt;VB.getVertexCoordPointer(i);
01228                 <a class="code" href="a04558.html#a7">uint8</a>   *dstPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)allocator-&gt;getVertexPointer(vid);
01229 
01230                 <span class="comment">// Get bendWeight for this vertex.</span>
01231                 <span class="keywordtype">float</span>   vertexBendWeight= ((<a class="code" href="a03640.html">CUV</a>*)(srcPtr + srcTex1Off))-&gt;U * bendFactor;
01232 
01233                 <span class="comment">// Pos.</span>
01234                 <span class="comment">//-------</span>
01235                 <span class="comment">// Separate Center and relative pos.</span>
01236                 CVector relPos= mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>(*(CVector*)srcPtr);       <span class="comment">// mulVector, because translation in v[center]</span>
01237                 <span class="comment">// compute bendCenterPos</span>
01238                 CVector bendCenterPos;
01239                 <span class="keywordflow">if</span>(shape-&gt;BendCenterMode == CVegetableShapeBuild::BendCenterNull)
01240                         bendCenterPos= CVector::Null;
01241                 <span class="keywordflow">else</span>
01242                 {
01243                         CVector <a class="code" href="a04223.html#a576">v</a>= *(CVector*)srcPtr;
01244                         <a class="code" href="a04223.html#a576">v</a>.z= 0;
01245                         bendCenterPos= mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>(v);                                <span class="comment">// mulVector, because translation in v[center]</span>
01246                 }
01247                 <span class="comment">// copy</span>
01248                 deltaPos= relPos-bendCenterPos;
01249                 *(CVector*)dstPtr= deltaPos;
01250                 *(CVector*)(dstPtr + dstCenterOff)= instancePos + bendCenterPos;
01251                 <span class="comment">// if !destLighted, then VP is different</span>
01252                 <span class="keywordflow">if</span>(!destLighted)
01253                 {
01254                         deltaPosNorm= deltaPos.norm();
01255                         <span class="comment">// copy bendWeight in v.w</span>
01256                         <a class="code" href="a03668.html">CVectorH</a>        *vh= (<a class="code" href="a03668.html">CVectorH</a>*)dstPtr;
01257                         <span class="comment">// Mul by deltaPosNorm, to draw an arc circle.</span>
01258                         vh-&gt;<a class="code" href="a03668.html#NLMISC_1_1CVectorHo0">w</a>= vertexBendWeight * deltaPosNorm;
01259                 }
01260 
01261                 <span class="comment">// Enlarge the clipBlock of the IG.</span>
01262                 <span class="comment">// Since small shape, enlarge with each vertices. simpler and maybe faster.</span>
01263                 <span class="comment">// TODO_VEGET: bend and clipping ...</span>
01264                 ig-&gt;_ClipOwner-&gt;extendBBoxOnly(instancePos + relPos);
01265 
01266                 <span class="comment">// prepare for ZSort</span>
01267                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01268                 {
01269                         worldVertices[i]= instancePos + relPos;
01270                 }
01271 
01272 
01273                 <span class="comment">// Color-ligthing.</span>
01274                 <span class="comment">//-------</span>
01275                 <span class="keywordflow">if</span>(!precomputeLighting)
01276                 {
01277                         <span class="comment">// just copy the primary color (means diffuse part if lighted)</span>
01278                         *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off)= primaryRGBA;
01279                         <span class="comment">// normal and secondary color</span>
01280                         <span class="keywordflow">if</span>(destLighted)
01281                         {
01282                                 <span class="comment">// normal</span>
01283                                 *(CVector*)(dstPtr + dstNormalOff)= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
01284                         }
01285                         <span class="comment">// If destLighted, secondaryRGBA is the ambient</span>
01286                         <span class="comment">// else secondaryRGBA is used only for Alpha (DLM uv.v).</span>
01287                         *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
01288                 }
01289                 <span class="keywordflow">else</span>
01290                 {
01291                         <a class="code" href="a04199.html#a6">nlassert</a>(!destLighted);
01292 
01293                         <span class="comment">// compute normal.</span>
01294                         CVector         rotNormal= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
01295                         <span class="comment">// must normalize() because scale is possible.</span>
01296                         rotNormal.normalize();
01297 
01298                         <span class="comment">// Do the compute.</span>
01299                         <span class="keywordflow">if</span>(!bestSidedPrecomputeLighting)
01300                         {
01301                                 <a class="code" href="a05363.html#a543">computeVegetVertexLighting</a>(rotNormal, 
01302                                         _DirectionalLight, primaryRGBA, secondaryRGBA, 
01303                                         vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
01304                         }
01305                         <span class="keywordflow">else</span>
01306                         {
01307                                 <a class="code" href="a05363.html#a544">computeVegetVertexLightingForceBestSided</a>(rotNormal, 
01308                                         _DirectionalLight, primaryRGBA, secondaryRGBA, 
01309                                         vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
01310                         }
01311 
01312                         <span class="comment">// copy secondaryRGBA, used only for Alpha (DLM uv.v).</span>
01313                         *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
01314                 }
01315 
01316 
01317                 <span class="comment">// Texture.</span>
01318                 <span class="comment">//-------</span>
01319                 *(<a class="code" href="a03640.html">CUV</a>*)(dstPtr + dstTex0Off)= *(<a class="code" href="a03640.html">CUV</a>*)(srcPtr + srcTex0Off);
01320 
01321                 <span class="comment">// Bend.</span>
01322                 <span class="comment">//-------</span>
01323                 CVector         *dstBendPtr= (CVector*)(dstPtr + dstBendOff);
01324                 <span class="comment">// setup bend Phase.</span>
01325                 dstBendPtr-&gt;y= bendPhase;
01326                 <span class="comment">// setup bend Weight.</span>
01327                 <span class="comment">// if !destLighted, then VP is different, vertexBendWeight is stored in v[0].w</span>
01328                 <span class="keywordflow">if</span>(destLighted)
01329                         dstBendPtr-&gt;x= vertexBendWeight;
01330                 <span class="keywordflow">else</span>
01331                         <span class="comment">// the VP need the norm of relPos in v[9].x</span>
01332                         dstBendPtr-&gt;x= deltaPosNorm;
01333                 <span class="comment">// setup bendFreqFactor</span>
01334                 dstBendPtr-&gt;z= bendFreqFactor;
01336                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01337                 {
01338                         <span class="comment">// get ptr on v[9].w NB: in Unlit mode, it has 4 components.</span>
01339                         <a class="code" href="a03668.html">CVectorH</a>                *dstBendPtr= (<a class="code" href="a03668.html">CVectorH</a>*)(dstPtr + dstBendOff);
01340                         <span class="comment">// setup the constant of linear formula:</span>
01341                         <span class="comment">// Alpha= -1/blendTransDist * dist + blendDistMax/blendTransDist</span>
01342                         dstBendPtr-&gt;<a class="code" href="a03668.html#NLMISC_1_1CVectorHo0">w</a>= blendDistMax/<a class="code" href="a05270.html#a9">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>;
01343                 }
01344 
01345 
01346                 <span class="comment">// fill the vertex in AGP.</span>
01347                 <span class="comment">//-------</span>
01348                 allocator-&gt;flushVertex(vid);
01349         }
01350 
01351 
01352         <span class="comment">// must recompute the sphere according to the bbox.</span>
01353         ig-&gt;_ClipOwner-&gt;updateSphere();
01354 
01355 
01356         <span class="comment">// If ZSort, compute Triangle Centers and Orders for quadrant</span>
01357         <span class="comment">//--------------------</span>
01358         <span class="keywordflow">if</span>(rdrPass==<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01359         {
01360                 <span class="comment">// inform the SB that it must be updated.</span>
01361                 ig-&gt;_SortOwner-&gt;_Dirty= <span class="keyword">true</span>;
01362                 <span class="comment">// For deletion, inform the ig that it has instances which impact the SB.</span>
01363                 ig-&gt;_HasZSortPassInstances= <span class="keyword">true</span>;
01364 
01365                 <span class="comment">// change UnderWater falg of the SB</span>
01366                 <span class="keywordflow">if</span>(vegetWaterState == <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a>)
01367                         ig-&gt;_SortOwner-&gt;_UnderWater= <span class="keyword">false</span>;
01368                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(vegetWaterState == <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>)
01369                         ig-&gt;_SortOwner-&gt;_UnderWater= <span class="keyword">true</span>;
01370 
01371                 <span class="comment">// static to avoid reallocation</span>
01372                 <span class="keyword">static</span>  vector&lt;CVector&gt;         triangleCenters;
01373                 triangleCenters.resize(numNewTris);
01374 
01375                 <span class="comment">// compute triangle centers</span>
01376                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;numNewTris; i++)
01377                 {
01378                         <span class="comment">// get index in shape.</span>
01379                         <a class="code" href="a04558.html#a15">uint</a>    v0= shape-&gt;TriangleIndices[i*3+0];
01380                         <a class="code" href="a04558.html#a15">uint</a>    v1= shape-&gt;TriangleIndices[i*3+1];
01381                         <a class="code" href="a04558.html#a15">uint</a>    v2= shape-&gt;TriangleIndices[i*3+2];
01382 
01383                         <span class="comment">// get world coord.</span>
01384                         <span class="keyword">const</span> CVector   &amp;vert0= worldVertices[v0];
01385                         <span class="keyword">const</span> CVector   &amp;vert1= worldVertices[v1];
01386                         <span class="keyword">const</span> CVector   &amp;vert2= worldVertices[v2];
01387 
01388                         <span class="comment">// compute center</span>
01389                         triangleCenters[i]= (vert0 + vert1 + vert2) / 3;
01390                         <span class="comment">// relative to center of the sortBlock (for sint16 compression)</span>
01391                         triangleCenters[i]-= ig-&gt;_SortOwner-&gt;_Center;
01392                 }
01393 
01394 
01395                 <span class="comment">// resize the array. Actually only modify the number of triangles really setuped.</span>
01396                 <a class="code" href="a04558.html#a15">uint</a>    offTri= ig-&gt;_TriangleQuadrantOrderNumTriangles;
01397                 ig-&gt;_TriangleQuadrantOrderNumTriangles+= numNewTris;
01398                 <span class="comment">// verify user has correclty used reserveIg system.</span>
01399                 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderNumTriangles * NL3D_VEGETABLE_NUM_QUADRANT &lt;= ig-&gt;_TriangleQuadrantOrderArray.size());
01400 
01401 
01402                 <span class="comment">// compute distance for each quadrant. Since we are not sure of the sortBlockSize, mul with a (big: 16) security.</span>
01403                 <span class="comment">// NB: for landscape practical usage, this left us with more than 1mm precision.</span>
01404                 <span class="keywordtype">float</span>   distFactor=32768/(16*ig-&gt;_SortOwner-&gt;_Radius);
01405                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> quadId=0; quadId&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; quadId++)
01406                 {
01407                         <span class="keyword">const</span> CVector           &amp;quadDir= CVegetableQuadrant::Dirs[quadId];
01408 
01409                         <span class="comment">// For all tris.</span>
01410                         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;numNewTris; i++)
01411                         {
01412                                 <span class="comment">// compute the distance with orientation of the quadrant. (DotProduct)</span>
01413                                 <span class="keywordtype">float</span>   dist= triangleCenters[i] * quadDir;
01414                                 <span class="comment">// compress to sint16. </span>
01415                                 ig-&gt;_TriangleQuadrantOrders[quadId][offTri + i]= (<a class="code" href="a04558.html#a8">sint16</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dist*distFactor);
01416                         }
01417                 }
01418         }
01419 
01420 
01421         <span class="comment">// Append list of indices and list of triangles to the IG</span>
01422         <span class="comment">//--------------------</span>
01423 
01424         <span class="comment">// TODO_VEGET_OPTIM: system reallocation of array is very bad...</span>
01425 
01426 
01427         <span class="comment">// compute dest start idx.</span>
01428         <a class="code" href="a04558.html#a15">uint</a>    offVertex= vegetRdrPass.NVertices;
01429         <a class="code" href="a04558.html#a15">uint</a>    offTri= vegetRdrPass.NTriangles;
01430         <a class="code" href="a04558.html#a15">uint</a>    offTriIdx= offTri*3;
01431 
01432         <span class="comment">// verify user has correclty used reserveIg system.</span>
01433         <a class="code" href="a04199.html#a6">nlassert</a>(offVertex + numNewVertices &lt;= vegetRdrPass.Vertices.size());
01434         <a class="code" href="a04199.html#a6">nlassert</a>(offTriIdx + numNewIndices &lt;= vegetRdrPass.TriangleIndices.size());
01435         <a class="code" href="a04199.html#a6">nlassert</a>(offTriIdx + numNewIndices &lt;= vegetRdrPass.TriangleLocalIndices.size());
01436 
01437 
01438         <span class="comment">// insert list of vertices to delete in ig vertices.</span>
01439         vegetRdrPass.Vertices.copy(offVertex, offVertex+numNewVertices, &amp;shape-&gt;InstanceVertices[0]);
01440 
01441         <span class="comment">// insert array of triangles in ig.</span>
01442         <span class="comment">// for all indices, fill IG</span>
01443         <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numNewIndices; i++)
01444         {
01445                 <span class="comment">// get the index of the vertex in the shape</span>
01446                 <a class="code" href="a04558.html#a15">uint</a>    vid= shape-&gt;TriangleIndices[i];
01447                 <span class="comment">// re-direction, using InstanceVertices;</span>
01448                 vegetRdrPass.TriangleIndices[offTriIdx + i]= shape-&gt;InstanceVertices[vid];
01449                 <span class="comment">// local re-direction: adding vertexOffset.</span>
01450                 vegetRdrPass.TriangleLocalIndices[offTriIdx + i]= offVertex + vid;
01451         }
01452 
01453         <span class="comment">// new triangle and vertex size.</span>
01454         vegetRdrPass.NTriangles+= numNewTris;
01455         vegetRdrPass.NVertices+= numNewVertices;
01456 
01457 
01458         <span class="comment">// if lighted, must add a lightedInstance for lighting update.</span>
01459         <span class="comment">//--------------------</span>
01460         <span class="keywordflow">if</span>(instanceLighted)
01461         {
01462                 <span class="comment">// first, update Ig.</span>
01463                 ig-&gt;_ULNumVertices+= numNewVertices;
01464                 <span class="comment">// and update the vegetable manager.</span>
01465                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>+= numNewVertices;
01466                 <span class="comment">// link at the end of the circular list: link before the current root.</span>
01467                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>==NULL)
01468                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= ig;
01469                 <span class="keywordflow">else</span>
01470                         ig-&gt;linkBeforeUL(_ULRootIg);
01471 
01472                 <span class="comment">// check good use of reserveIg.</span>
01473                 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.NLightedInstances &lt; vegetRdrPass.LightedInstances.size());
01474 
01475                 <span class="comment">// Fill instance info</span>
01476                 CVegetableInstanceGroup::CVegetableLightedInstance      &amp;vli= 
01477                         vegetRdrPass.LightedInstances[vegetRdrPass.NLightedInstances];
01478                 vli.Shape= shape;
01479                 vli.NormalMat= normalMat;
01480                 <span class="comment">// copy colors unmodulated by global light.</span>
01481                 vli.MatAmbient= ambientRGBA;
01482                 vli.MatDiffuse= diffuseRGBA;
01483                 <span class="comment">// store dynamic lightmap UV</span>
01484                 vli.DlmUV= dlmUV;
01485                 <span class="comment">// where vertices of this instances are wrote in the VegetRdrPass</span>
01486                 vli.StartIdInRdrPass= offVertex;
01487 
01488                 <span class="comment">// Inc size setuped.</span>
01489                 vegetRdrPass.NLightedInstances++;
01490         }
01491 
01492 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_0" doxytag="NL3D::CVegetableManager::createClipBlock" ></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="a03673.html">CVegetableClipBlock</a> * NL3D::CVegetableManager::createClipBlock </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>
Create a clipBlock where SortBlock will be created. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00607">607</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00289">_ClipBlockMemory</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableClipBlock &gt;::allocate()</a>, and <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00611">NL3D::CPatch::addRefTessBlocks()</a>.
<p>
<div class="fragment"><pre>00608 {
00609         <span class="comment">// create a clipblock</span>
00610         CVegetableClipBlock     *ret;
00611         ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
00612 
00613         <span class="comment">// append to list.</span>
00614         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.append(ret);
00615 
00616         <span class="keywordflow">return</span> ret;
00617 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_1" doxytag="NL3D::CVegetableManager::createIg" ></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="a03674.html">CVegetableInstanceGroup</a> * NL3D::CVegetableManager::createIg </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>sortBlock</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>
create an instance group in a sortBlock, where instances will be created. Instances will be frustum-clipped by the clipBlock, and sorted (for the ZSort rdrPass only) by sortBlock.
<p>
Definition at line <a class="el" href="a06698.html#l00672">672</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00291">_InstanceGroupMemory</a>, <a class="el" href="a06691.html#l00089">NL3D::CVegetableClipBlock::_NumIgs</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableInstanceGroup &gt;::allocate()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::append()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, and <a class="el" href="a06705.html#l00122">NL3D::CVegetableSortBlock::ZSortHardMode</a>.
<p>
Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>.
<p>
<div class="fragment"><pre>00673 {
00674         <a class="code" href="a04199.html#a6">nlassert</a>(sortBlock);
00675         CVegetableClipBlock             *clipBlock= sortBlock-&gt;_Owner;
00676         
00677 
00678         <span class="comment">// create an IG</span>
00679         CVegetableInstanceGroup *ret;
00680         ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
00681         ret-&gt;_SortOwner= sortBlock;
00682         ret-&gt;_ClipOwner= clipBlock;
00683 
00684         <span class="comment">// if the clipBlock is empty, change list, because won't be no more.</span>
00685         <span class="keywordflow">if</span>(clipBlock-&gt;_NumIgs==0)
00686         {
00687                 <span class="comment">// remove from empty list</span>
00688                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.remove(clipBlock);
00689                 <span class="comment">// and append to not empty one.</span>
00690                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.append(clipBlock);
00691         }
00692 
00693         <span class="comment">// inc the number of igs appended to the clipBlock.</span>
00694         clipBlock-&gt;_NumIgs++;
00695 
00696         <span class="comment">// link ig to sortBlock.</span>
00697         sortBlock-&gt;_InstanceGroupList.append(ret);
00698 
00699         <span class="comment">// Special Init: The ZSort rdrPass must start with the same HardMode than SortBlock.</span>
00700         ret-&gt;_RdrPass[<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>].HardMode= sortBlock-&gt;ZSortHardMode;
00701 
00702         <span class="keywordflow">return</span> ret;
00703 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_2" doxytag="NL3D::CVegetableManager::createSortBlock" ></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="a03684.html">CVegetableSortBlock</a> * NL3D::CVegetableManager::createSortBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>clipBlock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>center</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>radius</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>
Create a SortBlock in a clipBlock where instance group (ig) will be created. All AlphaBlend instances created in a SortBlock should have the same vegetWaterState: AboveWater or UnderWater. Each time an instance is added to the sortBlock it changes the _UnderWater state of the sortBlock. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>center</em>&nbsp;</td><td>you must give an approximate center for the sortBlock (for sorting) </td></tr>
    <tr><td valign=top><em>radius</em>&nbsp;</td><td>you must give an approximate radius for the sortBlock (for the system to know when you are IN the sortBlock, and then to sort in a better way)</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06698.html#l00637">637</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06699.html#l00290">_SortBlockMemory</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableSortBlock &gt;::allocate()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableSortBlock &gt;::append()</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
<p>
Referenced by <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>.
<p>
<div class="fragment"><pre>00638 {
00639         <a class="code" href="a04199.html#a6">nlassert</a>(clipBlock);
00640 
00641         <span class="comment">// create a clipblock</span>
00642         CVegetableSortBlock     *ret;
00643         ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
00644         ret-&gt;_Owner= clipBlock;
00645         ret-&gt;_Center= center;
00646         ret-&gt;_Radius= radius;
00647 
00648         <span class="comment">// append to list.</span>
00649         clipBlock-&gt;_SortBlockList.append(ret);
00650 
00651         <span class="keywordflow">return</span> ret;
00652 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagera0" doxytag="NL3D::CVegetableManager::createVegetableBlendLayersModels" ></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::CVegetableManager::createVegetableBlendLayersModels </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03348.html">CScene</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>scene</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>
Before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render()</a>, you must call this method (else nlassert). It creates the necessary models in the scene, to manage AlphaBlending correctly. Those models are deleted in the object dtor.
<p>
Definition at line <a class="el" href="a06698.html#l00156">156</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06699.html#l00394">_ZSortScene</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06689.html#l00044">NL3D::VegetableBlendLayerModelId</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03225">NL3D::CLandscape::createVegetableBlendLayersModels()</a>.
<p>
<div class="fragment"><pre>00157 {
00158         <span class="comment">// setup scene</span>
00159         <a class="code" href="a04199.html#a6">nlassert</a>(scene);
00160         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>= scene;
00161 
00162         <span class="comment">// create the layers models.</span>
00163         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>; i++)
00164         {
00165                 <span class="comment">// assert not already done.</span>
00166                 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayers[i]==NULL);
00167                 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayersUW[i]==NULL);
00168 
00169                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a>*)scene-&gt;createModel(VegetableBlendLayerModelId);
00170                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a>*)scene-&gt;createModel(VegetableBlendLayerModelId);
00171                 <span class="comment">// init owner.</span>
00172                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]-&gt;VegetableManager= <span class="keyword">this</span>;
00173                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;VegetableManager= <span class="keyword">this</span>;
00174 
00175                 <span class="comment">// Set UnderWater layer for _ZSortModelLayersUW</span>
00176                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;setOrderingLayer(2);
00177         }
00178 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_3" doxytag="NL3D::CVegetableManager::deleteClipBlock" ></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::CVegetableManager::deleteClipBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>clipBlock</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>
delete such a clipBlock. all sortBlocks and so all ig must be deleted before. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00620">620</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00289">_ClipBlockMemory</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableClipBlock &gt;::free()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CVegetableSortBlock &gt;::size()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00669">NL3D::CPatch::clearTessBlocks()</a>.
<p>
<div class="fragment"><pre>00621 {
00622         <span class="keywordflow">if</span>(!clipBlock)
00623                 <span class="keywordflow">return</span>;
00624 
00625         <span class="comment">// verify no more sortBlocks in this clipblock</span>
00626         <a class="code" href="a04199.html#a6">nlassert</a>(clipBlock-&gt;_SortBlockList.size() == 0);
00627 
00628         <span class="comment">// unlink from _EmptyClipBlockList, because _InstanceGroupList.size() == 0 ...</span>
00629         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.remove(clipBlock);
00630 
00631         <span class="comment">// delete</span>
00632         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(clipBlock);
00633 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_4" doxytag="NL3D::CVegetableManager::deleteIg" ></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::CVegetableManager::deleteIg </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ig</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>
delete such an ig. After doing this, you must call igSortBlockOwner-&gt;updateSortBlock() If the sortBlock has many Igs, you can do it after deleting all your igs.
<p>
Definition at line <a class="el" href="a06698.html#l00706">706</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06705.html#l00088">NL3D::CVegetableSortBlock::_Dirty</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06695.html#l00146">NL3D::CVegetableInstanceGroup::_HasZSortPassInstances</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00291">_InstanceGroupMemory</a>, <a class="el" href="a06691.html#l00089">NL3D::CVegetableClipBlock::_NumIgs</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06695.html#l00154">NL3D::CVegetableInstanceGroup::_ULNext</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06695.html#l00156">NL3D::CVegetableInstanceGroup::_ULNumVertices</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>, <a class="el" href="a06116.html#l00124">NLMISC::CObjectVector&lt; uint32, false &gt;::clear()</a>, <a class="el" href="a06708.html#l00234">NL3D::CVegetableVBAllocator::deleteVertex()</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableInstanceGroup &gt;::free()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::remove()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06694.html#l00072">NL3D::CVegetableInstanceGroup::unlinkUL()</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
<p>
Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>, <a class="el" href="a05876.html#l00124">NL3D::CLandscapeVegetableBlock::release()</a>, and <a class="el" href="a05876.html#l00155">NL3D::CLandscapeVegetableBlock::update()</a>.
<p>
<div class="fragment"><pre>00707 {
00708         <span class="keywordflow">if</span>(!ig)
00709                 <span class="keywordflow">return</span>;
00710 
00711         <span class="comment">// update lighting mgt: no more vertices.</span>
00712         <span class="comment">// -----------</span>
00713         <span class="comment">// If I delete the ig which is the current root</span>
00714         <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a> == ig)
00715         {
00716                 <span class="comment">// switch to next</span>
00717                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= ig-&gt;_ULNext;
00718                 <span class="comment">// if still the same, it means that the circular list is now empty</span>
00719                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a> == ig)
00720                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= NULL;
00721                 <span class="comment">// Reset UL instance info.</span>
00722                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
00723                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
00724         }
00725         <span class="comment">// remove UL vertex count of the deleted ig</span>
00726         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>-= ig-&gt;_ULNumVertices;
00727         <span class="comment">// unlink the ig for lighting update.</span>
00728         ig-&gt;unlinkUL();
00729 
00730 
00731         <span class="comment">// For all render pass of this instance, delete his vertices</span>
00732         <span class="comment">// -----------</span>
00733         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> rdrPass=0; rdrPass &lt; <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
00734         {
00735                 <span class="comment">// rdrPass</span>
00736                 CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
00737                 <span class="comment">// which allocator?</span>
00738                 CVegetableVBAllocator   &amp;vbAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vegetRdrPass.HardMode);
00739 
00740                 <span class="comment">// For all vertices of this rdrPass, delete it</span>
00741                 <a class="code" href="a04558.html#a14">sint</a>    numVertices;
00742                 numVertices= vegetRdrPass.Vertices.size();
00743                 <span class="comment">// all vertices must have been setuped.</span>
00744                 <a class="code" href="a04199.html#a6">nlassert</a>((<a class="code" href="a04558.html#a15">uint</a>)numVertices == vegetRdrPass.NVertices);
00745                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;numVertices;i++)
00746                 {
00747                         vbAllocator.deleteVertex(vegetRdrPass.Vertices[i]);
00748                 }
00749                 vegetRdrPass.Vertices.clear();
00750         }
00751 
00752         CVegetableClipBlock             *clipBlock= ig-&gt;_ClipOwner;
00753         CVegetableSortBlock             *sortBlock= ig-&gt;_SortOwner;
00754 
00755         <span class="comment">// If I have got some faces in ZSort rdrPass</span>
00756         <span class="keywordflow">if</span>(ig-&gt;_HasZSortPassInstances)
00757                 <span class="comment">// after my deletion, the sortBlock must be updated.</span>
00758                 sortBlock-&gt;_Dirty= <span class="keyword">true</span>;
00759 
00760 
00761         <span class="comment">// unlink from sortBlock, and delete.</span>
00762         sortBlock-&gt;_InstanceGroupList.remove(ig);
00763         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(ig);
00764 
00765 
00766         <span class="comment">// decRef the clipBlock</span>
00767         clipBlock-&gt;_NumIgs--;
00768         <span class="comment">// if the clipBlock is now empty, change list</span>
00769         <span class="keywordflow">if</span>(clipBlock-&gt;_NumIgs==0)
00770         {
00771                 <span class="comment">// remove from normal list</span>
00772                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.remove(clipBlock);
00773                 <span class="comment">// and append to empty list.</span>
00774                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.append(clipBlock);
00775         }
00776 
00777 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_5" doxytag="NL3D::CVegetableManager::deleteSortBlock" ></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::CVegetableManager::deleteSortBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>sortBlock</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>
delete such a SortBlock. all ig must be deleted before. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00655">655</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06699.html#l00290">_SortBlockMemory</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableSortBlock &gt;::free()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableSortBlock &gt;::remove()</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::size()</a>.
<p>
Referenced by <a class="el" href="a05876.html#l00124">NL3D::CLandscapeVegetableBlock::release()</a>.
<p>
<div class="fragment"><pre>00656 {
00657         <span class="keywordflow">if</span>(!sortBlock)
00658                 <span class="keywordflow">return</span>;
00659 
00660         <span class="comment">// verify no more IGs in this sortblock</span>
00661         <a class="code" href="a04199.html#a6">nlassert</a>(sortBlock-&gt;_InstanceGroupList.size() == 0);
00662 
00663         <span class="comment">// unlink from clipBlock</span>
00664         sortBlock-&gt;_Owner-&gt;_SortBlockList.remove(sortBlock);
00665 
00666         <span class="comment">// delete</span>
00667         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(sortBlock);
00668 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerh0" doxytag="NL3D::CVegetableManager::doubleSidedRdrPass" ></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::CVegetableManager::doubleSidedRdrPass </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>rdrPass</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static, 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="a06698.html#l01560">1560</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.
<p>
<div class="fragment"><pre>01561 {
01562         <a class="code" href="a04199.html#a6">nlassert</a>(rdrPass&lt;NL3D_VEGETABLE_NRDRPASS);
01563         <span class="keywordflow">return</span> (rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>) || 
01564                 (rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>) ||
01565                 (rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>);
01566 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_0" doxytag="NL3D::CVegetableManager::doUpdateLighting" ></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::CVegetableManager::doUpdateLighting </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><code> [private]</code></td>
        </tr>

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

<p>
update lighting according to _ULNVerticesToUpdate 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l02262">2262</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06695.html#l00154">NL3D::CVegetableInstanceGroup::_ULNext</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.
<p>
Referenced by <a class="el" href="a06698.html#l02228">updateLighting()</a>, and <a class="el" href="a06698.html#l02251">updateLightingAll()</a>.
<p>
<div class="fragment"><pre>02263 {
02264         <span class="comment">// while there is still some vertices to update.</span>
02265         <span class="keywordflow">while</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a> &gt; 0 &amp;&amp; <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>)
02266         {
02267                 <span class="comment">// update the current ig. if all updated, skip to next one.</span>
02268                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_2">updateLightingIGPart</a>())
02269                 {
02270                         <span class="comment">// next</span>
02271                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;_ULNext;
02272                 }
02273         }
02274 
02275         <span class="comment">// Now, _ULNVerticesToUpdate should be &lt;=0. (most of the time &lt; 0)</span>
02276 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_0" doxytag="NL3D::CVegetableManager::exitRenderStateForBlendLayerModel" ></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::CVegetableManager::exitRenderStateForBlendLayerModel </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>driver</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="a06698.html#l02180">2180</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00380">_BkupFog</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, and <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>.
<p>
Referenced by <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>.
<p>
<div class="fragment"><pre>02181 {
02182         <span class="comment">// disable VertexProgram.</span>
02183         driver-&gt;activeVertexProgram(NULL);
02184 
02185         <span class="comment">// restore Fog.</span>
02186         driver-&gt;enableFog(_BkupFog);
02187 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1120_0" doxytag="NL3D::CVegetableManager::getNumVegetableFaceRendered" ></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#a15">uint</a> NL3D::CVegetableManager::getNumVegetableFaceRendered </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> const</td>
        </tr>

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

<p>
get the number of faces rendered by the vegetable manager 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l02173">2173</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03211">NL3D::CLandscape::getNumVegetableFaceRendered()</a>.
<p>
<div class="fragment"><pre>02174 {
02175         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>;
02176 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerd0" doxytag="NL3D::CVegetableManager::getRdrPassInfoForShape" ></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#a15">uint</a> NL3D::CVegetableManager::getRdrPassInfoForShape </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>shape</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>vegetWaterState</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>instanceLighted</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>instanceDoubleSided</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>instanceZSort</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>destLighted</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>precomputeLighting</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>
get the rdrPass and other info for a given shape. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00817">817</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06703.html#l00132">NL3D::CVegetableShape::AlphaBlend</a>, <a class="el" href="a06703.html#l00130">NL3D::CVegetableShape::DoubleSided</a>, <a class="el" href="a06703.html#l00129">NL3D::CVegetableShape::Lighted</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06703.html#l00131">NL3D::CVegetableShape::PreComputeLighting</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, and <a class="el" href="a06698.html#l00856">reserveIgAddInstances()</a>.
<p>
<div class="fragment"><pre>00820 {
00821         instanceLighted= shape-&gt;Lighted;
00822         instanceDoubleSided= shape-&gt;DoubleSided;
00823         <span class="comment">// Disable ZSorting when we intersect water.</span>
00824         instanceZSort= shape-&gt;AlphaBlend &amp;&amp; vegetWaterState!=<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>;
00825         destLighted= instanceLighted &amp;&amp; !shape-&gt;PreComputeLighting;
00826         precomputeLighting= instanceLighted &amp;&amp; shape-&gt;PreComputeLighting;
00827 
00828         <span class="comment">// get correct rdrPass</span>
00829         <a class="code" href="a04558.html#a15">uint</a>    rdrPass;
00830         <span class="comment">// get according to lighted / doubleSided state</span>
00831         <span class="keywordflow">if</span>(destLighted)
00832         {
00833                 <span class="keywordflow">if</span>(instanceDoubleSided)
00834                         rdrPass= <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>;
00835                 <span class="keywordflow">else</span>
00836                         rdrPass= <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>;
00837         }
00838         <span class="keywordflow">else</span>
00839         {
00840                 <span class="keywordflow">if</span>(instanceDoubleSided)
00841                 {
00842                         <span class="keywordflow">if</span>(instanceZSort)
00843                                 rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
00844                         <span class="keywordflow">else</span>
00845                                 rdrPass= <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>;
00846                 }
00847                 <span class="keywordflow">else</span>
00848                         rdrPass= <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>;
00849         }
00850 
00851         <span class="keywordflow">return</span> rdrPass;
00852 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerd1" doxytag="NL3D::CVegetableManager::getVBAllocatorForRdrPassAndVBHardMode" ></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="a03686.html">CVegetableVBAllocator</a> &amp; NL3D::CVegetableManager::getVBAllocatorForRdrPassAndVBHardMode </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>rdrPass</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>vbHardMode</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>
Get the good allocator for the appropriate rdr pass. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00182">182</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>, <a class="el" href="a06698.html#l01496">swapIgRdrPassHardMode()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>.
<p>
<div class="fragment"><pre>00183 {
00184         <span class="comment">// If software VB</span>
00185         <span class="keywordflow">if</span>(vbHardMode==0)
00186         {
00187                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>)
00188                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
00189                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>)
00190                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
00191                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>)
00192                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00193                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>)
00194                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00195                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
00196                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00197         }
00198         <span class="comment">// If hard VB</span>
00199         <span class="keywordflow">else</span>
00200         {
00201                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>)
00202                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
00203                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>)
00204                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
00205                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>)
00206                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00207                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>)
00208                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00209                 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
00210                         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
00211         }
00212 
00213         <span class="comment">// abnormal case</span>
00214         <a class="code" href="a04199.html#a12">nlstop</a>;
00215         <span class="comment">// To avoid warning;</span>
00216         <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[0];
00217 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1108_0" doxytag="NL3D::CVegetableManager::getVegetableShape" ></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="a03682.html">CVegetableShape</a> * NL3D::CVegetableManager::getVegetableShape </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>shape</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 a shape if necessary, and return a shapeId for this shape. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00781">781</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00301">ItShapeMap</a>, <a class="el" href="a06702.html#l00177">NL3D::CVegetableShape::loadShape()</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
<p>
Referenced by <a class="el" href="a06686.html#l00123">NL3D::CVegetable::registerToManager()</a>.
<p>
<div class="fragment"><pre>00782 {
00783         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagery0">ItShapeMap</a>      it= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.find(shape);
00784         <span class="comment">// if found</span>
00785         <span class="keywordflow">if</span>(it != <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.end())
00786                 <span class="keywordflow">return</span> &amp;it-&gt;second;
00787         <span class="comment">// else insert</span>
00788         {
00789                 <span class="comment">// insert.</span>
00790                 CVegetableShape         *ret;
00791                 it= ( <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.insert(make_pair(shape, CVegetableShape()) ) ).first;
00792                 ret= &amp;it-&gt;second;
00793 
00794                 <span class="comment">// fill.</span>
00795                 <span class="keywordflow">try</span>
00796                 {
00797                         ret-&gt;loadShape(shape);
00798                 }
00799                 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &amp;e)
00800                 {
00801                         <span class="comment">// Warning</span>
00802                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"CVegetableManager::getVegetableShape error while loading shape file '%s' : '%s'"</span>, shape.c_str (), e.what ());
00803 
00804                         <span class="comment">// Remove from map</span>
00805                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.erase (shape);
00806 
00807                         <span class="comment">// Return NULL</span>
00808                         ret = NULL;
00809                 }
00810 
00811                 <span class="keywordflow">return</span> ret;
00812         }
00813 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerd2" doxytag="NL3D::CVegetableManager::initVertexProgram" ></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::CVegetableManager::initVertexProgram </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vpType</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>
init the ith vertexProgram. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l00562">562</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00448">_LastDriver</a>, <a class="el" href="a06698.html#l00460">NL3D::NL3D_BendProgram</a>, <a class="el" href="a06698.html#l00529">NL3D::NL3D_CommonEndVegetableProgram</a>, <a class="el" href="a06698.html#l00316">NL3D::NL3D_FastBendProgram</a>, <a class="el" href="a06698.html#l00471">NL3D::NL3D_LightedStartVegetableProgram</a>, <a class="el" href="a06698.html#l00513">NL3D::NL3D_UnlitAlphaBlendVegetableProgram</a>, <a class="el" href="a06698.html#l00506">NL3D::NL3D_UnlitStartVegetableProgram</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01569">updateDriver()</a>.
<p>
<div class="fragment"><pre>00563 {
00564         <a class="code" href="a04199.html#a6">nlassert</a>(_LastDriver); <span class="comment">// update driver should have been called at least once !</span>
00565         <span class="comment">// Init the Vertex Program.</span>
00566         string  vpgram;
00567         <span class="comment">// start always with Bend.</span>
00568         <span class="keywordflow">if</span>( vpType==<a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a> || vpType==<a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a> )
00569                 vpgram= <a class="code" href="a05363.html#a335">NL3D_BendProgram</a>;
00570         <span class="keywordflow">else</span>
00571                 vpgram= <a class="code" href="a05363.html#a332">NL3D_FastBendProgram</a>;
00572 
00573         <span class="comment">// combine the VP according to Type</span>
00574         <span class="keywordflow">switch</span>(vpType)
00575         {
00576         <span class="keywordflow">case</span> <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>:
00577         <span class="keywordflow">case</span> <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>:             
00578                 vpgram+= string(NL3D_LightedStartVegetableProgram);
00579                 <span class="keywordflow">break</span>;
00580         <span class="keywordflow">case</span> <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>:              
00581         <span class="keywordflow">case</span> <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>:               
00582                 vpgram+= string(NL3D_UnlitStartVegetableProgram);
00583                 <span class="keywordflow">break</span>;
00584         <span class="keywordflow">case</span> <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>:         
00585                 vpgram+= string(NL3D_UnlitStartVegetableProgram);
00586                 vpgram+= string(NL3D_UnlitAlphaBlendVegetableProgram);
00587                 <span class="keywordflow">break</span>;  
00588         }
00589 
00590         <span class="comment">// common end of VP</span>
00591         vpgram+= string(NL3D_CommonEndVegetableProgram);
00592 
00593         <span class="comment">// create VP.</span>
00594         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[vpType]= <span class="keyword">new</span> CVertexProgram(vpgram.c_str());
00595 
00596 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_0" doxytag="NL3D::CVegetableManager::loadTexture" ></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::CVegetableManager::loadTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>itex</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 a global texture used for all vegetables (smartPtr-ized). 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01604">1604</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, and <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>.
<p>
<div class="fragment"><pre>01605 {
01606         <span class="comment">// setup a ITexture (smartPtr-ized).</span>
01607         <span class="comment">// Store in stage1, for dynamicLightmaping</span>
01608         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(1, itex);
01609 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_1" doxytag="NL3D::CVegetableManager::loadTexture" ></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::CVegetableManager::loadTexture </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>texName</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 a global texture used for all vegetables (lookup into CPath). 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01592">1592</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06505.html#l00100">NL3D::ITexture::setFilterMode()</a>, <a class="el" href="a06506.html#l00202">NL3D::ITexture::setWrapS()</a>, and <a class="el" href="a06506.html#l00203">NL3D::ITexture::setWrapT()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03174">NL3D::CLandscape::loadVegetableTexture()</a>.
<p>
<div class="fragment"><pre>01593 {
01594         <span class="comment">// setup a CTextureFile (smartPtr-ized).</span>
01595         ITexture        *tex= <span class="keyword">new</span> CTextureFile(texName);
01596         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1114_1">loadTexture</a>(tex);
01597         <span class="comment">// setup good params.</span>
01598         tex-&gt;setFilterMode(ITexture::Linear, ITexture::LinearMipMapLinear);
01599         tex-&gt;setWrapS(ITexture::Clamp);
01600         tex-&gt;setWrapT(ITexture::Clamp);
01601 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_2" doxytag="NL3D::CVegetableManager::lockBuffers" ></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::CVegetableManager::lockBuffers </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>
lock any AGP vertex buffers. Do it wisely (just one time before refine as example). You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a> (and so <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_1">CVegetable::generateInstance()</a>) with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
<p>
Definition at line <a class="el" href="a06698.html#l01622">1622</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06708.html#l00144">NL3D::CVegetableVBAllocator::lockBuffer()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00862">NL3D::CLandscape::lockBuffers()</a>.
<p>
<div class="fragment"><pre>01623 {
01624         <span class="comment">// lock all buffers</span>
01625         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
01626         {
01627                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].lockBuffer();
01628                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].lockBuffer();
01629         }
01630 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_3" doxytag="NL3D::CVegetableManager::render" ></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::CVegetableManager::render </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>viewCenter</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>frontVector</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03082.html">CPlane</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pyramid</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>textureDLM</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>driver</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>
render the manager into a driver, with current viewMatrix/frustum/fog setuped Buffers should be unlocked. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>textureDLM</em>&nbsp;</td><td>is the dynamic lightmap to use. can be NULL if don't want DLM</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06698.html#l01713">1713</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00378">_AngleAxis</a>, <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00382">_ManagerMatrix</a>, <a class="el" href="a06705.html#l00111">NL3D::CVegetableSortBlock::_NTriangles</a>, <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06705.html#l00103">NL3D::CVegetableSortBlock::_QuadrantId</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06691.html#l00092">NL3D::CVegetableClipBlock::_RenderNext</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06705.html#l00101">NL3D::CVegetableSortBlock::_SortKey</a>, <a class="el" href="a06705.html#l00091">NL3D::CVegetableSortBlock::_UnderWater</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a06699.html#l00379">_ViewCenter</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00369">_WindDeltaTable</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00361">_WindPrecRenderTime</a>, <a class="el" href="a06699.html#l00368">_WindTable</a>, <a class="el" href="a06699.html#l00393">_ZSortLayerDistMax</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06708.html#l00266">NL3D::CVegetableVBAllocator::activate()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::begin()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableSortBlock &gt;::begin()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableClipBlock &gt;::begin()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06690.html#l00082">NL3D::CVegetableClipBlock::clip()</a>, <a class="el" href="a06698.html#l01560">doubleSidedRdrPass()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_1">NL3D::IDriver::fogEnabled()</a>, <a class="el" href="a06708.html#l00171">NL3D::CVegetableVBAllocator::getNumUserVerticesAllocated()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06693.html#l00061">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06206.html#l00048">NL3D::CPrimitiveProfile::NTriangles</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz141_4">NL3D::IDriver::profileRenderedPrimitives()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera55">NL3D::IDriver::renderSimpleTriangles()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00071">NL3D::CMaterial::setDoubleSided()</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera67">NL3D::IDriver::setupMaterial()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05641.html#l00247">NL3D::CMaterial::texEnvArg0Alpha()</a>, <a class="el" href="a05641.html#l00221">NL3D::CMaterial::texEnvArg0RGB()</a>, <a class="el" href="a05641.html#l00256">NL3D::CMaterial::texEnvArg1Alpha()</a>, <a class="el" href="a05641.html#l00229">NL3D::CMaterial::texEnvArg1RGB()</a>, <a class="el" href="a05641.html#l00240">NL3D::CMaterial::texEnvOpAlpha()</a>, <a class="el" href="a05641.html#l00214">NL3D::CMaterial::texEnvOpRGB()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06698.html#l01569">updateDriver()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a05646.html#l00236">z</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>01715 {
01716         <a class="code" href="a04365.html#a4">H_AUTO</a>( NL3D_Vegetable_Render );
01717 
01718         CVegetableClipBlock             *rootToRender= NULL;
01719 
01720         <span class="comment">// get normalized front vector.</span>
01721         CVector         frontVectorNormed= frontVector.normed();
01722 
01723         <span class="comment">// For Speed debug only.</span>
01724         <span class="comment">/*extern        bool    YOYO_ATTest;</span>
01725 <span class="comment">        if(YOYO_ATTest)</span>
01726 <span class="comment">                return;</span>
01727 <span class="comment">        */</span>
01728 
01729         <span class="comment">// Clip.</span>
01730         <span class="comment">//--------------------</span>
01731         <span class="comment">// For all current not empty clipBlocks, clip against pyramid, and insert visibles in list.</span>
01732         CVegetableClipBlock             *ptrClipBlock= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.begin();
01733         <span class="keywordflow">while</span>(ptrClipBlock)
01734         {
01735                 <span class="comment">// if the clipBlock is visible and not empty</span>
01736                 <span class="keywordflow">if</span>(ptrClipBlock-&gt;clip(pyramid))
01737                 {
01738                         <span class="comment">// insert into visible list.</span>
01739                         ptrClipBlock-&gt;_RenderNext= rootToRender;
01740                         rootToRender= ptrClipBlock;
01741                 }
01742 
01743                 <span class="comment">// next</span>
01744                 ptrClipBlock= (CVegetableClipBlock*)ptrClipBlock-&gt;Next;
01745         }
01746 
01747 
01748         <span class="comment">// If no clip block visible, just skip!!</span>
01749         <span class="keywordflow">if</span>(rootToRender==NULL)
01750                 <span class="keywordflow">return</span>;
01751 
01752 
01753         <span class="comment">// Prepare Render</span>
01754         <span class="comment">//--------------------</span>
01755 
01756         <span class="comment">// profile.</span>
01757         CPrimitiveProfile       ppIn, ppOut;
01758         driver-&gt;profileRenderedPrimitives(ppIn, ppOut);
01759         <a class="code" href="a04558.html#a15">uint</a>    precNTriRdr= ppOut.NTriangles;
01760 
01761 
01762         <span class="comment">// Disable Fog.</span>
01763         <span class="keywordtype">bool</span>    bkupFog;
01764         bkupFog= driver-&gt;fogEnabled();
01765         driver-&gt;enableFog(<span class="keyword">false</span>);
01766 
01767 
01768         <span class="comment">// Used by setupVertexProgramConstants(). The center of camera.</span>
01769         <span class="comment">// Used for AlphaBlending, and for ZBuffer precision problems.</span>
01770         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">_ViewCenter</a>= viewCenter;
01771 
01772 
01773         <span class="comment">// The manager is identity in essence. But for ZBuffer improvements, must set it as close</span>
01774         <span class="comment">// to the camera. In the VertexProgram, _ViewCenter is substracted from bent vertex pos. So take it as position.</span>
01775         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a>.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_0">identity</a>();
01776         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a>.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_4">setPos</a>(_ViewCenter);
01777 
01778 
01779         <span class="comment">// set model matrix to the manager matrix.</span>
01780         driver-&gt;setupModelMatrix(_ManagerMatrix);
01781 
01782 
01783         <span class="comment">// set the driver for all allocators</span>
01784         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1114_6">updateDriver</a>(driver);
01785 
01786 
01787         <span class="comment">// Compute Bend Anim.</span>
01788 
01789         <span class="comment">// AnimFrequency factor.</span>
01790         <span class="comment">// Doing it incrementaly allow change of of frequency each frame with good results.</span>
01791         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>+= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a> - <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>)*<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>;
01792         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>= fmod(_WindAnimTime, (<span class="keywordtype">float</span>)NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC);
01793         <span class="comment">// NB: Leave timeBend (_WindAnimTime) as a time (ie [0..1]), because VP do a "EXP time".</span>
01794         <span class="comment">// For incremental computing.</span>
01795         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>;
01796 
01797 
01798         <span class="comment">// compute the angleAxis corresponding to direction</span>
01799         <span class="comment">// perform a 90deg rotation to get correct angleAxis</span>
01800         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.set(-<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.y,<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.x,0);
01801 
01802 
01803         <span class="comment">// Fill LUT WindTable.</span>
01804         <a class="code" href="a04558.html#a15">uint</a>    i;
01805         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
01806         {
01807                 <span class="comment">/* NB: this formula works quite well, because vertex BendFactor is expressed in Radian/2.</span>
01808 <span class="comment">                        And since animFactor==(_CosTable[i] + 1) E [0..2], we have here an arc-cirle computing:</span>
01809 <span class="comment">                        dmove= Radius * AngleRadian/2 *  animFactor. So at max of animFactor (ie 2), we have:</span>
01810 <span class="comment">                        dmove= Radius * AngleRadian, which is by definition an arc-cirle computing...</span>
01811 <span class="comment">                        And so this approximate the Bend-quaternion Vertex Program.</span>
01812 <span class="comment">                */</span>
01813                 <span class="keywordtype">float</span>   windForce= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a>[(i+32)%64] + 1);
01814                 <span class="comment">// Modify with _WindPower / _WindBendMin.</span>
01815                 windForce= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>*2 + windForce * (1-<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>);
01816                 windForce*= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>;
01817                 <span class="comment">// Compute direction of the wind, and multiply by windForce.</span>
01818                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i]= <a class="code" href="a03660.html">CVector2f</a>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.x, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.y) * windForce;
01819         }
01820         <span class="comment">// compute delta</span>
01821         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
01822         {
01823                 <a class="code" href="a03660.html">CVector2f</a>               cur= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i];
01824                 <a class="code" href="a03660.html">CVector2f</a>               delta= _WindTable[ (i+1)%<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a> ] - cur;
01825                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a>[i]= delta;
01826         }
01827 
01828 
01829         <span class="comment">// setup VP constants.</span>
01830         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a>(driver);
01831 
01832 
01833         <span class="comment">// Setup TexEnvs for Dynamic lightmapping</span>
01834         <span class="comment">//--------------------</span>
01835         <span class="comment">// if the dynamic lightmap is provided</span>
01836         <span class="keywordflow">if</span>(textureDLM)
01837         {
01838                 <span class="comment">// stage0 RGB is Diffuse + DLM.</span>
01839                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(0, textureDLM);
01840                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(0, CMaterial::Add);
01841                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(0, CMaterial::Texture, CMaterial::SrcColor);
01842                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(0, CMaterial::Diffuse, CMaterial::SrcColor);
01843                 <span class="comment">// stage1 RGB is Previous * Texture</span>
01844                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(1, CMaterial::Modulate);
01845                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(1, CMaterial::Texture, CMaterial::SrcColor);
01846                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(1, CMaterial::Previous, CMaterial::SrcColor);
01847         }
01848         <span class="keywordflow">else</span>
01849         {
01850                 <span class="comment">// reset stage0 (to skip it)</span>
01851                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(0, NULL);
01852                 <span class="comment">// stage1 RGB is Diffuse * Texture</span>
01853                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(1, CMaterial::Modulate);
01854                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(1, CMaterial::Texture, CMaterial::SrcColor);
01855                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(1, CMaterial::Diffuse, CMaterial::SrcColor);
01856         }
01857         <span class="comment">// stage1 Alpha is always "Modulate texture with diffuse Alpha"</span>
01858         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpAlpha(1, CMaterial::Modulate);
01859         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0Alpha(1, CMaterial::Texture, CMaterial::SrcAlpha);
01860         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1Alpha(1, CMaterial::Diffuse, CMaterial::SrcAlpha);
01861 
01862 
01863 
01864         <span class="comment">// Render !ZSORT pass</span>
01865         <span class="comment">//--------------------</span>
01866 
01867         <span class="comment">// setup material (may have change because of ZSORT / alphaBlend pass)</span>
01868         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlend(<span class="keyword">false</span>);
01869         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setZWrite(<span class="keyword">true</span>);
01870         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTestThreshold(0.5f);
01871 
01872 
01873         <span class="comment">/*</span>
01874 <span class="comment">                Prefer sort with Soft / Hard first.</span>
01875 <span class="comment">                Also, Prefer do VBsoft last, for better GPU //ism with Landscape.</span>
01876 <span class="comment">        */</span>
01877         <span class="comment">// For both allocators: Hard(1) then Soft(0)</span>
01878         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> vbHardMode= 1; vbHardMode&gt;=0; vbHardMode--)
01879         {
01880                 <span class="comment">// For all renderPass.</span>
01881                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> rdrPass=0; rdrPass &lt; <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
01882                 {
01883                         <span class="comment">// skip ZSORT rdrPass, done after.</span>
01884                         <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
01885                                 <span class="keywordflow">continue</span>;
01886 
01887                         <span class="comment">// which allocator?</span>
01888                         CVegetableVBAllocator   &amp;vbAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vbHardMode);
01889 
01890                         <span class="comment">// Do the pass only if there is some vertices to draw.</span>
01891                         <span class="keywordflow">if</span>(vbAllocator.getNumUserVerticesAllocated()&gt;0)
01892                         {
01893                                 <span class="comment">// additional setup to the material</span>
01894                                 <span class="keywordtype">bool</span>    doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
01895                                 <span class="comment">// set the 2Sided flag in the material</span>
01896                                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setDoubleSided( doubleSided );
01897 
01898 
01899                                 <span class="comment">// Activate the unique material.</span>
01900                                 driver-&gt;setupMaterial(_VegetableMaterial);
01901 
01902                                 <span class="comment">// activate Vertex program first.</span>
01903                                 <span class="comment">//nlinfo("\nSTARTVP\n%s\nENDVP\n", _VertexProgram[rdrPass]-&gt;getProgram().c_str());</span>
01904                                 <a class="code" href="a04199.html#a9">nlverify</a>(driver-&gt;activeVertexProgram(_VertexProgram[rdrPass]));
01905 
01906                                 <span class="comment">// Activate the good VBuffer</span>
01907                                 vbAllocator.activate();
01908 
01909                                 <span class="comment">// For all visibles clipBlock, render their instance groups.</span>
01910                                 ptrClipBlock= rootToRender;
01911                                 <span class="keywordflow">while</span>(ptrClipBlock)
01912                                 {
01913                                         <span class="comment">// For all sortBlock of the clipBlock</span>
01914                                         CVegetableSortBlock     *ptrSortBlock= ptrClipBlock-&gt;_SortBlockList.begin();
01915                                         <span class="keywordflow">while</span>(ptrSortBlock)
01916                                         {
01917                                                 <span class="comment">// For all igs of the sortBlock</span>
01918                                                 CVegetableInstanceGroup         *ptrIg= ptrSortBlock-&gt;_InstanceGroupList.begin();
01919                                                 <span class="keywordflow">while</span>(ptrIg)
01920                                                 {
01921                                                         <span class="comment">// rdrPass</span>
01922                                                         CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ptrIg-&gt;_RdrPass[rdrPass];
01923 
01924                                                         <span class="comment">// if this rdrPass is in same HardMode as we process now.</span>
01925                                                         <span class="keywordflow">if</span>( (vegetRdrPass.HardMode &amp;&amp; vbHardMode==1) || (!vegetRdrPass.HardMode &amp;&amp; vbHardMode==0) )
01926                                                         {
01927                                                                 <span class="comment">// Ok, Render the faces.</span>
01928                                                                 <span class="keywordflow">if</span>(vegetRdrPass.NTriangles)
01929                                                                 {
01930                                                                         driver-&gt;renderSimpleTriangles(&amp;vegetRdrPass.TriangleIndices[0], 
01931                                                                                 vegetRdrPass.NTriangles);
01932                                                                 }
01933                                                         }
01934 
01935                                                         <span class="comment">// next ig.</span>
01936                                                         ptrIg= (CVegetableInstanceGroup*)ptrIg-&gt;Next;
01937                                                 }
01938 
01939                                                 <span class="comment">// next sortBlock</span>
01940                                                 ptrSortBlock= (CVegetableSortBlock      *)(ptrSortBlock-&gt;Next);
01941                                         }
01942 
01943                                         <span class="comment">// next clipBlock to render </span>
01944                                         ptrClipBlock= ptrClipBlock-&gt;_RenderNext;
01945                                 }
01946                         }
01947 
01948                 }
01949 
01950         }
01951 
01952         <span class="comment">// Render ZSort pass.</span>
01953         <span class="comment">//--------------------</span>
01954 
01955         <span class="comment">// Debug Quadrants.</span>
01956         <span class="comment">/*static vector&lt;CVector&gt;                p0DebugLines;</span>
01957 <span class="comment">        static vector&lt;CVector&gt;          p1DebugLines;</span>
01958 <span class="comment">        p0DebugLines.clear();</span>
01959 <span class="comment">        p1DebugLines.clear();*/</span>
01960 
01961         <span class="comment">// For all Blend model Layers, clear Sort Block list and setup.</span>
01962         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>;i++)
01963         {
01964                 <span class="comment">// must have been created.</span>
01965                 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayers[i]);
01966                 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayersUW[i]);
01967                 <span class="comment">// NB: don't refresh list, it is done in CVegetableBlendLayerModel.</span>
01968                 <span class="comment">// We must do it here, because if vegetableManger::render() is no more called (eg: disabled),</span>
01969                 <span class="comment">// then the models must do nothing.</span>
01970 
01971                 <span class="comment">// To get layers correclty sorted from fornt to back, must init their pos</span>
01972                 <span class="comment">// because it is the renderTraversal which sort them.</span>
01973                 <span class="comment">// compute distance to camera of this layer.</span>
01974                 <span class="keywordtype">float</span>   layerZ= i * <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a> / _NumZSortBlendLayers;
01975                 <span class="comment">// compute position of this layer.</span>
01976                 CVector         pos= viewCenter + frontVector * layerZ;
01977                 <span class="comment">// special setup in the layer.</span>
01978                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]-&gt;setWorldPos(pos);
01979                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;setWorldPos(pos);
01980         }
01981 
01982         <span class="comment">// If some vertices in arrays for ZSort rdrPass</span>
01983         <span class="keywordflow">if</span>( <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT, 0).getNumUserVerticesAllocated()&gt;0 ||
01984                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT, 1).getNumUserVerticesAllocated()&gt;0 )
01985         {
01986                 <a class="code" href="a04558.html#a15">uint</a>    rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
01987 
01988                 <span class="comment">// sort</span>
01989                 <span class="comment">//-------------</span>
01990                 <span class="comment">// Array for sorting. (static to avoid reallocation)</span>
01991                 <span class="keyword">static</span>  vector&lt;CSortVSB&gt;                sortVegetSbs;
01992                 sortVegetSbs.clear();
01993 
01994                 <span class="comment">// For all visibles clipBlock</span>
01995                 ptrClipBlock= rootToRender;
01996                 <span class="keywordflow">while</span>(ptrClipBlock)
01997                 {
01998                         <span class="comment">// For all sortBlock, prepare to sort them</span>
01999                         CVegetableSortBlock     *ptrSortBlock= ptrClipBlock-&gt;_SortBlockList.begin();
02000                         <span class="keywordflow">while</span>(ptrSortBlock)
02001                         {
02002                                 <span class="comment">// if the sortBlock has some sorted faces to render</span>
02003                                 <span class="keywordflow">if</span>(ptrSortBlock-&gt;_NTriangles != 0)
02004                                 {
02005                                         <span class="comment">// Compute Distance to Viewer.</span>
02006                                         <span class="comment">/* NB: compute radial distance (with norm()) instead of linear distance </span>
02007 <span class="comment">                                                (DotProduct with front vector) get less "ZSort poping".</span>
02008 <span class="comment">                                        */</span>
02009                                         CVector         dirToSb= ptrSortBlock-&gt;_Center - viewCenter;
02010                                         <span class="keywordtype">float</span>           distToViewer= dirToSb.norm();
02011                                         <span class="comment">// SortKey change if the center is behind the camera.</span>
02012                                         <span class="keywordflow">if</span>(dirToSb * frontVectorNormed&lt;0)
02013                                         {
02014                                                 ptrSortBlock-&gt;_SortKey= - distToViewer;
02015                                         }
02016                                         <span class="keywordflow">else</span>
02017                                         {
02018                                                 ptrSortBlock-&gt;_SortKey= distToViewer;
02019                                         }
02020 
02021                                         <span class="comment">// Choose the quadrant for this sortBlock</span>
02022                                         <a class="code" href="a04558.html#a14">sint</a>            bestDirIdx= 0;
02023                                         <span class="keywordtype">float</span>           bestDirVal= -FLT_MAX;
02024                                         <span class="comment">// If too near, must take the frontVector as key, to get better sort.</span>
02025                                         <span class="comment">// use ptrSortBlock-&gt;_SortKey to get correct negative values.</span>
02026                                         <span class="keywordflow">if</span>(ptrSortBlock-&gt;_SortKey &lt; ptrSortBlock-&gt;_Radius)
02027                                         {
02028                                                 dirToSb= frontVectorNormed;
02029                                         }
02030 
02031                                         <span class="comment">// NB: no need to normalize dirToSb, because need only to sort with DP</span>
02032                                         <span class="comment">// choose the good list of triangles according to quadrant.</span>
02033                                         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> dirIdx=0; dirIdx&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; dirIdx++)
02034                                         {
02035                                                 <span class="keywordtype">float</span>   dirVal= CVegetableQuadrant::Dirs[dirIdx] * dirToSb;
02036                                                 <span class="keywordflow">if</span>(dirVal&gt;bestDirVal)
02037                                                 {
02038                                                         bestDirVal= dirVal;
02039                                                         bestDirIdx= dirIdx;
02040                                                 }
02041                                         }
02042 
02043                                         <span class="comment">// set the result.</span>
02044                                         ptrSortBlock-&gt;_QuadrantId= bestDirIdx;
02045 
02046                                         <span class="comment">// insert in list to sort.</span>
02047                                         sortVegetSbs.push_back(CSortVSB(ptrSortBlock));
02048 
02049                                         <span class="comment">// Debug Quadrants</span>
02050                                         <span class="comment">/*p0DebugLines.push_back(ptrSortBlock-&gt;_Center);</span>
02051 <span class="comment">                                        p1DebugLines.push_back(ptrSortBlock-&gt;_Center + CVegetableQuadrant::Dirs[bestDirIdx]);*/</span>
02052                                 }
02053 
02054                                 <span class="comment">// next sortBlock</span>
02055                                 ptrSortBlock= (CVegetableSortBlock      *)(ptrSortBlock-&gt;Next);
02056                         }
02057 
02058                         <span class="comment">// next clipBlock to render </span>
02059                         ptrClipBlock= ptrClipBlock-&gt;_RenderNext;
02060                 }
02061 
02062                 <span class="comment">// sort!</span>
02063                 <span class="comment">// QSort. (I tried, better than radix sort, guckk!!)</span>
02064                 sort(sortVegetSbs.begin(), sortVegetSbs.end());
02065 
02066 
02067                 <span class="comment">// setup material for this rdrPass. NB: rendered after (in LayerModels).</span>
02068                 <span class="comment">//-------------</span>
02069                 <span class="keywordtype">bool</span>    doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
02070                 <span class="comment">// set the 2Sided flag in the material</span>
02071                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setDoubleSided( doubleSided );
02072 
02073                 <span class="comment">// setup the unique material.</span>
02074                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlend(<span class="keyword">true</span>);
02075                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setZWrite(<span class="keyword">false</span>);
02076                 <span class="comment">// leave AlphaTest but still kick low alpha values (for fillRate performance)</span>
02077                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTestThreshold(0.1f);
02078 
02079 
02080 
02081                 <span class="comment">// order them in Layers.</span>
02082                 <span class="comment">//-------------</span>
02083 
02084                 <span class="comment">// render from back to front, to keep correct Z order in a single layer.</span>
02085                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;sortVegetSbs.size();i++)
02086                 {
02087                         CVegetableSortBlock     *ptrSortBlock= sortVegetSbs[i].Sb;
02088 
02089                         <span class="keywordtype">float</span>   <a class="code" href="a04223.html#a574">z</a>= ptrSortBlock-&gt;_SortKey;
02090                         <span class="comment">// compute in which layer must store this SB.</span>
02091                         <a class="code" href="a04223.html#a574">z</a>= <a class="code" href="a04223.html#a574">z</a>*_NumZSortBlendLayers / <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a>;
02092                         <span class="comment">// Avoid a floor(), using an OptFastFloor, but without the OptFastFloorBegin() End() group.</span>
02093                         <span class="comment">// =&gt; avoid the imprecision with such a trick; *256, then divide the integer by 256.</span>
02094                         <a class="code" href="a04558.html#a14">sint</a>    layer= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(z*256) &gt;&gt; 8;
02095                         <a class="code" href="a05378.html#a374">clamp</a>(layer, 0, (<a class="code" href="a04558.html#a14">sint</a>)_NumZSortBlendLayers-1);
02096 
02097                         <span class="comment">// Range in correct layer, according to water ordering</span>
02098                         <span class="keywordflow">if</span>(ptrSortBlock-&gt;_UnderWater)
02099                                 <span class="comment">// range in the correct layermodel (NB: keep the same layer internal order).</span>
02100                                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[layer]-&gt;SortBlocks.push_back(ptrSortBlock);
02101                         <span class="keywordflow">else</span>
02102                                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[layer]-&gt;SortBlocks.push_back(ptrSortBlock);
02103                 }
02104                 
02105         }
02106 
02107 
02108         <span class="comment">// Quit</span>
02109         <span class="comment">//--------------------</span>
02110 
02111         <span class="comment">// disable VertexProgram.</span>
02112         driver-&gt;activeVertexProgram(NULL);
02113 
02114 
02115         <span class="comment">// restore Fog.</span>
02116         driver-&gt;enableFog(bkupFog);
02117 
02118 
02119         <span class="comment">// Debug Quadrants</span>
02120         <span class="comment">/*for(uint l=0; l&lt;p0DebugLines.size();l++)</span>
02121 <span class="comment">        {</span>
02122 <span class="comment">                CVector dv= CVector::K;</span>
02123 <span class="comment">                CDRU::drawLine(p0DebugLines[l]+dv, p1DebugLines[l]+dv, CRGBA(255,0,0), *driver);</span>
02124 <span class="comment">        }*/</span>
02125 
02126         <span class="comment">// profile: compute number of triangles rendered with vegetable manager.</span>
02127         driver-&gt;profileRenderedPrimitives(ppIn, ppOut);
02128         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= ppOut.NTriangles-precNTriRdr;
02129 
02130 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_1" doxytag="NL3D::CVegetableManager::reserveIgAddInstances" ></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::CVegetableManager::reserveIgAddInstances </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vegetIgReserve</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>shape</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>vegetWaterState</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>numInstances</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>
reserve some instance space in an Ig. nothing is really done here, after doing this for all shapes of your ig, you must call <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a> <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>vegetIgReserve</em>&nbsp;</td><td>the object where space required for the ig is added</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06698.html#l00856">856</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06695.html#l00206">NL3D::CVegetableInstanceGroupReserve::_RdrPass</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a06698.html#l00817">getRdrPassInfoForShape()</a>, <a class="el" href="a06695.html#l00195">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NLightedInstances</a>, <a class="el" href="a06695.html#l00193">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06695.html#l00194">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06703.html#l00140">NL3D::CVegetableShape::TriangleIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>.
<p>
Referenced by <a class="el" href="a06686.html#l00296">NL3D::CVegetable::reserveIgAddInstances()</a>.
<p>
<div class="fragment"><pre>00857 {
00858         <span class="keywordtype">bool</span>    instanceLighted;
00859         <span class="keywordtype">bool</span>    instanceDoubleSided;
00860         <span class="keywordtype">bool</span>    instanceZSort;
00861         <span class="keywordtype">bool</span>    destLighted;
00862         <span class="keywordtype">bool</span>    precomputeLighting;
00863 
00864         <span class="comment">// get correct rdrPass / info</span>
00865         <a class="code" href="a04558.html#a15">uint</a>    rdrPass;
00866         rdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a>(shape, vegetWaterState, instanceLighted, instanceDoubleSided, 
00867                 instanceZSort, destLighted, precomputeLighting);
00868 
00869         <span class="comment">// veget rdrPass</span>
00870         CVegetableInstanceGroupReserve::CVegetableRdrPass       &amp;vegetRdrPass= vegetIgReserve._RdrPass[rdrPass];
00871 
00872         <span class="comment">// Reserve space in the rdrPass.</span>
00873         vegetRdrPass.NVertices+= numInstances * shape-&gt;VB.getNumVertices();
00874         vegetRdrPass.NTriangles+= numInstances * shape-&gt;TriangleIndices.size()/3;
00875         <span class="comment">// if the instances are lighted, reserve space for lighting updates</span>
00876         <span class="keywordflow">if</span>(instanceLighted)
00877                 vegetRdrPass.NLightedInstances+= numInstances;
00878 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_2" doxytag="NL3D::CVegetableManager::reserveIgCompile" ></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::CVegetableManager::reserveIgCompile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ig</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vegetIgReserve</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>
reserve the space in the ig. <a class="el" href="a04199.html#a6">nlassert()</a> if the ig is not empty. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06698.html#l00882">882</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06695.html#l00206">NL3D::CVegetableInstanceGroupReserve::_RdrPass</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00142">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderArray</a>, <a class="el" href="a06695.html#l00143">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderNumTriangles</a>, <a class="el" href="a06695.html#l00144">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrders</a>, <a class="el" href="a06116.html#l00195">NLMISC::CObjectVector&lt; sint16, false &gt;::getPtr()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; sint16, false &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; uint32, false &gt;::resize()</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; sint16, false &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
<p>
Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>.
<p>
<div class="fragment"><pre>00883 {
00884         <a class="code" href="a04558.html#a15">uint</a>    rdrPass;
00885 
00886 
00887         <span class="comment">// Check.</span>
00888         <span class="comment">//===========</span>
00889         <span class="comment">// For all rdrPass of the ig, check empty</span>
00890         <span class="keywordflow">for</span>(rdrPass= 0; rdrPass&lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
00891         {
00892                 CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
00893                 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleIndices.size()==0);
00894                 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleLocalIndices.size()==0);
00895                 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.Vertices.size()==0);
00896                 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.LightedInstances.size()==0);
00897         }
00898         <span class="comment">// Do the same for all quadrants of the zsort rdrPass.</span>
00899         <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderArray.size()==0);
00900         <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderNumTriangles==0);
00901 
00902 
00903         <span class="comment">// Reserve.</span>
00904         <span class="comment">//===========</span>
00905         <span class="comment">// For all rdrPass of the ig, reserve.</span>
00906         <span class="keywordflow">for</span>(rdrPass= 0; rdrPass&lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
00907         {
00908                 CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
00909                 <a class="code" href="a04558.html#a15">uint</a>    numVertices= vegetIgReserve._RdrPass[rdrPass].NVertices;
00910                 <a class="code" href="a04558.html#a15">uint</a>    numTris= vegetIgReserve._RdrPass[rdrPass].NTriangles;
00911                 <a class="code" href="a04558.html#a15">uint</a>    numLightedInstances= vegetIgReserve._RdrPass[rdrPass].NLightedInstances;
00912                 <span class="comment">// reserve triangles indices and vertices for this rdrPass.</span>
00913                 vegetRdrPass.TriangleIndices.resize(numTris*3);
00914                 vegetRdrPass.TriangleLocalIndices.resize(numTris*3);
00915                 vegetRdrPass.Vertices.resize(numVertices);
00916                 <span class="comment">// reserve ligthedinstances space.</span>
00917                 vegetRdrPass.LightedInstances.resize(numLightedInstances);
00918         }
00919 
00920         <span class="comment">// Reserve space for the zsort rdrPass sorting.</span>
00921         <a class="code" href="a04558.html#a15">uint</a>    numZSortTris= vegetIgReserve._RdrPass[<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>].NTriangles;
00922         <span class="comment">// allocate sufficient space for all quadrants (1 alloc for all quadrants).</span>
00923         ig-&gt;_TriangleQuadrantOrderArray.resize(numZSortTris * NL3D_VEGETABLE_NUM_QUADRANT);
00924 
00925         <span class="comment">// And init ptrs.</span>
00926         <span class="keywordflow">if</span>(numZSortTris&gt;0)
00927         {
00928                 <a class="code" href="a04558.html#a8">sint16</a>  *start= ig-&gt;_TriangleQuadrantOrderArray.getPtr();
00929                 <span class="comment">// init ptr to each qaudrant</span>
00930                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; i++)
00931                 {
00932                         ig-&gt;_TriangleQuadrantOrders[i]= start + i*numZSortTris;
00933                 }
00934         }
00935 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1120_1" doxytag="NL3D::CVegetableManager::resetNumVegetableFaceRendered" ></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::CVegetableManager::resetNumVegetableFaceRendered </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>
set to 0 the number of faces rendered 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l02166">2166</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>02167 {
02168         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= 0;
02169 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_4" doxytag="NL3D::CVegetableManager::setDirectionalLight" ></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::CVegetableManager::setDirectionalLight </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>ambient</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03337.html">CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>diffuse</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>light</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>
setup the directional light 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01612">1612</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, and <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03181">NL3D::CLandscape::setupVegetableLighting()</a>.
<p>
<div class="fragment"><pre>01613 {
01614         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>= light;
01615         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>.normalize();
01616         <span class="comment">// Setup ambient/Diffuse.</span>
01617         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a>= ambient;
01618         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a>= diffuse;
01619 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1116_0" doxytag="NL3D::CVegetableManager::setTime" ></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::CVegetableManager::setTime </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>time</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>
set the current Time (in seconds). For Wind animation
<p>
Definition at line <a class="el" href="a06698.html#l02206">2206</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03196">NL3D::CLandscape::setVegetableTime()</a>.
<p>
<div class="fragment"><pre>02207 {
02208         <span class="comment">// copy time</span>
02209         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>= time;
02210 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_0" doxytag="NL3D::CVegetableManager::setUpdateLightingFrequency" ></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::CVegetableManager::setUpdateLightingFrequency </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>freq</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>
set the frequency of lighting update. If freq==1, ALL lighted igs are updated each second. e.g: if 1/20, then every 20 seconds, all Igs are updated. If you set 0, no update will be done at all (this is the default setup!!).
<p>
Definition at line <a class="el" href="a06698.html#l02280">2280</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03232">NL3D::CLandscape::setVegetableUpdateLightingFrequency()</a>.
<p>
<div class="fragment"><pre>02281 {
02282         freq= max(freq, 0.f);
02283         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a>= freq;
02284 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_1" doxytag="NL3D::CVegetableManager::setUpdateLightingTime" ></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::CVegetableManager::setUpdateLightingTime </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>time</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>
set the vegetable manager System Time (in seconds) This time is used for lighting update, and is independent of <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_0">setTime()</a>
<p>
Definition at line <a class="el" href="a06698.html#l02221">2221</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03203">NL3D::CLandscape::setVegetableUpdateLightingTime()</a>.
<p>
<div class="fragment"><pre>02222 {
02223         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>= time;
02224 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_1" doxytag="NL3D::CVegetableManager::setupRenderStateForBlendLayerModel" ></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::CVegetableManager::setupRenderStateForBlendLayerModel </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>driver</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>
called by <a class="el" href="a03672.html">CVegetableBlendLayerModel</a>. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l02134">2134</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00380">_BkupFog</a>, <a class="el" href="a06699.html#l00382">_ManagerMatrix</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, <a class="el" href="a06698.html#l01560">doubleSidedRdrPass()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_1">NL3D::IDriver::fogEnabled()</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera67">NL3D::IDriver::setupMaterial()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>.
<p>
<div class="fragment"><pre>02135 {
02136         <span class="comment">// Setup Global.</span>
02137         <span class="comment">//=============</span>
02138         <span class="comment">// disable fog, for faster VP.</span>
02139         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_1">_BkupFog</a>= driver-&gt;fogEnabled();
02140         driver-&gt;enableFog(<span class="keyword">false</span>);
02141 
02142         <span class="comment">// set model matrix to the manager matrix.</span>
02143         driver-&gt;setupModelMatrix(_ManagerMatrix);
02144 
02145         <span class="comment">// setup VP constants.</span>
02146         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a>(driver);
02147 
02148         <span class="comment">// Setup RdrPass.</span>
02149         <span class="comment">//=============</span>
02150         <a class="code" href="a04558.html#a15">uint</a>    rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
02151 
02152         <span class="comment">// setup doubleSidedmaterial for this rdrPass.</span>
02153         <span class="keywordtype">bool</span>    doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
02154 
02155         <span class="comment">// Activate the unique material (correclty setuped for AlphaBlend in render()).</span>
02156         driver-&gt;setupMaterial(_VegetableMaterial);
02157 
02158         <span class="comment">// activate Vertex program first.</span>
02159         <span class="comment">//nlinfo("\nSTARTVP\n%s\nENDVP\n", _VertexProgram[rdrPass]-&gt;getProgram().c_str());</span>
02160         <a class="code" href="a04199.html#a9">nlverify</a>(driver-&gt;activeVertexProgram(_VertexProgram[rdrPass]));
02161 
02162 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerd3" doxytag="NL3D::CVegetableManager::setupVertexProgramConstants" ></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::CVegetableManager::setupVertexProgramConstants </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>driver</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>
setup the vertexProgram constants. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01664">1664</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00378">_AngleAxis</a>, <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00379">_ViewCenter</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00369">_WindDeltaTable</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00368">_WindTable</a>, <a class="el" href="a06693.html#l00053">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_11">NL3D::IDriver::setConstant()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_12">NL3D::IDriver::setConstantMatrix()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.
<p>
<div class="fragment"><pre>01665 {
01666         <span class="comment">// Standard</span>
01667         <span class="comment">// setup VertexProgram constants.</span>
01668         <span class="comment">// c[0..3] take the ModelViewProjection Matrix. After setupModelMatrix();</span>
01669         driver-&gt;setConstantMatrix(0, IDriver::ModelViewProjection, IDriver::Identity);
01670         <span class="comment">// c[4..7] take the ModelView Matrix. After setupModelMatrix();</span>
01671         driver-&gt;setConstantMatrix(4, IDriver::ModelView, IDriver::Identity);
01672         <span class="comment">// c[8] take usefull constants.</span>
01673         driver-&gt;setConstant(8, 0, 1, 0.5f, 2);
01674         <span class="comment">// c[9] take normalized directional light</span>
01675         driver-&gt;setConstant(9, _DirectionalLight);
01676         <span class="comment">// c[10] take pos of camera</span>
01677         driver-&gt;setConstant(10, _ViewCenter);
01678         <span class="comment">// c[11] take factor for Blend formula</span>
01679         driver-&gt;setConstant(11, -1.f/NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST, 0, 0, 0);
01680 
01681 
01682 
01683         <span class="comment">// Bend.</span>
01684         <span class="comment">// c[16]= quaternion axis. w==1, and z must be 0</span>
01685         driver-&gt;setConstant( 16, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.x, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.y, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.z, 1);
01686         <span class="comment">// c[17]=       {timeAnim, WindPower, WindPower*(1-WindBendMin)/2, 0)}</span>
01687         driver-&gt;setConstant( 17, (<span class="keywordtype">float</span>)_WindAnimTime, _WindPower, _WindPower*(1-_WindBendMin)/2, 0 );
01688         <span class="comment">// c[18]=       High order Taylor cos coefficient: { -1/2, 1/24, -1/720, 1/40320 }</span>
01689         driver-&gt;setConstant( 18, -1/2.f, 1/24.f, -1/720.f, 1/40320.f );
01690         <span class="comment">// c[19]=       Low order Taylor cos coefficient: { 1, -1/2, 1/24, -1/720 }</span>
01691         driver-&gt;setConstant( 19, 1, -1/2.f, 1/24.f, -1/720.f );
01692         <span class="comment">// c[20]=       Low order Taylor sin coefficient: { 1, -1/6, 1/120, -1/5040 }</span>
01693         driver-&gt;setConstant( 20, 1, -1/6.f, 1/120.f, -1/5040.f );
01694         <span class="comment">// c[21]=       Special constant vector for quatToMatrix: { 0, 1, -1, 0 }</span>
01695         driver-&gt;setConstant( 21, 0.f, 1.f, -1.f, 0.f);
01696         <span class="comment">// c[22]=       {0.5f, Pi, 2*Pi, 1/(2*Pi)}</span>
01697         driver-&gt;setConstant( 22, 0.5f, (<span class="keywordtype">float</span>)Pi, (<span class="keywordtype">float</span>)(2*Pi), (<span class="keywordtype">float</span>)(1/(2*Pi)) );
01698         <span class="comment">// c[23]=       {NL3D_VEGETABLE_VP_LUT_SIZE, 0, 0, 0}. NL3D_VEGETABLE_VP_LUT_SIZE==64.</span>
01699         driver-&gt;setConstant( 23, NL3D_VEGETABLE_VP_LUT_SIZE, 0.f, 0.f, 0.f );
01700 
01701 
01702         <span class="comment">// Fill constant. Start at 32.</span>
01703         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
01704         {
01705                 <a class="code" href="a03660.html">CVector2f</a>               cur= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i];
01706                 <a class="code" href="a03660.html">CVector2f</a>               delta= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a>[i];
01707                 driver-&gt;setConstant( 32+i, cur.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, cur.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, delta.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, delta.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a> );
01708         }
01709 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1116_1" doxytag="NL3D::CVegetableManager::setWind" ></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::CVegetableManager::setWind </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>windDir</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>windFreq</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>windPower</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>windBendMin</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 Wind for animation. All thoses variables may be modified each frame without penalty.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>windDir</em>&nbsp;</td><td>is the direction of the wind. NB: only XY direction is kept. </td></tr>
    <tr><td valign=top><em>windFreq</em>&nbsp;</td><td>is the frequency for the animation (speed) </td></tr>
    <tr><td valign=top><em>windPower</em>&nbsp;</td><td>is the power of the wind, and is a factor (0..1) of Bend </td></tr>
    <tr><td valign=top><em>windBendMin</em>&nbsp;</td><td>is a value in (0..1) which indicate how much the vegetables are bended at minimum (for very powerfull wind)</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06698.html#l02192">2192</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03188">NL3D::CLandscape::setVegetableWind()</a>.
<p>
<div class="fragment"><pre>02193 {
02194         <span class="comment">// Keep only XY component of the Wind direction (because VP only support z==0 quaternions).</span>
02195         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>= windDir;
02196         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.z= 0;
02197         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.normalize();
02198         <span class="comment">// copy setup</span>
02199         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>= windFreq;
02200         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>= windPower;
02201         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>= windBendMin;
02202         <a class="code" href="a05378.html#a374">clamp</a>(_WindBendMin, 0, 1);
02203 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerd4" doxytag="NL3D::CVegetableManager::swapIgRdrPassHardMode" ></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::CVegetableManager::swapIgRdrPassHardMode </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
          <td class="mdname" nowrap>, </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>rdrPass</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>
swap the RdrPass type (hard or soft) of the rdrPass of an instance group. vertices are allocated in other VBallocator, copied and freed in the old VBallocator.
<p>
Definition at line <a class="el" href="a06698.html#l01496">1496</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06708.html#l00185">NL3D::CVegetableVBAllocator::allocateVertex()</a>, <a class="el" href="a06708.html#l00234">NL3D::CVegetableVBAllocator::deleteVertex()</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06711.html#l00473">NL3D::CVertexBuffer::getVertexSize()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>.
<p>
<div class="fragment"><pre>01497 {
01498         CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
01499 
01500         <span class="comment">// the allocator where vertices come from</span>
01501         CVegetableVBAllocator   &amp;srcAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vegetRdrPass.HardMode);
01502         <span class="comment">// the allocator where vertices will go</span>
01503         CVegetableVBAllocator   &amp;dstAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, !vegetRdrPass.HardMode);
01504 
01505         <span class="comment">// vertex size</span>
01506         <a class="code" href="a04558.html#a15">uint</a>    vbSize= srcAllocator.getSoftwareVertexBuffer().getVertexSize();
01507         <a class="code" href="a04199.html#a6">nlassert</a>(vbSize == dstAllocator.getSoftwareVertexBuffer().getVertexSize());
01508 
01509         <span class="comment">// for all vertices of the IG, change of VBAllocator</span>
01510         <a class="code" href="a04558.html#a15">uint</a> i;
01511         <span class="comment">// Do it only for current Vertices setuped!!! because a swapIgRdrPassHardMode awlays arise when the ig is </span>
01512         <span class="comment">// in construcion.</span>
01513         <span class="comment">// Hence here, we may have vegetRdrPass.NVertices &lt; vegetRdrPass.Vertices.size() !!!</span>
01514         <span class="keywordflow">for</span>(i=0;i&lt;vegetRdrPass.NVertices;i++)
01515         {
01516                 <span class="comment">// get idx in src allocator.</span>
01517                 <a class="code" href="a04558.html#a15">uint</a>    srcId= vegetRdrPass.Vertices[i];
01518                 <span class="comment">// allocate a verex in the dst allocator.</span>
01519                 <a class="code" href="a04558.html#a15">uint</a>    dstId= dstAllocator.allocateVertex();
01520 
01521                 <span class="comment">// copy from VBsoft of src to dst.</span>
01522                 <span class="keywordtype">void</span>    *vbSrc= srcAllocator.getVertexPointer(srcId);
01523                 <span class="keywordtype">void</span>    *vbDst= dstAllocator.getVertexPointer(dstId);
01524                 memcpy(vbDst, vbSrc, vbSize);
01525                 <span class="comment">// release src vertex.</span>
01526                 srcAllocator.deleteVertex(srcId);
01527 
01528                 <span class="comment">// and copy new dest id in Vertices array.</span>
01529                 vegetRdrPass.Vertices[i]= dstId;
01530 
01531                 <span class="comment">// and flush this vertex into VBHard (if dst is aVBHard).</span>
01532                 dstAllocator.flushVertex(dstId);
01533         }
01534 
01535         <span class="comment">// For all triangles, bind correct triangles.</span>
01536         <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleIndices.size() == vegetRdrPass.TriangleLocalIndices.size());
01537         <span class="comment">// Do it only for current Triangles setuped!!! same reason as vertices</span>
01538         <span class="comment">// For all setuped triangles indices</span>
01539         <span class="keywordflow">for</span>(i=0;i&lt;vegetRdrPass.NTriangles*3;i++)
01540         {
01541                 <span class="comment">// get the index in Vertices.</span>
01542                 <a class="code" href="a04558.html#a15">uint</a>    localVid= vegetRdrPass.TriangleLocalIndices[i];
01543                 <span class="comment">// get the index in new VBufffer (dstAllocator), and copy to TriangleIndices</span>
01544                 vegetRdrPass.TriangleIndices[i]= vegetRdrPass.Vertices[localVid];
01545         }
01546 
01547         <span class="comment">// Since change is made, flag the IG rdrpass</span>
01548         vegetRdrPass.HardMode= !vegetRdrPass.HardMode;
01549 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_5" doxytag="NL3D::CVegetableManager::unlockBuffers" ></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::CVegetableManager::unlockBuffers </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>
unlock any AGP vertex buffers 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01633">1633</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06708.html#l00158">NL3D::CVegetableVBAllocator::unlockBuffer()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00877">NL3D::CLandscape::unlockBuffers()</a>.
<p>
<div class="fragment"><pre>01634 {
01635         <span class="comment">// unlock all buffers</span>
01636         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
01637         {
01638                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].unlockBuffer();
01639                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].unlockBuffer();
01640         }
01641 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_6" doxytag="NL3D::CVegetableManager::updateDriver" ></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::CVegetableManager::updateDriver </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>driver</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>
must give a driver to the vegetableManager, before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a>. 
<p>

<p>
Definition at line <a class="el" href="a06698.html#l01569">1569</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00448">_LastDriver</a>, <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06698.html#l00562">initVertexProgram()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06708.html#l00089">NL3D::CVegetableVBAllocator::updateDriver()</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a05862.html#l00799">NL3D::CLandscape::updateGlobalsAndLockBuffers()</a>.
<p>
<div class="fragment"><pre>01570 {
01571         <span class="comment">// update all driver</span>
01572         <a class="code" href="a04558.html#a15">uint</a> i;
01573         <span class="keywordflow">for</span>(i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
01574         {
01575                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].updateDriver(driver);
01576                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].updateDriver(driver);
01577         }
01578         
01579         <span class="comment">// if driver changed, recreate vertex programs</span>
01580         <span class="keywordflow">if</span> (driver != <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</a>)
01581         {
01582                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</a> = driver;
01583                 <span class="keywordflow">for</span>(i=0; i &lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; i++)
01584                 {
01585                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd2">initVertexProgram</a>(i);
01586                 }               
01587         }       
01588 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_1" doxytag="NL3D::CVegetableManager::updateInstanceLighting" ></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#a15">uint</a> NL3D::CVegetableManager::updateInstanceLighting </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ig</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>rdrPassId</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>instanceId</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>
update part of an ig. Do not use/modify _UL* return number of vertices processed (nb vertices of the shape)
<p>
Definition at line <a class="el" href="a06698.html#l02354">2354</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06703.html#l00133">NL3D::CVegetableShape::BestSidedPreComputeLighting</a>, <a class="el" href="a06697.html#l00065">NL3D::CVegetableLightEx::Color</a>, <a class="el" href="a06698.html#l00939">NL3D::computeVegetVertexLighting()</a>, <a class="el" href="a06698.html#l00986">NL3D::computeVegetVertexLightingForceBestSided()</a>, <a class="el" href="a06695.html#l00100">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::DlmUV</a>, <a class="el" href="a06703.html#l00130">NL3D::CVegetableShape::DoubleSided</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06711.html#l00338">NL3D::CVertexBuffer::getNormalOff()</a>, <a class="el" href="a06116.html#l00195">NLMISC::CObjectVector&lt; uint32, false &gt;::getPtr()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06711.html#l00441">NL3D::CVertexBuffer::getValueOffEx()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06710.html#l00438">NL3D::CVertexBuffer::getVertexCoordPointer()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06703.html#l00147">NL3D::CVegetableShape::InstanceVertices</a>, <a class="el" href="a06703.html#l00129">NL3D::CVegetableShape::Lighted</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06695.html#l00097">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatAmbient</a>, <a class="el" href="a06695.html#l00098">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatDiffuse</a>, <a class="el" href="a06340.html#l00243">NLMISC::CRGBA::modulateFromColorRGBOnly()</a>, <a class="el" href="a05972.html#l01244">NLMISC::CMatrix::mulVector()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06709.html#l00041">NL3D_VEGETABLE_VPPOS_COLOR0</a>, <a class="el" href="a06709.html#l00042">NL3D_VEGETABLE_VPPOS_COLOR1</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a06695.html#l00095">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::NormalMat</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a06703.html#l00131">NL3D::CVegetableShape::PreComputeLighting</a>, <a class="el" href="a06695.html#l00093">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::Shape</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06695.html#l00102">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::StartIdInRdrPass</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</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="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
<p>
Referenced by <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.
<p>
<div class="fragment"><pre>02355 {
02356         <a class="code" href="a04199.html#a6">nlassert</a>(ig);
02357         <span class="comment">// get the rdrPass.</span>
02358         <a class="code" href="a04199.html#a6">nlassert</a>(rdrPassId&lt;NL3D_VEGETABLE_NRDRPASS);
02359         CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPassId];
02360         <span class="comment">// get the lighted instance.</span>
02361         <a class="code" href="a04199.html#a6">nlassert</a>(instanceId&lt;vegetRdrPass.LightedInstances.size());
02362         CVegetableInstanceGroup::CVegetableLightedInstance      &amp;vegetLI= vegetRdrPass.LightedInstances[instanceId];
02363 
02364         <span class="comment">// get the shape</span>
02365         CVegetableShape         *shape= vegetLI.Shape;
02366         <span class="comment">// it must be lighted.</span>
02367         <a class="code" href="a04199.html#a6">nlassert</a>(shape-&gt;Lighted);
02368         <span class="keywordtype">bool</span>    instanceLighted= <span class="keyword">true</span>;
02369 
02370 
02371         <span class="comment">// get ref on the vegetLex.</span>
02372         CVegetableLightEx       &amp;vegetLex= ig-&gt;VegetableLightEx;
02373         <span class="comment">// Color of pointLights modulated by diffuse.</span>
02374         <a class="code" href="a03337.html">CRGBA</a>   diffusePL[2];
02375         <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=1)
02376         {
02377                 diffusePL[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, vegetLex.Color[0]);
02378                 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=2)
02379                 {
02380                         diffusePL[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, vegetLex.Color[1]);
02381                 }
02382         }
02383 
02384         <span class="comment">// Recompute lighting</span>
02385         <span class="comment">//===========</span>
02386         
02387         <span class="comment">// setup for this instance.</span>
02388         <span class="comment">//---------</span>
02389         <span class="comment">// 2Sided</span>
02390         <span class="keywordtype">bool</span>    instanceDoubleSided= shape-&gt;DoubleSided;
02391         <span class="comment">// Precompute lighting or not??</span>
02392         <span class="keywordtype">bool</span>    precomputeLighting= instanceLighted &amp;&amp; shape-&gt;PreComputeLighting;
02393         <span class="comment">// bestSided Precompute lighting or not??</span>
02394         <span class="keywordtype">bool</span>    bestSidedPrecomputeLighting= precomputeLighting &amp;&amp; shape-&gt;BestSidedPreComputeLighting;
02395         <span class="comment">// destLighted?</span>
02396         <span class="keywordtype">bool</span>    destLighted= instanceLighted &amp;&amp; !shape-&gt;PreComputeLighting;
02397         <span class="comment">// Diffuse and ambient, modulated by current GlobalAmbient and GlobalDiffuse.</span>
02398         <a class="code" href="a03337.html">CRGBA</a>   primaryRGBA, secondaryRGBA;
02399         primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, _GlobalDiffuse);
02400         secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatAmbient, _GlobalAmbient);
02401         <span class="comment">// get normal matrix</span>
02402         <a class="code" href="a02851.html">CMatrix</a>         &amp;normalMat= vegetLI.NormalMat;
02403         <span class="comment">// array of vertex id to update</span>
02404         <a class="code" href="a04558.html#a11">uint32</a>          *ptrVid= vegetRdrPass.Vertices.getPtr() + vegetLI.StartIdInRdrPass;
02405         <a class="code" href="a04558.html#a15">uint</a>            numVertices= shape-&gt;InstanceVertices.size();
02406 
02407         <span class="comment">// Copy Dynamic Lightmap UV in Alpha part (save memory for an extra cost of 1 VP instruction)</span>
02408         primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= vegetLI.DlmUV.U;
02409         secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= vegetLI.DlmUV.V;
02410 
02411 
02412         <span class="comment">// get VertexBuffer info.</span>
02413         CVegetableVBAllocator   *allocator;
02414         allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPassId, vegetRdrPass.HardMode);
02415         <span class="keyword">const</span> CVertexBuffer     &amp;dstVBInfo= allocator-&gt;getSoftwareVertexBuffer();
02416 
02417         <a class="code" href="a04558.html#a15">uint</a>    srcNormalOff= (instanceLighted? shape-&gt;VB.getNormalOff() : 0);
02418         <a class="code" href="a04558.html#a15">uint</a>    dstColor0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR0);
02419         <a class="code" href="a04558.html#a15">uint</a>    dstColor1Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR1);
02420         
02421 
02422 
02423         <span class="comment">// For all vertices, recompute lighting.</span>
02424         <span class="comment">//---------</span>
02425         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numVertices;i++)
02426         {
02427                 <span class="comment">// get the Vertex in the VB.</span>
02428                 <a class="code" href="a04558.html#a15">uint</a>    vid= ptrVid[i];
02429                 <span class="comment">// store in tmp shape.</span>
02430                 shape-&gt;InstanceVertices[i]= vid;
02431 
02432                 <span class="comment">// Fill this vertex.</span>
02433                 <a class="code" href="a04558.html#a7">uint8</a>   *srcPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)shape-&gt;VB.getVertexCoordPointer(i);
02434                 <a class="code" href="a04558.html#a7">uint8</a>   *dstPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)allocator-&gt;getVertexPointer(vid);
02435 
02436 
02437                 <span class="comment">// if !precomputeLighting (means destLighted...)</span>
02438                 <span class="keywordflow">if</span>(!precomputeLighting)
02439                 {
02440                         <span class="comment">// just copy the primary and secondary color</span>
02441                         *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off)= primaryRGBA;
02442                         *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
02443                 }
02444                 <span class="keywordflow">else</span>
02445                 {
02446                         <a class="code" href="a04199.html#a6">nlassert</a>(!destLighted);
02447 
02448                         <span class="comment">// compute normal.</span>
02449                         CVector         rotNormal= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
02450                         <span class="comment">// must normalize() because scale is possible.</span>
02451                         rotNormal.normalize();
02452 
02453                         <span class="comment">// Do the compute.</span>
02454                         <span class="keywordflow">if</span>(!bestSidedPrecomputeLighting)
02455                         {
02456                                 <a class="code" href="a05363.html#a543">computeVegetVertexLighting</a>(rotNormal, 
02457                                         _DirectionalLight, primaryRGBA, secondaryRGBA, 
02458                                         vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
02459                         }
02460                         <span class="keywordflow">else</span>
02461                         {
02462                                 <a class="code" href="a05363.html#a544">computeVegetVertexLightingForceBestSided</a>(rotNormal, 
02463                                         _DirectionalLight, primaryRGBA, secondaryRGBA, 
02464                                         vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
02465                         }
02466 
02467                 }
02468 
02469                 <span class="comment">// flust the vertex in AGP.</span>
02470                 allocator-&gt;flushVertex(vid);
02471         }
02472 
02473 
02474         <span class="comment">// numVertices vertices are updated</span>
02475         <span class="keywordflow">return</span> numVertices;
02476 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_2" doxytag="NL3D::CVegetableManager::updateLighting" ></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::CVegetableManager::updateLighting </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>
update the lighting of Igs, within a certain amount of time. You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a> with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
<p>
Definition at line <a class="el" href="a06698.html#l02228">2228</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, and <a class="el" href="a05484.html#l00038">min</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
<p>
<div class="fragment"><pre>02229 {
02230         <span class="comment">// first time in this method??</span>
02231         <span class="keywordflow">if</span>(!<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>)
02232         {
02233                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>= <span class="keyword">true</span>;
02234                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>;
02235         }
02236         <span class="comment">// compute delta time from last update.</span>
02237         <span class="keywordtype">float</span> dt= float(_ULTime - _ULPrecTime);
02238         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>;
02239 
02240         <span class="comment">// compute number of vertices to update.</span>
02241         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>+= dt*<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a> * <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>;
02242         <span class="comment">// maximize, so at max, it computes all Igs, just one time.</span>
02243         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>= <a class="code" href="a04061.html#a0">min</a>(_ULNVerticesToUpdate, (<span class="keywordtype">float</span>)_ULNTotalVertices);
02244 
02245         <span class="comment">// go.</span>
02246         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a>();
02247 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_3" doxytag="NL3D::CVegetableManager::updateLightingAll" ></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::CVegetableManager::updateLightingAll </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>
like <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a>, but update ALL vegetable You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a> with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
<p>
Definition at line <a class="el" href="a06698.html#l02251">2251</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, and <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03357">NL3D::CLandscape::updateLightingAll()</a>.
<p>
<div class="fragment"><pre>02252 {
02253         <span class="comment">// maximize, so at max, it computes all Igs</span>
02254         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>= (<span class="keywordtype">float</span>)<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>;
02255 
02256         <span class="comment">// go.</span>
02257         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a>();
02258 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_2" doxytag="NL3D::CVegetableManager::updateLightingIGPart" ></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::CVegetableManager::updateLightingIGPart </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><code> [private]</code></td>
        </tr>

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

<p>
update part of the RootIg, according to _ULNVerticesToUpdate (while &gt; 0) if all Ig is updated, return true and _ULCurrentIgRdrPass and _ULCurrentIgInstance is updated.
<p>
Definition at line <a class="el" href="a06698.html#l02288">2288</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
<p>
References <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06696.html#l00037">NL3D::CVegetableLightEx::computeCurrentColors()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>, and <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>.
<p>
Referenced by <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>.
<p>
<div class="fragment"><pre>02289 {
02290         <a class="code" href="a04199.html#a6">nlassert</a>(_ULRootIg);
02291 
02292 
02293         <span class="comment">// First, update lighting info global to the ig, ie update current </span>
02294         <span class="comment">// colros of the PointLights which influence the ig.</span>
02295         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;VegetableLightEx.computeCurrentColors();
02296 
02297         <span class="comment">// while there is some vertices to update</span>
02298         <span class="keywordflow">while</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>&gt;0)
02299         {
02300                 <span class="comment">// if all rdrPass of the ig are processed.</span>
02301                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>&gt;= <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>)
02302                 {
02303                         <span class="comment">// All this Ig is updated.</span>
02304                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
02305                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
02306                         <span class="comment">// skip to next Ig.</span>
02307                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
02308                 }
02309                 CVegetableInstanceGroup::CVegetableRdrPass      &amp;vegetRdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;_RdrPass[<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>];
02310 
02311                 <span class="comment">// if all instances are processed for this pass (especially if size()==0 !!)</span>
02312                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>&gt;= vegetRdrPass.LightedInstances.size())
02313                 {
02314                         <span class="comment">// skip to the next rdrPass.</span>
02315                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>++;
02316                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
02317                         <span class="keywordflow">continue</span>;
02318                 }
02319 
02320                 <span class="comment">// Process this instance.</span>
02321                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>-= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_1">updateInstanceLighting</a>(_ULRootIg, _ULCurrentIgRdrPass, _ULCurrentIgInstance);
02322 
02323                 <span class="comment">// next instance.</span>
02324                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>++;
02325 
02326                 <span class="comment">// if all instances are processed for this pass</span>
02327                 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>&gt;= vegetRdrPass.LightedInstances.size())
02328                 {
02329                         <span class="comment">// skip to the next rdrPass.</span>
02330                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>++;
02331                         <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
02332                 }
02333         }
02334 
02335         <span class="comment">// If all rdrPass of the ig are processed.</span>
02336         <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>&gt;= <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>)
02337         {
02338                 <span class="comment">// All this Ig is updated.</span>
02339                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
02340                 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
02341                 <span class="comment">// skip to next Ig.</span>
02342                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
02343         }
02344         <span class="keywordflow">else</span>
02345         {
02346                 <span class="comment">// The Ig is not entirely updated.</span>
02347                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
02348         }
02349 
02350 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagern0" doxytag="NL3D::CVegetableManager::CVegetableBlendLayerModel" ></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"> friend class <a class="el" href="a03672.html">CVegetableBlendLayerModel</a><code> [friend]</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="a06699.html#l00287">287</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_0" doxytag="NL3D::CVegetableManager::_AngleAxis" ></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="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">NL3D::CVegetableManager::_AngleAxis</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="a06699.html#l00378">378</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_1" doxytag="NL3D::CVegetableManager::_BkupFog" ></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 <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_1">NL3D::CVegetableManager::_BkupFog</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="a06699.html#l00380">380</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l02180">exitRenderStateForBlendLayerModel()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr0" doxytag="NL3D::CVegetableManager::_ClipBlockList" ></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="a03064.html">CTessList</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr0">NL3D::CVegetableManager::_ClipBlockList</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="a06699.html#l00294">294</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00672">createIg()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l01713">render()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr1" doxytag="NL3D::CVegetableManager::_ClipBlockMemory" ></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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr1">NL3D::CVegetableManager::_ClipBlockMemory</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="a06699.html#l00289">289</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00607">createClipBlock()</a>, and <a class="el" href="a06698.html#l00620">deleteClipBlock()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_0" doxytag="NL3D::CVegetableManager::_CosTable" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">NL3D::CVegetableManager::_CosTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00366">366</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr2" doxytag="NL3D::CVegetableManager::_DirectionalLight" ></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="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr2">NL3D::CVegetableManager::_DirectionalLight</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="a06699.html#l00316">316</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr3" doxytag="NL3D::CVegetableManager::_EmptyClipBlockList" ></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="a03064.html">CTessList</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr3">NL3D::CVegetableManager::_EmptyClipBlockList</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="a06699.html#l00296">296</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00607">createClipBlock()</a>, <a class="el" href="a06698.html#l00672">createIg()</a>, <a class="el" href="a06698.html#l00620">deleteClipBlock()</a>, and <a class="el" href="a06698.html#l00706">deleteIg()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr4" doxytag="NL3D::CVegetableManager::_GlobalAmbient" ></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="a03337.html">NLMISC::CRGBA</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr4">NL3D::CVegetableManager::_GlobalAmbient</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="a06699.html#l00317">317</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr5" doxytag="NL3D::CVegetableManager::_GlobalDiffuse" ></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="a03337.html">NLMISC::CRGBA</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr5">NL3D::CVegetableManager::_GlobalDiffuse</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="a06699.html#l00318">318</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr6" doxytag="NL3D::CVegetableManager::_InstanceGroupMemory" ></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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03674.html">CVegetableInstanceGroup</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr6">NL3D::CVegetableManager::_InstanceGroupMemory</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="a06699.html#l00291">291</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00672">createIg()</a>, and <a class="el" href="a06698.html#l00706">deleteIg()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr7" doxytag="NL3D::CVegetableManager::_LastDriver" ></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="a03321.html">NLMISC::CRefPtr</a>&lt;<a class="el" href="a02434.html">IDriver</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr7">NL3D::CVegetableManager::_LastDriver</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="a06699.html#l00448">448</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00562">initVertexProgram()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_2" doxytag="NL3D::CVegetableManager::_ManagerMatrix" ></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="a02851.html">NLMISC::CMatrix</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">NL3D::CVegetableManager::_ManagerMatrix</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="a06699.html#l00382">382</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr8" doxytag="NL3D::CVegetableManager::_NumVegetableFaceRendered" ></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#a15">uint</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr8">NL3D::CVegetableManager::_NumVegetableFaceRendered</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
profile 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00322">322</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l02173">getNumVegetableFaceRendered()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>, and <a class="el" href="a06698.html#l02166">resetNumVegetableFaceRendered()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_2" doxytag="NL3D::CVegetableManager::_NumZSortBlendLayers" ></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#a15">uint</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">NL3D::CVegetableManager::_NumZSortBlendLayers</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
For Alpha Blend rdrPass, ordering into layers. 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00392">392</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr9" doxytag="NL3D::CVegetableManager::_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="a03680.html#NL3D_1_1CVegetableManagery1">TShapeMap</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr9">NL3D::CVegetableManager::_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="a06699.html#l00302">302</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr10" doxytag="NL3D::CVegetableManager::_SortBlockMemory" ></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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03684.html">CVegetableSortBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr10">NL3D::CVegetableManager::_SortBlockMemory</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="a06699.html#l00290">290</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00637">createSortBlock()</a>, and <a class="el" href="a06698.html#l00655">deleteSortBlock()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_1" doxytag="NL3D::CVegetableManager::_Time" ></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"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">NL3D::CVegetableManager::_Time</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="a06699.html#l00360">360</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_3" doxytag="NL3D::CVegetableManager::_ULCurrentIgInstance" ></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#a15">uint</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">NL3D::CVegetableManager::_ULCurrentIgInstance</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
update lighting according to _ULNVerticesToUpdate 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00428">428</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_4" doxytag="NL3D::CVegetableManager::_ULCurrentIgRdrPass" ></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#a15">uint</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">NL3D::CVegetableManager::_ULCurrentIgRdrPass</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Current instance to render in the first ig to update: rdrpass/instanceId. 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00427">427</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_5" doxytag="NL3D::CVegetableManager::_ULFrequency" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">NL3D::CVegetableManager::_ULFrequency</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Frequency of update. 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00419">419</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_6" doxytag="NL3D::CVegetableManager::_ULNTotalVertices" ></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#a15">uint</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">NL3D::CVegetableManager::_ULNTotalVertices</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sum of all ig vertices to update. 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00423">423</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l02228">updateLighting()</a>, and <a class="el" href="a06698.html#l02251">updateLightingAll()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_7" doxytag="NL3D::CVegetableManager::_ULNVerticesToUpdate" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">NL3D::CVegetableManager::_ULNVerticesToUpdate</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Current number of vertices to update. If negative, I have some advance. 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00421">421</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, <a class="el" href="a06698.html#l02228">updateLighting()</a>, <a class="el" href="a06698.html#l02251">updateLightingAll()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_8" doxytag="NL3D::CVegetableManager::_ULPrecTime" ></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"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">NL3D::CVegetableManager::_ULPrecTime</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
NB: we update at the precision of a shape (a dozen of vertices).
<p>
Definition at line <a class="el" href="a06699.html#l00414">414</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_9" doxytag="NL3D::CVegetableManager::_ULPrecTimeInit" ></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 <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">NL3D::CVegetableManager::_ULPrecTimeInit</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
update lighting according to _ULNVerticesToUpdate 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00415">415</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_10" doxytag="NL3D::CVegetableManager::_ULRootIg" ></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="a03674.html">CVegetableInstanceGroup</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">NL3D::CVegetableManager::_ULRootIg</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
the priority list of ig to update 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00425">425</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_11" doxytag="NL3D::CVegetableManager::_ULTime" ></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"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">NL3D::CVegetableManager::_ULTime</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
update lighting according to _ULNVerticesToUpdate 
<p>

<p>
Definition at line <a class="el" href="a06699.html#l00416">416</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr11" doxytag="NL3D::CVegetableManager::_VBHardAllocator" ></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="a03686.html">CVegetableVBAllocator</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr11">NL3D::CVegetableManager::_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeCount]<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="a06699.html#l00306">306</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06698.html#l01622">lockBuffers()</a>, <a class="el" href="a06698.html#l01633">unlockBuffers()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr12" doxytag="NL3D::CVegetableManager::_VBSoftAllocator" ></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="a03686.html">CVegetableVBAllocator</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr12">NL3D::CVegetableManager::_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeCount]<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="a06699.html#l00308">308</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06698.html#l01622">lockBuffers()</a>, <a class="el" href="a06698.html#l01633">unlockBuffers()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr13" doxytag="NL3D::CVegetableManager::_VegetableMaterial" ></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="a02839.html">CMaterial</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr13">NL3D::CVegetableManager::_VegetableMaterial</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="a06699.html#l00314">314</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01604">loadTexture()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerr14" doxytag="NL3D::CVegetableManager::_VertexProgram" ></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="a03702.html">CVertexProgram</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr14">NL3D::CVegetableManager::_VertexProgram</a>[NL3D_VEGETABLE_NRDRPASS]<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="a06699.html#l00310">310</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_3" doxytag="NL3D::CVegetableManager::_ViewCenter" ></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="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">NL3D::CVegetableManager::_ViewCenter</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="a06699.html#l00379">379</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_2" doxytag="NL3D::CVegetableManager::_WindAnimTime" ></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"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">NL3D::CVegetableManager::_WindAnimTime</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="a06699.html#l00363">363</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_3" doxytag="NL3D::CVegetableManager::_WindBendMin" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">NL3D::CVegetableManager::_WindBendMin</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="a06699.html#l00358">358</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_4" doxytag="NL3D::CVegetableManager::_WindDeltaTable" ></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="a03660.html">NLMISC::CVector2f</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">NL3D::CVegetableManager::_WindDeltaTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00369">369</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_5" doxytag="NL3D::CVegetableManager::_WindDirection" ></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="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">NL3D::CVegetableManager::_WindDirection</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="a06699.html#l00355">355</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_6" doxytag="NL3D::CVegetableManager::_WindFrequency" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">NL3D::CVegetableManager::_WindFrequency</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="a06699.html#l00356">356</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_7" doxytag="NL3D::CVegetableManager::_WindPower" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">NL3D::CVegetableManager::_WindPower</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="a06699.html#l00357">357</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_8" doxytag="NL3D::CVegetableManager::_WindPrecRenderTime" ></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"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">NL3D::CVegetableManager::_WindPrecRenderTime</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="a06699.html#l00361">361</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, and <a class="el" href="a06698.html#l01713">render()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_9" doxytag="NL3D::CVegetableManager::_WindTable" ></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="a03660.html">NLMISC::CVector2f</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">NL3D::CVegetableManager::_WindTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00368">368</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_3" doxytag="NL3D::CVegetableManager::_ZSortLayerDistMax" ></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"> float <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">NL3D::CVegetableManager::_ZSortLayerDistMax</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="a06699.html#l00393">393</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l01713">render()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_4" doxytag="NL3D::CVegetableManager::_ZSortModelLayers" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03672.html">CVegetableBlendLayerModel</a>*&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">NL3D::CVegetableManager::_ZSortModelLayers</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="a06699.html#l00395">395</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_5" doxytag="NL3D::CVegetableManager::_ZSortModelLayersUW" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03672.html">CVegetableBlendLayerModel</a>*&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">NL3D::CVegetableManager::_ZSortModelLayersUW</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="a06699.html#l00397">397</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_6" doxytag="NL3D::CVegetableManager::_ZSortScene" ></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="a03348.html">CScene</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">NL3D::CVegetableManager::_ZSortScene</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="a06699.html#l00394">394</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
<p>
Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06699.html">vegetable_manager.h</a><li><a class="el" href="a06698.html">vegetable_manager.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:22:15 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>