aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03057.html
blob: 5ec5a37e2717ce0a8cee0ee058e8c63b093c72c5 (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
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
<!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::CPatch 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::CPatch Class Reference</h1><code>#include &lt;<a class="el" href="a06156.html">patch.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A landscape patch. QuadPatch layout (same notations as 3ds Max SDK).<p>
A---&gt; ad ---- da &lt;---D | | | | v v ab ia id dc<p>
| | | |<p>
ba ib ic cd ^ ^ | | | | B---&gt; bc ---- cb &lt;---C<p>
NB: Patch 1x1 or 1xX are illegal: lot of problem: rectangular geomoprh, Son0 and Son1 must be setup as tile at beginning ...<p>
NB: Edges number are:<ul>
<li>0: AB.</li><li>1: BC.</li><li>2: CD.</li><li>3: DA.</li></ul>
<p>
<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06156.html#l00302">302</a> of file <a class="el" href="a06156.html">patch.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Lumels methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_0">copyTileFlagsFromPatch</a> (const <a class="el" href="a03057.html">CPatch</a> *<a class="el" href="a04223.html#a652">src</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap</a> (const <a class="el" href="a04558.html#a7">uint8</a> *pLumel)</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_3">setupColorsFromTileFlags</a> (const <a class="el" href="a03337.html">NLMISC::CRGBA</a> colors[4])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debug coloring  <a href="#NL3D_1_1CPatchz640_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="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap</a> (<a class="el" href="a04558.html#a7">uint8</a> *pShadow)</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="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (const <a class="el" href="a04558.html#a7">uint8</a> *original, const <a class="el" href="a04558.html#a7">uint8</a> *unCompressed, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a632">width</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a633">height</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (<a class="el" href="a04558.html#a7">uint8</a> *dest, const <a class="el" href="a04558.html#a7">uint8</a> *source, <a class="el" href="a04558.html#a7">uint8</a> alpha0, <a class="el" href="a04558.html#a7">uint8</a> alpha1)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (<a class="el" href="a04558.html#a7">uint8</a> *dest, const <a class="el" href="a04558.html#a7">uint8</a> *<a class="el" href="a04223.html#a652">src</a>)</td></tr>

<tr><td colspan=2><br><h2>[NOHEADER]</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> corner) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_1">setCornerSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> corner, bool smooth)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap.  <a href="#NL3D_1_1CPatchz637_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Put here for packing with NoiseRotation.  <a href="#NL3D_1_1CPatchz637_3"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>RenderList mgt.</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> { <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> = 0, 
<a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>, 
<a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>
 }</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_3">appendFaceToTileRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *fv)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_5">appendNearVertexToRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tileMat, <a class="el" href="a03481.html">CTessNearVertex</a> *nv)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_6">appendTileMaterialToRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tm)</td></tr>

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a> (<a class="el" href="a03475.html">CTessBlock</a> &amp;block)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_10">extendTessBlockWithEndPos</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_11">getNumTessBlock</a> (<a class="el" href="a03040.html">CParamCoord</a> pc, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> &amp;<a class="el" href="a04223.html#a581">type</a>, <a class="el" href="a04558.html#a15">uint</a> &amp;numtb)</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="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_13">removeFaceFromRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_14">removeFaceFromTileRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_15">removeFarVertexFromRenderList</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *fv)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_16">removeNearVertexFromRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tileMat, <a class="el" href="a03481.html">CTessNearVertex</a> *nv)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_17">removeTileMaterialFromRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tm)</td></tr>

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

<tr><td colspan=2><br><h2>Dynamic Lighting 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="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a ref count to the DLMContext, creating it if necessary.  <a href="#NL3D_1_1CPatchz675_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="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a577">count</a>=1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dec a ref count to the DLMContext, deleting it if refCount== 0.  <a href="#NL3D_1_1CPatchz675_1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03060.html">CPatchDLMContext</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a></td></tr>

<tr><td colspan=2><br><h2>[NOHEADER]</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz669_0">linkTessFaceWithEdge</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv0, const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv1, <a class="el" href="a03476.html">CTessFace</a> *linkTo)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a> [4]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The 4 neighbors zone of this patch (setuped at <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a> time). NB: NULL if zone not loaded, or if no patch near us.  <a href="#NL3D_1_1CPatchz669_1"></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="a03057.html#NL3D_1_1CPatcha0">averageTesselationVertices</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind</a> (<a class="el" href="a03058.html">CBindInfo</a> Edges[4], bool rebind)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02156.html">CAABBox</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha2">buildBBox</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build the bbox of the patch, according to ctrl points, and displacement map max value.  <a href="#NL3D_1_1CPatcha2"></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="a03057.html#NL3D_1_1CPatcha3">compile</a> (<a class="el" href="a03730.html">CZone</a> *<a class="el" href="a04223.html#a574">z</a>, <a class="el" href="a04558.html#a15">uint</a> patchId, <a class="el" href="a04558.html#a7">uint8</a> orderS, <a class="el" href="a04558.html#a7">uint8</a> orderT, <a class="el" href="a03482.html">CTessVertex</a> *baseVertices[4], float errorSize=0)</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="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </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="a03057.html#NL3D_1_1CPatcha5">computeVertex</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#NL3D_1_1CPatcha6"></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="a03057.html#NL3D_1_1CPatcha7">deleteTileUvs</a> ()</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For changing TileMaxSubdivision. force tesselation to be under tile.  <a href="#NL3D_1_1CPatcha8"></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="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a> (<a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03058.html">CBindInfo</a> &amp;neighborEdge) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return neighborhood information.  <a href="#NL3D_1_1CPatcha9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha10">getCornerVertex</a> (<a class="el" href="a04558.html#a15">uint</a> corner)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha11">getErrorSize</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha12">getFar0</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha13">getFar1</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02702.html">CLandscape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the landscape in which is placed this patch.  <a href="#NL3D_1_1CPatcha14"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha15">getOrderForEdge</a> (<a class="el" href="a04558.html#a6">sint8</a> edge) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha18">getPatchId</a> () const </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="a03057.html#NL3D_1_1CPatcha19">getTileMaterialRefCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of TileMaterial created in this Patch.  <a href="#NL3D_1_1CPatcha19"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha20">getZone</a> () const </td></tr>

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

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

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Refine this patch. Even if clipped. Refine all nodes.  <a href="#NL3D_1_1CPatcha23"></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="a03057.html#NL3D_1_1CPatcha24">refreshTesselationGeometry</a> ()</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op.  <a href="#NL3D_1_1CPatcha25"></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="a03057.html#NL3D_1_1CPatcha26">resetRenderFar</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha27">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;f)</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha29">unpack</a> (<a class="el" href="a02258.html">CBezierPatch</a> &amp;p) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02258.html">CBezierPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a> () const </td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dtor  <a href="#NL3D_1_1CPatcha31"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Subdivision / ForCollision.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_0">addPatchBlocksInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;paBlockIds) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_1">addTrianglesInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tileTessLevel) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_2">appendTessellationLeaves</a> (std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;leaves) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_3">fillPatchQuadBlock</a> (<a class="el" href="a03068.html">CPatchQuadBlock</a> &amp;quadBlock) const </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="a03057.html#NL3D_1_1CPatchz643_4">getTesselatedPos</a> (<a class="el" href="a03640.html">CUV</a> uv) const </td></tr>

<tr><td colspan="2"><div class="groupHeader">VB Allocator mgt.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a> ()</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_2">debugAllocationMarkIndices</a> (<a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

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

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

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

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_12">recreateTessBlockFaceVector</a> (<a class="el" href="a03475.html">CTessBlock</a> &amp;block)</td></tr>

<tr><td colspan="2"><div class="groupHeader">Lightmap get interface.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_0">appendTileLightInfluences</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv, std::vector&lt; <a class="el" href="a03092.html">CPointLightInfluence</a> &gt; &amp;pointLightList) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_1">computeCurrentTLILightmapDiv2</a> (<a class="el" href="a03337.html">NLMISC::CRGBA</a> *array) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_2">getLumel</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lumel under the position.  <a href="#NL3D_1_1CPatchz645_2"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Dynamic Lighting 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="a03057.html#NL3D_1_1CPatchz657_0">beginDLMLighting</a> ()</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz657_2">processDLMLight</a> (<a class="el" href="a03065.html">CPatchDLMPointLight</a> &amp;pl)</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="a03057.html#NL3D_1_1CPatchz639_0">computeSoftwareGeomorphAndAlpha</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_1">getNextFar0ToRdr</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_2">getNextFar1ToRdr</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_3">preRender</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">preRender this patch. Build Max faces / pass etc...  <a href="#NL3D_1_1CPatchz639_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="a03057.html#NL3D_1_1CPatchz639_4">renderFar0</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Render this patch, if not clipped. Call PatchCurrentDriver-&gt;renderSimpleTriangles().  <a href="#NL3D_1_1CPatchz639_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="a03057.html#NL3D_1_1CPatchz639_5">renderFar1</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_6">updateClipPatchVB</a> (bool renderClipped)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_7">updateTextureFarOnly</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere)</td></tr>

<tr><td colspan="2"><div class="groupHeader">MicroVegetation</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz651_0">deleteAllVegetableIgs</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete any vegetable Ig still existing in this patch.  <a href="#NL3D_1_1CPatchz651_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="a03057.html#NL3D_1_1CPatchz651_1">recreateAllVegetableIgs</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recreate any vegetable block (as possible) in this patch. (usefull for edition).  <a href="#NL3D_1_1CPatchz651_1"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">UpdateLighting Management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_0">getNextNearUL</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, get Next (CiruclarList). If ==this, then list is empty.  <a href="#NL3D_1_1CPatchz655_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="a03057.html#NL3D_1_1CPatchz655_1">getNumNearTessBlocks</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the number of Near TessBlocks. Actually OrderS/2*OrderT/2.  <a href="#NL3D_1_1CPatchz655_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="a03057.html#NL3D_1_1CPatchz655_2">linkBeforeNearUL</a> (<a class="el" href="a03057.html">CPatch</a> *patchNext)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL.  <a href="#NL3D_1_1CPatchz655_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_3">unlinkNearUL</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, unlink (CiruclarList).  <a href="#NL3D_1_1CPatchz655_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="a03057.html#NL3D_1_1CPatchz655_4">updateTessBlockLighting</a> (<a class="el" href="a04558.html#a15">uint</a> numTb)</td></tr>

<tr><td colspan="2"><div class="groupHeader">Smooth flags methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> edge) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz641_1">setSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> edge, bool flag)</td></tr>

<tr><td colspan="2"><div class="groupHeader">Tiles get interface.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03522.html">CTileElement</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz647_0">getTileElement</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lumel under the position.  <a href="#NL3D_1_1CPatchz647_0"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">TileLightInfluences</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz653_0">resetTileLightInfluences</a> ()</td></tr>

<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho1">Interiors</a> [4]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho2">Tangents</a> [8]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03520.html">CTileColor</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03527.html">CTileLightInfluence</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03522.html">CTileElement</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho6">Vertices</a> [4]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The patch coordinates (see <a class="el" href="a02258.html">CBezierPatch</a>).  <a href="#NL3D_1_1CPatcho6"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td colspan=2><br><h2>Private 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="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a> (<a class="el" href="a04558.html#a14">sint</a> edge, <a class="el" href="a03476.html">CTessFace</a> *to)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd1">checkCreateVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd2">checkCreateVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd3">checkDeleteVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd4">checkDeleteVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd6">checkFillVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd10">computeGeomorphTileVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere, <a class="el" href="a04558.html#a14">sint</a> &amp;newFar0, <a class="el" href="a04558.html#a14">sint</a> &amp;newFar1)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a> (<a class="el" href="a04558.html#a15">uint</a> &amp;numtb, <a class="el" href="a04558.html#a15">uint</a> &amp;numtm, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, <a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd17">debugAllocationMarkIndicesNearList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList, <a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a> (<a class="el" href="a04558.html#a14">sint</a> edge) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd27">getRootVertexForEdge</a> (<a class="el" href="a04558.html#a14">sint</a> edge) const </td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a> (bool alloc)</td></tr>

<tr><td colspan="2"><div class="groupHeader">Subdivision private.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;paBlockIds, const <a class="el" href="a02258.html">CBezierPatch</a> &amp;pa, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> s1, <a class="el" href="a04558.html#a7">uint8</a> t0, <a class="el" href="a04558.html#a7">uint8</a> t1) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_1">addTileTrianglesInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tessLevel, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> t0) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tessLevel, const <a class="el" href="a02258.html">CBezierPatch</a> &amp;pa, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> s1, <a class="el" href="a04558.html#a7">uint8</a> t0, <a class="el" href="a04558.html#a7">uint8</a> t1) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a> (const <a class="el" href="a02258.html">CBezierPatch</a> &amp;p, <a class="el" href="a02156.html">CAABBox</a> &amp;ret) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">build a bbox from the convex hull of a bezier patch, enlarged with noise.  <a href="#NL3D_1_1CPatchz668_3"></a><br><br></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="a03057.html#NL3D_1_1CPatchz668_4">computeVertexButCorner</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, bool &amp;onCorner) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex()</a>.  <a href="#NL3D_1_1CPatchz668_4"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_0">addTileLightmapEdgeWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_1">addTileLightmapPixelWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_2">addTileLightmapWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *lightText)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_5">computeTileLightmapAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_7">computeTileLightmapEdgeAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_8">computeTileLightmapEdgePrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_10">computeTileLightmapPixelAroundCorner</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;stIn, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, bool lookAround)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_12">computeTileLightmapPixelPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_13">computeTileLightmapPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_14">CPatch::getCurrentTLIColor</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> corners[4])</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_16">getTileLightMap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03069.html">CPatchRdrPass</a> *&amp;rdrpass)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_17">getTileLightMapUvInfo</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03128.html">CVector</a> &amp;uvScaleBias)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> corners[4])</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_19">modulateTileLightmapEdgeWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_20">modulateTileLightmapPixelWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_21">modulateTileLightmapWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_22">releaseTileLightMap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>

<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_1">computeDisplaceEdgeSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a14">sint</a> &amp;ts, <a class="el" href="a04558.html#a14">sint</a> &amp;tt, <a class="el" href="a04558.html#a14">sint</a> &amp;ms, <a class="el" href="a04558.html#a14">sint</a> &amp;mt) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a> (<a class="el" href="a04558.html#a14">sint</a> ts, <a class="el" href="a04558.html#a14">sint</a> tt, <a class="el" href="a04558.html#a14">sint</a> ms, <a class="el" href="a04558.html#a14">sint</a> mt) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_6">computeDisplaceRawOnNeighbor</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_7">computeNoise</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03128.html">CVector</a> &amp;displace) const </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="a03057.html#NL3D_1_1CPatchz670_8">computeNormalCornerSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </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="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </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="a03057.html#NL3D_1_1CPatchz670_10">computeNormalOnNeighbor</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a15">uint</a> edgeExclude) const </td></tr>

<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a> (<a class="el" href="a04558.html#a15">uint</a> numTb, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.  <a href="#NL3D_1_1CPatchz671_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="a03057.html#NL3D_1_1CPatchz671_1">generateTileVegetable</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *vegetIg, <a class="el" href="a04558.html#a15">uint</a> distType, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a02719.html">CLandscapeVegetableBlockCreateContext</a> &amp;vbCreateCtx)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.  <a href="#NL3D_1_1CPatchz671_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="a03057.html#NL3D_1_1CPatchz671_2">getTileLumelmapPixelPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a7">uint8</a> &amp;dest) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz671_3">getTileLumelmapPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a7">uint8</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.  <a href="#NL3D_1_1CPatchz671_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="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a> (<a class="el" href="a04558.html#a15">uint</a> numTb)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist  <a href="#NL3D_1_1CPatchz671_4"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Texture mgt.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz665_0">getTileRenderPass</a> (<a class="el" href="a04558.html#a14">sint</a> tileId, <a class="el" href="a04558.html#a14">sint</a> pass)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz665_1">getTileUvInfo</a> (<a class="el" href="a04558.html#a14">sint</a> tileId, <a class="el" href="a04558.html#a14">sint</a> pass, bool <a class="el" href="a04223.html#a663">alpha</a>, <a class="el" href="a04558.html#a7">uint8</a> &amp;orient, <a class="el" href="a03128.html">CVector</a> &amp;uvScaleBias, bool &amp;is256x256, <a class="el" href="a04558.html#a7">uint8</a> &amp;uvOff)</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="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03480.html">CTessFarVertex</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr4">BaseFarVertices</a> [4]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a> [4]</td></tr>

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr8">Far0</a></td></tr>

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

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

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr13">Far1</a></td></tr>

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

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

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr18">Flags</a></td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr23">Son0</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr24">Son1</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr25">SquareLimitLevel</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a></td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr29">Zone</a></td></tr>

<tr><td colspan="2"><div class="groupHeader">UpdateLighting Management</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a></td></tr>

<tr><td colspan="2"><div class="groupHeader">Block renders.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03475.html">CTessBlock</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03000.html">NLMISC::CObjectVector</a>&lt; <a class="el" href="a03475.html">CTessBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a></td></tr>

<tr><td colspan="2"><div class="groupHeader">Vegetables.</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">list of vegetable clipBlocks, created/destroyed at same time as TessBlocks.  <a href="#NL3D_1_1CPatchz661_0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv0">_Version</a> = 7</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02258.html">CBezierPatch</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv1">CachePatch</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a> = NULL</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="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn3">CZone</a></td></tr>

</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="NL3D_1_1CPatchz663_0" doxytag="NL3D::CPatch::TFarVertType" ></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="a03057.html#NL3D_1_1CPatchz663_0">NL3D::CPatch::TFarVertType</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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_1CPatchz663_0NL3D_1_1CPatchy0" doxytag="FVMasterBlock" ></a>FVMasterBlock</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1" doxytag="FVTessBlock" ></a>FVTessBlock</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2" doxytag="FVTessBlockEdge" ></a>FVTessBlockEdge</em>&nbsp;</td><td>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="a06156.html#l00931">931</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, and <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>.
<p>
<div class="fragment"><pre>00931 {<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>=0, <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>, <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>};
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CPatcha6" doxytag="NL3D::CPatch::CPatch" ></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::CPatch::CPatch </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>
Constructor. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l00061">61</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06156.html#l00872">_NextRdrFar0</a>, <a class="el" href="a06156.html#l00874">_NextRdrFar1</a>, <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06156.html#l00807">ExcludeFromRefineAll</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06491.html#l00130">NL3D::CTessBlock::resetClip()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>.
<p>
<div class="fragment"><pre>00062 {
00063         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= NULL;
00064         <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>=0;
00065         <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>=0;
00066         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>=NULL;
00067         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>=NULL;
00068         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>=0;
00069         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>= 0;
00070 
00071         <span class="comment">// for Pacs process. By default, false.</span>
00072         <a class="code" href="a03057.html#NL3D_1_1CPatchr7">ExcludeFromRefineAll</a>= <span class="keyword">false</span>;
00073 
00074         <span class="comment">// Init Passes.</span>
00075         <span class="comment">// DO NOT FILL Patch here, because of operator= problem. do it in compile().</span>
00076         <span class="comment">// By default, RdrPasses are NULL.</span>
00077 
00078         <span class="comment">// To force computation of texture info on next preRender().</span>
00079         <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= -1;
00080         <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= -1;
00081 
00082         <span class="comment">// Default: not binded.</span>
00083         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[0]= NULL;
00084         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[1]= NULL;
00085         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[2]= NULL;
00086         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[3]= NULL;
00087         <a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a>= 0;
00088         <span class="comment">// No smooth by default.</span>
00089         <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>= 0;
00090 
00091         <span class="comment">// MasterBlock never clipped.</span>
00092         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.resetClip();
00093 
00094         <span class="comment">// Init UL circular list to NULL (not compiled)</span>
00095         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= NULL;
00096         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= NULL;
00097 
00098         <span class="comment">// Dynamic LightMap</span>
00099         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
00100         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>= 0;
00101 
00102         <span class="comment">// Render Passes</span>
00103         <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>= NULL;
00104         <a class="code" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a>= NULL;
00105         <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>= NULL;
00106         <a class="code" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a>= NULL;
00107 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha31" doxytag="NL3D::CPatch::~CPatch" ></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::CPatch::~<a class="el" href="a03057.html">CPatch</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>
dtor 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l00109">109</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00115">release()</a>.
<p>
<div class="fragment"><pre>00110 {
00111         <a class="code" href="a03057.html#NL3D_1_1CPatcha25">release</a>();
00112 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CPatchz643_0" doxytag="NL3D::CPatch::addPatchBlocksInBBox" ></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::CPatch::addPatchBlocksInBBox </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>paId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>paBlockIds</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Add <a class="el" href="a03059.html">CPatchBlockIdent</a> to <a class="el" href="a03059.html">CPatchBlockIdent</a> array which intersect the bbox. NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>patchId</em>&nbsp;</td><td>the id of this patch, used to fill PatchBlockIdent. </td></tr>
    <tr><td valign=top><em>bbox</em>&nbsp;</td><td>the bbox to test against. </td></tr>
    <tr><td valign=top><em>paBlockIds</em>&nbsp;</td><td>array to be filled (no clear performed, elements added).</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06155.html#l00504">504</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00514">addPatchBlocksInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l02327">NL3D::CLandscape::addPatchBlocksInBBox()</a>.
<p>
<div class="fragment"><pre>00505 {
00506         CBezierPatch    &amp;bpatch= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00507 
00508         <span class="comment">// call with the whole root patch.</span>
00509         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, bpatch, 0, OrderS, 0, OrderT);
00510 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz668_0" doxytag="NL3D::CPatch::addPatchBlocksInBBoxRecurs" ></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::CPatch::addPatchBlocksInBBoxRecurs </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>paId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>paBlockIds</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pa</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>s0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>t0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>t1</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
recurse method of addPatchBlocksInBBox.
<p>
Definition at line <a class="el" href="a06155.html#l00514">514</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a06156.html#l00064">NL_PATCH_BLOCK_MAX_QUAD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderS</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderT</a>, <a class="el" href="a06156.html#l00197">NL3D::CPatchBlockIdent::PatchId</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S1</a>, <a class="el" href="a05478.html#l00391">NL3D::CBezierPatch::subdivideS()</a>, <a class="el" href="a05478.html#l00422">NL3D::CBezierPatch::subdivideT()</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T1</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00504">addPatchBlocksInBBox()</a>.
<p>
<div class="fragment"><pre>00516 {
00517         <a class="code" href="a04558.html#a7">uint8</a>   lenS=s1-s0, lenT=t1-t0;
00518         <a class="code" href="a04199.html#a6">nlassert</a>(lenS&gt;0);
00519         <a class="code" href="a04199.html#a6">nlassert</a>(lenT&gt;0);
00520 
00521         <span class="comment">// compute and compare bbox of the subdivision patch against request bbox.</span>
00522         <span class="comment">//========================</span>
00523         <span class="comment">// NB: this compute includes possible noise.</span>
00524         CAABBox         paBBox;
00525         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(pa, paBBox);
00526         <span class="comment">// if do not intersect, stop here.</span>
00527         <span class="keywordflow">if</span>( !paBBox.intersect(bbox) )
00528                 <span class="keywordflow">return</span>;
00529         <span class="comment">// else if at CPatchQuadBlock tile level, then just add this Id.</span>
00530         <span class="comment">//========================</span>
00531         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( lenS&lt;=<a class="code" href="a04733.html#a9">NL_PATCH_BLOCK_MAX_QUAD</a> &amp;&amp; lenT&lt;=<a class="code" href="a04733.html#a9">NL_PATCH_BLOCK_MAX_QUAD</a> )
00532         {
00533                 <span class="comment">// Add this PatchBlock desctiptor to the list.</span>
00534                 CPatchBlockIdent        pbId;
00535                 <span class="comment">// Fill struct from this and result of recursion.</span>
00536                 pbId.PatchId= paId;
00537                 pbId.OrderS= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00538                 pbId.OrderT= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00539                 pbId.S0= s0;
00540                 pbId.S1= s1;
00541                 pbId.T0= t0;
00542                 pbId.T1= t1;
00543                 <span class="comment">// Add to list.</span>
00544                 paBlockIds.push_back(pbId);
00545         }
00546         <span class="comment">// else subdiv and reccurs.</span>
00547         <span class="comment">//========================</span>
00548         <span class="keywordflow">else</span>
00549         {
00550                 <span class="comment">// Subdivide along the bigger side.</span>
00551                 <span class="keywordflow">if</span>(lenS&gt;lenT)
00552                 {
00553                         <span class="comment">// subdivide.</span>
00554                         CBezierPatch    left, right;
00555                         pa.subdivideS(left, right);
00556                         <a class="code" href="a04558.html#a7">uint8</a>   sMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)s0+(<a class="code" href="a04558.html#a15">uint</a>)s1) /2 );
00557                         <span class="comment">// recurs left.</span>
00558                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, left, s0, sMiddle, t0, t1);
00559                         <span class="comment">// recurs right.</span>
00560                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, right, sMiddle, s1, t0, t1);
00561                 }
00562                 <span class="keywordflow">else</span>
00563                 {
00564                         <span class="comment">// subdivide.</span>
00565                         CBezierPatch    top, bottom;
00566                         pa.subdivideT(top, bottom);
00567                         <a class="code" href="a04558.html#a7">uint8</a>   tMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)t0+(<a class="code" href="a04558.html#a15">uint</a>)t1) /2 );
00568                         <span class="comment">// recurs top.</span>
00569                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, top, s0, s1, t0, tMiddle);
00570                         <span class="comment">// recurs bottom.</span>
00571                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, bottom, s0, s1, tMiddle, t1);
00572                 }
00573         }
00574 
00575 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz675_0" doxytag="NL3D::CPatch::addRefDLMContext" ></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::CPatch::addRefDLMContext </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>
Add a ref count to the DLMContext, creating it if necessary. 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l01950">1950</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, and <a class="el" href="a06157.html#l02021">processDLMLight()</a>.
<p>
<div class="fragment"><pre>01951 {
01952         <span class="comment">// the patch must be compiled.</span>
01953         <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
01954 
01955         <span class="comment">// if 0, create the context.</span>
01956         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>==0)
01957         {
01958                 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext==NULL);
01959                 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= <span class="keyword">new</span> CPatchDLMContext;
01960                 <span class="comment">// init now the context.</span>
01961                 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;generate(<span class="keyword">this</span>, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTextureDLM(), <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getPatchDLMContextList());
01962 
01963                 <span class="comment">// If the patch is visible, it may have Far Vertices created, </span>
01964                 <span class="comment">// hence, we must refill them with good DLM Uvs.</span>
01965                 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
01966                 {
01967                         <span class="comment">// setup DLM Uv with new _DLMContext</span>
01968                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_10">fillVBFarsDLMUvOnly</a>();
01969                 }
01970         }
01971 
01972         <span class="comment">// incRef.</span>
01973         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>++;
01974 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_1" doxytag="NL3D::CPatch::addRefTessBlocks" ></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::CPatch::addRefTessBlocks </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>

<p>
Definition at line <a class="el" href="a06155.html#l00611">611</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06698.html#l00607">NL3D::CVegetableManager::createClipBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03394">NL3D::CLandscape::linkPatchToNearUL()</a>, <a class="el" href="a06156.html#l00098">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>, <a class="el" href="a06156.html#l00097">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CTessBlock &gt;::resize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, and <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>.
<p>
<div class="fragment"><pre>00612 {
00613         <a class="code" href="a04558.html#a15">uint</a>    i;
00614 
00615         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>++;
00616         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()==0)
00617         {
00618                 <span class="comment">// Allocate the tessblocks.</span>
00619                 <span class="comment">//==========</span>
00620 
00621                 <a class="code" href="a04199.html#a6">nlassert</a>(NL3D_TESSBLOCK_TILESIZE==4);
00622                 <span class="comment">// A tessblock is 2*2 tiles.</span>
00623                 <a class="code" href="a04558.html#a14">sint</a> os= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
00624                 <a class="code" href="a04558.html#a14">sint</a> ot= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1;
00625                 <a class="code" href="a04199.html#a6">nlassert</a>(os&gt;0);
00626                 <a class="code" href="a04199.html#a6">nlassert</a>(ot&gt;0);
00627                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(os*ot);
00628                 <span class="comment">// init all tessBlocks with the Patch ptr.</span>
00629                 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00630                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].init(<span class="keyword">this</span>);
00631 
00632 
00633                 <span class="comment">// Vegetable management</span>
00634                 <span class="comment">//==========</span>
00635                 CVegetableManager       *vegetableManager= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager;
00636 
00637                 <span class="comment">// Create ClipBlocks.</span>
00638                 <a class="code" href="a04558.html#a15">uint</a>    nTbPerCb= <a class="code" href="a04733.html#a13">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>;
00639                 <a class="code" href="a04558.html#a15">uint</a>    wCB= (os + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
00640                 <a class="code" href="a04558.html#a15">uint</a>    hCB= (ot + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
00641                 <a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.resize(wCB * hCB);
00642                 <span class="comment">// allocate ClipBlocks</span>
00643                 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.size(); i++)
00644                 {
00645                         <a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>[i]= vegetableManager-&gt;createClipBlock();
00646                 }
00647 
00648 
00649                 <span class="comment">// updateLighting management.</span>
00650                 <span class="comment">//==========</span>
00651                 <span class="comment">// append patch for Near updateLighting, since TessBlock lightmap may/will exist.</span>
00652                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;linkPatchToNearUL(<span class="keyword">this</span>);
00653 
00654         }
00655 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_0" doxytag="NL3D::CPatch::addTileLightmapEdgeWithTLI" ></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::CPatch::addTileLightmapEdgeWithTLI </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>ts</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>tt</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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>inverse</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>

<p>
Definition at line <a class="el" href="a06157.html#l01758">1758</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
<p>
<div class="fragment"><pre>01759 {
01760         <span class="comment">// compute colors ar corners of the tile.</span>
01761         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
01762         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
01763 
01764         <span class="comment">// get coordinate according to edge.</span>
01765         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
01766         <span class="keywordflow">switch</span>(edge)
01767         {
01768         <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
01769         <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
01770         <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
01771         <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
01772         };
01773 
01774         <span class="comment">// For all lumel of the edge, bilinear.</span>
01775         <a class="code" href="a04558.html#a15">uint</a>    i;
01776         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
01777         {
01778                 <span class="comment">// if vertical edge</span>
01779                 <span class="keywordflow">if</span>( (edge&amp;1)==0 )       <a class="code" href="a04223.html#a573">y</a>= i;
01780                 <span class="comment">// else horizontal edge</span>
01781                 <span class="keywordflow">else</span>                            <a class="code" href="a04223.html#a572">x</a>= i;
01782 
01783                 <span class="comment">// manage inverse.</span>
01784                 <a class="code" href="a04558.html#a15">uint</a>    where;
01785                 <span class="keywordflow">if</span>(inverse)             where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
01786                 <span class="keywordflow">else</span>                    where= i;
01787                 <span class="comment">// compute this pixel, and modulate</span>
01788                 <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, x, y, dest[where*stride]);
01789         }
01790 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_1" doxytag="NL3D::CPatch::addTileLightmapPixelWithTLI" ></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::CPatch::addTileLightmapPixelWithTLI </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>

<p>
Definition at line <a class="el" href="a06157.html#l01793">1793</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
<p>
<div class="fragment"><pre>01794 {
01795         <span class="comment">// compute colors ar corners of the tile.</span>
01796         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
01797         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
01798 
01799         <span class="comment">// compute this pixel, and modulate</span>
01800         <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, s, t, *dest);
01801 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_2" doxytag="NL3D::CPatch::addTileLightmapWithTLI" ></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::CPatch::addTileLightmapWithTLI </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>

<p>
Definition at line <a class="el" href="a06157.html#l01739">1739</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
<p>
<div class="fragment"><pre>01740 {
01741         <span class="comment">// compute colors ar corners of the tile.</span>
01742         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
01743         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
01744 
01745         <span class="comment">// Bilinear accross the tile, and add to dest.</span>
01746         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
01747         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
01748         {
01749                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
01750                 {
01751                         <span class="comment">// compute this pixel, and add</span>
01752                         <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, x, y, dest[y*stride + x]);
01753                 }
01754         }
01755 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz668_1" doxytag="NL3D::CPatch::addTileTrianglesInBBox" ></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::CPatch::addTileTrianglesInBBox </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>paId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>triangles</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tessLevel</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>s0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>t0</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<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="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs()</a>. effective fill the array of triangles from 1 tile at tile coordinates s0,t0. depending of tessLevel (0,1,2), 2, 8 or 32 triangles are added. (2*2m, 1*1*m or 0.5*0.5m). NB: only triangles of quad included in the bbox are added.
<p>
Definition at line <a class="el" href="a06155.html#l00335">335</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00181">NL3D::CTrianglePatch::PatchId</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv0</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv1</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv2</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, and <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>.
<p>
<div class="fragment"><pre>00336 {
00337         <a class="code" href="a04199.html#a6">nlassert</a>(s0&lt;OrderS);
00338         <a class="code" href="a04199.html#a6">nlassert</a>(t0&lt;OrderT);
00339         <a class="code" href="a04199.html#a6">nlassert</a>(tessLevel&lt;=2);
00340         <a class="code" href="a04558.html#a15">uint</a>    tessLen= 1&lt;&lt;tessLevel;
00341 
00342         <span class="comment">// some preca.</span>
00343         <span class="keywordtype">float</span>   startS0= (<span class="keywordtype">float</span>)s0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
00344         <span class="keywordtype">float</span>   startT0= (<span class="keywordtype">float</span>)t0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
00345         <span class="keywordtype">float</span>   ds= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*tessLen);
00346         <span class="keywordtype">float</span>   dt= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*tessLen);
00347 
00348         <span class="comment">// Parse all quads.</span>
00349         <a class="code" href="a04558.html#a15">uint</a>    sl,tl;
00350         <span class="keywordflow">for</span>(tl=0; tl&lt;tessLen; tl++)
00351         {
00352                 <span class="keywordtype">float</span>   fs0, fs1, ft0, ft1;
00353                 <span class="comment">// compute t patch coordinates.</span>
00354                 ft0= startT0 + (<span class="keywordtype">float</span>)tl * dt ;
00355                 ft1= ft0 + dt;
00356                 <span class="keywordflow">for</span>(sl=0; sl&lt;tessLen; sl++)
00357                 {
00358                         <span class="comment">// compute s patch coordinates.</span>
00359                         fs0= startS0 + (<span class="keywordtype">float</span>)sl * ds ;
00360                         fs1= fs0 + ds;
00361 
00362                         <span class="comment">// Compute Quad vectors (in CCW).</span>
00363                         CVector         p0, p1, p2, p3;
00364                         CUV                     uv0, uv1, uv2, uv3;
00365                         uv0.U= fs0; uv0.V= ft0;
00366                         uv1.U= fs0; uv1.V= ft1;
00367                         uv2.U= fs1; uv2.V= ft1;
00368                         uv3.U= fs1; uv3.V= ft0;
00369                         <span class="comment">// evaluate patch (with noise). (NB: because of cache, patch decompression cost nothing).</span>
00370                         p0= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv0.U, uv0.V);
00371                         p1= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv1.U, uv1.V);
00372                         p2= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv2.U, uv2.V);
00373                         p3= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv3.U, uv3.V);
00374 
00375                         <span class="comment">// build the bbox of this quad, and test with request bbox.</span>
00376                         CAABBox         quadBBox;
00377                         quadBBox.setCenter(p0);
00378                         quadBBox.extend(p1);
00379                         quadBBox.extend(p2);
00380                         quadBBox.extend(p3);
00381 
00382                         <span class="comment">// insert only if intersect with the bbox.</span>
00383                         <span class="keywordflow">if</span>(quadBBox.intersect(bbox))
00384                         {
00385                                 <span class="comment">// build triangles (in CCW).</span>
00386                                 CTrianglePatch  tri;
00387                                 tri.PatchId= paId;
00388 
00389                                 <span class="comment">// first tri.</span>
00390                                 tri.V0= p0; tri.V1= p1; tri.V2= p2;
00391                                 tri.Uv0= uv0; tri.Uv1= uv1; tri.Uv2= uv2;
00392                                 triangles.push_back(tri);
00393 
00394                                 <span class="comment">// second tri.</span>
00395                                 tri.V0= p2; tri.V1= p3; tri.V2= p0;
00396                                 tri.Uv0= uv2; tri.Uv1= uv3; tri.Uv2= uv0;
00397                                 triangles.push_back(tri);
00398 
00399                                 <span class="comment">// NB: this is not the same tesselation than in tesselation.cpp.</span>
00400                                 <span class="comment">// But this looks like Ben's NLPACS::CLocalRetriever tesselation.</span>
00401                         }
00402                 }
00403         }
00404 
00405 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz643_1" doxytag="NL3D::CPatch::addTrianglesInBBox" ></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::CPatch::addTrianglesInBBox </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>paId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>triangles</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tileTessLevel</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Add triangles to triangles array which intersect the bbox. NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>patchId</em>&nbsp;</td><td>the id of this patch, used to fill triangles. </td></tr>
    <tr><td valign=top><em>bbox</em>&nbsp;</td><td>the bbox to test against. </td></tr>
    <tr><td valign=top><em>triangles</em>&nbsp;</td><td>array to be filled (no clear performed, elements added). </td></tr>
    <tr><td valign=top><em>tileTessLevel</em>&nbsp;</td><td>0,1 or 2 size of the triangles (2*2m, 1*1m or 0.5*0.5m). Level of subdivision of a tile.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06155.html#l00270">270</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l02294">NL3D::CLandscape::addTrianglesInBBox()</a>.
<p>
<div class="fragment"><pre>00271 {
00272         CBezierPatch    &amp;bpatch= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00273 
00274         <span class="comment">// call with the whole root patch.</span>
00275         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tileTessLevel, bpatch, 0, OrderS, 0, OrderT);
00276 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz668_2" doxytag="NL3D::CPatch::addTrianglesInBBoxRecurs" ></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::CPatch::addTrianglesInBBoxRecurs </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>paId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbox</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>triangles</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tessLevel</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pa</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>s0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>t0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>t1</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
recurse subdivide of the bezierPatch. 3 1st parameters are the parameter of <a class="el" href="a03057.html#NL3D_1_1CPatchz643_1">addTrianglesInBBox()</a>. <br>
 pa is the bezier patch for this subdivision of this patch. <br>
 s0, s1, t0, t1 represent the part of the bezier patch subdivided. At start, s0=0, s1=OrderS, t0=0, t1=OrderT.
<p>
Definition at line <a class="el" href="a06155.html#l00280">280</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00335">addTileTrianglesInBBox()</a>, <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05478.html#l00391">NL3D::CBezierPatch::subdivideS()</a>, <a class="el" href="a05478.html#l00422">NL3D::CBezierPatch::subdivideT()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00270">addTrianglesInBBox()</a>.
<p>
<div class="fragment"><pre>00282 {
00283         <a class="code" href="a04558.html#a7">uint8</a>   lenS=s1-s0, lenT=t1-t0;
00284         <a class="code" href="a04199.html#a6">nlassert</a>(lenS&gt;0);
00285         <a class="code" href="a04199.html#a6">nlassert</a>(lenT&gt;0);
00286 
00287         <span class="comment">// compute and compare bbox of the subdivision patch against request bbox.</span>
00288         <span class="comment">//========================</span>
00289         <span class="comment">// NB: this compute includes possible noise.</span>
00290         CAABBox         paBBox;
00291         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(pa, paBBox);
00292         <span class="comment">// if do not intersect, stop here.</span>
00293         <span class="keywordflow">if</span>( !paBBox.intersect(bbox) )
00294                 <span class="keywordflow">return</span>;
00295         <span class="comment">// else if at tile level, then just computeTriangles.</span>
00296         <span class="comment">//========================</span>
00297         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( lenS==1 &amp;&amp; lenT==1 )
00298         {
00299                 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_1">addTileTrianglesInBBox</a>(paId, bbox, triangles, tessLevel, s0, t0);
00300         }
00301         <span class="comment">// else subdiv and reccurs.</span>
00302         <span class="comment">//========================</span>
00303         <span class="keywordflow">else</span>
00304         {
00305                 <span class="comment">// Subdivide along the bigger side.</span>
00306                 <span class="keywordflow">if</span>(lenS&gt;lenT)
00307                 {
00308                         <span class="comment">// subdivide.</span>
00309                         CBezierPatch    left, right;
00310                         pa.subdivideS(left, right);
00311                         <a class="code" href="a04558.html#a7">uint8</a>   sMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)s0+(<a class="code" href="a04558.html#a15">uint</a>)s1) /2 );
00312                         <span class="comment">// recurs left.</span>
00313                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, left, s0, sMiddle, t0, t1);
00314                         <span class="comment">// recurs right.</span>
00315                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, right, sMiddle, s1, t0, t1);
00316                 }
00317                 <span class="keywordflow">else</span>
00318                 {
00319                         <span class="comment">// subdivide.</span>
00320                         CBezierPatch    top, bottom;
00321                         pa.subdivideT(top, bottom);
00322                         <a class="code" href="a04558.html#a7">uint8</a>   tMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)t0+(<a class="code" href="a04558.html#a15">uint</a>)t1) /2 );
00323                         <span class="comment">// recurs top.</span>
00324                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, top, s0, s1, t0, tMiddle);
00325                         <span class="comment">// recurs bottom.</span>
00326                         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, bottom, s0, s1, tMiddle, t1);
00327                 }
00328         }
00329 
00330 
00331 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_0" doxytag="NL3D::CPatch::allocateVBAndFaceVector" ></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::CPatch::allocateVBAndFaceVector </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="a06161.html#l00845">845</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
<p>
<div class="fragment"><pre>00846 {
00847         <a class="code" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a>(<span class="keyword">true</span>);
00848         <a class="code" href="a03057.html#NL3D_1_1CPatchd15">createFaceVectorFar1</a>();
00849         <a class="code" href="a03057.html#NL3D_1_1CPatchd14">createFaceVectorFar0OrTile</a>();
00850 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_1" doxytag="NL3D::CPatch::allocateVBAndFaceVectorFar1Only" ></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::CPatch::allocateVBAndFaceVectorFar1Only </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="a06161.html#l00873">873</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>00874 {
00875         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00876         {
00877                 <span class="comment">// alloc VB.</span>
00878                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, <span class="keyword">true</span>);
00879                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00880                 {
00881                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00882                         <span class="comment">// need update VB only if tessBlock is visible.</span>
00883                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
00884                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
00885                 }
00886         }
00887 
00888         <a class="code" href="a03057.html#NL3D_1_1CPatchd15">createFaceVectorFar1</a>();
00889 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_2" doxytag="NL3D::CPatch::appendFaceToRenderList" ></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::CPatch::appendFaceToRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00800">800</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTessFace &gt;::append()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
<p>
<div class="fragment"><pre>00801 {
00802         <span class="comment">// Update the number of renderable Faces</span>
00803         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>++;
00804 
00805         <span class="comment">// Update Gnal render.</span>
00806         <span class="comment">//====================</span>
00807         <span class="keywordflow">if</span>(face-&gt;Level&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
00808         {
00809                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.append(face);
00810                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FaceTileMaterialRefCount++;
00811 
00812                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00813                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(MasterBlock);
00814         }
00815         <span class="keywordflow">else</span>
00816         {
00817                 <span class="comment">// Alloc if necessary the TessBlocks.</span>
00818                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
00819 
00820                 <span class="comment">// link the face to the good tessblock.</span>
00821                 <a class="code" href="a04558.html#a15">uint</a>    numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
00822                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarFaceList.append(face);
00823                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount++;
00824 
00825                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00826                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
00827 
00828                 <span class="comment">// Must enlarge the BSphere of the tesblock!!</span>
00829                 <span class="comment">// We must do it on a per-face approach, because of tessblocks 's corners which are outside of tessblocks.</span>
00830                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereFirst(face-&gt;VBase-&gt;EndPos);
00831                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;EndPos);
00832                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;EndPos);
00833                 <span class="comment">// I think this should be done too on StartPos, for geomorph (rare??...) problems.</span>
00834                 <span class="comment">// \todo yoyo: is this necessary???</span>
00835                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VBase-&gt;StartPos);
00836                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;StartPos);
00837                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;StartPos);
00838                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereCompile();
00839 
00840 
00841                 <span class="comment">// Update Tile render (no need to do it if face not at least at tessblock level).</span>
00842                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_3">appendFaceToTileRenderList</a>(face);
00843         }
00844 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_3" doxytag="NL3D::CPatch::appendFaceToTileRenderList" ></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::CPatch::appendFaceToTileRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00884">884</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTileFace &gt;::append()</a>, <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>, <a class="el" href="a06498.html#l00261">NL3D::CTessFace::TileFaces</a>, <a class="el" href="a06498.html#l00259">NL3D::CTessFace::TileMaterial</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, and <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>.
<p>
<div class="fragment"><pre>00885 {
00886         <span class="keywordflow">if</span>(face-&gt;TileMaterial)
00887         {
00888                 <span class="comment">// For all valid faces, update their links.</span>
00889                 <span class="comment">// Do not do this for lightmap, since it use same face from RGB0 pass.</span>
00890                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
00891                 {
00892                         <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a>   *tilePass= face-&gt;TileMaterial-&gt;Pass[i].PatchRdrPass;
00893                         <span class="comment">// If tile i enabled.</span>
00894                         <span class="keywordflow">if</span>(tilePass)
00895                         {
00896                                 <span class="comment">// a face should have created for this pass.</span>
00897                                 <a class="code" href="a04199.html#a6">nlassert</a>(face-&gt;TileFaces[i]);
00898                                 face-&gt;TileMaterial-&gt;TileFaceList[i].append(face-&gt;TileFaces[i]);
00899                         }
00900                 }
00901 
00902                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00903                 <a class="code" href="a04558.html#a15">uint</a>    numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
00904                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
00905 
00906                 <span class="comment">// Shadow: append it to the Shadow Triangles.</span>
00907                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;appendToShadowPolyReceiver(face);
00908         }
00909 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_4" doxytag="NL3D::CPatch::appendFarVertexToRenderList" ></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::CPatch::appendFarVertexToRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fv</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="a06155.html#l01040">1040</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTessFarVertex &gt;::append()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06156.html#l00931">TFarVertType</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
<p>
<div class="fragment"><pre>01041 {
01042         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a>    <a class="code" href="a04223.html#a581">type</a>;
01043         <a class="code" href="a04558.html#a15">uint</a>                    numtb;
01044         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(fv-&gt;PCoord, type, numtb);
01045         
01046         
01047         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> || <a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>)
01048         {
01049                 fv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>;
01050                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.append(fv);
01051         }
01052         <span class="keywordflow">else</span> 
01053         {
01054                 <span class="comment">// Alloc if necessary the TessBlocks.</span>
01055                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
01056 
01057                 fv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
01058                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarVertexList.append(fv);
01059         }
01060 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_5" doxytag="NL3D::CPatch::appendNearVertexToRenderList" ></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::CPatch::appendNearVertexToRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>tileMat</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>nv</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>

<p>
Definition at line <a class="el" href="a06155.html#l01086">1086</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00372">NL3D::CTessFace::allocTileUv()</a>.
<p>
<div class="fragment"><pre>01087 {
01088         <a class="code" href="a04199.html#a6">nlassert</a>(tileMat);
01089 
01090         <span class="comment">// Alloc if necessary the TessBlocks.</span>
01091         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
01092 
01093         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01094         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tileMat-&gt;TileS, tileMat-&gt;TileT);
01095         nv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
01096         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].NearVertexList.append(nv);
01097 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz643_2" doxytag="NL3D::CPatch::appendTessellationLeaves" ></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::CPatch::appendTessellationLeaves </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>leaves</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
From the current tesselation of this patch, append to the list of leaves faces.
<p>
Definition at line <a class="el" href="a06155.html#l02176">2176</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06497.html#l03194">NL3D::CTessFace::appendTessellationLeaves()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a05862.html#l02899">NL3D::CLandscape::getTessellationLeaves()</a>.
<p>
<div class="fragment"><pre>02177 {
02178         <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
02179         <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
02180         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;appendTessellationLeaves(leaves);
02181         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;appendTessellationLeaves(leaves);
02182 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz645_0" doxytag="NL3D::CPatch::appendTileLightInfluences" ></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::CPatch::appendTileLightInfluences </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uv</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a03092.html">CPointLightInfluence</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pointLightList</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Append lights under the position to pointLightList. Notice that the PointLight are ensured to be actually <a class="el" href="a03094.html">CPointLightNamed</a>.
<p>
Definition at line <a class="el" href="a06157.html#l01543">1543</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06760.html#l00586">NL3D::CZone::_PointLightArray</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05896.html#l00071">NL3D::CLightInfluenceInterpolator::Corners</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a05895.html#l00038">NL3D::CLightInfluenceInterpolator::interpolate()</a>, <a class="el" href="a06545.html#l00060">NL3D::CTileLightInfluence::Light</a>, <a class="el" href="a05896.html#l00060">NL3D::CLightInfluenceInterpolator::CCorner::Lights</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03273">NL3D::CLandscape::appendTileLightInfluences()</a>, and <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>.
<p>
<div class="fragment"><pre>01545 {
01546         <span class="comment">/*</span>
01547 <span class="comment">                WARNING !! only CPointLightNamed must be added here (used for convenience by CPatch::generateTileVegetable() )</span>
01548 <span class="comment">        */</span>
01549 
01550         <span class="comment">// Compute TLI coord for BiLinear.</span>
01551         <a class="code" href="a04558.html#a14">sint</a>    <a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>;
01552         <span class="comment">// There is (OrderS/2+1) * (OrderT/2+1) tileLightInfluences (TLI).</span>
01553         <a class="code" href="a04558.html#a14">sint</a>    <a class="code" href="a04223.html#a575">w</a>= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1);
01554         <a class="code" href="a04558.html#a14">sint</a>    h= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1);
01555         <a class="code" href="a04558.html#a14">sint</a>    wTLI= <a class="code" href="a04223.html#a575">w</a>+1;
01556         <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
01557         <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U * (w&lt;&lt;8));
01558         <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V * (h&lt;&lt;8));
01559         <a class="code" href="a05378.html#a374">clamp</a>(x, 0, w&lt;&lt;8);
01560         <a class="code" href="a05378.html#a374">clamp</a>(y, 0, h&lt;&lt;8);
01561         <span class="comment">// compute the TLI coord, and the subCoord for bilinear.</span>
01562         <a class="code" href="a04558.html#a14">sint</a>    xTLI,yTLI, xSub, ySub;
01563         xTLI= <a class="code" href="a04223.html#a572">x</a>&gt;&gt;8; <a class="code" href="a05378.html#a374">clamp</a>(xTLI, 0, w-1);
01564         yTLI= <a class="code" href="a04223.html#a573">y</a>&gt;&gt;8; <a class="code" href="a05378.html#a374">clamp</a>(yTLI, 0, h-1);
01565         <span class="comment">// Hence, xSub and ySub range is [0, 256].</span>
01566         xSub= <a class="code" href="a04223.html#a572">x</a> - (xTLI&lt;&lt;8);
01567         ySub= <a class="code" href="a04223.html#a573">y</a> - (yTLI&lt;&lt;8);
01568 
01569 
01570         <span class="comment">// Use a CLightInfluenceInterpolator to biLinear light influence</span>
01571         CLightInfluenceInterpolator             interp;
01572         <span class="comment">// Must support only 2 light per TLI.</span>
01573         <a class="code" href="a04199.html#a6">nlassert</a>(CTileLightInfluence::NumLightPerCorner==2);
01574         <a class="code" href="a04199.html#a6">nlassert</a>(CLightInfluenceInterpolator::NumLightPerCorner==2);
01575         <span class="comment">// Get ref on array of PointLightNamed.</span>
01576         CPointLightNamed        *zonePointLights= NULL;
01577         <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights().size() &gt;0 )
01578         {
01579                 <span class="comment">// const_cast, because will only change _IdInfluence, and </span>
01580                 <span class="comment">// also because CLightingManager will call appendLightedModel()</span>
01581                 zonePointLights= const_cast&lt;CPointLightNamed*&gt;(&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights()[0]));
01582         }
01583         <span class="comment">// For 4 corners.</span>
01584         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;2;<a class="code" href="a04223.html#a573">y</a>++)
01585         {
01586                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;2;<a class="code" href="a04223.html#a572">x</a>++)
01587                 {
01588                         <span class="comment">// get ref on TLI, and on corner.</span>
01589                         <span class="keyword">const</span> CTileLightInfluence                               &amp;tli= <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>[ (yTLI+<a class="code" href="a04223.html#a573">y</a>)*wTLI + xTLI+<a class="code" href="a04223.html#a572">x</a> ];
01590                         CLightInfluenceInterpolator::CCorner    &amp;corner= interp.Corners[<a class="code" href="a04223.html#a573">y</a>*2 + <a class="code" href="a04223.html#a572">x</a>];
01591                         <span class="comment">// For all lights</span>
01592                         <a class="code" href="a04558.html#a15">uint</a> lid;
01593                         <span class="keywordflow">for</span>(lid= 0; lid&lt;CTileLightInfluence::NumLightPerCorner; lid++)
01594                         {
01595                                 <span class="comment">// get the id of the light in the zone</span>
01596                                 <a class="code" href="a04558.html#a15">uint</a>    tliLightId= tli.Light[lid];
01597                                 <span class="comment">// If empty id, stop</span>
01598                                 <span class="keywordflow">if</span>(tliLightId==0xFF)
01599                                         <span class="keywordflow">break</span>;
01600                                 <span class="keywordflow">else</span>
01601                                 {
01602                                         <span class="comment">// Set pointer of the light in the corner</span>
01603                                         corner.Lights[lid]= zonePointLights + tliLightId;
01604                                 }
01605                         }
01606                         <span class="comment">// Reset Empty slots.</span>
01607                         <span class="keywordflow">for</span>(; lid&lt;CTileLightInfluence::NumLightPerCorner; lid++)
01608                         {
01609                                 <span class="comment">// set to NULL</span>
01610                                 corner.Lights[lid]= NULL;
01611                         }
01612                 }
01613         }
01614         <span class="comment">// interpolate.</span>
01615         interp.interpolate(pointLightList, xSub/256.f, ySub/256.f);
01616 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_6" doxytag="NL3D::CPatch::appendTileMaterialToRenderList" ></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::CPatch::appendTileMaterialToRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tm</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="a06155.html#l00955">955</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06610.html#l00051">NL3D::CTileAddedInfo::Center</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06610.html#l00050">NL3D::CTileAddedInfo::Corners</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00622">NL3D::CLandscape::getTileCallback()</a>, <a class="el" href="a05862.html#l03168">NL3D::CLandscape::isVegetableActive()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06610.html#l00052">NL3D::CTileAddedInfo::Normal</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a03932.html#NL3D_1_1ULandscapeTileCallbacka0">NL3D::ULandscapeTileCallback::tileAdded()</a>, <a class="el" href="a06610.html#l00049">NL3D::CTileAddedInfo::TileID</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00102">uint64</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
<div class="fragment"><pre>00956 {
00957         <a class="code" href="a04199.html#a6">nlassert</a>(tm);
00958 
00959         <span class="comment">// Alloc if necessary the TessBlocks.</span>
00960         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
00961 
00962         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
00963         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tm-&gt;TileS, tm-&gt;TileT);
00964         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].RdrTileRoot[numtm]= tm;
00965         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount++;
00966         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount++;
00967         <span class="comment">// The master block contains the whole patch TileMaterialRefCount</span>
00968         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount++;
00969 
00970         <span class="comment">// DynamicLighting. When in near, must compute the context, to have good UVs.</span>
00971         <span class="comment">//==========</span>
00972         <span class="comment">// inc ref to the context, creating it if needed.</span>
00973         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a>();
00974         <span class="comment">// NB: do it before creating the vegetableBlock, because vegetables use DLM Uvs.</span>
00975 
00976         <span class="comment">// if was no tiles before in this tessBlock, create a Vegetable block.</span>
00977         <span class="comment">//==========</span>
00978         <span class="comment">// one Tile &lt;=&gt; was 0 before</span>
00979         <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount == 1 &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;isVegetableActive() )
00980         {
00981                 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a>(numtb, tm-&gt;TileS, tm-&gt;TileT);
00982         }
00983         ULandscapeTileCallback *tileCallback = <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileCallback();
00984         <span class="keywordflow">if</span> (tileCallback)
00985         {
00986                 CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00987                 CTileAddedInfo tai;
00988                 <span class="comment">//              </span>
00989                 tai.Corners[0] = bpatch-&gt;eval((<span class="keywordtype">float</span>) tm-&gt;TileS / OrderS, (<span class="keywordtype">float</span>) tm-&gt;TileT / OrderT);
00990                 tai.Corners[1] = bpatch-&gt;eval((tm-&gt; TileS + 1.f) / OrderS, (<span class="keywordtype">float</span>) tm-&gt;TileT / OrderT);
00991                 tai.Corners[2] = bpatch-&gt;eval( (tm-&gt; TileS + 1.f) / OrderS, (tm-&gt;TileT + 1.f) / OrderT);
00992                 tai.Corners[3] = bpatch-&gt;eval( (<span class="keywordtype">float</span>) tm-&gt; TileS / OrderS, (tm-&gt;TileT + 1.f) / OrderT);
00993                 tai.Center = bpatch-&gt;eval( (tm-&gt; TileS + 0.5f) / OrderS, (tm-&gt;TileT + 0.5f) / OrderT);
00994                 <span class="comment">//</span>
00995                 tai.Normal = bpatch-&gt;evalNormal( (tm-&gt; TileS + 0.5f) / OrderS, (tm-&gt;TileT + 0.5f) / OrderT);
00996                 tai.TileID = (<a class="code" href="a04558.html#a13">uint64</a>) tm; <span class="comment">// pointer to tile material serves as a unique identifier</span>
00997                 <span class="comment">//</span>
00998                 tileCallback-&gt;tileAdded(tai);
00999         }
01000 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha0" doxytag="NL3D::CPatch::averageTesselationVertices" ></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::CPatch::averageTesselationVertices </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>
This is especially for Pacs. see <a class="el" href="a02702.html">CLandscape</a> desc.
<p>
Definition at line <a class="el" href="a06155.html#l01505">1505</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06497.html#l02468">NL3D::CTessFace::averageTesselationVertices()</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01157">NL3D::CZone::averageTesselationVertices()</a>.
<p>
<div class="fragment"><pre>01506 {
01507         <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
01508         <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
01509 
01510         <span class="comment">// Recompute the BaseVertices. This is usefull for Pacs.</span>
01511         <span class="comment">// Because CLandscape::averageTesselationVertices() is made on a strict order for patchs (map of zones, then </span>
01512         <span class="comment">// array of patchs), we are sure to overwrite BaseVertices in this order.</span>
01513         CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
01514         CTessVertex *b= BaseVertices[1];
01515         CTessVertex *c= BaseVertices[2];
01516         CTessVertex *d= BaseVertices[3];
01517         <span class="comment">// Set positions.</span>
01518         a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
01519         b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
01520         c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
01521         d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
01522 
01523 
01524         <span class="comment">// Average the tesselation of sons.</span>
01525         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;averageTesselationVertices();
01526         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;averageTesselationVertices();
01527 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz657_0" doxytag="NL3D::CPatch::beginDLMLighting" ></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::CPatch::beginDLMLighting </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>
begin Dynamic light Process. reset texture To Black (if needed) Called by <a class="el" href="a02702.html">CLandscape</a>. _DLMContext must exist
<p>
Definition at line <a class="el" href="a06157.html#l02005">2005</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06163.html#l00592">NL3D::CPatchDLMContext::clearLighting()</a>, <a class="el" href="a06164.html#l00128">NL3D::CPatchDLMContext::CurPointLightCount</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06164.html#l00127">NL3D::CPatchDLMContext::OldPointLightCount</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>.
<p>
<div class="fragment"><pre>02006 {
02007         <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
02008 
02009         <span class="comment">// Must bkup prec pointLightCount in OldPointLightCount, and reset CurPointLightCount</span>
02010         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;OldPointLightCount= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount;
02011         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount= 0;
02012 
02013         <span class="comment">// clear lighting, only if patch is visible</span>
02014         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
02015                 <span class="comment">// NB: no-op if src is already full black.</span>
02016                 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;clearLighting();
02017 
02018 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha1" doxytag="NL3D::CPatch::bind" ></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::CPatch::bind </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03058.html">CBindInfo</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>Edges</em>[4], </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>rebind</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>
bind the patch to 4 neighbors, given in this patch edge order (0,1,2,3). Tesselation is reseted (patch unbound first). NB: this patch and his neighborood must be compiled... NB: neighbor patchs must not be NULL (but according to NPatchs).
<p>
Definition at line <a class="el" href="a06155.html#l01847">1847</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, <a class="el" href="a06497.html#l00345">NL3D::CTessFace::computeSplitPoint()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FBase</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVBase</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVLeft</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVRight</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00321">NL3D::CPatch::CBindInfo::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a06156.html#l00804">OrderS</a>, <a class="el" href="a06156.html#l00804">OrderT</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00243">NL3D::CTessFace::SonLeft</a>, <a class="el" href="a06498.html#l00243">NL3D::CTessFace::SonRight</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06497.html#l02860">NL3D::CTessFace::updateBind()</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, and <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>.
<p>
<div class="fragment"><pre>01848 {
01849         <span class="comment">// The multiple Patch Face.</span>
01850         <span class="comment">// By default, Patch==NULL, FLeft, FRight and FBase==NULL so ok!</span>
01851         <span class="keyword">static</span>  <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a>       bind1_2[4];
01852         <span class="keyword">static</span>  <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a>       bind1_4[8];
01853 
01854 
01855         <span class="comment">// THIS PATCH MUST BE UNBOUND FIRST!!!!!</span>
01856         <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
01857         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
01858         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
01859         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
01860         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
01861         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
01862 
01863 
01864         <span class="comment">// bind the Realtime bind info here (before any computeVertex, and before bind too).</span>
01865         <a class="code" href="a04558.html#a14">sint</a>    i;
01866         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
01867         {
01868                 <span class="comment">// just Copy zone (if not NULL).</span>
01869                 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[i]= Edges[i].Zone;
01870         }
01871 
01872 
01873         <span class="keywordflow">if</span>(!rebind)
01874         {
01875                 <span class="comment">// Just recompute base vertices.</span>
01876                 CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
01877                 CTessVertex *b= BaseVertices[1];
01878                 CTessVertex *c= BaseVertices[2];
01879                 CTessVertex *d= BaseVertices[3];
01880                 <span class="comment">// Set positions.</span>
01881                 a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
01882                 b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
01883                 c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
01884                 d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
01885                 <span class="comment">// NB: no propagation problem, since the patch has root only (since has to be unbound!!!)</span>
01886                 <span class="comment">// Recompute centers.</span>
01887                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;computeSplitPoint();
01888                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;computeSplitPoint();
01889         }
01890         <span class="keywordflow">else</span>
01891         {
01892                 <span class="comment">// Keep old Vertices as computed from neighbors, but reFill the 4 FarVertices.</span>
01893                 <span class="comment">// NB: don't do it on NearVertices because suppose that Near is Off when a bind occurs (often far away).</span>
01894                 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase);
01895                 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft);
01896                 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight);
01897                 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase);
01898         }
01899 
01900 
01901         <span class="comment">// Bind the roots.</span>
01902         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
01903         {
01904                 CBindInfo       &amp;<a class="code" href="a03057.html#NL3D_1_1CPatcha1">bind</a>= Edges[i];
01905 
01906                 <a class="code" href="a04199.html#a6">nlassert</a>(bind.NPatchs==0 || bind.NPatchs==1 || bind.NPatchs==2 || bind.NPatchs==4 || bind.NPatchs==5);
01907                 <span class="keywordflow">if</span>(bind.NPatchs==1)
01908                 {
01909                         <span class="comment">// Bind me on Next.</span>
01910                         this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]));
01911                         <span class="comment">// Bind Next on me.</span>
01912                         bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], this-&gt;getRootFaceForEdge(i));
01913                 }
01914                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==2)
01915                 {
01916                         <span class="comment">// Setup multiple bind.</span>
01917                         this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind1_2+i);
01918                         bind1_2[i].FBase= this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a>(i);
01919                         <span class="comment">// Setup the multiple face.</span>
01920                         <span class="comment">// Follow the conventions! Make a draw for understand. Small Patchs are numbered in CCW.</span>
01921                         bind1_2[i].SonRight= bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]);
01922                         bind1_2[i].SonLeft= bind.Next[1]-&gt;getRootFaceForEdge(bind.Edge[1]);
01923                         bind1_2[i].VBase= bind.Next[0]-&gt;getRootVertexForEdge(bind.Edge[0]);
01924                         <span class="comment">// Set a "flag" to neighbors, so they know what edge is to be bind on me.</span>
01925                         bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], &amp;CTessFace::MultipleBindFace);
01926                         bind.Next[1]-&gt;changeEdgeNeighbor(bind.Edge[1], &amp;CTessFace::MultipleBindFace);
01927                 }
01928                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==4)
01929                 {
01930                         <span class="comment">// Setup multiple bind level 0.</span>
01931                         this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind1_2+i);
01932                         bind1_2[i].FBase= this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a>(i);
01933 
01934                         <span class="comment">// Setup multiple bind level 1.</span>
01935                         <span class="comment">// Follow the conventions! Make a draw for understand. Small Patchs are numbered in CCW.</span>
01936                         bind1_2[i].SonRight= bind1_4 + 2*i+0;
01937                         bind1_2[i].SonLeft= bind1_4 + 2*i+1;
01938                         bind1_2[i].VBase= bind.Next[1]-&gt;getRootVertexForEdge(bind.Edge[1]);
01939                         <span class="comment">// Make first multiple face bind level1.</span>
01940                         bind1_4[2*i+0].FBase= &amp;CTessFace::MultipleBindFace;     <span class="comment">// to link correctly when the root face will be splitted.</span>
01941                         bind1_4[2*i+0].SonRight= bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]);
01942                         bind1_4[2*i+0].SonLeft= bind.Next[1]-&gt;getRootFaceForEdge(bind.Edge[1]);
01943                         bind1_4[2*i+0].VBase= bind.Next[0]-&gt;getRootVertexForEdge(bind.Edge[0]);
01944                         <span class="comment">// Make second multiple face bind level1.</span>
01945                         bind1_4[2*i+1].FBase= &amp;CTessFace::MultipleBindFace;     <span class="comment">// to link correctly when the root face will be splitted.</span>
01946                         bind1_4[2*i+1].SonRight= bind.Next[2]-&gt;getRootFaceForEdge(bind.Edge[2]);
01947                         bind1_4[2*i+1].SonLeft= bind.Next[3]-&gt;getRootFaceForEdge(bind.Edge[3]);
01948                         bind1_4[2*i+1].VBase= bind.Next[2]-&gt;getRootVertexForEdge(bind.Edge[2]);
01949 
01950                         <span class="comment">// Set a "flag" to neighbors, so they know what edge is to be bind on me.</span>
01951                         bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], &amp;CTessFace::MultipleBindFace);
01952                         bind.Next[1]-&gt;changeEdgeNeighbor(bind.Edge[1], &amp;CTessFace::MultipleBindFace);
01953                         bind.Next[2]-&gt;changeEdgeNeighbor(bind.Edge[2], &amp;CTessFace::MultipleBindFace);
01954                         bind.Next[3]-&gt;changeEdgeNeighbor(bind.Edge[3], &amp;CTessFace::MultipleBindFace);
01955                 }
01956                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==5)
01957                 {
01958                         <span class="comment">/* I am binded to a bigger patch and this one has already done the binding on me =&gt; </span>
01959 <span class="comment">                                It must be correclty tesselated. Note also that bind 1/X are only possible on interior of zone.</span>
01960 <span class="comment">                        */</span>
01961 
01962                         <span class="comment">// First, make the link with the face to which I must connect.</span>
01963                         <span class="comment">// -----------------</span>
01964 
01965                         <span class="comment">// Get the coordinate of the current edge of this patch</span>
01966                         <a class="code" href="a03660.html">CVector2f</a>       uvi0, uvi1;
01967                         <span class="keywordflow">switch</span>(i)
01968                         {
01969                         <span class="keywordflow">case</span> 0: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,0); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,1);  <span class="keywordflow">break</span>;
01970                         <span class="keywordflow">case</span> 1: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,1); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,1);  <span class="keywordflow">break</span>;
01971                         <span class="keywordflow">case</span> 2: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,1); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,0);  <span class="keywordflow">break</span>;
01972                         <span class="keywordflow">case</span> 3: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,0); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,0);  <span class="keywordflow">break</span>;
01973                         };
01974                         <span class="comment">// mul by OrderS/OrderT for CPatchUVLocator</span>
01975                         uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
01976                         uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
01977                         uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
01978                         uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
01979                         <span class="comment">// build a CPatchUVLocator to transpose coorindate ot this edge in coordinate on the bigger Neighbor patch.</span>
01980                         CBindInfo       bindInfo;
01981                         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(i, bindInfo);
01982                         <a class="code" href="a04199.html#a6">nlassert</a>(bindInfo.Zone!=NULL &amp;&amp; bindInfo.NPatchs==1);
01983                         CPatchUVLocator         puvloc;
01984                         puvloc.build(<span class="keyword">this</span>, i, bindInfo);
01985 
01986                         <span class="comment">// transpose from this patch coord in neighbor patch coord.</span>
01987                         <a class="code" href="a03660.html">CVector2f</a>       uvo0, uvo1;
01988                         <a class="code" href="a04558.html#a15">uint</a>    pid;
01989                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>  *patchNeighbor;
01990                         <span class="comment">// Do it for uvi0</span>
01991                         pid= puvloc.selectPatch(uvi0);
01992                         puvloc.locateUV(uvi0, pid, patchNeighbor, uvo0);
01993                         <a class="code" href="a04199.html#a6">nlassert</a>(patchNeighbor == bindInfo.Next[0]);
01994                         <span class="comment">// Do it for uvi1</span>
01995                         pid= puvloc.selectPatch(uvi1);
01996                         puvloc.locateUV(uvi1, pid, patchNeighbor, uvo1);
01997                         <a class="code" href="a04199.html#a6">nlassert</a>(patchNeighbor == bindInfo.Next[0]);
01998                         <span class="comment">// Rescale to have uv in 0,1 basis.</span>
01999                         uvo0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= patchNeighbor-&gt;OrderS;
02000                         uvo0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= patchNeighbor-&gt;OrderT;
02001                         uvo1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= patchNeighbor-&gt;OrderS;
02002                         uvo1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= patchNeighbor-&gt;OrderT;
02003 
02004                         <span class="comment">// Now, traverse the tesselation and find the first CTessFace which use this edge.</span>
02005                         <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a>       *faceNeighbor;
02006                         faceNeighbor= patchNeighbor-&gt;linkTessFaceWithEdge(uvo0, uvo1, this-&gt;getRootFaceForEdge(i));
02007                         <a class="code" href="a04199.html#a6">nlassert</a>(faceNeighbor);
02008                         <span class="comment">// Bind me on Next.</span>
02009                         this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, faceNeighbor);
02010                 }
02011 
02012         }
02013 
02014         <span class="comment">// Propagate the binds to sons.</span>
02015         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;updateBind();
02016         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;updateBind();
02017 
02018 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha2" doxytag="NL3D::CPatch::buildBBox" ></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="a02156.html">CAABBox</a> NL3D::CPatch::buildBBox </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>
Build the bbox of the patch, according to ctrl points, and displacement map max value. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l00257">257</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, and <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>.
<p>
<div class="fragment"><pre>00258 {
00259         CBezierPatch    &amp;p= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00260 
00261         <span class="comment">// Compute Bounding Box. (easiest way...)</span>
00262         CAABBox         ret;
00263         <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(p, ret);
00264 
00265         <span class="keywordflow">return</span> ret;
00266 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz668_3" doxytag="NL3D::CPatch::buildBBoxFromBezierPatch" ></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::CPatch::buildBBoxFromBezierPatch </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>ret</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
build a bbox from the convex hull of a bezier patch, enlarged with noise. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l00221">221</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a06682.html#l00192">NLMISC::CVector::maxof()</a>, <a class="el" href="a06682.html#l00186">NLMISC::CVector::minof()</a>, <a class="el" href="a06156.html#l00089">NL3D_NOISE_MAX</a>, <a class="el" href="a05385.html#l00071">NLMISC::CAABBox::setMinMax()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00514">addPatchBlocksInBBoxRecurs()</a>, <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00257">buildBBox()</a>.
<p>
<div class="fragment"><pre>00222 {
00223         <span class="comment">// Because of the structure of CAABBox, extend() is not fast enough for us. first compute bmin, bmax,</span>
00224         <span class="comment">// then compute the bbox.</span>
00225         CVector         bmin= p.Vertices[0];
00226         CVector         bmax= bmin; 
00227 
00228         <a class="code" href="a04558.html#a14">sint</a>                    i;
00229         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
00230         {
00231                 bmin.minof(bmin, p.Vertices[i]);
00232                 bmax.maxof(bmax, p.Vertices[i]);
00233         }
00234         <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
00235         {
00236                 bmin.minof(bmin, p.Tangents[i]);
00237                 bmax.maxof(bmax, p.Tangents[i]);
00238         }
00239         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
00240         {
00241                 bmin.minof(bmin, p.Interiors[i]);
00242                 bmax.maxof(bmax, p.Interiors[i]);
00243         }
00244 
00245         <span class="comment">// Modulate with the maximum displacement map (usefull for patch clipping).</span>
00246         <span class="keyword">static</span>  CVector         vectorNoiseMax(NL3D_NOISE_MAX, NL3D_NOISE_MAX, NL3D_NOISE_MAX);
00247         bmin-= vectorNoiseMax;
00248         bmax+= vectorNoiseMax;
00249         <span class="comment">// NB: this is not very optimal, since the BBox may be very too big. eg: patch 16mx16m =&gt; bbox 18mx18m.</span>
00250         <span class="comment">// But remind that tessblocks do not use this BBox, and are computed with the real geometry.</span>
00251 
00252         ret.setMinMax(bmin, bmax);
00253 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd0" doxytag="NL3D::CPatch::changeEdgeNeighbor" ></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::CPatch::changeEdgeNeighbor </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>to</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>

<p>
Definition at line <a class="el" href="a06155.html#l01805">1805</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
<p>
<div class="fragment"><pre>01806 {
01807         <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
01808 
01809         <span class="comment">// See tessellation rules.</span>
01810         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
01811         {
01812                 <span class="keywordflow">switch</span>(edge)
01813                 {
01814                         <span class="keywordflow">case</span> 0: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
01815                         <span class="keywordflow">case</span> 1: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
01816                         <span class="keywordflow">case</span> 2: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
01817                         <span class="keywordflow">case</span> 3: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
01818                 }
01819         }
01820         <span class="keywordflow">else</span>
01821         {
01822                 <span class="keywordflow">switch</span>(edge)
01823                 {
01824                         <span class="keywordflow">case</span> 0: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
01825                         <span class="keywordflow">case</span> 1: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
01826                         <span class="keywordflow">case</span> 2: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
01827                         <span class="keywordflow">case</span> 3: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
01828                 }
01829         }
01830 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd1" doxytag="NL3D::CPatch::checkCreateVertexVBFar" ></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::CPatch::checkCreateVertexVBFar </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01502">1502</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
<p>
<div class="fragment"><pre>01503 {
01504         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01505         <span class="comment">// If visible, and Far0 in !Tile Mode, allocate.</span>
01506         <span class="comment">// NB: must test Far0&gt;0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
01507         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0() )
01508         {
01509                 pVert-&gt;Index0= CLandscapeGlobals::CurrentFar0VBAllocator-&gt;allocateVertex();
01510         }
01511 
01512         <span class="comment">// Idem for Far1</span>
01513         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1())
01514         {
01515                 pVert-&gt;Index1= CLandscapeGlobals::CurrentFar1VBAllocator-&gt;allocateVertex();
01516         }
01517 
01518 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd2" doxytag="NL3D::CPatch::checkCreateVertexVBNear" ></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::CPatch::checkCreateVertexVBNear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01543">1543</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00403">NL3D::CTessFace::checkCreateFillTileVB()</a>.
<p>
<div class="fragment"><pre>01544 {
01545         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01546         <span class="comment">// If visible, and Far0 in Tile Mode, allocate.</span>
01547         <span class="comment">// NB: must test Far0==0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
01548         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile())
01549         {
01550                 pVert-&gt;Index= CLandscapeGlobals::CurrentTileVBAllocator-&gt;allocateVertex();
01551         }
01552 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd3" doxytag="NL3D::CPatch::checkDeleteVertexVBFar" ></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::CPatch::checkDeleteVertexVBFar </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01571">1571</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>.
<p>
<div class="fragment"><pre>01572 {
01573         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01574         <span class="comment">// If visible, and Far0 in !Tile Mode, ok, the vertex exist in VB, so delete.</span>
01575         <span class="comment">// NB: must test Far0&gt;0 because vertices are deleted in preRender() if a change of Far occurs.</span>
01576         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0() )
01577         {
01578                 CLandscapeGlobals::CurrentFar0VBAllocator-&gt;deleteVertex(pVert-&gt;Index0);
01579         }
01580 
01581         <span class="comment">// Idem for Far1</span>
01582         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0  &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1() )
01583         {
01584                 CLandscapeGlobals::CurrentFar1VBAllocator-&gt;deleteVertex(pVert-&gt;Index1);
01585         }
01586 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd4" doxytag="NL3D::CPatch::checkDeleteVertexVBNear" ></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::CPatch::checkDeleteVertexVBNear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01589">1589</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>.
<p>
<div class="fragment"><pre>01590 {
01591         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01592         <span class="comment">// If visible, and Far0 in Tile Mode, ok, the vertex exist in VB, so delete.</span>
01593         <span class="comment">// NB: must test Far0==0 because vertices are deleted in preRender() if a change of Far occurs.</span>
01594         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile() )
01595         {
01596                 CLandscapeGlobals::CurrentTileVBAllocator-&gt;deleteVertex(pVert-&gt;Index);
01597         }
01598 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd5" doxytag="NL3D::CPatch::checkFillVertexVBFar" ></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::CPatch::checkFillVertexVBFar </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01522">1522</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">NL3D::CTessFace::updateNearFarVertices()</a>.
<p>
<div class="fragment"><pre>01523 {
01524         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01525         <span class="comment">// If visible, and Far0 in !Tile Mode, try to fill.</span>
01526         <span class="comment">// NB: must test Far0&gt;0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
01527         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0())
01528         {
01529                 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
01530                         <a class="code" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a>(pVert);
01531         }
01532 
01533         <span class="comment">// Idem for Far1</span>
01534         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1())
01535         {
01536                 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
01537                         <a class="code" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a>(pVert);
01538         }
01539 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd6" doxytag="NL3D::CPatch::checkFillVertexVBNear" ></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::CPatch::checkFillVertexVBNear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</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="a06161.html#l01556">1556</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l01109">fillTileVertexVB()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00403">NL3D::CTessFace::checkCreateFillTileVB()</a>, <a class="el" href="a06497.html#l00424">NL3D::CTessFace::checkFillTileVB()</a>, and <a class="el" href="a06497.html#l00873">NL3D::CTessFace::updateNearFarVertices()</a>.
<p>
<div class="fragment"><pre>01557 {
01558         <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
01559         <span class="comment">// If visible, and Far0 in Tile Mode, try to fill.</span>
01560         <span class="comment">// NB: must test Far0==0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
01561         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()&amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile() )
01562         {
01563                 <span class="comment">// try to fill.</span>
01564                 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs() )
01565                         <a class="code" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a>(pVert);
01566         }
01567 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_7" doxytag="NL3D::CPatch::clearTessBlocks" ></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::CPatch::clearTessBlocks </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>

<p>
Definition at line <a class="el" href="a06155.html#l00669">669</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, <a class="el" href="a06698.html#l00620">NL3D::CVegetableManager::deleteClipBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.
<p>
<div class="fragment"><pre>00670 {
00671         <a class="code" href="a04558.html#a15">uint</a>    i;
00672 
00673         <span class="comment">// Vegetable management</span>
00674         <span class="comment">//==========</span>
00675         <span class="comment">// if compiled.</span>
00676         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
00677         {
00678                 CVegetableManager       *vegetableManager= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager;
00679 
00680                 <span class="comment">// delete still existing vegetable Igs.</span>
00681                 <a class="code" href="a03057.html#NL3D_1_1CPatchz651_0">deleteAllVegetableIgs</a>();
00682 
00683                 <span class="comment">// delete ClipBlocks.</span>
00684                 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.size(); i++)
00685                 {
00686                         vegetableManager-&gt;deleteClipBlock(VegetableClipBlocks[i]);
00687                 }
00688                 <a class="code" href="a05378.html#a381">contReset</a>(VegetableClipBlocks);
00689         }
00690 
00691 
00692         <span class="comment">// updateLighting management.</span>
00693         <span class="comment">//==========</span>
00694         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
00695         {
00696                 <span class="comment">// remove patch from Near updateLighting, since no more TessBlock lightmap can exist.</span>
00697                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;unlinkPatchFromNearUL(<span class="keyword">this</span>);
00698         }
00699 
00700 
00701         <span class="comment">// Delete TessBlocks</span>
00702         <span class="comment">//==========</span>
00703         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>=0;
00704         <a class="code" href="a05378.html#a381">contReset</a>(TessBlocks);
00705 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha3" doxytag="NL3D::CPatch::compile" ></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::CPatch::compile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03730.html">CZone</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>z</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>patchId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>orderS</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>orderT</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>baseVertices</em>[4], </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>errorSize</em> = 0</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>
compile a valid patch. (init) Call this method before any other. Zone and Control points must be valid before calling <a class="el" href="a03057.html#NL3D_1_1CPatcha3">compile()</a>. <br>
 This is an <b>ERROR</b> to call <a class="el" href="a03057.html#NL3D_1_1CPatcha3">compile()</a> two times. <br>
 <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>z</em>&nbsp;</td><td>zone where the patch must be binded. </td></tr>
    <tr><td valign=top><em>orderS</em>&nbsp;</td><td>the Tile order in S direction: 2,4,8,16. </td></tr>
    <tr><td valign=top><em>orderT</em>&nbsp;</td><td>the Tile order in T direction: 2,4,8,16. </td></tr>
    <tr><td valign=top><em>errorSize</em>&nbsp;</td><td>if 0, setup() compute himself the errormetric of the patch. May be setup to surface of patch, modulated by tangents and displacement map.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06155.html#l01283">1283</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a05586.html#l00358">NLMISC::getPowerOf2()</a>, <a class="el" href="a06491.html#l00089">NL3D::CTessBlock::init()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00814">SquareLimitLevel</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00812">TileLimitLevel</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l00236">z</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>.
<p>
<div class="fragment"><pre>01284 {
01285         <a class="code" href="a04199.html#a6">nlassert</a>(z);
01286         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= <a class="code" href="a04223.html#a574">z</a>;
01287 
01288         <span class="comment">// For updateLighting, get the correct pointer now.</span>
01289         <span class="comment">// Init UL circular list to me</span>
01290         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= <span class="keyword">this</span>;
01291         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= <span class="keyword">this</span>;
01292 
01293 
01294         <span class="comment">// Once the patch is inserted and compiled in a zone, it is ready to be rendered.</span>
01295         <span class="comment">// init the MasterBlock.</span>
01296         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.init(<span class="keyword">this</span>);
01297 
01298         <span class="comment">// only 65536 patch per zone allowed.</span>
01299         <a class="code" href="a04199.html#a6">nlassert</a>(patchId&lt;0x10000);
01300         <a class="code" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a>= (<a class="code" href="a04558.html#a9">uint16</a>)patchId;
01301 
01302         <span class="keywordflow">if</span>(errorSize==0)
01303                 <a class="code" href="a03057.html#NL3D_1_1CPatchd7">computeDefaultErrorSize</a>();
01304         <span class="keywordflow">else</span>
01305                 <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>= errorSize;
01306 
01307         <a class="code" href="a04199.html#a6">nlassert</a>(orderS==2 || orderS==4 || orderS==8 || orderS==16);
01308         <a class="code" href="a04199.html#a6">nlassert</a>(orderT==2 || orderT==4 || orderT==8 || orderT==16);
01309         <a class="code" href="a04199.html#a6">nlassert</a> (OrderS==orderS);
01310         <a class="code" href="a04199.html#a6">nlassert</a> (OrderT==orderT);
01311 
01312         <span class="comment">// Compile additional infos.</span>
01313         <a class="code" href="a04558.html#a14">sint</a>    ps= <a class="code" href="a05378.html#a263">getPowerOf2</a>(orderS) , pt= <a class="code" href="a05378.html#a263">getPowerOf2</a>(orderT);
01314         <a class="code" href="a04558.html#a14">sint</a>    pmin= <a class="code" href="a04061.html#a0">min</a>(ps,pt);
01315         <a class="code" href="a04558.html#a14">sint</a>    pmax= max(ps,pt);
01316         <span class="comment">// Rectangular patch OK.</span>
01317         <span class="comment">// Work, since patch 1xX are illegal. =&gt; The TileLimitLevel is at least 2 level distant from the time where</span>
01318         <span class="comment">// the rectangular patch is said "un-rectangular-ed" (tesselation looks like square). Hence, there is no problem</span>
01319         <span class="comment">// with rectangular UV geomorph (well don't bother me, make a draw :) ).</span>
01320         <a class="code" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a>= pmin*2 + pmax-pmin;
01321         <span class="comment">// A TessBlock is a 2*2 tile. This simple formula works because patch 1xX are illegal.</span>
01322         <a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a>-2;
01323         <span class="comment">// This tell us when the tess face is "un-rectangular-ed" (to say a square). Before, it is a "rectangular" face, </span>
01324         <span class="comment">// which has a strange fxxxxxg split.</span>
01325         <span class="comment">// If patch is square, then SquareLimitLevel=0 (ok!!).</span>
01326         <a class="code" href="a03057.html#NL3D_1_1CPatchr25">SquareLimitLevel</a>= pmax-pmin;
01327 
01328         <span class="comment">// Bind vertices, to zone base vertices.</span>
01329         <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]= baseVertices[0];
01330         <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]= baseVertices[1];
01331         <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]= baseVertices[2];
01332         <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]= baseVertices[3];
01333 
01334         <span class="comment">// build Sons.</span>
01335         <a class="code" href="a03057.html#NL3D_1_1CPatchd28">makeRoots</a>();
01336 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha4" doxytag="NL3D::CPatch::computeContinousVertex" ></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> NL3D::CPatch::computeContinousVertex </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Same as computeVertex, but special accurate version for <a class="el" href="a03705.html">CVisualCollisionEntity</a>. If on a corner of the patch (0,0), (0,1) ...., take directly the BaseVertices[] result if on a border of a patch (ie s==0, s==1, t==0 or t==1), also compute the vertex of the neighbor patch (if any), and then average the result. This ensure that tesselation generated is perfectly continous, even across patchs of same or different zones. This feature is very important for <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya9">CVisualCollisionEntity::snapToGround()</a>
<p>
Definition at line <a class="el" href="a06155.html#l01363">1363</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</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="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
<div class="fragment"><pre>01364 {
01365         <span class="comment">// must be compiled</span>
01366         <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
01367 
01368         <span class="comment">// Test is on a edge/corner of the patch</span>
01369         <a class="code" href="a04558.html#a14">sint</a>    edgeIdS= -1;
01370         <a class="code" href="a04558.html#a14">sint</a>    edgeIdT= -1;
01371         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==0)                edgeIdS= 0;
01372         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==1)   edgeIdS= 2;
01373         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==0)                edgeIdT= 3;
01374         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==1)   edgeIdT= 1;
01375 
01376         <span class="comment">// test if on a corner</span>
01377         <span class="keywordflow">if</span>(edgeIdS&gt;=0 &amp;&amp; edgeIdT&gt;=0)
01378         {
01379                 <span class="comment">// return the baseVertex according to edge falgs</span>
01380                 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==3)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]-&gt;EndPos;
01381                 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==1)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]-&gt;EndPos;
01382                 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==1)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]-&gt;EndPos;
01383                 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==3)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]-&gt;EndPos;
01384                 <a class="code" href="a04199.html#a12">nlstop</a>;
01385                 <span class="comment">// Error, but Avoid warning</span>
01386                 <span class="keywordflow">return</span> CVector::Null;
01387         }
01388         <span class="comment">// test if on an edge</span>
01389         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(edgeIdS&gt;=0 || edgeIdT&gt;=0)
01390         {
01391                 <span class="comment">// Yes, must compute myslef</span>
01392                 CVector         vertexOnMe= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s,t);
01393 
01394                 <span class="comment">// Then, must compute my neighbor.</span>
01395                 <a class="code" href="a04558.html#a14">sint</a>    edgeId;
01396                 <span class="keywordflow">if</span>(edgeIdS&gt;=0)
01397                         edgeId= edgeIdS;
01398                 <span class="keywordflow">else</span>
01399                         edgeId= edgeIdT;
01400 
01401                 <span class="comment">// Get my neighbor, if any.</span>
01402                 CBindInfo       bindInfo;
01403                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeId, bindInfo);
01404                 <span class="comment">// Fast reject: if no neighbor on the edge, just return my pos.</span>
01405                 <span class="keywordflow">if</span>(!bindInfo.Zone)
01406                 {
01407                         <span class="keywordflow">return</span> vertexOnMe;
01408                 }
01409                 <span class="comment">// else must get vertex pos of my neighbor, and average.</span>
01410                 <span class="keywordflow">else</span>
01411                 {
01412                         <span class="comment">// use a CPatchUVLocator to get UV in neighbor patch</span>
01413                         CPatchUVLocator         uvLocator;
01414                         uvLocator.build(<span class="keyword">this</span>, edgeId, bindInfo);
01415 
01416                         <span class="comment">// UVlocator use OrderS/OrderT coordinate system.</span>
01417                         <a class="code" href="a03660.html">CVector2f</a>       stTileIn, stTileOut;
01418                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>= <a class="code" href="a04223.html#a626">s</a> * <a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>();
01419                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>= <a class="code" href="a04223.html#a627">t</a> * <a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>();
01420 
01421                         <span class="comment">// transform coordinate to get into the neigbhor patch</span>
01422                         <a class="code" href="a04558.html#a15">uint</a>    pid= uvLocator.selectPatch(stTileIn);
01423                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>  *nebPatch;
01424                         uvLocator.locateUV(stTileIn, pid, nebPatch, stTileOut);
01425 
01426                         <span class="comment">// transform neigbhor coord in 0..1 coordinate space.</span>
01427                         stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= nebPatch-&gt;getOrderS();
01428                         stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= nebPatch-&gt;getOrderT();
01429 
01430                         <span class="comment">// and compute vertex. NB: if binded on 2 or 4 patch, it is then possible that stTileOut is on a</span>
01431                         <span class="comment">// a corner ( (0,0), (0,1) ...).</span>
01432                         <span class="comment">// In this case, we must use the precomputed Vertex pos, for completeness.</span>
01433                         <span class="keywordtype">bool</span>            onCorner;
01434                         CVector         vertexOnNeb= nebPatch-&gt;computeVertexButCorner(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, onCorner);
01435 
01436                         <span class="comment">// If the neighbor is on a corner, then use its corner value.</span>
01437                         <span class="keywordflow">if</span>(onCorner)
01438                                 <span class="keywordflow">return</span> vertexOnNeb;
01439                         <span class="keywordflow">else</span>
01440                         {
01441                                 <span class="comment">// Average the 2 and return this result.</span>
01442                                 vertexOnMe+= vertexOnNeb;
01443                                 vertexOnMe/= 2;
01444                                 <span class="keywordflow">return</span> vertexOnMe;
01445                         }
01446                 }
01447 
01448         }
01449         <span class="comment">// else, std case</span>
01450         <span class="keywordflow">else</span>
01451                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s, t);
01452 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz645_1" doxytag="NL3D::CPatch::computeCurrentTLILightmapDiv2" ></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::CPatch::computeCurrentTLILightmapDiv2 </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>array</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
For <a class="el" href="a03498.html">CTextureFar</a>, compute current TLI Lightmap at tile level. array should be allocated of at least sqr(NL_MAX_TILES_BY_PATCH_EDGE+1).
<p>
Definition at line <a class="el" href="a06157.html#l01805">1805</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>.
<p>
<div class="fragment"><pre>01806 {
01807         <span class="comment">// Size of TileLightInfluences</span>
01808         <a class="code" href="a04558.html#a15">uint</a>    wTLI= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1)+1;
01809         <a class="code" href="a04558.html#a15">uint</a>    hTLI= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1)+1;
01810         <span class="comment">// colros at corners of tiles size.</span>
01811         <a class="code" href="a04558.html#a15">uint</a>    wTC= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>+1;
01812         <a class="code" href="a04558.html#a15">uint</a>    wTCx2= wTC*2;
01813         <a class="code" href="a04558.html#a15">uint</a>    hTC= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>+1;
01814         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
01815 
01816         <span class="comment">// Compute TLI colors at each corner of each TessBlocks.</span>
01817         <span class="comment">//=============</span>
01818         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTLI;<a class="code" href="a04223.html#a573">y</a>++)
01819         {
01820                 <span class="comment">// store every 2 tiles corners.</span>
01821                 <a class="code" href="a03337.html">CRGBA</a>   *dst= array + <a class="code" href="a04223.html#a573">y</a>*2*wTC;
01822                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTLI;<a class="code" href="a04223.html#a572">x</a>++)
01823                 {
01824                         *dst= getCurrentTLIColor(x, y);
01825                         dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> &gt;&gt;= 1;
01826                         dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> &gt;&gt;= 1;
01827                         dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> &gt;&gt;= 1;
01828                         <span class="comment">// skip 2 tiles corners.</span>
01829                         dst++;
01830                         dst++;
01831                 }
01832         }
01833 
01834         <span class="comment">// Compute TLI colors at each corner of each Tiles.</span>
01835         <span class="comment">//=============</span>
01836 
01837         <span class="comment">// Compute corner at middle of vertical TessBlock edges.</span>
01838         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTC-1;<a class="code" href="a04223.html#a573">y</a>+=2)
01839         {
01840                 <a class="code" href="a03337.html">CRGBA</a>   *dst= array + <a class="code" href="a04223.html#a573">y</a>*wTC;
01841                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTC;<a class="code" href="a04223.html#a572">x</a>+=2)
01842                 {
01843                         <span class="comment">// Average midlle with cur and next.</span>
01844                         (dst+wTC)-&gt;avg2RGBOnly(*dst, *(dst + wTCx2) );
01845 
01846                         <span class="comment">// skip 2 tiles corners.</span>
01847                         dst++;
01848                         dst++;
01849                 }
01850         }
01851 
01852         <span class="comment">// Compute corner at middle of horizontal TessBlock edges, and at middle of TessBlock.</span>
01853         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTC;<a class="code" href="a04223.html#a573">y</a>++)
01854         {
01855                 <a class="code" href="a03337.html">CRGBA</a>   *dst= array + <a class="code" href="a04223.html#a573">y</a>*wTC;
01856                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTC-1;<a class="code" href="a04223.html#a572">x</a>+=2)
01857                 {
01858                         <span class="comment">// Average midlle with cur and next.</span>
01859                         (dst+1)-&gt;avg2RGBOnly(*dst, *(dst+2));
01860 
01861                         <span class="comment">// skip 2 tiles corners.</span>
01862                         dst++;
01863                         dst++;
01864                 }
01865         }
01866 
01867 
01868 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd7" doxytag="NL3D::CPatch::computeDefaultErrorSize" ></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::CPatch::computeDefaultErrorSize </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>

<p>
Definition at line <a class="el" href="a06155.html#l00206">206</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>.
<p>
<div class="fragment"><pre>00207 {
00208         CBezierPatch    &amp;p= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00209         CVector                 &amp;v0= p.Vertices[0];
00210         CVector                 &amp;v1= p.Vertices[1];
00211         CVector                 &amp;v2= p.Vertices[2];
00212 
00213         <span class="comment">// \todo yoyo: TODO_NOISE: modulate this value with tangents (roundiness of patch), and with the displacement map.</span>
00214         <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>= ((v1 - v0)^(v2 - v0)).norm();
00215 
00216 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_0" doxytag="NL3D::CPatch::computeDisplaceCornerSmooth" ></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 NL3D::CPatch::computeDisplaceCornerSmooth </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderY</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
<p>
Definition at line <a class="el" href="a06158.html#l00471">471</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</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="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
<p>
<div class="fragment"><pre>00472 {
00473         <span class="comment">// compute the value across the corner (enjoy!!)</span>
00474         <span class="comment">// NB: Only corners with Edges==4 and corners on a bind are correclty supported.</span>
00475         <span class="comment">// ignore problems with corner which nbEdges!=4, because Blend of normals blend to 0 on corner (see computenoise()).</span>
00476 
00477         <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
00478         <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
00479         CBindInfo       bindInfoX;
00480         CBindInfo       bindInfoY;
00481         <a class="code" href="a04558.html#a15">uint</a>            edgeX=0;
00482         <a class="code" href="a04558.html#a15">uint</a>            edgeY=0;
00483 
00484         <span class="comment">// both must be not null</span>
00485         <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX!=0) &amp;&amp; (smoothBorderY!=0) );
00486 
00487 
00488         <span class="comment">// Get the edge against we must share displace.</span>
00489         <span class="keywordflow">if</span>(smoothBorderX==-1)   edgeX=0;
00490         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       edgeX=2;
00491         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00492         <span class="keywordflow">if</span>(smoothBorderY==1)    edgeY=1;
00493         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      edgeY=3;
00494         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00495 
00496         <span class="comment">// Build the bindInfo against those 2 edge.</span>
00497         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeX, bindInfoX);
00498         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeY, bindInfoY);
00499 
00500         <span class="comment">// Fast reject: if no neighbor on one of the edge, just do a simple computeDisplaceInteriorSmooth.</span>
00501         <span class="keywordflow">if</span>(!bindInfoX.Zone || !bindInfoY.Zone)
00502                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(s, t);
00503         <span class="keywordflow">else</span>
00504         {
00505                 <span class="keywordtype">float</span>   ret;
00506 
00507 
00508                 <span class="comment">// compute bi-linear weight factors.</span>
00509                 <span class="keywordtype">float</span>   sInc, tInc, sa, ta, sa1, ta1;
00510                 <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
00511                 <span class="comment">// Manage limit case: if bilinear has not chosen the good direction (because of floor and orientation).</span>
00512                 <span class="comment">// eg on Right edge: This case arise if sDecimal==0, so if sa==sa1==0.5f. result is that</span>
00513                 <span class="comment">// smoothBorderX is != than sInc on right border. same reasoning with downBorder (smoothBorderY=1).</span>
00514 
00515                 <span class="comment">// NO NEED TO DO HERE, because sInc or tInc are not used at all.</span>
00516 
00517 
00518 
00519                 <span class="comment">// compute Neighboring info.</span>
00520                 CPatchUVLocator         uvLocatorX;
00521                 CPatchUVLocator         uvLocatorY;
00522                 uvLocatorX.build(<span class="keyword">this</span>, edgeX, bindInfoX);
00523                 uvLocatorY.build(<span class="keyword">this</span>, edgeY, bindInfoY);
00524 
00525 
00526                 <span class="comment">/* NB: see floor problems note in computeDisplaceEdgeSmooth();</span>
00527 <span class="comment">                */</span>
00528                 sTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile) + 0.5f;
00529                 tTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile) + 0.5f;
00530                 <span class="comment">// If we were exactly on the superior edge, prec compute is false... so correct this here.</span>
00531                 <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) sTile--;
00532                 <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) tTile--;
00533 
00534 
00535                 <span class="comment">// Bilinear across a corner.</span>
00536                 <a class="code" href="a03660.html">CVector2f</a>       stTileIn, stIn;
00537                 <a class="code" href="a03660.html">CVector2f</a>       stTileOut, stOut;
00538                 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00539                 <a class="code" href="a04558.html#a15">uint</a>            patchId;
00540 
00541 
00542                 <span class="comment">// compute contribution of our patch.</span>
00543                 ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile, s,t) * sa * ta;
00544 
00545                 <span class="comment">// compute contribution of the patch on the left/right side. same reasoning as in computeDisplaceEdgeSmooth();</span>
00546                 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00547                 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile);
00548                 patchId= uvLocatorX.selectPatch(stTileIn);
00549                 uvLocatorX.locateUV(stTileIn, patchId, patchOut, stTileOut);
00550                 uvLocatorX.locateUV(stIn, patchId, patchOut, stOut);
00551                 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta;
00552 
00553 
00554                 <span class="comment">// compute contribution of the patch on the up/down side. same reasoning as in computeDisplaceEdgeSmooth();</span>
00555                 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00556                 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile+smoothBorderY);
00557                 patchId= uvLocatorY.selectPatch(stTileIn);
00558                 uvLocatorY.locateUV(stTileIn, patchId, patchOut, stTileOut);
00559                 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
00560                 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa * ta1;
00561 
00562 
00563                 <span class="comment">/* compute contribution of the patch adjacent to me.</span>
00564 <span class="comment">                        There is multiple case to consider here. Take example with corner=0 (ie smBdX=smBdY=-1):</span>
00565 <span class="comment">                                - if we are a normal corner with 4 edges, take the result from the left patch of our top patch.</span>
00566 <span class="comment">                                - if the corner is on a bind Edge, the top patch may be the bigger patch, so don't take the result</span>
00567 <span class="comment">                                        from his neighbor (of course).</span>
00568 <span class="comment">                                - if we are a normal corner with N!=4 edges, just do same thing than if N==4. this is false but don't bother.</span>
00569 <span class="comment"></span>
00570 <span class="comment">                        To solve smoothly cases 1 and 2, use computeDisplaceRawOnNeighbor().</span>
00571 <span class="comment">                        This method, if nessecary, look on his neighbor to compute the value.</span>
00572 <span class="comment">                */</span>
00573                 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00574                 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile+smoothBorderY);
00575                 <span class="comment">// look on our "top" patch (this is arbitrary).</span>
00576                 patchId= uvLocatorY.selectPatch(stTileIn);
00577                 uvLocatorY.locateUV(stTileIn, patchId, patchOut, stTileOut);
00578                 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
00579                 ret+= patchOut-&gt;computeDisplaceRawOnNeighbor(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
00580 
00581 
00582                 <span class="keywordflow">return</span> ret;
00583         }
00584 
00585 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_1" doxytag="NL3D::CPatch::computeDisplaceEdgeSmooth" ></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 NL3D::CPatch::computeDisplaceEdgeSmooth </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderY</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on edge.
<p>
Definition at line <a class="el" href="a06158.html#l00288">288</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</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="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
<p>
<div class="fragment"><pre>00289 {
00290         <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
00291         <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
00292         CBindInfo       bindInfo;
00293         <a class="code" href="a04558.html#a15">uint</a>            edge=0;
00294 
00295         <span class="comment">// only one must be not null</span>
00296         <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX==0) != (smoothBorderY==0) );
00297 
00298 
00299         <span class="comment">// Get the edge against we must share displace.</span>
00300         <span class="keywordflow">if</span>(smoothBorderX==-1)   edge=0;
00301         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1)       edge=1;
00302         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       edge=2;
00303         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      edge=3;
00304         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00305 
00306         <span class="comment">// Build the bindInfo against this edge.</span>
00307         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00308 
00309         <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
00310         <span class="keywordflow">if</span>(!bindInfo.Zone)
00311                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(s, t);
00312         <span class="comment">// else, look for result in neighborhood.</span>
00313         <span class="keywordflow">else</span>
00314         {
00315                 <span class="keywordtype">float</span>   ret;
00316 
00317 
00318                 <span class="comment">// compute bi-linear weight factors.</span>
00319                 <span class="keywordtype">float</span>   sInc, tInc, sa, ta, sa1, ta1;
00320                 <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
00321                 <span class="comment">// Manage limit case: if bilinear has not chosen the good direction (because of floor and orientation).</span>
00322                 <span class="comment">// eg on Right edge: This case arise if sDecimal==0, so if sa==sa1==0.5f. result is that</span>
00323                 <span class="comment">// smoothBorderX is != than sInc on right border. same reasoning with downBorder (smoothBorderY=1).</span>
00324 
00325                 <span class="comment">// NO NEED TO DO HERE, because sInc or tInc is not used if it is bad (smoothBorder? used instead).</span>
00326                 <span class="comment">// and no need to correct sa, sa1, because in this case they are both equal to 0.5.</span>
00327 
00328 
00329                 <span class="comment">// compute Neighboring info.</span>
00330                 CPatchUVLocator         uvLocator;
00331                 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00332 
00333                 <span class="comment">/* NB: there is floor problems with neighbors:</span>
00334 <span class="comment">                        - difference of orientation =&gt; uv.v=1. This point to the 1th tile. But this is not the same, if</span>
00335 <span class="comment">                                v goes to up, or goes to down.</span>
00336 <span class="comment">                        - if multiple bind, problem at limit (eg a bind 1/2 on edge 0 with OrdertT=8, when uv.v= 4).</span>
00337 <span class="comment">                                because, selection of the patch is dependent of orientation too.</span>
00338 <span class="comment">                        To avoid them, just take center of (sTile, tTile) to remove ambiguity.</span>
00339 <span class="comment">                        This works because computeDisplaceRaw() use sTile, tTile to get the noiseMap, so the decimal part is not </span>
00340 <span class="comment">                        used.</span>
00341 <span class="comment"></span>
00342 <span class="comment">                        Notice that we do this AFTER computeDisplaceBilinear() of course.</span>
00343 <span class="comment">                */</span>
00344                 sTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile) + 0.5f;
00345                 tTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile) + 0.5f;
00346                 <span class="comment">// If we were exactly on the superior edge, prec compute is false... so correct this here.</span>
00347                 <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) sTile--;
00348                 <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) tTile--;
00349 
00350 
00351                 <span class="comment">// Bilinear across an edge (enjoy!!).</span>
00352                 <a class="code" href="a03660.html">CVector2f</a>       stTileIn, stIn;
00353                 <a class="code" href="a03660.html">CVector2f</a>       stTileOut, stOut;
00354                 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00355                 <a class="code" href="a04558.html#a15">uint</a>            patchId;
00356 
00357 
00358                 <span class="comment">// if vertical edge.</span>
00359                 <span class="keywordflow">if</span>(smoothBorderX!=0)
00360                 {
00361                         <span class="comment">// compute contribution of our patch.</span>
00362                         ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile, s,t) * sa * ta;
00363                         ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile+tInc, s,t) * sa * ta1;
00364 
00365                         <span class="comment">// compute contribution of next(s) patchs.</span>
00366 
00367                         <span class="comment">// contribution of next at tTile.</span>
00368                         <span class="comment">// Keep the same coordinate.</span>
00369                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00370                         <span class="comment">// But look for the neighbor noise tile.</span>
00371                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile);
00372                         <span class="comment">// change basis: find the s,t on the neighbor patch.</span>
00373                         patchId= uvLocator.selectPatch(stTileIn);
00374                         uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
00375                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00376                         <span class="comment">// Compute displace, and bi-linear on the neighbor patch.</span>
00377                         ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta;
00378 
00379                         <span class="comment">// contribution of next at tTile+tInc (same reasoning).</span>
00380                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00381                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile+tInc);
00382                         patchId= uvLocator.selectPatch(stTileIn);
00383                         uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
00384                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00385                         ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
00386 
00387                 }
00388                 <span class="comment">// else if horizontal edge.</span>
00389                 <span class="keywordflow">else</span>
00390                 {
00391                         <span class="comment">// same reasoning as above.</span>
00392 
00393                         <span class="comment">// compute contribution of our patch.</span>
00394                         ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s,t) * sa * ta;
00395                         ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile+sInc,tTile, s,t) * sa1 * ta;
00396 
00397                         <span class="comment">// compute contribution of next(s) patchs.</span>
00398                         <span class="comment">// contribution of next at tTile.</span>
00399                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00400                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile+smoothBorderY);
00401                         patchId= uvLocator.selectPatch(stTileIn);
00402                         uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
00403                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00404                         ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa * ta1;
00405 
00406                         <span class="comment">// contribution of next at tTile+tInc (same reasoning).</span>
00407                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00408                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+sInc, tTile+smoothBorderY);
00409                         patchId= uvLocator.selectPatch(stTileIn);
00410                         uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
00411                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00412                         ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
00413                 }
00414 
00415                 <span class="keywordflow">return</span> ret;
00416         }
00417 
00418 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_2" doxytag="NL3D::CPatch::computeDisplaceInteriorSmooth" ></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 NL3D::CPatch::computeDisplaceInteriorSmooth </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).
<p>
Definition at line <a class="el" href="a06158.html#l00258">258</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, and <a class="el" href="a06158.html#l00874">computeNoise()</a>.
<p>
<div class="fragment"><pre>00259 {
00260         <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
00261         <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
00262         <span class="keywordtype">float</span>   ret;
00263 
00264         <span class="comment">// compute bi-linear weight factors.</span>
00265         <span class="keywordtype">float</span>   sInc, tInc, sa, ta, sa1, ta1;
00266         <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
00267 
00268 
00269         <span class="comment">// NB: to have smooth transition, must keep the same (s,t), so we do a transition with the noise tile of </span>
00270         <span class="comment">// our neigbhor, but under us.</span>
00271 
00272         <span class="comment">// speed up, using just one computeDisplaceRawCoordinates(), and multiple computeDisplaceRawInteger().</span>
00273         <a class="code" href="a04558.html#a14">sint</a>    ts,tt,ms,mt;
00274         <a class="code" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a>(sTile, tTile, s, t, ts, tt, ms, mt);
00275 
00276         <a class="code" href="a04558.html#a14">sint</a>    sIncInt= (<a class="code" href="a04558.html#a14">sint</a>) sInc;
00277         <a class="code" href="a04558.html#a14">sint</a>    tIncInt= (<a class="code" href="a04558.html#a14">sint</a>) tInc;
00278         ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt, ms,mt) * sa * ta;
00279         ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts+sIncInt, tt, ms,mt) * sa1 * ta;
00280         ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt+tIncInt, ms,mt) * sa * ta1;
00281         ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts+sIncInt, tt+tIncInt, ms,mt) * sa1 * ta1;
00282 
00283         <span class="keywordflow">return</span> ret;
00284 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_3" doxytag="NL3D::CPatch::computeDisplaceRaw" ></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 NL3D::CPatch::computeDisplaceRaw </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>sTile</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>tTile</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>s</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>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the displacement for s,t ([0;OrderS], [0;OrderT]) (sTile, tTile) choose what NoiseMap to use, and (s,t) choose the coordinate in the patch to compute this NoiseMap. Any rotation of the NoiseMap is included in this method. NB: s,t does not have to be clamped to ([0;OrderS], [0;OrderT]).
<p>
Definition at line <a class="el" href="a06158.html#l00219">219</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, and <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>.
<p>
<div class="fragment"><pre>00220 {
00221         <a class="code" href="a04558.html#a14">sint</a>    ts,tt,ms,mt;
00222         <a class="code" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a>(sTile, tTile, s, t, ts, tt, ms, mt);
00223         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt, ms, mt);
00224 
00225 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_4" doxytag="NL3D::CPatch::computeDisplaceRawCoordinates" ></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::CPatch::computeDisplaceRawCoordinates </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>sTile</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>tTile</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>ts</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>ms</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mt</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
<p>
Definition at line <a class="el" href="a06158.html#l00168">168</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06549.html#l00040">NL3D_TILE_NOISE_MAP_SIZE</a>, <a class="el" href="a06549.html#l00038">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, and <a class="el" href="a05646.html#l00237">v</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, and <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>.
<p>
<div class="fragment"><pre>00170 {
00171         <span class="comment">// Choose the noiseMap.</span>
00172         <span class="comment">// ===============================</span>
00173         <span class="comment">// Compute coordinate in the patch.</span>
00174         ts= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile);
00175         tt= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile);
00176 
00177 
00178         <span class="comment">// Sample the noiseMap with (s,t).</span>
00179         <span class="comment">// ===============================</span>
00180 
00181         <span class="comment">// scale the map.</span>
00182         <span class="keywordtype">float</span>   u= <a class="code" href="a04223.html#a626">s</a> * <a class="code" href="a05126.html#a0">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>;
00183         <span class="keywordtype">float</span>   <a class="code" href="a04223.html#a576">v</a>= <a class="code" href="a04223.html#a627">t</a> * <a class="code" href="a05126.html#a0">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>;
00184 
00185         <span class="comment">// Speed rotation.</span>
00186         CUV             uv;
00187         <span class="keywordflow">switch</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a> &amp; 3)
00188         {
00189                 <span class="keywordflow">case</span> 0: 
00190                         uv.U= u;
00191                         uv.V= <a class="code" href="a04223.html#a576">v</a>;
00192                         <span class="keywordflow">break</span>;
00193                 <span class="keywordflow">case</span> 1: 
00194                         uv.U= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-<a class="code" href="a04223.html#a576">v</a>;
00195                         uv.V= u;
00196                         <span class="keywordflow">break</span>;
00197                 <span class="keywordflow">case</span> 2: 
00198                         uv.U= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-u;
00199                         uv.V= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-<a class="code" href="a04223.html#a576">v</a>;
00200                         <span class="keywordflow">break</span>;
00201                 <span class="keywordflow">case</span> 3: 
00202                         uv.U= <a class="code" href="a04223.html#a576">v</a>;
00203                         uv.V= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-u;
00204                         <span class="keywordflow">break</span>;
00205         }
00206 
00207         <span class="comment">// direct map (no bilinear, no round, the case where s,t &lt; 1/4 of a tile is very rare).</span>
00208         ms= <a class="code" href="a05363.html#a450">noiseFloor</a>(uv.U);
00209         mt= <a class="code" href="a05363.html#a450">noiseFloor</a>(uv.V);
00210 
00211         <span class="comment">// Manage Tiling (add NL3D_TILE_NOISE_MAP_SIZE*1 should be sufficient, but take margin).</span>
00212         ms= (ms + (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*256)) &amp; (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-1);
00213         mt= (mt + (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*256)) &amp; (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-1);
00214 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_5" doxytag="NL3D::CPatch::computeDisplaceRawInteger" ></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 NL3D::CPatch::computeDisplaceRawInteger </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>ts</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>ms</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>mt</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
<p>
Definition at line <a class="el" href="a06158.html#l00136">136</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06760.html#l00461">NL3D::CZone::getLandscape()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a06156.html#l00089">NL3D_NOISE_MAX</a>, <a class="el" href="a06549.html#l00040">NL3D_TILE_NOISE_MAP_SIZE</a>, <a class="el" href="a06549.html#l00055">NL3D::CTileNoiseMap::Pixels</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05863.html#l00145">NL3D::CLandscape::TileBank</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, and <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>.
<p>
<div class="fragment"><pre>00137 {
00138         <span class="comment">// Choose the noiseMap.</span>
00139         <span class="comment">// ===============================</span>
00140         <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, OrderS-1);
00141         <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, OrderT-1);
00142 
00143         <a class="code" href="a04558.html#a15">uint</a>    tileId= tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts;
00144         <span class="comment">// Get the tile for pass0. This is the principal tile, and this one tells what noise to take.</span>
00145         <a class="code" href="a04558.html#a14">sint</a>    tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[0];
00146         <span class="comment">// Get the subNoise from tileElement.</span>
00147         <a class="code" href="a04558.html#a15">uint</a>    tileSubNoise= Tiles[tileId].getTileSubNoise();
00148 
00149         <span class="comment">// retrieve the wanted noiseMap.</span>
00150         CTileNoiseMap   *noiseMap;
00151         noiseMap = <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;getLandscape()-&gt;TileBank.getTileNoiseMap (tileNumber, tileSubNoise);
00152 
00153         <span class="keywordflow">if</span> (noiseMap == NULL)
00154                 <span class="keywordflow">return</span> 0.0f;
00155 
00156         <span class="comment">// Sample the noiseMap with (s,t).</span>
00157         <span class="comment">// ===============================</span>
00158 
00159         <span class="comment">// sample from map.</span>
00160         <a class="code" href="a04558.html#a6">sint8</a>   pix= noiseMap-&gt;Pixels[mt*<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a> + ms];
00161 
00162         <span class="comment">// normalize.</span>
00163         <span class="keywordflow">return</span>  (<span class="keywordtype">float</span>)pix * (<a class="code" href="a04733.html#a11">NL3D_NOISE_MAX</a> / 127.f);
00164 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_6" doxytag="NL3D::CPatch::computeDisplaceRawOnNeighbor" ></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 NL3D::CPatch::computeDisplaceRawOnNeighbor </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>sTile</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>tTile</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>s</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>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
usefull only for <a class="el" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth()</a>. This method, if nessecary (ie sTile or tTile &lt;0 or &gt;Order), look on his neighbor to compute the value.
<p>
Definition at line <a class="el" href="a06158.html#l00422">422</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</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="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>.
<p>
<div class="fragment"><pre>00423 {
00424         <a class="code" href="a04558.html#a14">sint</a>    edge= -1;
00425 
00426         <span class="comment">// look on what neighbor patch we must find the value (if any).</span>
00427         <span class="keywordflow">if</span>(sTile&lt;0)     edge=0;
00428         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)   edge=1;
00429         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>)   edge=2;
00430         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(tTile&lt;0)                edge=3;
00431 
00432         <span class="comment">// If the location is In the patch, just return normal value.</span>
00433         <span class="keywordflow">if</span>(edge==-1)
00434                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s, t);
00435         <span class="comment">// else must find on neighbor.</span>
00436         <span class="keywordflow">else</span>
00437         {
00438                 CBindInfo       bindInfo;
00439                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00440 
00441                 <span class="comment">// Fast reject: if no neighbor on the edge, just do a simple computeDisplaceRaw()</span>
00442                 <span class="keywordflow">if</span>(!bindInfo.Zone)
00443                 {
00444                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s, t);
00445                 }
00446                 <span class="comment">// else must find on neighbor.</span>
00447                 <span class="keywordflow">else</span>
00448                 {
00449                         CPatchUVLocator         uvLocator;
00450                         uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00451 
00452                         <a class="code" href="a03660.html">CVector2f</a>       stTileIn, stIn;
00453                         <a class="code" href="a03660.html">CVector2f</a>       stTileOut, stOut;
00454                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00455                         <a class="code" href="a04558.html#a15">uint</a>            patchId;
00456 
00457                         <span class="comment">// look on neighbor. same reasoning as in computeDisplaceEdgeSmooth();</span>
00458                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00459                         stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile);
00460                         patchId= uvLocator.selectPatch(stTileIn);
00461                         uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
00462                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00463                         <span class="keywordflow">return</span> patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>);
00464                 }
00465 
00466         }
00467 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd8" doxytag="NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB" ></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::CPatch::computeGeomorphAlphaFar1VertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01329">1329</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
<p>
<div class="fragment"><pre>01330 {
01331         <span class="comment">// Traverse the vertList.</span>
01332         CTessFarVertex  *pVert;
01333         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01334         {
01335                 <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01336                 <span class="comment">// Compute/build the new vertex.</span>
01337                 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
01338                 CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
01339 
01340                 <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
01341 
01342                 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
01343                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
01344 
01345                 <span class="comment">// Set Alpha color.</span>
01346                 <span class="keyword">static</span> <a class="code" href="a03337.html">CRGBA</a>    col(255,255,255,255);
01347                 <span class="comment">// For Far1, use alpha fro transition.</span>
01348                 <span class="comment">// Prefer Use Pos, because of caching. So little difference between Soft and VertexProgram mode.</span>
01349                 <span class="keywordtype">float</span>   f= (pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::RefineCenter).sqrnorm();
01350                 f= (f-<a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>) * <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>;
01351                 <a class="code" href="a05378.html#a374">clamp</a>(f,0,1);
01352                 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= (<a class="code" href="a04558.html#a7">uint8</a>)(f*255);
01353                 *(<a class="code" href="a03337.html">CRGBA</a>*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.ColorOff)= col;
01354         }
01355 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd9" doxytag="NL3D::CPatch::computeGeomorphFar0VertexListVB" ></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::CPatch::computeGeomorphFar0VertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01311">1311</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
<p>
<div class="fragment"><pre>01312 {
01313         <span class="comment">// Traverse the vertList.</span>
01314         CTessFarVertex  *pVert;
01315         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01316         {
01317                 <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01318                 <span class="comment">// Compute/build the new vertex.</span>
01319                 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
01320                 CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
01321 
01322                 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
01323                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
01324         }
01325 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd10" doxytag="NL3D::CPatch::computeGeomorphTileVertexListVB" ></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::CPatch::computeGeomorphTileVertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01359">1359</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
<p>
<div class="fragment"><pre>01360 {
01361         <span class="comment">// Traverse the vertList.</span>
01362         CTessNearVertex *pVert;
01363         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
01364         {
01365                 <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01366                 <span class="comment">// Compute/build the new vertex.</span>
01367                 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentTileVBInfo.VertexCoordPointer;
01368                 CurVBPtr+= pVert-&gt;Index * CLandscapeGlobals::CurrentTileVBInfo.VertexSize;
01369 
01370                 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
01371                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
01372         }
01373 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd11" doxytag="NL3D::CPatch::computeGeomorphVertexList" ></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::CPatch::computeGeomorphVertexList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01298">1298</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06497.html#l00113">NL3D::CTessVertex::computeGeomPos()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
<p>
<div class="fragment"><pre>01299 {
01300         <span class="comment">// Traverse the vertList.</span>
01301         CTessFarVertex  *pVert;
01302         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01303         {
01304                 <span class="comment">// compute geomorph.</span>
01305                 pVert-&gt;Src-&gt;computeGeomPos();
01306         }
01307 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_3" doxytag="NL3D::CPatch::computeNearBlockLightmap" ></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::CPatch::computeNearBlockLightmap </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>lightText</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>

<p>
Definition at line <a class="el" href="a06157.html#l00864">864</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>, <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06156.html#l00579">getSmoothFlag()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06166.html#l00066">NL3D::CPatchUVLocator::sameEdgeOrder()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, and <a class="el" href="a06157.html#l01909">updateTessBlockLighting()</a>.
<p>
<div class="fragment"><pre>00865 {
00866         <a class="code" href="a04558.html#a14">sint</a>    ts= uts;
00867         <a class="code" href="a04558.html#a14">sint</a>    tt= utt;
00868 
00869         <span class="comment">// hardcoded for 10x10.</span>
00870         <a class="code" href="a04199.html#a6">nlassert</a>(NL_TILE_LIGHTMAP_SIZE==10);
00871         <a class="code" href="a03337.html">CRGBA</a>   *dest;
00872         <a class="code" href="a04558.html#a15">uint</a>    edge;
00873         <a class="code" href="a04558.html#a15">uint</a>    corner;
00874 
00875         <span class="comment">// Compute center of the TessBlock: the 2x2 tiles.</span>
00876         <span class="comment">//=================</span>
00877         <span class="comment">// compute tile 0,0 of the tessBlock. must decal of 1 pixel.</span>
00878         dest= lightText+<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1;
00879         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts, tt, dest, NL_TILE_LIGHTMAP_SIZE);
00880         <span class="comment">// compute tile 1,0 of the tessBlock. must decal of 1 pixel.</span>
00881         dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
00882         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts+1, tt, dest, NL_TILE_LIGHTMAP_SIZE);
00883         <span class="comment">// compute tile 0,1 of the tessBlock. must decal of 1 pixel.</span>
00884         dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
00885         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts, tt+1, dest, NL_TILE_LIGHTMAP_SIZE);
00886         <span class="comment">// compute tile 1,1 of the tessBlock. must decal of 1 pixel.</span>
00887         dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
00888         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts+1, tt+1, dest, NL_TILE_LIGHTMAP_SIZE);
00889 
00890 
00891         <span class="comment">// Compute edges of the TessBlock.</span>
00892         <span class="comment">//=================</span>
00893         <span class="keywordtype">bool</span>    edgeBorder[4];
00894         <span class="comment">// where are we on a border of a patch??</span>
00895         edgeBorder[0]= ( ts==0 );
00896         edgeBorder[1]= ( tt == <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>-2 );
00897         edgeBorder[2]= ( ts == <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>-2 );
00898         edgeBorder[3]= ( tt==0 );
00899 
00900         <span class="comment">// For all edges.</span>
00901         <span class="keywordflow">for</span>(edge=0; edge&lt;4; edge++)
00902         {
00903                 <span class="comment">// compute dest info.</span>
00904                 <span class="comment">//==============</span>
00905                 <span class="comment">// Are we on a vertical edge or horizontal edge??</span>
00906                 <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a582">stride</a>= (edge&amp;1)==0? <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> : 1;
00907 
00908                 <span class="comment">// must compute on which tile we must find info.</span>
00909                 <a class="code" href="a04558.html#a14">sint</a>    decalS=0;
00910                 <a class="code" href="a04558.html#a14">sint</a>    decalT=0;
00911                 <span class="comment">// and must compute ptr, where we store the result of the edge.</span>
00912                 <span class="keywordflow">switch</span>(edge)
00913                 {
00914                 <span class="keywordflow">case</span> 0: decalS=-1; dest= lightText + 0 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
00915                 <span class="keywordflow">case</span> 1: decalT= 2; dest= lightText + 1 + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
00916                 <span class="keywordflow">case</span> 2: decalS= 2; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
00917                 <span class="keywordflow">case</span> 3: decalT=-1; dest= lightText + 1; <span class="keywordflow">break</span>;
00918                 };
00919 
00920                 <span class="comment">// compute the second tile dest info.</span>
00921                 <a class="code" href="a03337.html">CRGBA</a>   *dest2;
00922                 <a class="code" href="a04558.html#a14">sint</a>    decalS2;
00923                 <a class="code" href="a04558.html#a14">sint</a>    decalT2;
00924                 <span class="comment">// if vertical edge.</span>
00925                 <span class="keywordflow">if</span>((edge&amp;1)==0)
00926                 {
00927                         <span class="comment">// Next Y tile.</span>
00928                         dest2= dest + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>;
00929                         decalS2= decalS;
00930                         decalT2= decalT+1;
00931                 }
00932                 <span class="keywordflow">else</span>
00933                 {
00934                         <span class="comment">// Next X tile.</span>
00935                         dest2= dest + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
00936                         decalS2= decalS+1;
00937                         decalT2= decalT;
00938                 }
00939 
00940 
00941                 <span class="comment">// If we are not on a border of a patch, just compute on the interior of the patch.</span>
00942                 <span class="comment">//==============</span>
00943                 <span class="keywordflow">if</span>(!edgeBorder[edge])
00944                 {
00945                         <span class="comment">// find the result on the mirrored border of us. First tile.</span>
00946                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a>(ts+decalS, tt+decalT, (edge+2)&amp;3, dest, stride, <span class="keyword">false</span>);
00947 
00948                         <span class="comment">// find the result on the mirrored border of us. Second Tile.</span>
00949                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a>(ts+decalS2, tt+decalT2, (edge+2)&amp;3, dest2, stride, <span class="keyword">false</span>);
00950 
00951                 }
00952                 <span class="comment">// else, slightly complicated, must find the result on neighbor patch(s).</span>
00953                 <span class="comment">//==============</span>
00954                 <span class="keywordflow">else</span>
00955                 {
00956                         CPatchUVLocator         uvLocator;
00957                         CBindInfo                       bindInfo;
00958                         bindInfo.Zone= NULL;
00959 
00960                         <span class="comment">// if smoothed edge, search the neighbor.</span>
00961                         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
00962                         {
00963                                 <span class="comment">// Build the bindInfo against this edge.</span>
00964                                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00965 
00966                                 <span class="comment">// if ok, build the uv info against this edge.</span>
00967                                 <span class="keywordflow">if</span>(bindInfo.Zone)
00968                                 {
00969                                         uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00970                                         <span class="comment">// if there is not same tile order across the edge, invalidate the smooth.</span>
00971                                         <span class="comment">// This is rare, so don't bother.</span>
00972                                         <span class="keywordflow">if</span>(!uvLocator.sameEdgeOrder())
00973                                                 bindInfo.Zone= NULL;
00974                                 }
00975                         }
00976 
00977 
00978                         <span class="comment">// Fast reject: if no neighbor, or if not smoothed, or if edge order pb, just copy from my interior.</span>
00979                         <span class="keywordflow">if</span>(!bindInfo.Zone)
00980                         {
00981                                 <a class="code" href="a03337.html">CRGBA</a>   *<a class="code" href="a04223.html#a652">src</a>=0;
00982                                 <span class="keywordflow">switch</span>(edge)
00983                                 {
00984                                 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a652">src</a>= dest + 1; <span class="keywordflow">break</span>;
00985                                 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a652">src</a>= dest - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
00986                                 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a652">src</a>= dest - 1; <span class="keywordflow">break</span>;
00987                                 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a652">src</a>= dest + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
00988                                 };
00989                                 
00990                                 <span class="comment">// fill the NL_LUMEL_BY_TILE*2 (8) pixels.</span>
00991                                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> n=<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*2; n&gt;0; n--, <a class="code" href="a04223.html#a652">src</a>+=<a class="code" href="a04223.html#a582">stride</a>, dest+=<a class="code" href="a04223.html#a582">stride</a>)
00992                                         *dest= *<a class="code" href="a04223.html#a652">src</a>;
00993                         }
00994                         <span class="comment">// else, ok, get from neighbor.</span>
00995                         <span class="keywordflow">else</span>
00996                         {
00997                                 <a class="code" href="a03660.html">CVector2f</a>       stIn, stOut;
00998                                 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00999                                 <a class="code" href="a04558.html#a15">uint</a>            patchId;
01000                                 <a class="code" href="a04558.html#a15">uint</a>            edgeOut;
01001                                 <span class="keywordtype">bool</span>            inverse;
01002 
01003                                 <span class="comment">// First Tile.</span>
01004                                 <span class="comment">//=========</span>
01005                                 <span class="comment">// to remove floor pbs, take the center of the wanted tile.</span>
01006                                 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(ts+decalS + 0.5f, tt+decalT + 0.5f);
01007                                 patchId= uvLocator.selectPatch(stIn);
01008                                 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
01009                                 <span class="comment">// must find what edge on neighbor to compute, and if we must inverse (swap) result.</span>
01010                                 <span class="comment">// easy: the edge of the tile is the edge of the patch where we are binded.</span>
01011                                 edgeOut= bindInfo.Edge[patchId];
01012                                 <span class="comment">// edge0 is oriented in T increasing order. edge1 is oriented in S increasing order.</span>
01013                                 <span class="comment">// edge2 is oriented in T decreasing order. edge3 is oriented in S decreasing order.</span>
01014                                 <span class="comment">// inverse is true if same sens on both edges (because of mirroring, sens should be different).</span>
01015                                 inverse= (edge&gt;&gt;1)==(edgeOut&gt;&gt;1);
01016                                 <span class="comment">// compute the lightmap on the edge of the neighbor.</span>
01017                                 patchOut-&gt;computeTileLightmapEdge((<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>), (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>), edgeOut, dest, stride, inverse);
01018 
01019                                 <span class="comment">// Second Tile.</span>
01020                                 <span class="comment">//=========</span>
01021                                 <span class="comment">// same reasoning.</span>
01022                                 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(ts+decalS2 + 0.5f, tt+decalT2 + 0.5f);
01023                                 patchId= uvLocator.selectPatch(stIn);
01024                                 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
01025                                 edgeOut= bindInfo.Edge[patchId];
01026                                 inverse= (edge&gt;&gt;1)==(edgeOut&gt;&gt;1);
01027                                 patchOut-&gt;computeTileLightmapEdge((<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>), (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>), edgeOut, dest2, stride, inverse);
01028                         }
01029 
01030                 }
01031         }
01032 
01033 
01034         <span class="comment">// Compute corners of the TessBlock.</span>
01035         <span class="comment">//=================</span>
01036         <span class="keywordtype">bool</span>    cornerOnPatchEdge[4];
01037         <span class="keywordtype">bool</span>    cornerOnPatchCorner[4];
01038         <span class="comment">// where are we on a edge border of a patch??</span>
01039         cornerOnPatchEdge[0]= edgeBorder[3] != edgeBorder[0];
01040         cornerOnPatchEdge[1]= edgeBorder[0] != edgeBorder[1];
01041         cornerOnPatchEdge[2]= edgeBorder[1] != edgeBorder[2];
01042         cornerOnPatchEdge[3]= edgeBorder[2] != edgeBorder[3];
01043         <span class="comment">// where are we on a corner border of a patch??</span>
01044         cornerOnPatchCorner[0]= edgeBorder[3] &amp;&amp; edgeBorder[0];
01045         cornerOnPatchCorner[1]= edgeBorder[0] &amp;&amp; edgeBorder[1];
01046         cornerOnPatchCorner[2]= edgeBorder[1] &amp;&amp; edgeBorder[2];
01047         cornerOnPatchCorner[3]= edgeBorder[2] &amp;&amp; edgeBorder[3];
01048 
01049         <span class="comment">// For all corners.</span>
01050         <span class="keywordflow">for</span>(corner=0; corner&lt;4; corner++)
01051         {
01052                 <span class="comment">// compute dest info.</span>
01053                 <span class="comment">//==============</span>
01054                 <span class="comment">// must compute on which tile we must find info.</span>
01055                 <a class="code" href="a04558.html#a14">sint</a>    decalS=0;
01056                 <a class="code" href="a04558.html#a14">sint</a>    decalT=0;
01057                 <span class="comment">// and must compute ptr, where we store the result of the corner.</span>
01058                 <span class="keywordflow">switch</span>(corner)
01059                 {
01060                 <span class="keywordflow">case</span> 0: decalS=-1; decalT=-1; dest= lightText + 0 + 0; <span class="keywordflow">break</span>;
01061                 <span class="keywordflow">case</span> 1: decalS=-1; decalT= 2; dest= lightText + 0 + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01062                 <span class="keywordflow">case</span> 2: decalS= 2; decalT= 2; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01063                 <span class="keywordflow">case</span> 3: decalS= 2; decalT=-1; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + 0; <span class="keywordflow">break</span>;
01064                 };
01065 
01066 
01067                 <span class="comment">// If we are not on a border of a patch, just compute on the interior of the patch.</span>
01068                 <span class="comment">//==============</span>
01069                 <span class="comment">// if the corner is IN the patch.</span>
01070                 <span class="keywordflow">if</span>(!cornerOnPatchCorner[corner] &amp;&amp; !cornerOnPatchEdge[corner])
01071                 {
01072                         <span class="comment">// what pixel to read.</span>
01073                         <a class="code" href="a04558.html#a15">uint</a>    subS, subT;
01074                         <span class="keywordflow">if</span>(decalS==-1)  subS= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1;
01075                         <span class="keywordflow">else</span>                    subS= 0;
01076                         <span class="keywordflow">if</span>(decalT==-1)  subT= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1;
01077                         <span class="keywordflow">else</span>                    subT= 0;
01078 
01079                         <span class="comment">// find the result on the corner of the neighbor tile.</span>
01080                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(ts+decalS, tt+decalT, subS, subT, dest);
01081                 }
01082                 <span class="keywordflow">else</span>
01083                 {
01084                         <span class="comment">// By default, fill the corner with our interior corner. Because other methods may fail.</span>
01085                         <a class="code" href="a03337.html">CRGBA</a>   *<a class="code" href="a04223.html#a652">src</a>=0;
01086                         <span class="keywordflow">switch</span>(corner)
01087                         {
01088                         <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a652">src</a>= dest + 1 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01089                         <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a652">src</a>= dest + 1 - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01090                         <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a652">src</a>= dest - 1 - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01091                         <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a652">src</a>= dest - 1 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
01092                         };
01093                         
01094                         <span class="comment">// fill the pixel.</span>
01095                         *dest= *<a class="code" href="a04223.html#a652">src</a>;
01096 
01097                         <span class="comment">// get the coordinate of the corner, in our [0,Order] basis. get it at the center of the pixel.</span>
01098                         CBindInfo                       bindInfo;
01099                         CPatchUVLocator         uvLocator;
01100                         <a class="code" href="a03660.html">CVector2f</a>                       stIn, stOut;
01101                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>                          *patchOut;
01102                         <a class="code" href="a04558.html#a15">uint</a>                            patchId;
01103                         <span class="keywordtype">float</span>                           decX, decY;
01104                         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span>      lumelSize= 1.f/<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
01105                         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span>      semiLumelSize= 0.5f*lumelSize;
01106 
01107                         <span class="keywordflow">if</span>(decalS==-1)  decX= -  semiLumelSize;
01108                         <span class="keywordflow">else</span>                    decX= 2+ semiLumelSize;
01109                         <span class="keywordflow">if</span>(decalT==-1)  decY= -  semiLumelSize;
01110                         <span class="keywordflow">else</span>                    decY= 2+ semiLumelSize;
01111                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>( ts+decX, tt+decY);
01112 
01113 
01114                         <span class="comment">// if the corner is on One edge only of the patch.</span>
01115                         <span class="keywordflow">if</span>(cornerOnPatchEdge[corner])
01116                         {
01117                                 <span class="comment">// find the edge where to read this corner: hard edge after or before this corner.</span>
01118                                 <span class="keywordflow">if</span>(edgeBorder[corner])  edge= corner;
01119                                 <span class="keywordflow">else</span>                                    edge= (corner+4-1) &amp; 3;
01120 
01121                                 <span class="comment">// if this edge is smoothed, find on neighbor.</span>
01122                                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
01123                                 {
01124                                         <span class="comment">// retrieve neigbhor info.</span>
01125                                         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
01126 
01127                                         <span class="comment">// if neighbor present.</span>
01128                                         <span class="keywordflow">if</span>(bindInfo.Zone)
01129                                         {
01130                                                 <span class="comment">// Ok, search uv on this patch.</span>
01131                                                 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
01132                                                 patchId= uvLocator.selectPatch(stIn);
01133                                                 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
01134 
01135                                                 <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis), and get from neighbor patch</span>
01136                                                 <a class="code" href="a04558.html#a14">sint</a>    u, <a class="code" href="a04223.html#a576">v</a>;
01137                                                 u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
01138                                                 <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
01139                                                 patchOut-&gt;computeTileLightmapPixel(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
01140                                         }
01141                                 }
01142                                 <span class="comment">// else we must still smooth with our lumel on this patch, so get it from neighbor on edge.</span>
01143                                 <span class="keywordflow">else</span>
01144                                 {
01145                                         <span class="comment">// first, clamp to our patch (recenter on the previous pixel)</span>
01146                                         <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>&lt;0)                    stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>+= lumelSize;
01147                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>)  stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>-= lumelSize;
01148                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>&lt;0)               stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>+= lumelSize;
01149                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)  stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>-= lumelSize;
01150 
01151                                         <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis), and get from this patch</span>
01152                                         <a class="code" href="a04558.html#a14">sint</a>    u, <a class="code" href="a04223.html#a576">v</a>;
01153                                         u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
01154                                         <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
01155                                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
01156                                 }
01157                         }
01158                         <span class="comment">// else it is on a corner of the patch.</span>
01159                         <span class="keywordflow">else</span>
01160                         {
01161                                 <span class="comment">// if the corner of the patch (same as tile corner) is smoothed, find on neighbor</span>
01162                                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a>(corner))
01163                                 {
01164                                         <span class="comment">// retrieve neigbhor info. NB: use edgeId=corner, (corner X is the start of the edge X)it works.</span>
01165                                         <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(corner, bindInfo);
01166 
01167                                         <span class="comment">// if neighbor present.</span>
01168                                         <span class="keywordflow">if</span>(bindInfo.Zone)
01169                                         {
01170                                                 <span class="comment">// Ok, search uv on this patch.</span>
01171                                                 uvLocator.build(<span class="keyword">this</span>, corner, bindInfo);
01172                                                 patchId= uvLocator.selectPatch(stIn);
01173                                                 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
01174 
01175                                                 <span class="comment">// same reasoning as in computeDisplaceCornerSmooth(), must find the pixel on the neighbor </span>
01176                                                 <span class="comment">// of our neighbor. But the current corner may be a corner on a bind X/1. All is managed by doing</span>
01177                                                 <span class="comment">// this way.</span>
01178                                                 patchOut-&gt;computeTileLightmapPixelAroundCorner(stOut, dest, <span class="keyword">true</span>);
01179                                         }
01180                                 }
01181                         }
01182                 }
01183 
01184         }
01185 
01186 
01187 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd12" doxytag="NL3D::CPatch::computeNewFar" ></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::CPatch::computeNewFar </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>patchSphere</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>newFar0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>newFar1</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>

<p>
Definition at line <a class="el" href="a06161.html#l00054">54</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a05505.html#l00048">NLMISC::CBSphere::Center</a>, <a class="el" href="a06156.html#l00827">Far0UBias</a>, <a class="el" href="a06156.html#l00827">Far0UScale</a>, <a class="el" href="a06156.html#l00827">Far0VBias</a>, <a class="el" href="a06156.html#l00827">Far0VScale</a>, <a class="el" href="a06156.html#l00828">Far1UBias</a>, <a class="el" href="a06156.html#l00828">Far1UScale</a>, <a class="el" href="a06156.html#l00828">Far1VBias</a>, <a class="el" href="a06156.html#l00828">Far1VScale</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06156.html#l00054">NL_PATCH_FAR0_ROTATED</a>, <a class="el" href="a06156.html#l00055">NL_PATCH_FAR1_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a05505.html#l00049">NLMISC::CBSphere::Radius</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00226">updateTextureFarOnly()</a>.
<p>
<div class="fragment"><pre>00055 {
00056         <span class="comment">// Classify the patch.</span>
00057         <span class="comment">//========================</span>
00058         <span class="keywordtype">float</span>   <a class="code" href="a04223.html#a628">r</a>= (CLandscapeGlobals::RefineCenter-patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo0">Center</a>).norm() - patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo1">Radius</a>;
00059         <span class="keywordtype">float</span>   rr=0.0;
00060         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::TileDistNear)
00061                 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::TileDistNear, newFar0= 0;
00062         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::Far0Dist)
00063                 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::Far0Dist, newFar0= 1;
00064         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::Far1Dist)
00065                 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::Far1Dist, newFar0= 2;
00066         <span class="keywordflow">else</span>
00067                 newFar0= 3;
00068         <span class="comment">// Transition with the next level.</span>
00069         newFar1=0;
00070         <span class="keywordflow">if</span>(newFar0&lt;3 &amp;&amp; rr&gt;-(CLandscapeGlobals::FarTransition+2*patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo1">Radius</a>))
00071         {
00072                 newFar1= newFar0+1;
00073         }
00074 
00075 
00076         <span class="comment">// Update Texture Info.</span>
00077         <span class="comment">//========================</span>
00078         <span class="keywordflow">if</span>(newFar0!=<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a> || newFar1!=<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
00079         {
00080                 <span class="comment">// Backup old pass0</span>
00081                 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a>   *oldPass0=<a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>;
00082                 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a>   *oldPass1=<a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>;
00083 
00084                 <span class="comment">// Checks</span>
00085                 <span class="keywordflow">if</span> (oldPass0==NULL)
00086                         <a class="code" href="a04199.html#a6">nlassert</a> (Far0&lt;=0);
00087                 <span class="keywordflow">if</span> (oldPass1==NULL)
00088                         <a class="code" href="a04199.html#a6">nlassert</a> (Far1&lt;=0);
00089 
00090                 <span class="keywordtype">float</span> oldFar0UScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a>;
00091                 <span class="keywordtype">float</span> oldFar0VScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a>;
00092                 <span class="keywordtype">float</span> oldFar0UBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
00093                 <span class="keywordtype">float</span> oldFar0VBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
00094                 <a class="code" href="a04558.html#a7">uint8</a> oldFlags=<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>;
00095 
00096 
00097                 <span class="comment">// Don't delete the pass0 if the new newFar1 will use it</span>
00098                 <span class="keywordflow">if</span> ((newFar1==<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)&amp;&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0))
00099                         _PatchRdrPassFar0=NULL;
00100 
00101                 <span class="comment">// Don't delete the pass1 if the new newFar0 will use it</span>
00102                 <span class="keywordflow">if</span> ((newFar0==<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)&amp;&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0))
00103                         _PatchRdrPassFar1=NULL;
00104 
00105                 <span class="comment">// Pass0 have changed ?</span>
00106                 <span class="keywordflow">if</span> (newFar0!=<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)
00107                 {
00108                         <span class="comment">// Compute / get the texture Far.</span>
00109                         <span class="keywordflow">if</span>(newFar0&gt;0)
00110                         {
00111                                 <span class="comment">// Free the old pass, don't used any more</span>
00112                                 <span class="keywordflow">if</span> (_PatchRdrPassFar0)
00113                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
00114 
00115                                 <span class="comment">// Can we use the old pass1 ?</span>
00116                                 <span class="keywordflow">if</span> (newFar0==<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
00117                                 {
00118                                         <span class="comment">// Yes, recycle it!</span>
00119                                         _PatchRdrPassFar0=oldPass1;
00120 
00121                                         <span class="comment">// Copy uv coordinates</span>
00122                                         Far0UScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a>;
00123                                         Far0VScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a>;
00124                                         Far0UBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
00125                                         Far0VBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
00126 
00127                                         <span class="comment">// Copy rotation flag</span>
00128                                         Flags&amp;=~<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;                  <span class="comment">// erase it</span>
00129                                         <span class="keywordflow">if</span> (Flags&amp;<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>)
00130                                                 Flags|=<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;                   <span class="comment">// copy it</span>
00131                                 }
00132                                 <span class="keywordflow">else</span>    <span class="comment">// get a new render pass</span>
00133                                 {
00134                                         <span class="comment">// Rotation boolean</span>
00135                                         <span class="keywordtype">bool</span> bRot;
00136                                         _PatchRdrPassFar0=<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getFarRenderPass(<span class="keyword">this</span>, newFar0, Far0UScale, Far0VScale, Far0UBias, Far0VBias, bRot);
00137 
00138                                         <span class="comment">// Flags is set if the far texture is rotated of 90deg to the left</span>
00139                                         <span class="keywordflow">if</span> (bRot)
00140                                                 Flags|=<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;
00141                                         <span class="keywordflow">else</span>
00142                                                 Flags&amp;=~<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;
00143                                 }
00144                         }
00145                         <span class="keywordflow">else</span>    <span class="comment">// no more far pass0</span>
00146                         {
00147                                 <span class="keywordflow">if</span> (_PatchRdrPassFar0)
00148                                 {
00149                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
00150                                         _PatchRdrPassFar0=NULL;
00151                                 }
00152                         }
00153                 }
00154 
00155                 <span class="comment">// Pass1 have changed ?</span>
00156                 <span class="keywordflow">if</span> (newFar1!=<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
00157                 {
00158                         <span class="comment">// Now let's go with pass1</span>
00159                         <span class="keywordflow">if</span>(newFar1&gt;0)
00160                         {
00161                                 <span class="comment">// Delete the pass1 if not used any more</span>
00162                                 <span class="keywordflow">if</span> (_PatchRdrPassFar1)
00163                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
00164 
00165                                 <span class="comment">// Can we use the old pass1 ?</span>
00166                                 <span class="keywordflow">if</span> (newFar1==<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)
00167                                 {
00168                                         <span class="comment">// Yes, recycle it!</span>
00169                                         _PatchRdrPassFar1= oldPass0;
00170                                         <a class="code" href="a04199.html#a6">nlassert</a> (_PatchRdrPassFar1);
00171 
00172                                         <span class="comment">// Copy uv coordinates</span>
00173                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a>=oldFar0UScale;
00174                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a>=oldFar0VScale;
00175                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>=oldFar0UBias;
00176                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>=oldFar0VBias;
00177 
00178                                         <span class="comment">// Copy rotation flag</span>
00179                                         Flags&amp;=~<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;                  <span class="comment">// erase it</span>
00180                                         <span class="keywordflow">if</span> (oldFlags&amp;<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>)
00181                                                 Flags|=<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;                   <span class="comment">// copy it</span>
00182                                 }
00183                                 <span class="keywordflow">else</span>    <span class="comment">// get a new render pass</span>
00184                                 {
00185                                         <span class="comment">// Rotation boolean</span>
00186                                         <span class="keywordtype">bool</span> bRot;
00187                                         _PatchRdrPassFar1=<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getFarRenderPass(<span class="keyword">this</span>, newFar1, Far1UScale, Far1VScale, Far1UBias, Far1VBias, bRot);
00188                                         <a class="code" href="a04199.html#a6">nlassert</a> (_PatchRdrPassFar1);
00189 
00190                                         <span class="comment">// Flags is set if the far texture is rotated of 90deg to the left</span>
00191                                         <span class="keywordflow">if</span> (bRot)
00192                                                 Flags|=<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;
00193                                         <span class="keywordflow">else</span>
00194                                                 Flags&amp;=~<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;
00195                                 }
00196 
00197                                 <span class="comment">// Compute info for transition.</span>
00198                                 <span class="keywordtype">float</span>   farDist;
00199                                 <span class="keywordflow">switch</span>(newFar1)
00200                                 {
00201                                         <span class="keywordflow">case</span> 1: farDist= CLandscapeGlobals::TileDistNear; <span class="keywordflow">break</span>;
00202                                         <span class="keywordflow">case</span> 2: farDist= CLandscapeGlobals::Far0Dist; <span class="keywordflow">break</span>;
00203                                         <span class="keywordflow">case</span> 3: farDist= CLandscapeGlobals::Far1Dist; <span class="keywordflow">break</span>;
00204                                         <span class="keywordflow">default</span>: <a class="code" href="a04199.html#a12">nlstop</a>;
00205                                 };
00206                                 <a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>= <a class="code" href="a05378.html#a373">sqr</a>(farDist-CLandscapeGlobals::FarTransition);
00207                                 <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>= 1.0f/(<a class="code" href="a05378.html#a373">sqr</a>(farDist)-<a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>);
00208                         }
00209                         <span class="keywordflow">else</span>    <span class="comment">// no more far pass1</span>
00210                         {
00211                                 <span class="keywordflow">if</span> (_PatchRdrPassFar1)
00212                                 {
00213                                         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
00214                                         _PatchRdrPassFar1=NULL;
00215                                 }
00216                         }
00217                 }
00218 
00219         }
00220 
00221         <span class="comment">// Don't copy Far0 and Far1.</span>
00222 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_7" doxytag="NL3D::CPatch::computeNoise" ></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::CPatch::computeNoise </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>displace</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the Final displacement for s,t ([0;1], [0;1]). This is the top call. displace.norm() should be &lt;= NL3D_NOISE_MAX.
<p>
Definition at line <a class="el" href="a06158.html#l00874">874</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01338">computeVertex()</a>.
<p>
<div class="fragment"><pre>00875 {
00876         <span class="keywordtype">float</span>   so= <a class="code" href="a04223.html#a626">s</a>*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00877         <span class="keywordtype">float</span>   to= <a class="code" href="a04223.html#a627">t</a>*<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00878 
00879 
00880         <span class="comment">// Pre-Compute Border Smothing.</span>
00881         <span class="comment">//=========================</span>
00882         <span class="comment">// If we are on a border, flag it.</span>
00883         <a class="code" href="a04558.html#a6">sint8</a>   smoothNormalBorderX= 0;
00884         <a class="code" href="a04558.html#a6">sint8</a>   smoothNormalBorderY= 0;
00885         <span class="comment">// NB: because OrderS and OrderT &gt;=2, smoothNormalBorderX=-1 and smoothNormalBorderX=1 are exclusive (as smoothNormalBorderY).</span>
00886         <span class="keywordflow">if</span>(so &lt; 1) smoothNormalBorderX= -1;
00887         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(so &gt; OrderS-1) smoothNormalBorderX= 1;
00888         <span class="keywordflow">if</span>(to &lt; 1) smoothNormalBorderY= -1;
00889         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(to &gt; OrderT-1) smoothNormalBorderY= 1;
00890 
00891         <span class="keywordtype">bool</span>    smoothNormalEdge= (smoothNormalBorderX!=0) != (smoothNormalBorderY!=0);
00892         <span class="keywordtype">bool</span>    smoothNormalCorner= (smoothNormalBorderX!=0) &amp;&amp; (smoothNormalBorderY!=0);
00893 
00894 
00895         <span class="comment">// Do same thing, but to know if we must compute a displace on an interior, on an edge or on a corner.</span>
00896         <a class="code" href="a04558.html#a6">sint8</a>   smoothDisplaceBorderX= 0;
00897         <a class="code" href="a04558.html#a6">sint8</a>   smoothDisplaceBorderY= 0;
00898         <span class="comment">// NB: because OrderS and OrderT &gt;=2, smoothBorderX=-1 and smoothBorderX=1 are exclusive (as smoothBorderY).</span>
00899         <span class="keywordflow">if</span>(so &lt; 0.5) smoothDisplaceBorderX= -1;
00900         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(so &gt; OrderS-0.5) smoothDisplaceBorderX= 1;
00901         <span class="keywordflow">if</span>(to &lt; 0.5) smoothDisplaceBorderY= -1;
00902         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(to &gt; OrderT-0.5) smoothDisplaceBorderY= 1;
00903 
00904         <span class="keywordtype">bool</span>    smoothDisplaceEdge= (smoothDisplaceBorderX!=0) != (smoothDisplaceBorderY!=0);
00905         <span class="keywordtype">bool</span>    smoothDisplaceCorner= (smoothDisplaceBorderX!=0) &amp;&amp; (smoothDisplaceBorderY!=0);
00906 
00907 
00908         <span class="comment">// Compute Displace value.</span>
00909         <span class="comment">//=========================</span>
00910         <span class="keywordtype">float</span>   displaceValue;
00911 
00912         <span class="keywordflow">if</span>(smoothDisplaceCorner)
00913                 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth</a>(so, to, smoothDisplaceBorderX, smoothDisplaceBorderY);
00914         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothDisplaceEdge)
00915                 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_1">computeDisplaceEdgeSmooth</a>(so, to, smoothDisplaceBorderX, smoothDisplaceBorderY);
00916         <span class="keywordflow">else</span>
00917                 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(so, to);
00918 
00919 
00920 
00921         <span class="comment">// Compute Displace normal.</span>
00922         <span class="comment">//=========================</span>
00923 
00924         <span class="comment">// Evaluate the normal.</span>
00925         CVector         displaceNormal;
00926 
00927 
00928         <span class="comment">// smooth on edges and on corners.</span>
00929         <span class="keywordflow">if</span>(smoothNormalCorner)
00930                 displaceNormal= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_8">computeNormalCornerSmooth</a>(so, to, smoothNormalBorderX, smoothNormalBorderY);
00931         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothNormalEdge)
00932                 displaceNormal= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(so, to, smoothNormalBorderX, smoothNormalBorderY);
00933         <span class="keywordflow">else</span>
00934         {
00935                 <span class="comment">// unpack...</span>
00936                 CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00937                 <span class="comment">// eval.</span>
00938                 displaceNormal= bpatch-&gt;evalNormal(s, t);
00939         }
00940 
00941 
00942 
00943         <span class="comment">// Final result.</span>
00944         <span class="comment">//=========================</span>
00945         displace= displaceNormal * displaceValue;
00946 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_8" doxytag="NL3D::CPatch::computeNormalCornerSmooth" ></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> NL3D::CPatch::computeNormalCornerSmooth </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderY</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
<p>
Definition at line <a class="el" href="a06158.html#l00728">728</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00117">NL3D::noiseCeilF()</a>, <a class="el" href="a06158.html#l00113">NL3D::noiseFloorF()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
<p>
<div class="fragment"><pre>00729 {
00730         CBindInfo       bindInfoX;
00731         CBindInfo       bindInfoY;
00732         <a class="code" href="a04558.html#a15">uint</a>            edgeX=0;
00733         <a class="code" href="a04558.html#a15">uint</a>            edgeY=0;
00734         <a class="code" href="a04558.html#a15">uint</a>            corner;
00735         CBezierPatch    *bpatch;
00736         bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00737 
00738         <span class="comment">// both must be not null</span>
00739         <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX!=0) &amp;&amp; (smoothBorderY!=0) );
00740 
00741 
00742         <span class="comment">// Get the edge against we must share displace.</span>
00743         <span class="keywordflow">if</span>(smoothBorderX==-1)   edgeX=0;
00744         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       edgeX=2;
00745         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00746         <span class="keywordflow">if</span>(smoothBorderY==1)    edgeY=1;
00747         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      edgeY=3;
00748         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00749 
00750         <span class="comment">// Get the corner against we must share displace.</span>
00751         <span class="keywordflow">if</span>(smoothBorderX==-1)
00752         {
00753                 <span class="keywordflow">if</span>(smoothBorderY==-1)   corner=0;
00754                 <span class="keywordflow">else</span>                                    corner=1;
00755         }
00756         <span class="keywordflow">else</span>
00757         {
00758                 <span class="keywordflow">if</span>(smoothBorderY==-1)   corner=3;
00759                 <span class="keywordflow">else</span>                                    corner=2;
00760         }
00761 
00762         <span class="comment">// If this corner is smoothed, blend with 4 neighbors patchs.</span>
00763         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a>(corner))
00764         {
00765                 <span class="comment">// Build the bindInfo against the 2 edge.</span>
00766                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeX, bindInfoX);
00767                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeY, bindInfoY);
00768 
00769                 <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
00770                 <span class="keywordflow">if</span>(!bindInfoX.Zone || !bindInfoY.Zone)
00771                         <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00772                 <span class="keywordflow">else</span>
00773                 {
00774                         CVector         ret;
00775 
00776 
00777                         <span class="comment">// Compute the coordinate on the border of the edge, and the coef of the blend.</span>
00778                         <span class="keywordtype">float</span>           se=<a class="code" href="a04223.html#a626">s</a>;
00779                         <span class="keywordtype">float</span>           te=<a class="code" href="a04223.html#a627">t</a>;
00780                         <span class="keywordtype">float</span>           coefX;
00781                         <span class="keywordtype">float</span>           coefY;
00782                         <span class="keywordflow">if</span>(smoothBorderX==-1)   se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coefX=<a class="code" href="a04223.html#a626">s</a>-se;
00783                         <span class="keywordflow">else</span>                                    se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coefX=se-<a class="code" href="a04223.html#a626">s</a>;
00784                         <span class="keywordflow">if</span>(smoothBorderY==-1)   te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coefY=<a class="code" href="a04223.html#a627">t</a>-te;
00785                         <span class="keywordflow">else</span>                                    te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coefY=te-<a class="code" href="a04223.html#a627">t</a>;
00786                         coefX= 0.5f + coefX*0.5f;
00787                         coefY= 0.5f + coefY*0.5f;
00788 
00789 
00790                         <span class="comment">// Compute our contribution.</span>
00791                         ret= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>()) *coefX*coefY;
00792 
00793 
00794                         <span class="comment">// compute Neighboring info.</span>
00795                         CPatchUVLocator         uvLocatorX;
00796                         CPatchUVLocator         uvLocatorY;
00797                         <a class="code" href="a03660.html">CVector2f</a>       stIn, stOut;
00798                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00799                         <a class="code" href="a04558.html#a15">uint</a>            patchId;
00800 
00801                         uvLocatorX.build(<span class="keyword">this</span>, edgeX, bindInfoX);
00802                         uvLocatorY.build(<span class="keyword">this</span>, edgeY, bindInfoY);
00803 
00804                         <span class="comment">// Patch on our X side.</span>
00805                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
00806                         patchId= uvLocatorX.selectPatch(stIn);
00807                         uvLocatorX.locateUV(stIn, patchId, patchOut, stOut);
00808                         bpatch= patchOut-&gt;unpackIntoCache();
00809                         ret+= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT()) *(1-coefX)*coefY;
00810 
00811                         <span class="comment">// Patch on our Y side.</span>
00812                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
00813                         patchId= uvLocatorY.selectPatch(stIn);
00814                         uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
00815                         bpatch= patchOut-&gt;unpackIntoCache();
00816                         ret+= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT()) *coefX*(1-coefY);
00817 
00818                         <span class="comment">/* compute contribution of the patch adjacent to me.</span>
00819 <span class="comment">                                Same reasoning as in computeDisplaceCornerSmooth().</span>
00820 <span class="comment">                        */</span>
00821                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
00822                         patchId= uvLocatorY.selectPatch(stIn);
00823                         uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
00824                         <span class="comment">// Because we compute the normal exactly on the edge, we must inform this method not to take us as neighbor.</span>
00825                         <span class="comment">// ugly but simpler.</span>
00826                         ret+= patchOut-&gt;computeNormalOnNeighbor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, bindInfoY.Edge[patchId]) *(1-coefX)*(1-coefY);
00827 
00828                         <span class="keywordflow">return</span> ret;
00829                 }
00830         }
00831         <span class="comment">// else must blend with 0.</span>
00832         <span class="keywordflow">else</span>
00833         {
00834                 <span class="comment">// compute coef.</span>
00835                 <span class="keywordtype">float</span>           se=<a class="code" href="a04223.html#a626">s</a>;
00836                 <span class="keywordtype">float</span>           te=<a class="code" href="a04223.html#a627">t</a>;
00837                 <span class="keywordtype">float</span>           coefX;
00838                 <span class="keywordtype">float</span>           coefY;
00839                 <span class="keywordflow">if</span>(smoothBorderX==-1)   se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coefX=<a class="code" href="a04223.html#a626">s</a>-se;
00840                 <span class="keywordflow">else</span>                                    se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coefX=se-<a class="code" href="a04223.html#a626">s</a>;
00841                 <span class="keywordflow">if</span>(smoothBorderY==-1)   te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coefY=<a class="code" href="a04223.html#a627">t</a>-te;
00842                 <span class="keywordflow">else</span>                                    te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coefY=te-<a class="code" href="a04223.html#a627">t</a>;
00843 
00844 
00845                 <span class="comment">// To have smooth continuities with smooth on edge (if any), we must do this.</span>
00846                 CVector         rx, ry;
00847                 <span class="comment">// Compute a smooth with my X neighbor.</span>
00848                 rx= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(s, t, smoothBorderX, 0);
00849                 <span class="comment">// Compute a smooth with my Y neighbor.</span>
00850                 ry= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(s, t, 0, smoothBorderY);
00851 
00852                 <span class="comment">// Blend the 2 result.</span>
00853                 <span class="keywordflow">if</span>(coefY + coefX&gt;0)
00854                 {
00855                         <span class="comment">// This the weight used to blend to 0.</span>
00856                         <span class="keywordtype">float</span>   maxCoef= max(coefY, coefX);
00857                         <span class="comment">// This the weight used to blend beetween rx and ry.</span>
00858                         <span class="keywordtype">float</span>   ooSum= 1.0f / (coefY + coefX);
00859                         <span class="keywordtype">float</span>   blendCoefX= coefX * ooSum;
00860                         <span class="keywordtype">float</span>   blendCoefY= coefY * ooSum;
00861 
00862                         <span class="keywordflow">return</span> maxCoef* (rx*blendCoefY + ry*blendCoefX);
00863                 }
00864                 <span class="keywordflow">else</span>
00865                 {
00866                         <span class="keywordflow">return</span> CVector::Null;
00867                 }
00868         }
00869 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_9" doxytag="NL3D::CPatch::computeNormalEdgeSmooth" ></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> NL3D::CPatch::computeNormalEdgeSmooth </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>smoothBorderY</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). Special case on edge.
<p>
Definition at line <a class="el" href="a06158.html#l00588">588</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06156.html#l00579">getSmoothFlag()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00117">NL3D::noiseCeilF()</a>, <a class="el" href="a06158.html#l00113">NL3D::noiseFloorF()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>, and <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>.
<p>
<div class="fragment"><pre>00589 {
00590         CBindInfo       bindInfo;
00591         <a class="code" href="a04558.html#a15">uint</a>            edge=0;
00592         CBezierPatch    *bpatch;
00593         bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00594 
00595         <span class="comment">// only one must be not null</span>
00596         <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX==0) != (smoothBorderY==0) );
00597 
00598 
00599         <span class="comment">// Get the edge against we must share displace.</span>
00600         <span class="keywordflow">if</span>(smoothBorderX==-1)   edge=0;
00601         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1)       edge=1;
00602         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       edge=2;
00603         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      edge=3;
00604         <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
00605 
00606         <span class="comment">// If the edge is smoothed, blend with neighbor.</span>
00607         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
00608         {
00609                 <span class="comment">// Build the bindInfo against this edge.</span>
00610                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00611 
00612                 <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
00613                 <span class="keywordflow">if</span>(!bindInfo.Zone)
00614                         <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00615                 <span class="keywordflow">else</span>
00616                 {
00617                         CVector         r0, r1;
00618 
00619                         <span class="comment">// Compute our contribution.</span>
00620                         r0= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00621 
00622                         <span class="comment">// Compute the coordinate on the border of the edge, and the coef of the blend.</span>
00623                         <span class="keywordtype">float</span>           se=<a class="code" href="a04223.html#a626">s</a>;
00624                         <span class="keywordtype">float</span>           te=<a class="code" href="a04223.html#a627">t</a>;
00625                         <span class="keywordtype">float</span>           coef=0.0;
00626                         <span class="keywordflow">if</span>(smoothBorderX==-1)           se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coef=<a class="code" href="a04223.html#a626">s</a>-se;
00627                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coef=se-<a class="code" href="a04223.html#a626">s</a>;
00628                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coef=<a class="code" href="a04223.html#a627">t</a>-te;
00629                         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1)       te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coef=te-<a class="code" href="a04223.html#a627">t</a>;
00630                         coef= 0.5f + coef*0.5f;
00631 
00632                         <span class="comment">// Compute contribution of the normal on the neighbor, on the border of the edge.</span>
00633                         CPatchUVLocator         uvLocator;
00634                         <a class="code" href="a03660.html">CVector2f</a>       stIn, stOut;
00635                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00636                         <a class="code" href="a04558.html#a15">uint</a>            patchId;
00637 
00638                         uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00639                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
00640                         patchId= uvLocator.selectPatch(stIn);
00641                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00642 
00643                         bpatch= patchOut-&gt;unpackIntoCache();
00644                         r1= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT());
00645 
00646                         <span class="comment">// NB: don't bother problems with bind 1/X and the choice of the patch, because bind are C1, so normal is C0.</span>
00647 
00648                         <span class="comment">// Blend 2 result. For speed optim, don't normalize.</span>
00649                         <span class="keywordflow">return</span> r0*coef + r1*(1-coef);
00650                 }
00651         }
00652         <span class="comment">// else blend with vector Null.</span>
00653         <span class="keywordflow">else</span>
00654         {
00655                 <span class="comment">// compute coef.</span>
00656                 <span class="keywordtype">float</span>           se=<a class="code" href="a04223.html#a626">s</a>;
00657                 <span class="keywordtype">float</span>           te=<a class="code" href="a04223.html#a627">t</a>;
00658                 <span class="keywordtype">float</span>           coef=0.0;
00659                 <span class="keywordflow">if</span>(smoothBorderX==-1)           se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coef=<a class="code" href="a04223.html#a626">s</a>-se;
00660                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1)       se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coef=se-<a class="code" href="a04223.html#a626">s</a>;
00661                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1)      te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coef=<a class="code" href="a04223.html#a627">t</a>-te;
00662                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1)       te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coef=te-<a class="code" href="a04223.html#a627">t</a>;
00663 
00664                 <span class="comment">// Compute our contribution.</span>
00665                 CVector         r0;
00666                 r0= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00667 
00668                 <span class="comment">// Blend with 0.</span>
00669                 <span class="keywordflow">return</span> r0*coef;
00670         }
00671 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz670_10" doxytag="NL3D::CPatch::computeNormalOnNeighbor" ></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> NL3D::CPatch::computeNormalOnNeighbor </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</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>edgeExclude</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
same reasoning as in <a class="el" href="a03057.html#NL3D_1_1CPatchz670_6">computeDisplaceRawOnNeighbor()</a>.
<p>
Definition at line <a class="el" href="a06158.html#l00675">675</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>.
<p>
<div class="fragment"><pre>00676 {
00677         <a class="code" href="a04558.html#a14">sint</a>    edge= -1;
00678 
00679         <span class="comment">// look on what neighbor patch we must find the value (if any).</span>
00680         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>&lt;1 &amp;&amp; edgeExclude!=0)                               edge=0;
00681         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>-1 &amp;&amp; edgeExclude!=1)   edge=1;
00682         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>-1 &amp;&amp; edgeExclude!=2)   edge=2;
00683         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&lt;1 &amp;&amp; edgeExclude!=3)                  edge=3;
00684 
00685 
00686         <span class="comment">// If the location is In the patch, just return normal value. (case of a bind 1/X).</span>
00687         <span class="keywordflow">if</span>(edge==-1)
00688         {
00689                 CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00690                 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00691         }
00692         <span class="comment">// else must find on neighbor.</span>
00693         <span class="keywordflow">else</span>
00694         {
00695                 CBindInfo       bindInfo;
00696                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00697 
00698                 <span class="comment">// Fast reject: if no neighbor on the edge, just do a simple computeDisplaceRaw()</span>
00699                 <span class="keywordflow">if</span>(!bindInfo.Zone)
00700                 {
00701                         CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00702                         <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
00703                 }
00704                 <span class="comment">// else must find on neighbor.</span>
00705                 <span class="keywordflow">else</span>
00706                 {
00707                         CPatchUVLocator         uvLocator;
00708                         uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00709 
00710                         <a class="code" href="a03660.html">CVector2f</a>       stIn;
00711                         <a class="code" href="a03660.html">CVector2f</a>       stOut;
00712                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00713                         <a class="code" href="a04558.html#a15">uint</a>            patchId;
00714 
00715                         <span class="comment">// look on neighbor. same reasoning as in computeDisplaceEdgeSmooth();</span>
00716                         stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
00717                         patchId= uvLocator.selectPatch(stIn);
00718                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00719                         CBezierPatch    *bpatch= patchOut-&gt;unpackIntoCache();
00720                         <span class="keywordflow">return</span> bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT());
00721                 }
00722 
00723         }
00724 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_0" doxytag="NL3D::CPatch::computeSoftwareGeomorphAndAlpha" ></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::CPatch::computeSoftwareGeomorphAndAlpha </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="a06161.html#l01378">1378</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01311">computeGeomorphFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01359">computeGeomorphTileVertexListVB()</a>, <a class="el" href="a06161.html#l01298">computeGeomorphVertexList()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06492.html#l00132">NL3D::CTessBlock::getClipped()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>01379 {
01380         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
01381                 <span class="keywordflow">return</span>;
01382 
01383         <span class="comment">// Compute Geomorph.</span>
01384         <span class="comment">//=======</span>
01385         <span class="comment">// Need only to fill CTessVertex, so do it only for FarVertices</span>
01386         <span class="comment">// Hence Geomorph is done twice on edges of patches!!.</span>
01387         <span class="comment">// If not too near for precise, fast compute of geomorph.</span>
01388         <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()==0 )
01389         {
01390                 <span class="comment">// Just update all vertices of master block.</span>
01391                 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01392         }
01393         <span class="keywordflow">else</span>
01394         {
01395                 <span class="comment">// update all vertices of master block.</span>
01396                 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01397                 <span class="comment">// update vertices of others block.</span>
01398                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01399                 {
01400                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01401                         <span class="comment">// Precise Clip.</span>
01402                         <span class="keywordflow">if</span>(!tblock.getClipped())
01403                         {
01404                                 <span class="comment">// compute the geomorph of the vertices in the tessblock.</span>
01405                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(tblock.FarVertexList);
01406                         }
01407                 }
01408         }
01409 
01410 
01411         <span class="comment">// Fill Far0.</span>
01412         <span class="comment">//=======</span>
01413         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
01414         {
01415                 <span class="comment">// Fill Far0 VB.</span>
01416                 <a class="code" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01417                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01418                 {
01419                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01420                         <span class="comment">// Precise Clip.</span>
01421                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
01422                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a>(tblock.FarVertexList);
01423                 }
01424         }
01425         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
01426         {
01427                 <span class="comment">// Fill Tile VB.</span>
01428                 <span class="comment">// No Tiles in MasterBlock!!</span>
01429                 <span class="comment">// Traverse the TessBlocks to compute vertices.</span>
01430                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01431                 {
01432                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01433                         <span class="comment">// Precise Clip.</span>
01434                         <span class="keywordflow">if</span>( tblock.visibleTile() )
01435                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd10">computeGeomorphTileVertexListVB</a>(tblock.NearVertexList);
01436                 }
01437         }
01438 
01439         <span class="comment">// Fill Far1.</span>
01440         <span class="comment">//=======</span>
01441         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
01442         {
01443                 <span class="comment">// Fill VB.</span>
01444                 <a class="code" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01445                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01446                 {
01447                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01448                         <span class="comment">// Precise Clip.</span>
01449                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
01450                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a>(tblock.FarVertexList);
01451                 }
01452         }
01453 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd13" doxytag="NL3D::CPatch::computeTbTm" ></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::CPatch::computeTbTm </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>numtb</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> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>numtm</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>ts</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>tt</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>

<p>
Definition at line <a class="el" href="a06155.html#l00942">942</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, <a class="el" href="a06157.html#l01225">getTileLightMapUvInfo()</a>, <a class="el" href="a06157.html#l01247">releaseTileLightMap()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
<p>
<div class="fragment"><pre>00943 {
00944         <a class="code" href="a04558.html#a14">sint</a>    is= ts&amp;1;
00945         <a class="code" href="a04558.html#a14">sint</a>    it= tt&amp;1;
00946         ts&gt;&gt;=1;
00947         tt&gt;&gt;=1;
00948         
00949         numtb= tt*(<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1) + ts;
00950         numtm= it*2+is;
00951 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_4" doxytag="NL3D::CPatch::computeTileLightmap" ></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::CPatch::computeTileLightmap </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>

<p>
Definition at line <a class="el" href="a06157.html#l00750">750</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l01739">addTileLightmapWithTLI()</a>, <a class="el" href="a06157.html#l00557">computeTileLightmapAutomatic()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00488">modulateTileLightmapWithTileColors()</a>, <a class="el" href="a05646.html#l00244">stride</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
<p>
<div class="fragment"><pre>00751 {
00752         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
00753                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_5">computeTileLightmapAutomatic</a>(ts, tt, dest, stride);
00754         <span class="keywordflow">else</span>
00755         {
00756                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_13">computeTileLightmapPrecomputed</a>(ts, tt, dest, stride);
00757                 <span class="comment">// Add the inlufence of TLI.</span>
00758                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_2">addTileLightmapWithTLI</a>(ts, tt, dest, stride);
00759         }
00760 
00761         <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
00762         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_21">modulateTileLightmapWithTileColors</a>(ts, tt, dest, stride);
00763 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_5" doxytag="NL3D::CPatch::computeTileLightmapAutomatic" ></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::CPatch::computeTileLightmapAutomatic </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>

<p>
Definition at line <a class="el" href="a06157.html#l00557">557</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
<p>
<div class="fragment"><pre>00558 {
00559         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
00560         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
00561         {
00562                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
00563                 {
00564                         <span class="comment">// compute this pixel.</span>
00565                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, x, y, dest+ y*stride + x);
00566                 }
00567         }
00568 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_6" doxytag="NL3D::CPatch::computeTileLightmapEdge" ></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::CPatch::computeTileLightmapEdge </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>ts</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>tt</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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>inverse</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>

<p>
Definition at line <a class="el" href="a06157.html#l00765">765</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l01758">addTileLightmapEdgeWithTLI()</a>, <a class="el" href="a06157.html#l00571">computeTileLightmapEdgeAutomatic()</a>, <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00508">modulateTileLightmapEdgeWithTileColors()</a>, <a class="el" href="a05646.html#l00244">stride</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
<p>
<div class="fragment"><pre>00766 {
00767         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
00768                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_7">computeTileLightmapEdgeAutomatic</a>(ts, tt, edge, dest, stride, inverse);
00769         <span class="keywordflow">else</span>
00770         {
00771                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_8">computeTileLightmapEdgePrecomputed</a>(ts, tt, edge, dest, stride, inverse);
00772                 <span class="comment">// Add the inlufence of TLI.</span>
00773                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_0">addTileLightmapEdgeWithTLI</a>(ts, tt, edge, dest, stride, inverse);
00774         }
00775 
00776         <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
00777         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_19">modulateTileLightmapEdgeWithTileColors</a>(ts, tt, edge, dest, stride, inverse);
00778 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_7" doxytag="NL3D::CPatch::computeTileLightmapEdgeAutomatic" ></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::CPatch::computeTileLightmapEdgeAutomatic </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>ts</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>tt</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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>inverse</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>

<p>
Definition at line <a class="el" href="a06157.html#l00571">571</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
<p>
<div class="fragment"><pre>00572 {
00573         <span class="comment">// get coordinate according to edge.</span>
00574         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
00575         <span class="keywordflow">switch</span>(edge)
00576         {
00577         <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
00578         <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
00579         <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
00580         <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
00581         };
00582 
00583         <a class="code" href="a04558.html#a15">uint</a>    i;
00584         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
00585         {
00586                 <span class="comment">// if vertical edge</span>
00587                 <span class="keywordflow">if</span>( (edge&amp;1)==0 )       <a class="code" href="a04223.html#a573">y</a>= i;
00588                 <span class="comment">// else horizontal edge</span>
00589                 <span class="keywordflow">else</span>                            <a class="code" href="a04223.html#a572">x</a>= i;
00590 
00591                 <span class="comment">// manage inverse.</span>
00592                 <a class="code" href="a04558.html#a15">uint</a>    where;
00593                 <span class="keywordflow">if</span>(inverse)             where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
00594                 <span class="keywordflow">else</span>                    where= i;
00595                 <span class="comment">// compute this pixel.</span>
00596                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, x, y, dest+ where*stride);
00597         }
00598 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_8" doxytag="NL3D::CPatch::computeTileLightmapEdgePrecomputed" ></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::CPatch::computeTileLightmapEdgePrecomputed </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>ts</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>tt</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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>inverse</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>

<p>
Definition at line <a class="el" href="a06157.html#l00704">704</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06157.html#l00701">NL3D::NL3DDeltaLumel</a>, <a class="el" href="a06157.html#l00700">NL3D::NL3DPixelStartLumel</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l00236">x</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
<p>
<div class="fragment"><pre>00705 {
00706         <span class="comment">// Lumel table</span>
00707         <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
00708 
00709         <span class="comment">// Witch corner to start ?</span>
00710         <a class="code" href="a04558.html#a15">uint</a> pixel=<a class="code" href="a05363.html#a227">NL3DPixelStartLumel</a>[edge];
00711         <a class="code" href="a04558.html#a15">uint</a> delta=<a class="code" href="a05363.html#a228">NL3DDeltaLumel</a>[edge];
00712 
00713         <span class="comment">// For each lumels</span>
00714         <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *<a class="code" href="a04223.html#a652">src</a>=&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[(ts + (tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>))*<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>]);
00715         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>;
00716         <span class="keywordflow">if</span> (inverse)
00717         {
00718                 <a class="code" href="a04558.html#a15">uint</a> inverseStride=<a class="code" href="a04223.html#a582">stride</a>*(4-1);
00719                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;4; <a class="code" href="a04223.html#a572">x</a>++)
00720                 {
00721                         <span class="comment">// lumel</span>
00722                         dest[inverseStride-<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a582">stride</a>]=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (src, pixel)];
00723                         pixel+=delta;
00724                 }
00725         }
00726         <span class="keywordflow">else</span>
00727         {
00728                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;4; <a class="code" href="a04223.html#a572">x</a>++)
00729                 {
00730                         <span class="comment">// lumel</span>
00731                         dest[<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a582">stride</a>]=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (src, pixel)];
00732                         pixel+=delta;
00733                 }
00734         }
00735 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_9" doxytag="NL3D::CPatch::computeTileLightmapPixel" ></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::CPatch::computeTileLightmapPixel </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>

<p>
Definition at line <a class="el" href="a06157.html#l00782">782</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l01793">addTileLightmapPixelWithTLI()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00544">modulateTileLightmapPixelWithTileColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, and <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>.
<p>
<div class="fragment"><pre>00783 {
00784         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
00785                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, s, t, dest);
00786         <span class="keywordflow">else</span>
00787         {
00788                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_12">computeTileLightmapPixelPrecomputed</a>(ts, tt, s, t, dest);
00789                 <span class="comment">// Add the inlufence of TLI.</span>
00790                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_1">addTileLightmapPixelWithTLI</a>(ts, tt, s, t, dest);
00791         }
00792 
00793         <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
00794         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_20">modulateTileLightmapPixelWithTileColors</a>(ts, tt, s, t, dest);
00795 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_10" doxytag="NL3D::CPatch::computeTileLightmapPixelAroundCorner" ></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::CPatch::computeTileLightmapPixelAroundCorner </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>stIn</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>lookAround</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>

<p>
Definition at line <a class="el" href="a06157.html#l00799">799</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
<p>
<div class="fragment"><pre>00800 {
00801         <span class="keywordtype">bool</span>    mustLookOnNeighbor= <span class="keyword">false</span>;
00802 
00803         <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis).</span>
00804         <a class="code" href="a04558.html#a14">sint</a>    u, <a class="code" href="a04223.html#a576">v</a>;
00805         u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
00806         <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
00807 
00808         <span class="comment">// if allowed, try to go on neighbor patch.</span>
00809         <span class="keywordflow">if</span>(lookAround)
00810         {
00811                 <span class="comment">// try to know if we must go on a neighbor patch (maybe false with bind X/1).</span>
00812                 <span class="keywordflow">if</span>( u&lt;0 || u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> || <a class="code" href="a04223.html#a576">v&lt;0 || v&gt;</a>=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)
00813                         mustLookOnNeighbor= <span class="keyword">true</span>;
00814         }
00815 
00816 
00817         <span class="comment">// If we must get (if possible) the pixel in the current patch, do it.</span>
00818         <span class="keywordflow">if</span>(!mustLookOnNeighbor)
00819         {
00820                 <span class="comment">// if out this patch, abort.</span>
00821                 <span class="keywordflow">if</span>( u&lt;0 || u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> || <a class="code" href="a04223.html#a576">v&lt;0 || v&gt;</a>=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)
00822                         <span class="keywordflow">return</span>;
00823                 <span class="keywordflow">else</span>
00824                 {
00825                         <span class="comment">// get this pixel.</span>
00826                         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
00827                 }
00828         }
00829         <span class="comment">// else get from the best neighbor patch.</span>
00830         <span class="keywordflow">else</span>
00831         {
00832                 <span class="comment">// choose against which edge we must find the pixel.</span>
00833                 <a class="code" href="a04558.html#a15">uint</a>    edge=0;
00834                 <span class="keywordflow">if</span>(u&lt;0)                                 edge=0;
00835                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a576">v</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)     edge=1;
00836                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)     edge=2;
00837                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a576">v</a>&lt;0)                    edge=3;
00838 
00839                 <span class="comment">// retrieve info on neighbor.</span>
00840                 CBindInfo                       bindInfo;
00841                 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
00842 
00843                 <span class="comment">// if neighbor present.</span>
00844                 <span class="keywordflow">if</span>(bindInfo.Zone)
00845                 {
00846                         <a class="code" href="a03660.html">CVector2f</a>       stOut;
00847                         <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a>          *patchOut;
00848                         <a class="code" href="a04558.html#a15">uint</a>            patchId;
00849 
00850                         <span class="comment">// Ok, search uv on this patch.</span>
00851                         CPatchUVLocator         uvLocator;
00852                         uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
00853                         patchId= uvLocator.selectPatch(stIn);
00854                         uvLocator.locateUV(stIn, patchId, patchOut, stOut);
00855 
00856                         <span class="comment">// retry only one time, so at next call, must find the data IN htis patch (else abort).</span>
00857                         patchOut-&gt;computeTileLightmapPixelAroundCorner(stOut, dest, <span class="keyword">false</span>);
00858                 }
00859         }
00860 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_11" doxytag="NL3D::CPatch::computeTileLightmapPixelAutomatic" ></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::CPatch::computeTileLightmapPixelAutomatic </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>

<p>
Definition at line <a class="el" href="a06157.html#l00601">601</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a05863.html#l00415">NL3D::CLandscape::getAutomaticLightDir()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l00237">v</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00557">computeTileLightmapAutomatic()</a>, <a class="el" href="a06157.html#l00571">computeTileLightmapEdgeAutomatic()</a>, and <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
<p>
<div class="fragment"><pre>00602 {
00603         <span class="keywordtype">float</span>           u,<a class="code" href="a04223.html#a576">v</a>;
00604         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span>      lumelSize= 1.f/<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
00605 
00606         <span class="comment">// use 3 computeVertex to compute a normal. This is slow....</span>
00607         CVector         p0, p1 ,p2;
00608         <span class="comment">// 1st vert. Top-left of the lumel.</span>
00609         u= (ts + <a class="code" href="a04223.html#a626">s</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00610         <a class="code" href="a04223.html#a576">v</a>= (tt + <a class="code" href="a04223.html#a627">t</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00611         p0= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
00612         <span class="comment">// 2nd vert. Bottom-left of the lumel.</span>
00613         u= (ts + <a class="code" href="a04223.html#a626">s</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00614         <a class="code" href="a04223.html#a576">v</a>= (tt + (<a class="code" href="a04223.html#a627">t</a>+1)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00615         p1= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
00616         <span class="comment">// 3rd vert. Center-Right of the lumel.</span>
00617         u= (ts + (<a class="code" href="a04223.html#a626">s</a>+1)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00618         <a class="code" href="a04223.html#a576">v</a>= (tt + (<a class="code" href="a04223.html#a627">t</a>+0.5f)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00619         p2= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
00620 
00621         <span class="comment">// the normal.</span>
00622         CVector         normal;
00623         normal= (p1-p0)^(p2-p0);
00624         normal.normalize();
00625 
00626         <span class="comment">// lighting.</span>
00627         <span class="keywordtype">float</span>   c= -normal*<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLightDir();
00628         c= max(c, 0.f);
00629         <a class="code" href="a04558.html#a14">sint</a>    ic;
00630 
00631 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
00632 <span class="preprocessor"></span>        <span class="comment">// FastFloor using fistp. Don't care convention.</span>
00633         <span class="keywordtype">float</span>   fc= c*256;
00634         _asm
00635         {
00636                 fld fc
00637                 fistp ic
00638         }
00639 <span class="preprocessor">#else</span>
00640 <span class="preprocessor"></span>        ic= (<a class="code" href="a04558.html#a14">sint</a>)floor(c*256);
00641 <span class="preprocessor">#endif</span>
00642 <span class="preprocessor"></span>        <a class="code" href="a05378.html#a374">clamp</a>(ic, 0, 255);
00643 
00644         <span class="comment">// ambiant/diffuse lighting.</span>
00645         *dest= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getStaticLight()[ic];
00646 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_12" doxytag="NL3D::CPatch::computeTileLightmapPixelPrecomputed" ></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::CPatch::computeTileLightmapPixelPrecomputed </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>

<p>
Definition at line <a class="el" href="a06157.html#l00738">738</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
<p>
<div class="fragment"><pre>00739 {
00740         <span class="comment">// Lumel table</span>
00741         <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
00742 
00743         <span class="comment">// Return the lumel</span>
00744         *dest=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (&amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]), s+(t&lt;&lt;2))];
00745 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_13" doxytag="NL3D::CPatch::computeTileLightmapPrecomputed" ></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::CPatch::computeTileLightmapPrecomputed </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>

<p>
Definition at line <a class="el" href="a06157.html#l00678">678</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
<p>
<div class="fragment"><pre>00679 {
00680         <span class="comment">// Lumel table</span>
00681         <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
00682         <span class="comment">// Unpack the lumels</span>
00683         <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
00684         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (buffer, &amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]));
00685 
00686         <span class="comment">// Retrun it</span>
00687         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
00688         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
00689         {
00690                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
00691                 {
00692                         <span class="comment">// lumel</span>
00693                         dest[<a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a582">stride</a> + <a class="code" href="a04223.html#a572">x</a>]=colorTable[<a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04223.html#a572">x</a>+(<a class="code" href="a04223.html#a573">y</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>)]];
00694                 }
00695         }
00696 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha5" doxytag="NL3D::CPatch::computeVertex" ></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> NL3D::CPatch::computeVertex </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Compute a vertex. Compute a vertex according to:<ul>
<li>s,t</li><li>patch control points uncompressed with zone Bias/Scale.</li></ul>
<p>
Patch UV geometric correction.<ul>
<li>Patch noise (and noise of Patch neighbor).</li></ul>

<p>
Definition at line <a class="el" href="a06155.html#l01338">1338</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06158.html#l00874">computeNoise()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03106">NL3D::CLandscape::getNoiseMode()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00335">addTileTrianglesInBBox()</a>, <a class="el" href="a06497.html#l02468">NL3D::CTessFace::averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06768.html#l03346">NL3D::CZoneLighter::processZonePointLightRT()</a>, <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
<p>
<div class="fragment"><pre>01339 {
01340         <span class="comment">// \todo yoyo: TODO_UVCORRECT: use UV correction.</span>
01341 
01342         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getNoiseMode())
01343         {
01344                 <span class="comment">// compute displacement map to disturb result.</span>
01345                 CVector         displace;
01346                 <a class="code" href="a03057.html#NL3D_1_1CPatchz670_7">computeNoise</a>(s,t, displace);
01347 
01348                 <span class="comment">// return patch(s,t) + dispalcement result.</span>
01349                 <span class="comment">// unpack. Do it after computeNoise(), because this last may change the cache.</span>
01350                 CBezierPatch    *patch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
01351                 <span class="keywordflow">return</span> patch-&gt;eval(s,t) + displace;
01352         }
01353         <span class="keywordflow">else</span>
01354         {
01355                 <span class="comment">// unpack and return patch(s,t).</span>
01356                 CBezierPatch    *patch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
01357                 <span class="keywordflow">return</span> patch-&gt;eval(s,t);
01358         }
01359 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz668_4" doxytag="NL3D::CPatch::computeVertexButCorner" ></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> NL3D::CPatch::computeVertexButCorner </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>s</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>t</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>onCorner</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex()</a>. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l01456">1456</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>.
<p>
<div class="fragment"><pre>01457 {
01458         <span class="comment">// must be compiled</span>
01459         <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
01460 
01461         <span class="comment">// Test is on a edge/corner of the patch</span>
01462         <a class="code" href="a04558.html#a14">sint</a>    edgeIdS= -1;
01463         <a class="code" href="a04558.html#a14">sint</a>    edgeIdT= -1;
01464         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==0)                edgeIdS= 0;
01465         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==1)   edgeIdS= 2;
01466         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==0)                edgeIdT= 3;
01467         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==1)   edgeIdT= 1;
01468 
01469         <span class="comment">// test if on a corner</span>
01470         <span class="keywordflow">if</span>(edgeIdS&gt;=0 &amp;&amp; edgeIdT&gt;=0)
01471         {
01472                 <span class="comment">// indicate that yes, we are on a corner</span>
01473                 onCorner= <span class="keyword">true</span>;
01474                 <span class="comment">// return the baseVertex according to edge falgs</span>
01475                 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==3)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]-&gt;EndPos;
01476                 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==1)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]-&gt;EndPos;
01477                 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==1)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]-&gt;EndPos;
01478                 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==3)    <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]-&gt;EndPos;
01479                 <a class="code" href="a04199.html#a12">nlstop</a>;
01480                 <span class="comment">// Error, but Avoid warning</span>
01481                 <span class="keywordflow">return</span> CVector::Null;
01482         }
01483         <span class="comment">// else, std case</span>
01484         <span class="keywordflow">else</span>
01485         {
01486                 onCorner= <span class="keyword">false</span>;
01487                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s, t);
01488         }
01489 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_0" doxytag="NL3D::CPatch::copyTileFlagsFromPatch" ></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::CPatch::copyTileFlagsFromPatch </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03057.html">CPatch</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>src</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 this patch flags from an other one. The patchs must match
<p>
Definition at line <a class="el" href="a06155.html#l02245">2245</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01542">NL3D::CZone::copyTilesFlags()</a>.
<p>
<div class="fragment"><pre>02246 {
02247         <a class="code" href="a04199.html#a6">nlassert</a>(OrderS == <a class="code" href="a04223.html#a652">src</a>-&gt;OrderS
02248                          &amp;&amp; OrderT == <a class="code" href="a04223.html#a652">src</a>-&gt;OrderT);
02249 
02250         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k  &lt; <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>.size(); ++k)
02251         {
02252                 <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[k].copyFlagsFromOther(<a class="code" href="a04223.html#a652">src</a>-&gt;Tiles[k]);
02253         }
02254 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_14" doxytag="NL3D::CPatch::CPatch::getCurrentTLIColor" ></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">CRGBA</a> NL3D::CPatch::CPatch::getCurrentTLIColor </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>x</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>y</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd14" doxytag="NL3D::CPatch::createFaceVectorFar0OrTile" ></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::CPatch::createFaceVectorFar0OrTile </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>

<p>
Definition at line <a class="el" href="a06161.html#l00663">663</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00198">NL3D::CTessBlock::createFaceVectorFar0()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>.
<p>
<div class="fragment"><pre>00664 {
00665         <span class="comment">// If Far Mode.</span>
00666         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
00667         {
00668                 <span class="comment">// Create the face for all TessBlocks.</span>
00669                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00670                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00671                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00672         }
00673         <span class="comment">// Or If Tile Mode.</span>
00674         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
00675         {
00676                 <span class="comment">// Create the face for all TessBlocks.</span>
00677                 <span class="comment">// No tiles in MasterBlock!</span>
00678                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00679                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00680         }
00681 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd15" doxytag="NL3D::CPatch::createFaceVectorFar1" ></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::CPatch::createFaceVectorFar1 </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>

<p>
Definition at line <a class="el" href="a06161.html#l00641">641</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00242">NL3D::CTessBlock::createFaceVectorFar1()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>.
<p>
<div class="fragment"><pre>00642 {
00643         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00644         {
00645                 <span class="comment">// Create the face for all TessBlocks.</span>
00646                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00647                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00648                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00649         }
00650 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz671_0" doxytag="NL3D::CPatch::createVegetableBlock" ></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::CPatch::createVegetableBlock </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>numTb</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>ts</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>tt</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>
Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. 
<p>

<p>
Definition at line <a class="el" href="a06162.html#l00294">294</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
<p>
References <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06156.html#l00098">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>, <a class="el" href="a06156.html#l00097">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, and <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>.
<p>
<div class="fragment"><pre>00295 {
00296         <span class="comment">// TessBlock width</span>
00297         <a class="code" href="a04558.html#a15">uint</a>    tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> &gt;&gt; 1;
00298         <span class="comment">// clipBlock width</span>
00299         <a class="code" href="a04558.html#a15">uint</a>    nTbPerCb= <a class="code" href="a04733.html#a13">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>;
00300         <a class="code" href="a04558.html#a15">uint</a>    cbWidth= (tbWidth + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
00301 
00302         <span class="comment">// compute tessBlock coordinate.</span>
00303         <a class="code" href="a04558.html#a15">uint</a>    tbs ,tbt;
00304         tbs= ts &gt;&gt; 1;
00305         tbt= tt &gt;&gt; 1;
00306         <span class="comment">// compute clipBlock coordinate.</span>
00307         <a class="code" href="a04558.html#a15">uint</a>    cbs,cbt;
00308         cbs= tbs &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
00309         cbt= tbt &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
00310 
00311         <span class="comment">// create the vegetable block.</span>
00312         <a class="code" href="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a>                *vegetBlock= <span class="keyword">new</span> <a class="code" href="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a>;
00313         <span class="comment">// Init / append to list.</span>
00314         <span class="comment">// compute center of the vegetableBlock (approx).</span>
00315         CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00316         CVector         center= bpatch-&gt;eval( (<span class="keywordtype">float</span>)(tbs*2+1)/OrderS, (<span class="keywordtype">float</span>)(tbt*2+1)/OrderT );
00317         <span class="comment">// Lower-Left tile is (tbs*2, tbt*2)</span>
00318         vegetBlock-&gt;init(center, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager, VegetableClipBlocks[cbt *cbWidth + cbs], <span class="keyword">this</span>, tbs*2, tbt*2, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableBlockList);
00319 
00320         <span class="comment">// set in the tessBlock</span>
00321         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock= vegetBlock;
00322 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_2" doxytag="NL3D::CPatch::debugAllocationMarkIndices" ></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::CPatch::debugAllocationMarkIndices </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>marker</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>

<p>
Definition at line <a class="el" href="a06161.html#l00914">914</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00893">debugAllocationMarkIndicesFarList()</a>, <a class="el" href="a06161.html#l00904">debugAllocationMarkIndicesNearList()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00915 {
00916         <a class="code" href="a04558.html#a14">sint</a> i;
00917 
00918         <span class="comment">// Do it For Far.</span>
00919         <a class="code" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, marker);
00920         <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00921         {
00922                 CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00923                 <a class="code" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a>(tblock.FarVertexList, marker);
00924         }
00925         <span class="comment">// Do it For Near.</span>
00926         <span class="comment">// No Tiles in MasterBlock!!</span>
00927         <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00928         {
00929                 CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00930                 <a class="code" href="a03057.html#NL3D_1_1CPatchd17">debugAllocationMarkIndicesNearList</a>(tblock.NearVertexList, marker);
00931         }
00932 
00933 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd16" doxytag="NL3D::CPatch::debugAllocationMarkIndicesFarList" ></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::CPatch::debugAllocationMarkIndicesFarList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vertList</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>marker</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>

<p>
Definition at line <a class="el" href="a06161.html#l00893">893</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>.
<p>
<div class="fragment"><pre>00894 {
00895         <span class="comment">// Traverse the vertList.</span>
00896         CTessFarVertex  *pVert;
00897         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
00898         {
00899                 pVert-&gt;Index0= marker;
00900                 pVert-&gt;Index1= marker;
00901         }
00902 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd17" doxytag="NL3D::CPatch::debugAllocationMarkIndicesNearList" ></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::CPatch::debugAllocationMarkIndicesNearList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vertList</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>marker</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>

<p>
Definition at line <a class="el" href="a06161.html#l00904">904</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>.
<p>
<div class="fragment"><pre>00905 {
00906         <span class="comment">// Traverse the vertList.</span>
00907         CTessNearVertex *pVert;
00908         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
00909         {
00910                 pVert-&gt;Index= marker;
00911         }
00912 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz675_1" doxytag="NL3D::CPatch::decRefDLMContext" ></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::CPatch::decRefDLMContext </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>count</em> = 1          </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>
Dec a ref count to the DLMContext, deleting it if refCount== 0. 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l01977">1977</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</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="a06157.html#l02035">endDLMLighting()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
<p>
<div class="fragment"><pre>01978 {
01979         <span class="comment">// the patch must be compiled.</span>
01980         <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
01981         <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContextRefCount&gt;0);
01982 
01983         <span class="comment">// dec Ref.</span>
01984         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>-= <a class="code" href="a04223.html#a577">count</a>;
01985         <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContextRefCount&gt;=0);
01986 
01987         <span class="comment">// If 0, delete the context.</span>
01988         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>==0)
01989         {
01990                 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>;
01991                 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
01992 
01993                 <span class="comment">// If the patch is visible, it may have Far Vertices created, </span>
01994                 <span class="comment">// hence, we must reset their DLM Uvs (to point to black pixel)</span>
01995                 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
01996                 {
01997                         <span class="comment">// setup DLM Uv with new _DLMContext</span>
01998                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_10">fillVBFarsDLMUvOnly</a>();
01999                 }
02000         }
02001 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_8" doxytag="NL3D::CPatch::decRefTessBlocks" ></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::CPatch::decRefTessBlocks </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>

<p>
Definition at line <a class="el" href="a06155.html#l00658">658</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
<p>
<div class="fragment"><pre>00659 {
00660         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>--;
00661         <span class="comment">// If no loinger need the tessblocks, delete them.</span>
00662         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>==0)
00663                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
00664         <a class="code" href="a04199.html#a6">nlassert</a>(TessBlockRefCount&gt;=0);
00665 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz651_0" doxytag="NL3D::CPatch::deleteAllVegetableIgs" ></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::CPatch::deleteAllVegetableIgs </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>
Delete any vegetable Ig still existing in this patch. 
<p>

<p>
Definition at line <a class="el" href="a06162.html#l00282">282</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
<p>
References <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, and <a class="el" href="a05862.html#l03120">NL3D::CLandscape::enableVegetable()</a>.
<p>
<div class="fragment"><pre>00283 {
00284         <span class="comment">// For all TessBlocks, try to release their VegetableBlock</span>
00285         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00286         {
00287                 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a>(i);
00288         }
00289 
00290 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd18" doxytag="NL3D::CPatch::deleteFaceVectorFar0OrTile" ></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::CPatch::deleteFaceVectorFar0OrTile </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>

<p>
Definition at line <a class="el" href="a06161.html#l00683">683</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00213">NL3D::CTessBlock::deleteFaceVectorFar0()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>.
<p>
<div class="fragment"><pre>00684 {
00685         <span class="comment">// If Far Mode.</span>
00686         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
00687         {
00688                 <span class="comment">// delete the face for all TessBlocks.</span>
00689                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.deleteFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00690                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00691                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00692         }
00693         <span class="comment">// Or If Tile Mode.</span>
00694         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
00695         {
00696                 <span class="comment">// delete the face for all TessBlocks.</span>
00697                 <span class="comment">// No tiles in MasterBlock!</span>
00698                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00699                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00700         }
00701 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd19" doxytag="NL3D::CPatch::deleteFaceVectorFar1" ></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::CPatch::deleteFaceVectorFar1 </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>

<p>
Definition at line <a class="el" href="a06161.html#l00652">652</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00256">NL3D::CTessBlock::deleteFaceVectorFar1()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>.
<p>
<div class="fragment"><pre>00653 {
00654         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00655         {
00656                 <span class="comment">// delete the face for all TessBlocks.</span>
00657                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.deleteFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00658                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00659                         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00660         }
00661 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha7" doxytag="NL3D::CPatch::deleteTileUvs" ></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::CPatch::deleteTileUvs </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="a06155.html#l02142">2142</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
<div class="fragment"><pre>02143 {
02144         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;deleteTileUvs();
02145         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;deleteTileUvs();
02146 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_3" doxytag="NL3D::CPatch::deleteVBAndFaceVector" ></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::CPatch::deleteVBAndFaceVector </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="a06161.html#l00837">837</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
<p>
<div class="fragment"><pre>00838 {
00839         <a class="code" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a>(<span class="keyword">false</span>);
00840         <a class="code" href="a03057.html#NL3D_1_1CPatchd19">deleteFaceVectorFar1</a>();
00841         <a class="code" href="a03057.html#NL3D_1_1CPatchd18">deleteFaceVectorFar0OrTile</a>();
00842 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_4" doxytag="NL3D::CPatch::deleteVBAndFaceVectorFar1Only" ></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::CPatch::deleteVBAndFaceVectorFar1Only </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="a06161.html#l00854">854</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>00855 {
00856         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00857         {
00858                 <span class="comment">// alloc VB.</span>
00859                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, <span class="keyword">false</span>);
00860                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00861                 {
00862                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00863                         <span class="comment">// need update VB only if tessBlock is visible.</span>
00864                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
00865                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
00866                 }
00867         }
00868 
00869         <a class="code" href="a03057.html#NL3D_1_1CPatchd19">deleteFaceVectorFar1</a>();
00870 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_9" doxytag="NL3D::CPatch::dirtTessBlockFaceVector" ></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::CPatch::dirtTessBlockFaceVector </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03475.html">CTessBlock</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>block</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="a06155.html#l00783">783</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00354">NL3D::CTessBlock::appendToModifyListAndDeleteFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06492.html#l00152">NL3D::CTessBlock::isInModifyList()</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, and <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>.
<p>
<div class="fragment"><pre>00784 {
00785         <span class="comment">// If patch is visible, block's faceVector should exist, but are no more valid.</span>
00786         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
00787         {
00788                 <span class="comment">// If this tessBlock not already notified to modification.</span>
00789                 <span class="keywordflow">if</span>(!tb.isInModifyList())
00790                 {
00791                         <span class="comment">// Then append, and delete all FaceVector.</span>
00792                         <span class="comment">// NB: delete FaceVector now, because the TessBlock himself may disapear soon.</span>
00793                         tb.appendToModifyListAndDeleteFaceVector(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_TessBlockModificationRoot, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00794                 }
00795         }
00796 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz657_1" doxytag="NL3D::CPatch::endDLMLighting" ></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::CPatch::endDLMLighting </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>
end Dynamic light Process, deleting the DLMContext if necessary. NB: _DLMContext-&gt;compileLighting() is not called, since done during render phase. Called by <a class="el" href="a02702.html">CLandscape</a>. _DLMContext must exist
<p>
Definition at line <a class="el" href="a06157.html#l02035">2035</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06164.html#l00127">NL3D::CPatchDLMContext::OldPointLightCount</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>.
<p>
<div class="fragment"><pre>02036 {
02037         <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
02038 
02039         <span class="comment">// delete reference from old pointLight influences, at prec render() pass. _DLMContext may be deleted here,</span>
02040         <span class="comment">// if no more lights use it, and if the patch is not in Near.</span>
02041         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;OldPointLightCount);
02042 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_5" doxytag="NL3D::CPatch::evalLumelBlock" ></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::CPatch::evalLumelBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>original</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>unCompressed</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>width</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>height</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>
Eval an uncompressed 4x4 block against the original<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l00244">244</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05646.html#l00237">v</a>, and <a class="el" href="a05646.html#l01013">width</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01267">packShadowMap()</a>.
<p>
<div class="fragment"><pre>00245 {
00246         <span class="comment">// Sum</span>
00247         <a class="code" href="a04558.html#a15">uint</a> sum=0;
00248 
00249         <span class="comment">// Eval error for each..</span>
00250         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;<a class="code" href="a04223.html#a633">height</a>; <a class="code" href="a04223.html#a576">v</a>++)
00251         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;<a class="code" href="a04223.html#a632">width</a>; u++)
00252         {
00253                 sum += abs((<a class="code" href="a04558.html#a14">sint</a>)original[v*4+u]-(<a class="code" href="a04558.html#a14">sint</a>)unCompressed[v*4+u]);
00254         }
00255 
00256         <span class="comment">// return the sum</span>
00257         <span class="keywordflow">return</span> sum;
00258 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_10" doxytag="NL3D::CPatch::extendTessBlockWithEndPos" ></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::CPatch::extendTessBlockWithEndPos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00766">766</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
<p>
Referenced by <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>.
<p>
<div class="fragment"><pre>00767 {
00768         <span class="keywordflow">if</span>(face-&gt;Level&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
00769         {
00770                 <span class="comment">// get the tessBlock of the face.</span>
00771                 <a class="code" href="a04558.html#a15">uint</a>    numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
00772 
00773                 <span class="comment">// Must enlarge the BSphere of the tesblock!!</span>
00774                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereFirst(face-&gt;VBase-&gt;EndPos);
00775                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;EndPos);
00776                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;EndPos);
00777                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereCompile();
00778         }
00779 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_5" doxytag="NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB" ></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::CPatch::fillFar0DLMUvOnlyVertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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>

<p>
Definition at line <a class="el" href="a06161.html#l01609">1609</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>.
<p>
<div class="fragment"><pre>01610 {
01611         <span class="comment">// The Buffers must have been locked</span>
01612         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator);
01613         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator-&gt;bufferLocked());
01614         <span class="comment">// VBInfo must be OK.</span>
01615         <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs());
01616 
01617         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01618         <span class="keyword">static</span> CUV              uvDLM;
01619 
01620         <span class="comment">// If the DLMContext exist</span>
01621         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
01622         {
01623                 <span class="comment">// Traverse the vertList, to compute new uvDLM</span>
01624                 CTessFarVertex  *pVert;
01625                 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01626                 {
01627                         <span class="comment">// Compute/build the new vertex.</span>
01628                         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
01629                         CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
01630 
01631                         <span class="comment">// compute Uvs.</span>
01632                         CParamCoord     pc= pVert-&gt;PCoord;
01633 
01634                         <span class="comment">// compute Dynamic lightmap Uv with DLM context info.</span>
01635                         uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
01636                         uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
01637 
01638                         <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
01639                         *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
01640                 }
01641         }
01642         <span class="comment">// else, reset all Uvs</span>
01643         <span class="keywordflow">else</span>
01644         {
01645                 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
01646                 uvDLM.U= 1;
01647                 uvDLM.V= 1;
01648 
01649                 <span class="comment">// Traverse the vertList, to reset uv</span>
01650                 CTessFarVertex  *pVert;
01651                 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01652                 {
01653                         <span class="comment">// Compute/build the new vertex.</span>
01654                         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
01655                         CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
01656 
01657                         <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
01658                         *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
01659                 }
01660         }
01661 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd20" doxytag="NL3D::CPatch::fillFar0VertexListVB" ></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::CPatch::fillFar0VertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01161">1161</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>01162 {
01163         <span class="comment">// Traverse the vertList.</span>
01164         CTessFarVertex  *pVert;
01165         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01166         {
01167                 <a class="code" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a>(pVert);
01168         }
01169 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd21" doxytag="NL3D::CPatch::fillFar0VertexVB" ></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::CPatch::fillFar0VertexVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, 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="a06161.html#l00946">946</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00827">Far0UBias</a>, <a class="el" href="a06156.html#l00827">Far0UScale</a>, <a class="el" href="a06156.html#l00827">Far0VBias</a>, <a class="el" href="a06156.html#l00827">Far0VScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a06156.html#l00054">NL_PATCH_FAR0_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, and <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>.
<p>
<div class="fragment"><pre>00947 {
00948         <span class="comment">// The Buffers must have been locked</span>
00949         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator);
00950         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator-&gt;bufferLocked());
00951         <span class="comment">// VBInfo must be OK.</span>
00952         <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs());
00953 
00954         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
00955         <span class="comment">// Compute/build the new vertex.</span>
00956         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
00957         CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
00958 
00959         <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
00960 
00961         <span class="comment">// compute Uvs.</span>
00962         <span class="keyword">static</span> CUV      uv;
00963         CParamCoord     pc= pVert-&gt;PCoord;
00964         <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>)
00965         {
00966                 uv.U= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
00967                 uv.V= (1.f-pc.getS())* <a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
00968         }
00969         <span class="keywordflow">else</span>
00970         {
00971                 uv.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
00972                 uv.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
00973         }
00974 
00975         <span class="comment">// compute Dynamic lightmap Uv.</span>
00976         <span class="keyword">static</span> CUV      uvDLM;
00977         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)         <span class="comment">//  (NB: Suppose BTB kill this test).</span>
00978         {
00979                 <span class="comment">// compute UV with DLM context info.</span>
00980                 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
00981                 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
00982         }
00983         <span class="keywordflow">else</span>
00984         {
00985                 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
00986                 uvDLM.U= 1;
00987                 uvDLM.V= 1;
00988         }
00989 
00990         <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
00991         <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
00992         {
00993                 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
00994                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
00995                 <span class="comment">// Set Uvs.</span>
00996                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff0)= uv;
00997                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
00998         }
00999         <span class="keywordflow">else</span>
01000         {
01001                 <span class="comment">// Else must setup Vertex program inputs</span>
01002                 <span class="comment">// v[0]== StartPos.</span>
01003                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
01004                 <span class="comment">// v[8]== Tex0</span>
01005                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff0)= uv;
01006                 <span class="comment">// v[9]== Tex1</span>
01007                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
01008 
01009                 <span class="comment">// v[10]== GeomInfo.</span>
01010                 <span class="keyword">static</span> CUV      geomInfo;
01011                 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
01012                 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
01013                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.GeomInfoOff)= geomInfo;
01014 
01015                 <span class="comment">// v[11]== EndPos - StartPos</span>
01016                 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.DeltaPosOff)=
01017                         pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
01018         }
01019 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_6" doxytag="NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB" ></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::CPatch::fillFar1DLMUvOnlyVertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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>

<p>
Definition at line <a class="el" href="a06161.html#l01664">1664</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>.
<p>
<div class="fragment"><pre>01665 {
01666         <span class="comment">// The Buffers must have been locked</span>
01667         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator);
01668         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator-&gt;bufferLocked());
01669         <span class="comment">// VBInfo must be OK.</span>
01670         <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs());
01671 
01672         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01673         <span class="keyword">static</span> CUV              uvDLM;
01674 
01675         <span class="comment">// If the DLMContext exist</span>
01676         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
01677         {
01678                 <span class="comment">// Traverse the vertList, to compute new uvDLM</span>
01679                 CTessFarVertex  *pVert;
01680                 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01681                 {
01682                         <span class="comment">// Compute/build the new vertex.</span>
01683                         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
01684                         CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
01685 
01686                         <span class="comment">// compute Uvs.</span>
01687                         CParamCoord     pc= pVert-&gt;PCoord;
01688 
01689                         <span class="comment">// compute Dynamic lightmap Uv with DLM context info.</span>
01690                         uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
01691                         uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
01692 
01693                         <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
01694                         *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
01695                 }
01696         }
01697         <span class="comment">// else, reset all Uvs</span>
01698         <span class="keywordflow">else</span>
01699         {
01700                 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
01701                 uvDLM.U= 1;
01702                 uvDLM.V= 1;
01703 
01704                 <span class="comment">// Traverse the vertList, to reset uv</span>
01705                 CTessFarVertex  *pVert;
01706                 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01707                 {
01708                         <span class="comment">// Compute/build the new vertex.</span>
01709                         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
01710                         CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
01711 
01712                         <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
01713                         *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
01714                 }
01715         }
01716 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd22" doxytag="NL3D::CPatch::fillFar1VertexListVB" ></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::CPatch::fillFar1VertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01173">1173</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>01174 {
01175         <span class="comment">// Traverse the vertList.</span>
01176         CTessFarVertex  *pVert;
01177         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
01178         {
01179                 <a class="code" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a>(pVert);
01180         }
01181 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd23" doxytag="NL3D::CPatch::fillFar1VertexVB" ></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::CPatch::fillFar1VertexVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, 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="a06161.html#l01022">1022</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00828">Far1UBias</a>, <a class="el" href="a06156.html#l00828">Far1UScale</a>, <a class="el" href="a06156.html#l00828">Far1VBias</a>, <a class="el" href="a06156.html#l00828">Far1VScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a06156.html#l00055">NL_PATCH_FAR1_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, and <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>.
<p>
<div class="fragment"><pre>01023 {
01024         <span class="comment">// The Buffers must have been locked</span>
01025         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator);
01026         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator-&gt;bufferLocked());
01027         <span class="comment">// VBInfo must be OK.</span>
01028         <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs());
01029 
01030         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01031         <span class="comment">// Compute/build the new vertex.</span>
01032         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
01033         CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
01034 
01035         <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
01036 
01037         <span class="comment">// compute Uvs.</span>
01038         <span class="keyword">static</span> CUV      uv;
01039         CParamCoord     pc= pVert-&gt;PCoord;
01040         <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>)
01041         {
01042                 uv.U= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
01043                 uv.V= (1.f-pc.getS())* <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
01044         }
01045         <span class="keywordflow">else</span>
01046         {
01047                 uv.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
01048                 uv.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
01049         }
01050 
01051         <span class="comment">// compute Dynamic lightmap Uv.</span>
01052         <span class="keyword">static</span> CUV      uvDLM;
01053         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)         <span class="comment">//  (NB: Suppose BTB kill this test).</span>
01054         {
01055                 <span class="comment">// compute UV with DLM context info.</span>
01056                 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
01057                 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
01058         }
01059         <span class="keywordflow">else</span>
01060         {
01061                 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
01062                 uvDLM.U= 1;
01063                 uvDLM.V= 1;
01064         }
01065 
01066         <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
01067         <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
01068         {
01069                 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
01070                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
01071                 <span class="comment">// Set Uvs.</span>
01072                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff0)= uv;
01073                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
01074                 <span class="comment">// Set default color.</span>
01075                 <span class="keyword">static</span> <a class="code" href="a03337.html">CRGBA</a>    col(255,255,255,255);
01076                 *(<a class="code" href="a03337.html">CRGBA</a>*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.ColorOff)= col;
01077         }
01078         <span class="keywordflow">else</span>
01079         {
01080                 <span class="comment">// Else must setup Vertex program inputs</span>
01081                 <span class="comment">// v[0]== StartPos.</span>
01082                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
01083                 <span class="comment">// v[8]== Tex0</span>
01084                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff0)= uv;
01085                 <span class="comment">// v[9]== Tex1</span>
01086                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
01087 
01088                 <span class="comment">// v[10]== GeomInfo.</span>
01089                 <span class="keyword">static</span> CUV      geomInfo;
01090                 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
01091                 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
01092                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.GeomInfoOff)= geomInfo;
01093 
01094                 <span class="comment">// v[11]== EndPos - StartPos</span>
01095                 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.DeltaPosOff)=
01096                         pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
01097 
01098                 <span class="comment">// v[12]== Alpha information</span>
01099                 <span class="comment">// Hopefully, fillVBFar1Only() is called each Time the Far1 change, in preRender().</span>
01100                 <span class="comment">// So TransitionSqrMin and OOTransitionSqrDelta in CPath are valid.</span>
01101                 geomInfo.U= <a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>;
01102                 geomInfo.V= <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>;
01103                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.AlphaInfoOff)= geomInfo;
01104 
01105         }
01106 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz643_3" doxytag="NL3D::CPatch::fillPatchQuadBlock" ></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::CPatch::fillPatchQuadBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03068.html">CPatchQuadBlock</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>quadBlock</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
Fill a <a class="el" href="a03068.html">CPatchQuadBlock</a>, from its required PatchId. <a class="el" href="a04199.html#a6">nlassert(PatchId size is less than NL_PATCH_BLOCK_MAX_QUAD)</a>
<p>
Definition at line <a class="el" href="a06155.html#l00460">460</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00064">NL_PATCH_BLOCK_MAX_QUAD</a>, <a class="el" href="a06156.html#l00065">NL_PATCH_BLOCK_MAX_VERTEX</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderS</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderT</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S1</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T1</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l02359">NL3D::CLandscape::fillPatchQuadBlock()</a>.
<p>
<div class="fragment"><pre>00461 {
00462         CPatchBlockIdent        &amp;pbId= quadBlock.PatchBlockId;
00463         <a class="code" href="a04558.html#a15">uint</a>    lenS= pbId.S1-pbId.S0;
00464         <a class="code" href="a04558.html#a15">uint</a>    lenT= pbId.T1-pbId.T0;
00465         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.OrderS==OrderS );
00466         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.OrderT==OrderT );
00467         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.S1&lt;=OrderS );
00468         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.T1&lt;=OrderT );
00469         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.S0&lt;pbId.S1 );
00470         <a class="code" href="a04199.html#a6">nlassert</a>( pbId.T0&lt;pbId.T1 );
00471         <a class="code" href="a04199.html#a6">nlassert</a>( lenS&lt;=NL_PATCH_BLOCK_MAX_QUAD );
00472         <a class="code" href="a04199.html#a6">nlassert</a>( lenT&lt;=NL_PATCH_BLOCK_MAX_QUAD );
00473 
00474         <span class="comment">// Fill vertices.</span>
00475         <a class="code" href="a04558.html#a15">uint</a>    s0= pbId.S0;
00476         <a class="code" href="a04558.html#a15">uint</a>    t0= pbId.T0;
00477         <span class="comment">// some preca.</span>
00478         <span class="keywordtype">float</span>   startS0= (<span class="keywordtype">float</span>)s0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
00479         <span class="keywordtype">float</span>   startT0= (<span class="keywordtype">float</span>)t0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
00480         <span class="keywordtype">float</span>   ds= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
00481         <span class="keywordtype">float</span>   dt= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
00482 
00483         <span class="comment">// Parse all quads vertices corner.</span>
00484         <a class="code" href="a04558.html#a15">uint</a>    sl,tl;
00485         <span class="keywordflow">for</span>(tl=0; tl&lt;lenT+1; tl++)
00486         {
00487                 <span class="keywordtype">float</span>   fs, ft;
00488                 <span class="comment">// compute t patch coordinates.</span>
00489                 ft= startT0 + (<span class="keywordtype">float</span>)tl * dt ;
00490                 <span class="keywordflow">for</span>(sl=0; sl&lt;lenS+1; sl++)
00491                 {
00492                         <span class="comment">// compute s patch coordinates.</span>
00493                         fs= startS0 + (<span class="keywordtype">float</span>)sl * ds ;
00494 
00495                         <span class="comment">// Must use computeContinousVertex, to ensure continous coordinate on patch edges</span>
00496                         quadBlock.Vertices[sl + tl*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>]= <a class="code" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex</a>(fs, ft);
00497                 }
00498         }
00499 
00500 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd24" doxytag="NL3D::CPatch::fillTileVertexListVB" ></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::CPatch::fillTileVertexListVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>vertList</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="a06161.html#l01185">1185</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l01109">fillTileVertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>01186 {
01187         <span class="comment">// Traverse the vertList.</span>
01188         CTessNearVertex *pVert;
01189         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
01190         {
01191                 <a class="code" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a>(pVert);
01192         }
01193 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd25" doxytag="NL3D::CPatch::fillTileVertexVB" ></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::CPatch::fillTileVertexVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pVert</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, 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="a06161.html#l01109">1109</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00137">NL3D::CTessNearVertex::PUv0</a>, <a class="el" href="a06498.html#l00138">NL3D::CTessNearVertex::PUv1</a>, <a class="el" href="a06498.html#l00140">NL3D::CTessNearVertex::PUv2</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01556">checkFillVertexVBNear()</a>, and <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>.
<p>
<div class="fragment"><pre>01110 {
01111         <span class="comment">// The Buffers must have been locked</span>
01112         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentTileVBAllocator);
01113         <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentTileVBAllocator-&gt;bufferLocked());
01114         <span class="comment">// VBInfo must be OK.</span>
01115         <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs());
01116 
01117         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   *CurVBPtr;
01118         <span class="comment">// Compute/build the new vertex.</span>
01119         CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentTileVBInfo.VertexCoordPointer;
01120         CurVBPtr+= pVert-&gt;Index * CLandscapeGlobals::CurrentTileVBInfo.VertexSize;
01121 
01122 
01123         <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
01124 
01125         <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
01126         <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
01127         {
01128                 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
01129                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
01130                 <span class="comment">// Set Uvs.</span>
01131                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff0)= pVert-&gt;PUv0;
01132                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff1)= pVert-&gt;PUv1;
01133                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff2)= pVert-&gt;PUv2;
01134         }
01135         <span class="keywordflow">else</span>
01136         {
01137                 <span class="comment">// Else must setup Vertex program inputs</span>
01138                 <span class="comment">// v[0]== StartPos.</span>
01139                 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
01140                 <span class="comment">// v[8]== Tex0</span>
01141                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff0)= pVert-&gt;PUv0;
01142                 <span class="comment">// v[9]== Tex1</span>
01143                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff1)= pVert-&gt;PUv1;
01144                 <span class="comment">// v[13]== Tex2</span>
01145                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff2)= pVert-&gt;PUv2;
01146 
01147                 <span class="comment">// v[10]== GeomInfo.</span>
01148                 <span class="keyword">static</span> CUV      geomInfo;
01149                 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
01150                 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
01151                 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.GeomInfoOff)= geomInfo;
01152 
01153                 <span class="comment">// v[11]== EndPos - StartPos</span>
01154                 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.DeltaPosOff)=
01155                         pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
01156         }
01157 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_7" doxytag="NL3D::CPatch::fillVB" ></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::CPatch::fillVB </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="a06161.html#l01198">1198</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01248">fillVBIfVisible()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
<p>
<div class="fragment"><pre>01199 {
01200         <span class="comment">// Fill Far0.</span>
01201         <span class="comment">//=======</span>
01202         <span class="comment">// fill only if no reallcoation occurs</span>
01203         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
01204         {
01205                 <span class="comment">// Fill Far0 VB.</span>
01206                 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01207                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01208                 {
01209                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01210                         <span class="comment">// fill only if tblock visible.</span>
01211                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
01212                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
01213                 }
01214         }
01215         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; !CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs() )
01216         {
01217                 <span class="comment">// Fill Tile VB.</span>
01218                 <span class="comment">// No Tiles in MasterBlock!!</span>
01219                 <span class="comment">// Traverse the TessBlocks to add vertices.</span>
01220                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01221                 {
01222                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01223                         <span class="comment">// fill only if tblock visible.</span>
01224                         <span class="keywordflow">if</span>( tblock.visibleTile() )
01225                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a>(tblock.NearVertexList);
01226                 }
01227         }
01228 
01229         <span class="comment">// Fill Far1.</span>
01230         <span class="comment">//=======</span>
01231         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
01232         {
01233                 <span class="comment">// Fill VB.</span>
01234                 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01235                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01236                 {
01237                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01238                         <span class="comment">// fill only if tblock visible.</span>
01239                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
01240                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
01241                 }
01242         }
01243 
01244 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_8" doxytag="NL3D::CPatch::fillVBFar0Only" ></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::CPatch::fillVBFar0Only </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="a06161.html#l01256">1256</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>01257 {
01258         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
01259         {
01260                 <span class="comment">// Fill Far0 VB.</span>
01261                 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01262                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01263                 {
01264                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01265                         <span class="comment">// fill only if tblock visible.</span>
01266                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
01267                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
01268                 }
01269         }
01270 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_9" doxytag="NL3D::CPatch::fillVBFar1Only" ></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::CPatch::fillVBFar1Only </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="a06161.html#l01274">1274</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
<p>
<div class="fragment"><pre>01275 {
01276         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
01277         {
01278                 <span class="comment">// Fill VB.</span>
01279                 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01280                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01281                 {
01282                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01283                         <span class="comment">// fill only if tblock visible.</span>
01284                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
01285                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
01286                 }
01287         }
01288 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_10" doxytag="NL3D::CPatch::fillVBFarsDLMUvOnly" ></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::CPatch::fillVBFarsDLMUvOnly </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="a06161.html#l01720">1720</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01609">fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01664">fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, and <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>.
<p>
<div class="fragment"><pre>01721 {
01722         <span class="comment">// Do it for Far0.</span>
01723         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
01724         {
01725                 <span class="comment">// Fill Far0 VB.</span>
01726                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01727                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01728                 {
01729                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01730                         <span class="comment">// fill only if tblock visible.</span>
01731                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
01732                                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a>(tblock.FarVertexList);
01733                 }
01734         }
01735 
01736         <span class="comment">// Do it for Far1.</span>
01737         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
01738         {
01739                 <span class="comment">// Fill VB.</span>
01740                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
01741                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
01742                 {
01743                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01744                         <span class="comment">// fill only if tblock visible.</span>
01745                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
01746                                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a>(tblock.FarVertexList);
01747                 }
01748         }
01749 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_11" doxytag="NL3D::CPatch::fillVBIfVisible" ></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::CPatch::fillVBIfVisible </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="a06161.html#l01248">1248</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l01198">fillVB()</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>01249 {
01250         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()==<span class="keyword">false</span>)
01251                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
01252 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha8" doxytag="NL3D::CPatch::forceMergeAtTileLevel" ></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::CPatch::forceMergeAtTileLevel </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>
For changing TileMaxSubdivision. force tesselation to be under tile. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l02022">2022</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06497.html#l02448">NL3D::CTessFace::forceMergeAtTileLevel()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01259">NL3D::CZone::forceMergeAtTileLevel()</a>.
<p>
<div class="fragment"><pre>02023 {
02024         <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
02025 
02026         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;forceMergeAtTileLevel();
02027         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;forceMergeAtTileLevel();
02028 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz671_1" doxytag="NL3D::CPatch::generateTileVegetable" ></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::CPatch::generateTileVegetable </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>vegetIg</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>distType</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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02719.html">CLandscapeVegetableBlockCreateContext</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vbCreateCtx</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>
Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. 
<p>

<p>
Definition at line <a class="el" href="a06162.html#l00050">50</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06340.html#l00661">NLMISC::CRGBAF::A</a>, <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06340.html#l00659">NLMISC::CRGBAF::B</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06696.html#l00037">NL3D::CVegetableLightEx::computeCurrentColors()</a>, <a class="el" href="a06179.html#l00267">NL3D::CPointLight::computeLinearAttenuation()</a>, <a class="el" href="a06697.html#l00060">NL3D::CVegetableLightEx::Direction</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06340.html#l00657">NLMISC::CRGBAF::G</a>, <a class="el" href="a06686.html#l00190">NL3D::CVegetable::generateGroupBiLinear()</a>, <a class="el" href="a06686.html#l00306">NL3D::CVegetable::generateInstance()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06180.html#l00116">NL3D::CPointLight::getPosition()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a05862.html#l03218">NL3D::CLandscape::getTileVegetableDesc()</a>, <a class="el" href="a06550.html#l00112">NL3D::CTileVegetableDesc::getVegetableList()</a>, <a class="el" href="a06550.html#l00120">NL3D::CTileVegetableDesc::getVegetableSeed()</a>, <a class="el" href="a06164.html#l00121">NL3D::CPatchDLMContext::MaxU8</a>, <a class="el" href="a06164.html#l00122">NL3D::CPatchDLMContext::MaxV8</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06164.html#l00121">NL3D::CPatchDLMContext::MinU8</a>, <a class="el" href="a06164.html#l00122">NL3D::CPatchDLMContext::MinV8</a>, <a class="el" href="a05867.html#l00072">NL3D_PATCH_TILE_AREA</a>, <a class="el" href="a06693.html#l00051">NL3D_VEGETABLE_BLOCK_ELTDIST</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</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="a05972.html#l01170">NLMISC::CMatrix::normalize()</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a06697.html#l00058">NL3D::CVegetableLightEx::PointLight</a>, <a class="el" href="a06697.html#l00062">NL3D::CVegetableLightEx::PointLightFactor</a>, <a class="el" href="a06340.html#l00655">NLMISC::CRGBAF::R</a>, <a class="el" href="a06686.html#l00296">NL3D::CVegetable::reserveIgAddInstances()</a>, <a class="el" href="a06698.html#l00882">NL3D::CVegetableManager::reserveIgCompile()</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05538.html#l02935">size</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
<p>
Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>.
<p>
<div class="fragment"><pre>00052 {
00053         <a class="code" href="a04558.html#a15">uint</a>    i;
00054 
00055         <span class="comment">// Get tile infos for vegetable</span>
00056         <span class="comment">// =========================</span>
00057 
00058         <span class="comment">// Get the state for this vegetable tile</span>
00059         CTileElement::TVegetableInfo    vegetWaterState= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tt * <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts].getVegetableState();
00060         <span class="comment">// If vegetable disabled, skip!</span>
00061         <span class="keywordflow">if</span>(vegetWaterState == CTileElement::VegetableDisabled)
00062                 <span class="keywordflow">return</span>;
00063 
00064         <span class="comment">// get the tileId under this tile (&lt;=&gt; the tile material)</span>
00065         <a class="code" href="a04558.html#a15">uint</a>    tileId= Tiles[tt * <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts].Tile[0];
00066 
00067         <span class="comment">// get list of vegetable for this tile, and for hist distanceType category.</span>
00068         <span class="keyword">const</span> CTileVegetableDesc                &amp;tileVegetDesc= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileVegetableDesc(tileId);
00069         <span class="keyword">const</span> std::vector&lt;CVegetable&gt;   &amp;vegetableList= tileVegetDesc.getVegetableList(distType);
00070         <a class="code" href="a04558.html#a15">uint</a>                                                    distAddSeed= tileVegetDesc.getVegetableSeed(distType);
00071         <a class="code" href="a04558.html#a15">uint</a>                                                    numVegetable= vegetableList.size();
00072         
00073         <span class="comment">// If no vegetables at all, skip.</span>
00074         <span class="keywordflow">if</span>(numVegetable==0)
00075                 <span class="keywordflow">return</span>;
00076 
00077         <span class="comment">// compute approximate tile position and normal: get the middle</span>
00078         <span class="keywordtype">float</span>   tileU= (ts + 0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00079         <span class="keywordtype">float</span>   tileV= (tt + 0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00080         CBezierPatch    *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
00081         <span class="comment">// Get approximate position for the tile (usefull for noise). NB: eval() is faster than computeVertex().</span>
00082         CVector         tilePos= bpatch-&gt;eval(tileU, tileV);
00083         <span class="comment">// Get also the normal used for all instances on this tile (not precise, </span>
00084         <span class="comment">// don't take noise into account, but faster).</span>
00085         CVector         tileNormal= bpatch-&gt;evalNormal(tileU, tileV);
00086 
00087         <span class="comment">// Compute also position on middle of 4 edges of this tile, for generateGroupBiLinear().</span>
00088         CVector         tilePosBiLinear[4];
00089         <span class="keywordtype">float</span>           OOos= 1.0f / <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
00090         <span class="keywordtype">float</span>           OOot= 1.0f / <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
00091         tilePosBiLinear[0]= bpatch-&gt;eval( (ts + 0.0f) * OOos, (tt + 0.5f) * OOot);
00092         tilePosBiLinear[1]= bpatch-&gt;eval( (ts + 1.0f) * OOos, (tt + 0.5f) * OOot);
00093         tilePosBiLinear[2]= bpatch-&gt;eval( (ts + 0.5f) * OOos, (tt + 0.0f) * OOot);
00094         tilePosBiLinear[3]= bpatch-&gt;eval( (ts + 0.5f) * OOos, (tt + 1.0f) * OOot);
00095 
00096 
00097         <span class="comment">// compute a rotation matrix with the normal</span>
00098         CMatrix         matInstance;
00099         matInstance.setRot(CVector::I, CVector::J, tileNormal);
00100         <span class="comment">// must normalize the matrix. use the vector which is the most orthogonal to tileNormal</span>
00101         <span class="comment">// If tileNormal is much more a J vector, then use plane (I,tileNormal), and vice-versa</span>
00102         <span class="keywordflow">if</span>(fabs(tileNormal.y) &gt; fabs(tileNormal.x))
00103                 matInstance.normalize(CMatrix::ZXY);
00104         <span class="keywordflow">else</span>
00105                 matInstance.normalize(CMatrix::ZYX);
00106 
00107 
00108         <span class="comment">// prepare color / lighting</span>
00109         <span class="comment">// =========================</span>
00110 
00111         <span class="comment">// say that ambient never change. VegetableManager handle the ambient and diffuse itself (for precomputeLighting)</span>
00112         <a class="code" href="a03338.html">CRGBAF</a>  ambientF= <a class="code" href="a03338.html">CRGBAF</a>(1,1,1,1);
00113 
00114         <span class="comment">// Compute the tileLightmap (not modified by tileColor).</span>
00115         <span class="keyword">static</span>  <a class="code" href="a04558.html#a7">uint8</a>   tileLumelmap[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> * <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
00116         <a class="code" href="a03057.html#NL3D_1_1CPatchz671_3">getTileLumelmapPrecomputed</a>(ts, tt, tileLumelmap, NL_LUMEL_BY_TILE);
00117         <span class="comment">// compute diffuse color by substracting from ambient.</span>
00118         CRGBAF  diffuseColorF[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> * <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
00119         <span class="comment">// TODO_VEGET_OPTIM: optimize this.</span>
00120         <span class="comment">// For all lumel of this tile.</span>
00121         <span class="keywordflow">for</span>(i= 0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
00122         {
00123                 <span class="comment">// mul by 2, because shade is done twice here: by vertex, and by landscape.</span>
00124                 <a class="code" href="a04558.html#a14">sint</a>    tileLumel= 2*tileLumelmap[i];
00125                 tileLumel= <a class="code" href="a04061.html#a0">min</a>(tileLumel, 255);
00126                 <span class="keywordtype">float</span>   tlf= tileLumel / 255.f;
00127                 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>= tlf;
00128                 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>= tlf;
00129                 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>= tlf;
00130                 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo0">A</a>= 1;
00131         }
00132 
00133         <span class="comment">// Compute The CVegetableLightEx, adding pointLight effect to vegetation</span>
00134         <span class="comment">// First get pointLight at this tiles.</span>
00135         <span class="keyword">static</span>  vector&lt;CPointLightInfluence&gt;    lightList;
00136         lightList.clear();
00137         <a class="code" href="a03057.html#NL3D_1_1CPatchz645_0">appendTileLightInfluences</a>( CUV(tileU, tileV), lightList);
00138         <span class="comment">// for each light, modulate the factor of influence</span>
00139         <span class="keywordflow">for</span>(i=0; i&lt;lightList.size();i++)
00140         {
00141                 CPointLight     *pl= lightList[i].PointLight;
00142                 <span class="comment">// compute the attenuation to the pos of the tile</span>
00143                 <span class="keywordtype">float</span>   att= pl-&gt;computeLinearAttenuation(tilePos);
00144                 <span class="comment">// modulate the influence with this factor</span>
00145                 lightList[i].BkupInfluence= lightList[i].Influence;
00146                 lightList[i].Influence*= att;
00147         }
00148         <span class="comment">// sort the light by influence</span>
00149         sort(lightList.begin(), lightList.end());
00150         <span class="comment">// Setup the vegetLex directly in the ig. </span>
00151         CVegetableLightEx       &amp;vegetLex= vegetIg-&gt;VegetableLightEx;
00152         <span class="comment">// take only 2 first, computing direction to tilePos and computing attenuation.</span>
00153         vegetLex.NumLights= <a class="code" href="a04061.html#a0">min</a>((<a class="code" href="a04558.html#a15">uint</a>)CVegetableLightEx::MaxNumLight, (<a class="code" href="a04558.html#a15">uint</a>)lightList.size());
00154         <span class="keywordflow">for</span>(i=0;i&lt;vegetLex.NumLights;i++)
00155         {
00156                 <span class="comment">// WARNING: can C cast to CPointLightNamed here because comes from CPatch::appendTileLightInfluences() only!</span>
00157                 CPointLightNamed        *pl= (CPointLightNamed*)(lightList[i].PointLight);
00158                 <span class="comment">// copy to vegetLex.</span>
00159                 vegetLex.PointLight[i]= pl;
00160                 <span class="comment">// get the attenuation</span>
00161                 vegetLex.PointLightFactor[i]= (<a class="code" href="a04558.html#a15">uint</a>)(256* lightList[i].Influence);
00162                 <span class="comment">// Setup the direction from pointLight.</span>
00163                 vegetLex.Direction[i]= tilePos - pl-&gt;getPosition();
00164                 vegetLex.Direction[i].normalize();
00165         }
00166         <span class="comment">// compute now the current colors of the vegetLex.</span>
00167         vegetLex.computeCurrentColors();
00168 
00169 
00170         <span class="comment">// Compute Dynamic Lightmap UV for this tile.</span>
00171         <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
00172         CUV             dlmUV;
00173         <span class="comment">// get coordinate in 0..1 in texture.</span>
00174         dlmUV.U= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale * tileU;
00175         dlmUV.V= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale * tileV;
00176         <span class="comment">// get coordinate in 0..255.</span>
00177         CVegetableUV8   dlmUV8;
00178         dlmUV8.U= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dlmUV.U * 255 + 0.5f);
00179         dlmUV8.V= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dlmUV.V * 255 + 0.5f);
00180         <span class="comment">// bound them, ensuring 8Bits UV "uncompressed" by driver are in the lightmap area.</span>
00181         <a class="code" href="a05378.html#a374">clamp</a>(dlmUV8.U, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MinU8, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MaxU8);
00182         <a class="code" href="a05378.html#a374">clamp</a>(dlmUV8.V, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MinV8, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MaxV8);
00183 
00184 
00185         <span class="comment">// for all vegetable of this list, generate instances.</span>
00186         <span class="comment">// =========================</span>
00187 
00188         <span class="comment">// Get an array for each vegetable (static for speed).</span>
00189         <span class="keyword">typedef</span>         std::vector&lt;NLMISC::CVector2f&gt;  TPositionVector;
00190         <span class="keyword">static</span>  std::vector&lt;TPositionVector&gt;    instanceUVArray;
00191         <span class="comment">// realloc if necessary.</span>
00192         <span class="keywordflow">if</span>(instanceUVArray.size() &lt; numVegetable)
00193         {
00194                 <span class="comment">// clean.</span>
00195                 <a class="code" href="a05378.html#a381">contReset</a>(instanceUVArray);
00196                 <span class="comment">// realloc.</span>
00197                 instanceUVArray.resize(numVegetable);
00198         }
00199 
00200         <span class="comment">// First, for each vegetable, generate the number of instance to create, and their relative position.</span>
00201         <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
00202         {
00203                 <span class="comment">// get the vegetable</span>
00204                 <span class="keyword">const</span> CVegetable        &amp;veget= vegetableList[i];
00205 
00206                 <span class="comment">// generate instance for this vegetable.</span>
00207                 veget.generateGroupBiLinear(tilePos, tilePosBiLinear, tileNormal, NL3D_PATCH_TILE_AREA, i + distAddSeed, instanceUVArray[i]);
00208         }
00209 
00210         <span class="comment">// Then, now that we kno how many instance to generate for each vegetable, reserve space.</span>
00211         CVegetableInstanceGroupReserve  vegetIgReserve;
00212         <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
00213         {
00214                 <span class="comment">// get the vegetable</span>
00215                 <span class="keyword">const</span> CVegetable        &amp;veget= vegetableList[i];
00216 
00217                 <span class="comment">// reseve instance space for this vegetable.</span>
00218                 <span class="comment">// instanceUVArray[i].size() is the number of instances to create.</span>
00219                 veget.reserveIgAddInstances(vegetIgReserve, (CVegetable::TVegetableWater)vegetWaterState, instanceUVArray[i].<a class="code" href="a04115.html#a94">size</a>());
00220         }
00221         <span class="comment">// actual reseve memory of the ig.</span>
00222         <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager-&gt;reserveIgCompile(vegetIg, vegetIgReserve);
00223 
00224 
00225         <span class="comment">// generate the instances for all the vegetables.</span>
00226         <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
00227         {
00228                 <span class="comment">// get the vegetable</span>
00229                 <span class="keyword">const</span> CVegetable        &amp;veget= vegetableList[i];
00230 
00231                 <span class="comment">// get the relatives position of the instances</span>
00232                 std::vector&lt;CVector2f&gt;  &amp;instanceUV= instanceUVArray[i];
00233 
00234                 <span class="comment">// For all instance, generate the real instances.</span>
00235                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;instanceUV.size(); j++)
00236                 {
00237                         <span class="comment">// generate the position in world Space.</span>
00238                         <span class="comment">// instanceUV is in [0..1] interval, which maps to a tile, so explode to the patch</span>
00239                         CVector         instancePos;
00240                         vbCreateCtx.eval(ts, tt, instanceUV[j].<a class="code" href="a04223.html#a572">x</a>, instanceUV[j].<a class="code" href="a04223.html#a573">y</a>, instancePos);
00241                         <span class="comment">// NB: use same normal for rotation for all instances in a same tile.</span>
00242                         matInstance.setPos( instancePos );
00243 
00244                         <span class="comment">// peek color into the lightmap.</span>
00245                         <a class="code" href="a04558.html#a14">sint</a>    lumelS= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(instanceUV[j].<a class="code" href="a04223.html#a572">x</a> * NL_LUMEL_BY_TILE);
00246                         <a class="code" href="a04558.html#a14">sint</a>    lumelT= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(instanceUV[j].<a class="code" href="a04223.html#a573">y</a> * NL_LUMEL_BY_TILE);
00247                         <a class="code" href="a05378.html#a374">clamp</a>(lumelS, 0, NL_LUMEL_BY_TILE-1);
00248                         <a class="code" href="a05378.html#a374">clamp</a>(lumelT, 0, NL_LUMEL_BY_TILE-1);
00249 
00250                         <span class="comment">// generate the instance of the vegetable</span>
00251                         veget.generateInstance(vegetIg, matInstance, ambientF, 
00252                                 diffuseColorF[ (lumelT&lt;&lt;NL_LUMEL_BY_TILE_SHIFT) + lumelS ],
00253                                 (distType+1) * NL3D_VEGETABLE_BLOCK_ELTDIST, (CVegetable::TVegetableWater)vegetWaterState, dlmUV8);
00254                 }
00255         }
00256 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha9" doxytag="NL3D::CPatch::getBindNeighbor" ></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::CPatch::getBindNeighbor </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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03058.html">CBindInfo</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>neighborEdge</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
return neighborhood information. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l02213">2213</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06758.html#l00718">NL3D::CZone::buildBindInfo()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a06156.html#l00316">NL3D::CPatch::CBindInfo::MultipleBindNum</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>, <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, and <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>.
<p>
<div class="fragment"><pre>02214 {
02215         <a class="code" href="a04199.html#a6">nlassert</a>(edge&lt;4);
02216 
02217         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[edge]!=NULL)
02218         {
02219                 <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;buildBindInfo(PatchId, edge, _BindZoneNeighbor[edge], neighborEdge);
02220         }
02221         <span class="keywordflow">else</span>
02222         {
02223                 neighborEdge.Zone= NULL;
02224                 neighborEdge.NPatchs= 0;
02225                 neighborEdge.MultipleBindNum= 0;
02226         }
02227 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz637_0" doxytag="NL3D::CPatch::getCornerSmoothFlag" ></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::CPatch::getCornerSmoothFlag </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>corner</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a06158.html#l00962">962</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</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="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.
<p>
<div class="fragment"><pre>00963 {
00964         <a class="code" href="a04199.html#a6">nlassert</a>(corner&lt;=3);
00965         <a class="code" href="a04558.html#a15">uint</a>    mask= 1&lt;&lt;corner;
00966         <span class="keywordflow">return</span>  (<a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>&amp; mask)!=0;
00967 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha10" doxytag="NL3D::CPatch::getCornerVertex" ></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"> const <a class="el" href="a03482.html">CTessVertex</a>* NL3D::CPatch::getCornerVertex </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>corner</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</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="a06156.html#l00659">659</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00820">BaseVertices</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>.
<p>
<div class="fragment"><pre>00660         {
00661                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[corner];
00662         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_15" doxytag="NL3D::CPatch::getCurrentTileTLIColors" ></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::CPatch::getCurrentTileTLIColors </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>corners</em>[4]</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>

<p>
Definition at line <a class="el" href="a06157.html#l01655">1655</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06760.html#l00586">NL3D::CZone::_PointLightArray</a>, <a class="el" href="a06340.html#l00250">NLMISC::CRGBA::avg2RGBOnly()</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01758">addTileLightmapEdgeWithTLI()</a>, <a class="el" href="a06157.html#l01793">addTileLightmapPixelWithTLI()</a>, and <a class="el" href="a06157.html#l01739">addTileLightmapWithTLI()</a>.
<p>
<div class="fragment"><pre>01656 {
01657         <span class="comment">// Get ref on array of PointLightNamed.</span>
01658         <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights().size() &gt;0 )
01659         {
01660                 <span class="comment">// get coord of the tessBlock</span>
01661                 <a class="code" href="a04558.html#a15">uint</a>    tbs= ts&gt;&gt;1;
01662                 <a class="code" href="a04558.html#a15">uint</a>    tbt= tt&gt;&gt;1;
01663                 <span class="comment">// get tile id local to tessBlock.</span>
01664                 <a class="code" href="a04558.html#a15">uint</a>    tls= ts-(tbs&lt;&lt;1);
01665                 <a class="code" href="a04558.html#a15">uint</a>    tlt= tt-(tbt&lt;&lt;1);
01666 
01667                 <span class="comment">// For each corner of the tessBlock, compute lighting with pointLights.</span>
01668                 <a class="code" href="a03337.html">CRGBA</a>   tbCorners[4];
01669                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;2;<a class="code" href="a04223.html#a573">y</a>++)
01670                 {
01671                         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;2;<a class="code" href="a04223.html#a572">x</a>++)
01672                         {
01673                                 <a class="code" href="a03337.html">CRGBA</a>   &amp;cornerCol= tbCorners[<a class="code" href="a04223.html#a573">y</a>*2+<a class="code" href="a04223.html#a572">x</a>];
01674                                 cornerCol= getCurrentTLIColor(tbs+x, tbt+y);
01675                         }
01676                 }
01677 
01678                 <span class="comment">// Then biLinear to tile Level (tessBlock==2x2 tiles).</span>
01679                 <a class="code" href="a03337.html">CRGBA</a>   tbEdges[4];
01680                 <a class="code" href="a03337.html">CRGBA</a>   tbMiddle;
01681                 <span class="comment">// left.</span>
01682                 tbEdges[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[0], tbCorners[2]);
01683                 <span class="comment">// bottom</span>
01684                 tbEdges[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[2], tbCorners[3]);
01685                 <span class="comment">// right</span>
01686                 tbEdges[2].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[1], tbCorners[3]);
01687                 <span class="comment">// up</span>
01688                 tbEdges[3].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[0], tbCorners[1]);
01689                 <span class="comment">// middle.</span>
01690                 tbMiddle.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbEdges[0], tbEdges[2]);
01691                 
01692                 <span class="comment">// just copy result according to tile pos in tessBlock.</span>
01693                 <span class="keywordflow">if</span>(tlt==0)
01694                 {
01695                         <span class="keywordflow">if</span>(tls==0)
01696                         {
01697                                 corners[0]= tbCorners[0];
01698                                 corners[1]= tbEdges[3];
01699                                 corners[2]= tbEdges[0];
01700                                 corners[3]= tbMiddle;
01701                         }
01702                         <span class="keywordflow">else</span>
01703                         {
01704                                 corners[0]= tbEdges[3];
01705                                 corners[1]= tbCorners[1];
01706                                 corners[2]= tbMiddle;
01707                                 corners[3]= tbEdges[2];
01708                         }
01709                 }
01710                 <span class="keywordflow">else</span>
01711                 {
01712                         <span class="keywordflow">if</span>(tls==0)
01713                         {
01714                                 corners[0]= tbEdges[0];
01715                                 corners[1]= tbMiddle;
01716                                 corners[2]= tbCorners[2];
01717                                 corners[3]= tbEdges[1];
01718                         }
01719                         <span class="keywordflow">else</span>
01720                         {
01721                                 corners[0]= tbMiddle;
01722                                 corners[1]= tbEdges[2];
01723                                 corners[2]= tbEdges[1];
01724                                 corners[3]= tbCorners[3];
01725                         }
01726                 }
01727         }
01728         <span class="keywordflow">else</span>
01729         {
01730                 <span class="comment">// Just fill with 0s.</span>
01731                 corners[0]= CRGBA::Black;
01732                 corners[1]= CRGBA::Black;
01733                 corners[2]= CRGBA::Black;
01734                 corners[3]= CRGBA::Black;
01735         }
01736 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha11" doxytag="NL3D::CPatch::getErrorSize" ></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 NL3D::CPatch::getErrorSize </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<code> [inline]</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="a06156.html#l00395">395</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00816">ErrorSize</a>.
<p>
<div class="fragment"><pre>00395 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha12" doxytag="NL3D::CPatch::getFar0" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CPatch::getFar0 </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<code> [inline]</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="a06156.html#l00396">396</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00396 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha13" doxytag="NL3D::CPatch::getFar1" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CPatch::getFar1 </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<code> [inline]</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="a06156.html#l00397">397</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00397 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha14" doxytag="NL3D::CPatch::getLandscape" ></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="a02702.html">CLandscape</a> * NL3D::CPatch::getLandscape </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 landscape in which is placed this patch. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l02186">2186</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06760.html#l00461">NL3D::CZone::getLandscape()</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06497.html#l00372">NL3D::CTessFace::allocTileUv()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06497.html#l00511">NL3D::CTessFace::buildTileFaces()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>, <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>, <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06497.html#l00528">NL3D::CTessFace::deleteTileFaces()</a>, <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00115">release()</a>, <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, <a class="el" href="a06497.html#l02274">NL3D::CTessFace::unbind()</a>, <a class="el" href="a06497.html#l02643">NL3D::CTessFace::updateBindAndSplit()</a>, <a class="el" href="a06497.html#l02108">NL3D::CTessFace::updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.
<p>
<div class="fragment"><pre>02187 {
02188         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getLandscape();
02189 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz645_2" doxytag="NL3D::CPatch::getLumel" ></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#a7">uint8</a> NL3D::CPatch::getLumel </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>uv</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
Get the lumel under the position. 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l01499">1499</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06157.html#l00670">getTileLumelmapPixelPrecomputed()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, and <a class="el" href="a05646.html#l00236">w</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03254">NL3D::CLandscape::getLumel()</a>.
<p>
<div class="fragment"><pre>01500 {
01501         <span class="comment">// compute tile coord and lumel coord.</span>
01502         <a class="code" href="a04558.html#a14">sint</a>    ts, tt;
01503         <span class="comment">// get in lumel coord.</span>
01504         <a class="code" href="a04558.html#a14">sint</a>    <a class="code" href="a04223.html#a575">w</a>= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>);
01505         <a class="code" href="a04558.html#a14">sint</a>    h= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>);
01506         <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
01507         <span class="comment">// add 128, to round and get cneter of lumel.</span>
01508         ts= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U* (w&lt;&lt;8) + 128);   ts&gt;&gt;=8;
01509         tt= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V* (h&lt;&lt;8) + 128);   tt&gt;&gt;=8;
01510         <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, w-1);
01511         <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, h-1);
01512         <span class="comment">// get the lumel</span>
01513         <a class="code" href="a04558.html#a7">uint8</a>   ret;
01514         <a class="code" href="a03057.html#NL3D_1_1CPatchz671_2">getTileLumelmapPixelPrecomputed</a>(ts&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, tt&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, 
01515                 ts&amp;(NL_LUMEL_BY_TILE-1), tt&amp;(NL_LUMEL_BY_TILE-1), ret);
01516 
01517         <span class="keywordflow">return</span> ret;
01518 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_1" doxytag="NL3D::CPatch::getNextFar0ToRdr" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextFar0ToRdr </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<code> [inline]</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="a06156.html#l00465">465</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00872">_NextRdrFar0</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00465 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_2" doxytag="NL3D::CPatch::getNextFar1ToRdr" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextFar1ToRdr </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<code> [inline]</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="a06156.html#l00467">467</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00874">_NextRdrFar1</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00467 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz655_0" doxytag="NL3D::CPatch::getNextNearUL" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextNearUL </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<code> [inline]</code></td>
        </tr>

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

<p>
For lighting update, get Next (CiruclarList). If ==this, then list is empty. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00750">750</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l01203">_ULNearNext</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>, and <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
<p>
<div class="fragment"><pre>00750 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz655_1" doxytag="NL3D::CPatch::getNumNearTessBlocks" ></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::CPatch::getNumNearTessBlocks </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<code> [inline]</code></td>
        </tr>

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

<p>
get the number of Near TessBlocks. Actually OrderS/2*OrderT/2. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00753">753</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
<p>
<div class="fragment"><pre>00753 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_11" doxytag="NL3D::CPatch::getNumTessBlock" ></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::CPatch::getNumTessBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pc</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>type</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> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>numtb</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>

<p>
Definition at line <a class="el" href="a06155.html#l00738">738</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00739 {
00740         <a class="code" href="a04558.html#a15">uint</a>    tboS= (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1);
00741         <a class="code" href="a04558.html#a15">uint</a>    tboT= (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1);
00742 
00743         <span class="comment">// Coordinate of the tessblock (2*2 a tile!! so the &gt;&gt;1).</span>
00744         <a class="code" href="a04558.html#a15">uint</a> ts= ((<a class="code" href="a04558.html#a15">uint</a>)pc.S * tboS) / 0x8000;
00745         <a class="code" href="a04558.html#a15">uint</a> tt= ((<a class="code" href="a04558.html#a15">uint</a>)pc.T * tboT) / 0x8000;
00746         numtb= tt*tboS + ts;
00747 
00748         <span class="keywordtype">bool</span>    edgeS= (ts*0x8000) == ((<a class="code" href="a04558.html#a15">uint</a>)pc.S * tboS);
00749         <span class="keywordtype">bool</span>    edgeT= (tt*0x8000) == ((<a class="code" href="a04558.html#a15">uint</a>)pc.T * tboT);
00750 
00751         <span class="comment">// Does this vertex lies on a corner of a TessBlock?</span>
00752         <span class="keywordflow">if</span>(edgeS &amp;&amp; edgeT)
00753                 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>;
00754         <span class="comment">// Does this vertex lies on a edge of a TessBlock?</span>
00755         <span class="keywordflow">else</span> <span class="keywordflow">if</span>(edgeS || edgeT)
00756                 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>;
00757         <span class="comment">// Else it lies exclusively IN a TessBlock.</span>
00758         <span class="keywordflow">else</span>
00759                 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>;
00760 
00761 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_12" doxytag="NL3D::CPatch::getNumTessBlock" ></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::CPatch::getNumTessBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00722">722</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVBase</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVLeft</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVRight</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, and <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>.
<p>
<div class="fragment"><pre>00723 {
00724         <span class="comment">// To which tessBlocks link the face?</span>
00725         <span class="comment">// compute an approx middle of the face.</span>
00726         CParamCoord     edgeMid(face-&gt;PVLeft, face-&gt;PVRight);
00727         CParamCoord     middle(edgeMid, face-&gt;PVBase);
00728         <span class="comment">// Coordinate of the tessblock (2*2 a tile!! so the &gt;&gt;1).</span>
00729         <a class="code" href="a04558.html#a15">uint</a> ts= ((<a class="code" href="a04558.html#a15">uint</a>)middle.S * (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1)) / 0x8000;
00730         <a class="code" href="a04558.html#a15">uint</a> tt= ((<a class="code" href="a04558.html#a15">uint</a>)middle.T * (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1)) / 0x8000;
00731         <a class="code" href="a04558.html#a15">uint</a> numtb= tt*(<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1) + ts;
00732 
00733         <span class="keywordflow">return</span> numtb;
00734 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha15" doxytag="NL3D::CPatch::getOrderForEdge" ></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#a7">uint8</a> NL3D::CPatch::getOrderForEdge </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>edge</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a06155.html#l02196">2196</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>.
<p>
<div class="fragment"><pre>02197 {
02198         <a class="code" href="a04558.html#a15">uint</a>    e= ((<a class="code" href="a04558.html#a14">sint</a>)edge + 256)&amp;3;
02199         <span class="comment">// If an horizontal edge.</span>
02200         <span class="keywordflow">if</span>( e&amp;1 )       <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
02201         <span class="keywordflow">else</span>            <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
02202 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha16" doxytag="NL3D::CPatch::getOrderS" ></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#a7">uint8</a> NL3D::CPatch::getOrderS </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<code> [inline]</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="a06156.html#l00392">392</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06519.html#l00276">NL3D::CTextureFar::allocatePatch()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06768.html#l01451">NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06519.html#l00335">NL3D::CTextureFar::removePatch()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06519.html#l00368">NL3D::CTextureFar::touchPatchULAndNext()</a>, and <a class="el" href="a06519.html#l00176">NL3D::CTextureFar::tryAllocatePatch()</a>.
<p>
<div class="fragment"><pre>00392 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha17" doxytag="NL3D::CPatch::getOrderT" ></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#a7">uint8</a> NL3D::CPatch::getOrderT </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<code> [inline]</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="a06156.html#l00393">393</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06519.html#l00276">NL3D::CTextureFar::allocatePatch()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06519.html#l00335">NL3D::CTextureFar::removePatch()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06519.html#l00368">NL3D::CTextureFar::touchPatchULAndNext()</a>, and <a class="el" href="a06519.html#l00176">NL3D::CTextureFar::tryAllocatePatch()</a>.
<p>
<div class="fragment"><pre>00393 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha18" doxytag="NL3D::CPatch::getPatchId" ></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#a9">uint16</a> NL3D::CPatch::getPatchId </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<code> [inline]</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="a06156.html#l00398">398</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a05981.html#l00098">uint16</a>.
<p>
Referenced by <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, and <a class="el" href="a06768.html#l01451">NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample()</a>.
<p>
<div class="fragment"><pre>00398 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd26" doxytag="NL3D::CPatch::getRootFaceForEdge" ></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="a03476.html">CTessFace</a> * NL3D::CPatch::getRootFaceForEdge </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>edge</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<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="a06155.html#l01751">1751</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
<p>
<div class="fragment"><pre>01752 {
01753         <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
01754 
01755         <span class="comment">// See tessellation rules.</span>
01756         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
01757         {
01758                 <span class="keywordflow">if</span>(edge==0 || edge==1)
01759                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
01760                 <span class="keywordflow">else</span>
01761                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
01762         }
01763         <span class="keywordflow">else</span>
01764         {
01765                 <span class="keywordflow">if</span>(edge==0 || edge==3)
01766                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
01767                 <span class="keywordflow">else</span>
01768                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
01769         }
01770 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd27" doxytag="NL3D::CPatch::getRootVertexForEdge" ></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="a03482.html">CTessVertex</a> * NL3D::CPatch::getRootVertexForEdge </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>edge</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<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="a06155.html#l01773">1773</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
<p>
<div class="fragment"><pre>01774 {
01775         <span class="comment">// Return the vertex which is the start of edge.</span>
01776         <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
01777 
01778         <span class="comment">// See tessellation rules.</span>
01779         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
01780         {
01781                 <span class="keywordflow">switch</span>(edge)
01782                 {
01783                         <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight;
01784                         <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase;
01785                         <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft;
01786                         <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase;
01787                         <span class="keywordflow">default</span>: <span class="keywordflow">return</span> NULL;
01788                 }
01789         }
01790         <span class="keywordflow">else</span>
01791         {
01792                 <span class="keywordflow">switch</span>(edge)
01793                 {
01794                         <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase;
01795                         <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft;
01796                         <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase;
01797                         <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight;
01798                         <span class="keywordflow">default</span>: <span class="keywordflow">return</span> NULL;
01799                 }
01800         }
01801 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz641_0" doxytag="NL3D::CPatch::getSmoothFlag" ></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::CPatch::getSmoothFlag </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>edge</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
Get the smooth flag for the n-th edge. Return true if this edge must by smoothed, false else.
<p>
Definition at line <a class="el" href="a06156.html#l00579">579</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, and <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>.
<p>
<div class="fragment"><pre>00580         {
00581                 <span class="comment">// Test it</span>
00582                 <span class="keywordflow">return</span> ((<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;(1&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>)))!=0);
00583         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz643_4" doxytag="NL3D::CPatch::getTesselatedPos" ></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> NL3D::CPatch::getTesselatedPos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03640.html">CUV</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>uv</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>
From the current tesselation of this patch, and a UV in this patch, return tesselated position.
<p>
Definition at line <a class="el" href="a06155.html#l00579">579</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06497.html#l03101">NL3D::CTessFace::getTesselatedPos()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a05862.html#l02496">NL3D::CLandscape::getTesselatedPos()</a>.
<p>
<div class="fragment"><pre>00580 {
00581         <span class="comment">// clamp values.</span>
00582         <a class="code" href="a05378.html#a374">clamp</a>(uv.U, 0, 1);
00583         <a class="code" href="a05378.html#a374">clamp</a>(uv.V, 0, 1);
00584         <span class="comment">// recurs down the 2 sons.</span>
00585         CVector         ret= CVector::Null;
00586         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
00587         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
00588 
00589         <span class="keywordflow">return</span> ret;
00590 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz647_0" doxytag="NL3D::CPatch::getTileElement" ></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="a03522.html">CTileElement</a> * NL3D::CPatch::getTileElement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>uv</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>
Get the lumel under the position. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l02265">2265</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
<p>
Referenced by <a class="el" href="a05862.html#l01865">NL3D::CLandscape::getTileElement()</a>.
<p>
<div class="fragment"><pre>02266 {
02267         <span class="comment">// compute tile coord and lumel coord.</span>
02268         <a class="code" href="a04558.html#a14">sint</a>    ts, tt;
02269 
02270         <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
02271         <span class="comment">// add 128, to round and get cneter of lumel.</span>
02272         ts= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U* (OrderS&lt;&lt;8) + 128);      ts&gt;&gt;=8;
02273         tt= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V* (OrderT&lt;&lt;8) + 128);      tt&gt;&gt;=8;
02274         <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, OrderS-1);
02275         <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, OrderT-1);
02276 
02277         <span class="comment">// get the lumel</span>
02278         <span class="keywordflow">return</span> &amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[ts+tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>]);
02279 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_16" doxytag="NL3D::CPatch::getTileLightMap" ></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::CPatch::getTileLightMap </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03069.html">CPatchRdrPass</a> *&amp;&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>

<p>
Definition at line <a class="el" href="a06157.html#l01191">1191</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05862.html#l01945">NL3D::CLandscape::getTileLightMap()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00100">NL3D::CTessBlock::LightMapRdrPass</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>01192 {
01193         <span class="comment">// TessBlocks must have been allocated.</span>
01194         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
01195 
01196         <span class="comment">// get what tessBlock to use.</span>
01197         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01198         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
01199         CTessBlock      &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
01200 
01201         <span class="comment">// If the lightmap Id has not been computed, compute it.</span>
01202         <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
01203         {
01204                 <span class="comment">// Compute the lightmap texture, with help of TileColors, with neighboring info etc...</span>
01205                 <a class="code" href="a03337.html">CRGBA</a>   lightText[<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>];
01206                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a>(ts&amp;(~1), tt&amp;(~1), lightText);
01207 
01208                 <span class="comment">// Create a rdrPass with this texture, donlod to Driver etc...</span>
01209                 tessBlock.LightMapId= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileLightMap(lightText, rdrpass);
01210 
01211                 <span class="comment">// store this rdrpass ptr.</span>
01212                 tessBlock.LightMapRdrPass= rdrpass;
01213         }
01214 
01215         <span class="comment">// We are using this 2x2 tiles lightmap.</span>
01216         tessBlock.LightMapRefCount++;
01217 
01218 
01219         <span class="comment">// get the rdrpass ptr of the tessBlock lightmap</span>
01220         rdrpass= tessBlock.LightMapRdrPass;
01221 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_17" doxytag="NL3D::CPatch::getTileLightMapUvInfo" ></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::CPatch::getTileLightMapUvInfo </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uvScaleBias</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>

<p>
Definition at line <a class="el" href="a06157.html#l01225">1225</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05862.html#l02003">NL3D::CLandscape::getTileLightMapUvInfo()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</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="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00636">NL3D::CTessFace::initTileUvLightmap()</a>.
<p>
<div class="fragment"><pre>01226 {
01227         <span class="comment">// TessBlocks must have been allocated.</span>
01228         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
01229 
01230         <span class="comment">// get what tessBlock to use.</span>
01231         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01232         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
01233         CTessBlock      &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
01234 
01235         <span class="comment">// Get the uvScaleBias for the tile 0,0  of the block.</span>
01236         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileLightMapUvInfo(tessBlock.LightMapId, uvScaleBias);
01237 
01238         <span class="comment">// Must increment the bias, for the good tile in the 2x2 block Lightmap.</span>
01239         <a class="code" href="a04558.html#a15">uint</a>    tsDec= ts &amp; 1;
01240         <a class="code" href="a04558.html#a15">uint</a>    ttDec= tt &amp; 1;
01241         uvScaleBias.x+= tsDec * uvScaleBias.z;
01242         uvScaleBias.y+= ttDec * uvScaleBias.z;
01243 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz671_2" doxytag="NL3D::CPatch::getTileLumelmapPixelPrecomputed" ></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::CPatch::getTileLumelmapPixelPrecomputed </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [private]</code></td>
        </tr>

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

<p>
same as computeTileLightmapPixelPrecomputed, but brut result, not modified by colorTable. Actually used for Lightmap get interface.
<p>
Definition at line <a class="el" href="a06157.html#l00670">670</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01499">getLumel()</a>.
<p>
<div class="fragment"><pre>00671 {
00672         <span class="comment">// Return the lumel</span>
00673         dest= <a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (&amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]), s+(t&lt;&lt;2));
00674 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz671_3" doxytag="NL3D::CPatch::getTileLumelmapPrecomputed" ></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::CPatch::getTileLumelmapPrecomputed </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>
Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l00650">650</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>.
<p>
<div class="fragment"><pre>00651 {
00652         <span class="comment">// Unpack the lumels</span>
00653         <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
00654         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (buffer, &amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]));
00655 
00656         <span class="comment">// Retrun it</span>
00657         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
00658         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
00659         {
00660                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
00661                 {
00662                         <span class="comment">// lumel</span>
00663                         dest[<a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a582">stride</a> + <a class="code" href="a04223.html#a572">x</a>]= <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04223.html#a572">x</a>+(<a class="code" href="a04223.html#a573">y</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>)];
00664                 }
00665         }
00666 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha19" doxytag="NL3D::CPatch::getTileMaterialRefCount" ></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::CPatch::getTileMaterialRefCount </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<code> [inline]</code></td>
        </tr>

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

<p>
Get number of TileMaterial created in this Patch. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00788">788</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00788 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz665_0" doxytag="NL3D::CPatch::getTileRenderPass" ></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="a03069.html">CPatchRdrPass</a> * NL3D::CPatch::getTileRenderPass </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tileId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pass</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>

<p>
Definition at line <a class="el" href="a06155.html#l02040">2040</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05862.html#l01790">NL3D::CLandscape::getTileRenderPass()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a05867.html#l00053">NL3D_TILE_PASS_ADD</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05867.html#l00051">NL3D_TILE_PASS_RGB1</a>, <a class="el" href="a05867.html#l00052">NL3D_TILE_PASS_RGB2</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06156.html#l00340">Tiles</a>.
<p>
<div class="fragment"><pre>02041 {
02042         <span class="comment">// All but lightmap.</span>
02043         <a class="code" href="a04199.html#a6">nlassert</a>(pass==NL3D_TILE_PASS_RGB0 || pass==NL3D_TILE_PASS_RGB1 || pass==NL3D_TILE_PASS_RGB2 || 
02044                 pass==NL3D_TILE_PASS_ADD);
02045 
02046         <span class="keywordtype">bool</span>    additive= (pass==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>);
02047         <a class="code" href="a04558.html#a14">sint</a>    passNum= pass-<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>;
02048         <span class="comment">// If additive, take the additve tile of bigger existing pass.</span>
02049         <span class="keywordflow">if</span>(additive)
02050         {
02051                 <span class="comment">// Default: take addtive of pass 0.</span>
02052                 passNum= 0;
02053                 <span class="comment">// If the pass1 is not empty, may take its tile.</span>
02054                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[1]!=0xFFFF)
02055                 {
02056                         passNum= 1;
02057                         <span class="comment">// If the pass2 is not empty, take its tile.</span>
02058                         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[2]!=0xFFFF)
02059                                 passNum= 2;
02060                 }
02061         }
02062 
02063         <a class="code" href="a04558.html#a14">sint</a>    tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[passNum];
02064         <span class="keywordflow">if</span>(tileNumber==0xFFFF)
02065         {
02066                 <span class="comment">// Display a "fake" only if pass 0.</span>
02067                 <span class="keywordflow">if</span>(pass==<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>)
02068                         <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileRenderPass(0xFFFF, <span class="keyword">false</span>);
02069                 <span class="comment">// Else, this tile do not have such a pass (not a transition).</span>
02070                 <span class="keywordflow">return</span> NULL;
02071         }
02072         <span class="keywordflow">else</span>
02073         {
02074                 <span class="comment">// return still may be NULL, in additive case.</span>
02075                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileRenderPass(tileNumber, additive);
02076         }
02077 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_18" doxytag="NL3D::CPatch::getTileTileColors" ></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::CPatch::getTileTileColors </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>corners</em>[4]</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>

<p>
Definition at line <a class="el" href="a06157.html#l00345">345</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06539.html#l00048">NL3D::CTileColor::Color565</a>, <a class="el" href="a06340.html#l00162">NLMISC::CRGBA::set565()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00508">modulateTileLightmapEdgeWithTileColors()</a>, <a class="el" href="a06157.html#l00544">modulateTileLightmapPixelWithTileColors()</a>, and <a class="el" href="a06157.html#l00488">modulateTileLightmapWithTileColors()</a>.
<p>
<div class="fragment"><pre>00346 {
00347         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;4;i++)
00348         {
00349                 CTileColor      &amp;tcol= <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>[ (tt+(i&gt;&gt;1))*(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>+1) + (ts+(i&amp;1)) ];
00350                 <a class="code" href="a03337.html">CRGBA</a>           &amp;col= corners[i];
00351                 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa15">set565</a> (tcol.Color565);
00352         }
00353 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz665_1" doxytag="NL3D::CPatch::getTileUvInfo" ></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::CPatch::getTileUvInfo </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tileId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>pass</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>orient</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uvScaleBias</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>is256x256</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uvOff</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>

<p>
Definition at line <a class="el" href="a06155.html#l02080">2080</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a05862.html#l01820">NL3D::CLandscape::getTileUvScaleBiasRot()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a05867.html#l00053">NL3D_TILE_PASS_ADD</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05867.html#l00051">NL3D_TILE_PASS_RGB1</a>, <a class="el" href="a05867.html#l00052">NL3D_TILE_PASS_RGB2</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00096">uint8</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="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00565">NL3D::CTessFace::initTileUvRGBA()</a>.
<p>
<div class="fragment"><pre>02081 {
02082         <span class="comment">// All but lightmap.</span>
02083         <a class="code" href="a04199.html#a6">nlassert</a>(pass==NL3D_TILE_PASS_RGB0 || pass==NL3D_TILE_PASS_RGB1 || pass==NL3D_TILE_PASS_RGB2 || 
02084                 pass==NL3D_TILE_PASS_ADD);
02085 
02086         <span class="keywordtype">bool</span>    additive= (pass==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>);
02087         <a class="code" href="a04558.html#a14">sint</a>    passNum= pass-<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>;
02088         <span class="comment">// If additive, take the additve tile of bigger existing pass.</span>
02089         <span class="keywordflow">if</span>(additive)
02090         {
02091                 <span class="comment">// Default: take addtive of pass 0.</span>
02092                 passNum= 0;
02093                 <span class="comment">// If the pass1 is not empty, may take its tile.</span>
02094                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[1]!=0xFFFF)
02095                 {
02096                         passNum= 1;
02097                         <span class="comment">// If the pass2 is not empty, take its tile.</span>
02098                         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[2]!=0xFFFF)
02099                                 passNum= 2;
02100                 }
02101         }
02102 
02103         <a class="code" href="a04558.html#a14">sint</a>    tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[passNum];
02104         <span class="keywordflow">if</span>(tileNumber==0xFFFF)
02105         {
02106                 <span class="comment">// dummy... Should not be called here.</span>
02107                 orient= 0;
02108                 uvScaleBias.x=0;
02109                 uvScaleBias.y=0;
02110                 uvScaleBias.z=1;
02111                 is256x256=<span class="keyword">false</span>;
02112                 uvOff=0;
02113         }
02114         <span class="keywordflow">else</span>
02115         {
02116                 orient= Tiles[tileId].getTileOrient(passNum);
02117                 Tiles[tileId].getTile256Info(is256x256, uvOff);
02118                 CTile::TBitmap <a class="code" href="a04223.html#a581">type</a>;
02119                 <span class="comment">// If alpha wanted, return its UV info (works either for Alpha in Diffuse Pass and Alpha in Additive Pass)</span>
02120                 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a663">alpha</a>)
02121                         <a class="code" href="a04223.html#a581">type</a>= CTile::alpha;
02122                 <span class="keywordflow">else</span>
02123                 {
02124                         <span class="keywordflow">if</span>(additive)
02125                                 <a class="code" href="a04223.html#a581">type</a>= CTile::additive;
02126                         <span class="keywordflow">else</span>
02127                                 <a class="code" href="a04223.html#a581">type</a>= CTile::diffuse;
02128                 }
02129 
02130                 <a class="code" href="a04558.html#a7">uint8</a>   rotalpha;
02131                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileUvScaleBiasRot(tileNumber, type, uvScaleBias, rotalpha);
02132 
02133                 <span class="comment">// Add the special rotation of alpha.</span>
02134                 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a663">alpha</a>)
02135                         orient= (orient+rotalpha)&amp;3;
02136         }
02137 
02138 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha20" doxytag="NL3D::CPatch::getZone" ></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="a03730.html">CZone</a>* NL3D::CPatch::getZone </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<code> [inline]</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="a06156.html#l00391">391</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, and <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>.
<p>
<div class="fragment"><pre>00391 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha21" doxytag="NL3D::CPatch::isRenderClipped" ></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::CPatch::isRenderClipped </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>

<p>
Definition at line <a class="el" href="a06155.html#l00594">594</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06760.html#l00539">NL3D::CZone::isPatchRenderClipped()</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06157.html#l02005">beginDLMLighting()</a>, <a class="el" href="a06161.html#l01502">checkCreateVertexVBFar()</a>, <a class="el" href="a06161.html#l01543">checkCreateVertexVBNear()</a>, <a class="el" href="a06161.html#l01571">checkDeleteVertexVBFar()</a>, <a class="el" href="a06161.html#l01589">checkDeleteVertexVBNear()</a>, <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, <a class="el" href="a06161.html#l01556">checkFillVertexVBNear()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06161.html#l01248">fillVBIfVisible()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06157.html#l02021">processDLMLight()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00115">release()</a>, <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, and <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>.
<p>
<div class="fragment"><pre>00595 {
00596         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
00597                 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;isPatchRenderClipped(PatchId);
00598         <span class="keywordflow">else</span>
00599                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00600 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz655_2" doxytag="NL3D::CPatch::linkBeforeNearUL" ></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::CPatch::linkBeforeNearUL </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>patchNext</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>
For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL. 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l01880">1880</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03394">NL3D::CLandscape::linkPatchToNearUL()</a>.
<p>
<div class="fragment"><pre>01881 {
01882         <a class="code" href="a04199.html#a6">nlassert</a>(patchNext);
01883 
01884         <span class="comment">// first, unlink others from me. NB: works even if _ULNearPrec==_ULNearNext==this.</span>
01885         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>;
01886         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;
01887         <span class="comment">// link to igNext.</span>
01888         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= patchNext;
01889         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= patchNext-&gt;_ULNearPrec;
01890         <span class="comment">// link others to me.</span>
01891         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <span class="keyword">this</span>;
01892         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <span class="keyword">this</span>;
01893 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz669_0" doxytag="NL3D::CPatch::linkTessFaceWithEdge" ></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="a03476.html">CTessFace</a> * NL3D::CPatch::linkTessFaceWithEdge </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uv0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>uv1</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>linkTo</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>
Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a>. Search in the tesselation the first face which own the edge uv0-uv1. link it with linkTo, and return it. NULL if not found (obviously because not so tesselated)
<p>
Definition at line <a class="el" href="a06155.html#l01834">1834</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06497.html#l02904">NL3D::CTessFace::linkTessFaceWithEdge()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
<p>
<div class="fragment"><pre>01835 {
01836         <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
01837         <span class="comment">// Try to link with Root Son0</span>
01838         <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a>       *face= <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
01839         <span class="comment">// if Failed Try to link with Root Son1</span>
01840         <span class="keywordflow">if</span>(!face)
01841                 face= <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
01842         <span class="keywordflow">return</span> face;
01843 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd28" doxytag="NL3D::CPatch::makeRoots" ></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::CPatch::makeRoots </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>

<p>
Definition at line <a class="el" href="a06155.html#l01124">1124</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06156.html#l00822">BaseFarVertices</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06497.html#l00345">NL3D::CTessFace::computeSplitPoint()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FBase</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVBase</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVLeft</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVRight</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05862.html#l03010">NL3D::CLandscape::newTessFace()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">NL3D::CTessFace::Patch</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVBase</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVLeft</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVRight</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, <a class="el" href="a06498.html#l00083">NL3D::CParamCoord::setST()</a>, <a class="el" href="a06498.html#l00274">NL3D::CTessFace::Size</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>.
<p>
<div class="fragment"><pre>01125 {
01126         CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
01127         CTessVertex *b= BaseVertices[1];
01128         CTessVertex *c= BaseVertices[2];
01129         CTessVertex *d= BaseVertices[3];
01130 
01131         <span class="comment">// Set positions.</span>
01132         a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
01133         b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
01134         c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
01135         d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
01136 
01137         <span class="comment">// Init Far vetices.</span>
01138         CTessFarVertex *fa= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchr4">BaseFarVertices</a>[0];
01139         CTessFarVertex *fb= &amp;BaseFarVertices[1];
01140         CTessFarVertex *fc= &amp;BaseFarVertices[2];
01141         CTessFarVertex *fd= &amp;BaseFarVertices[3];
01142         fa-&gt;Src= a;
01143         fa-&gt;PCoord.setST(0,0);
01144         fb-&gt;Src= b;
01145         fb-&gt;PCoord.setST(0,1);
01146         fc-&gt;Src= c;
01147         fc-&gt;PCoord.setST(1,1);
01148         fd-&gt;Src= d;
01149         fd-&gt;PCoord.setST(1,0);
01150 
01151         <span class="comment">// We don't have to fill the Far vertices VB here, because this patch is still not visible.</span>
01152         <span class="comment">// NB: we can't because we don't have any driver here.</span>
01153         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()==<span class="keyword">true</span>);
01154 
01155 
01156         <span class="comment">// Make Roots.</span>
01157         <span class="comment">/*</span>
01158 <span class="comment">                Tesselation layout. For Square Face, and if OrderS&gt;=OrderT.</span>
01159 <span class="comment"></span>
01160 <span class="comment">                A-------D</span>
01161 <span class="comment">                |\ Son1 |</span>
01162 <span class="comment">                |  \    |</span>
01163 <span class="comment">                |    \  |</span>
01164 <span class="comment">                | Son0 \|</span>
01165 <span class="comment">                B-------C</span>
01166 <span class="comment"></span>
01167 <span class="comment">                For rectangles whith OrderT&gt;OrderS. It is VERY IMPORTANT, for splitRectangular() reasons.</span>
01168 <span class="comment"></span>
01169 <span class="comment">                A-------D</span>
01170 <span class="comment">                | Son0 /|</span>
01171 <span class="comment">                |    /  |</span>
01172 <span class="comment">                |  /    |</span>
01173 <span class="comment">                |/ Son1 |</span>
01174 <span class="comment">                B-------C</span>
01175 <span class="comment"></span>
01176 <span class="comment">        */</span>
01177         <a class="code" href="a04199.html#a6">nlassert</a>(Son0==NULL);
01178         <a class="code" href="a04199.html#a6">nlassert</a>(Son1==NULL);
01179         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;newTessFace();
01180         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;newTessFace();
01181 
01182         <span class="comment">// Son0.</span>
01183         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Patch= <span class="keyword">this</span>;
01184         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Level= 0;
01185         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
01186         {
01187                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase= b;
01188                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft= c;
01189                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight= a;
01190                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase= fb;
01191                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft= fc;
01192                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight= fa;
01193                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVBase.setST(0, 1);
01194                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVLeft.setST(1, 1);
01195                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVRight.setST(0, 0);
01196         }
01197         <span class="keywordflow">else</span>
01198         {
01199                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase= a;
01200                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft= b;
01201                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight= d;
01202                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase= fa;
01203                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft= fb;
01204                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight= fd;
01205                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVBase.setST(0, 0);
01206                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVLeft.setST(0, 1);
01207                 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVRight.setST(1, 0);
01208         }
01209         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FBase= <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
01210         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= NULL;
01211         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= NULL;
01212         <span class="comment">// No tile info.</span>
01213         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Size= <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>/2;
01214         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;computeSplitPoint();
01215 
01216         <span class="comment">// Son1.</span>
01217         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Patch= <span class="keyword">this</span>;
01218         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Level= 0;
01219         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
01220         {
01221                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase= d;
01222                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft= a;
01223                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight= c;
01224                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase= fd;
01225                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVLeft= fa;
01226                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVRight= fc;
01227                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVBase.setST(1, 0);
01228                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVLeft.setST(0, 0);
01229                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVRight.setST(1, 1);
01230         }
01231         <span class="keywordflow">else</span>
01232         {
01233                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase= c;
01234                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft= d;
01235                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight= b;
01236                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase= fc;
01237                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVLeft= fd;
01238                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVRight= fb;
01239                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVBase.setST(1, 1);
01240                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVLeft.setST(1, 0);
01241                 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVRight.setST(0, 1);
01242         }
01243         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FBase= <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
01244         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= NULL;
01245         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= NULL;
01246         <span class="comment">// No tile info.</span>
01247         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Size= <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>/2;
01248         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;computeSplitPoint();
01249 
01250 
01251         <span class="comment">// Prepare the render list...</span>
01252         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
01253         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_18">resetMasterBlock</a>();
01254         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fa);
01255         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fb);
01256         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fc);
01257         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fd);
01258         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a>(Son0);
01259         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a>(Son1);
01260 
01261         <span class="comment">// Usefull for geomorph: Init 2 root faces MaxNearLimit, and MaxFaceSize</span>
01262         <span class="comment">// NB: since no geomorph is made on endpoints (StartPos==EndPos) of patchs, this is not usefull.</span>
01263         <span class="comment">// but it is important to ensure the VP or software geomorph won't crash with bad float values.</span>
01264         <span class="comment">// Init MaxFaceSize.</span>
01265         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase-&gt;MaxFaceSize= 1;
01266         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft-&gt;MaxFaceSize= 1;
01267         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight-&gt;MaxFaceSize= 1;
01268         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase-&gt;MaxFaceSize= 1;
01269         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft-&gt;MaxFaceSize= 1;
01270         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight-&gt;MaxFaceSize= 1;
01271         <span class="comment">// Init MaxNearLimit.</span>
01272         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase-&gt;MaxNearLimit= 1;
01273         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft-&gt;MaxNearLimit= 1;
01274         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight-&gt;MaxNearLimit= 1;
01275         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase-&gt;MaxNearLimit= 1;
01276         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft-&gt;MaxNearLimit= 1;
01277         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight-&gt;MaxNearLimit= 1;
01278 
01279 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_19" doxytag="NL3D::CPatch::modulateTileLightmapEdgeWithTileColors" ></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::CPatch::modulateTileLightmapEdgeWithTileColors </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>ts</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>tt</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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>inverse</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>

<p>
Definition at line <a class="el" href="a06157.html#l00508">508</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
<p>
<div class="fragment"><pre>00509 {
00510         <span class="comment">// Get the tileColors around this tile</span>
00511         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
00512         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
00513 
00514         <span class="comment">// get coordinate according to edge.</span>
00515         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
00516         <span class="keywordflow">switch</span>(edge)
00517         {
00518         <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
00519         <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
00520         <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
00521         <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
00522         };
00523 
00524         <span class="comment">// For all lumel of the edge, bilinear.</span>
00525         <a class="code" href="a04558.html#a15">uint</a>    i;
00526         <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
00527         {
00528                 <span class="comment">// if vertical edge</span>
00529                 <span class="keywordflow">if</span>( (edge&amp;1)==0 )       <a class="code" href="a04223.html#a573">y</a>= i;
00530                 <span class="comment">// else horizontal edge</span>
00531                 <span class="keywordflow">else</span>                            <a class="code" href="a04223.html#a572">x</a>= i;
00532 
00533                 <span class="comment">// manage inverse.</span>
00534                 <a class="code" href="a04558.html#a15">uint</a>    where;
00535                 <span class="keywordflow">if</span>(inverse)             where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
00536                 <span class="keywordflow">else</span>                    where= i;
00537                 <span class="comment">// compute this pixel, and modulate</span>
00538                 <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, x, y, dest[where*stride]);
00539         }
00540 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_20" doxytag="NL3D::CPatch::modulateTileLightmapPixelWithTileColors" ></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::CPatch::modulateTileLightmapPixelWithTileColors </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>ts</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>tt</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>s</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>t</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>

<p>
Definition at line <a class="el" href="a06157.html#l00544">544</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
<p>
<div class="fragment"><pre>00545 {
00546         <span class="comment">// Get the tileColors around this tile</span>
00547         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
00548         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
00549 
00550         <span class="comment">// compute this pixel, and modulate</span>
00551         <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, s, t, *dest);
00552 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_21" doxytag="NL3D::CPatch::modulateTileLightmapWithTileColors" ></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::CPatch::modulateTileLightmapWithTileColors </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>ts</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>tt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</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>stride</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>

<p>
Definition at line <a class="el" href="a06157.html#l00488">488</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
<p>
<div class="fragment"><pre>00489 {
00490         <span class="comment">// Get the tileColors around this tile</span>
00491         <a class="code" href="a03337.html">CRGBA</a>   corners[4];
00492         <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
00493 
00494         <span class="comment">// For all lumel, bilinear.</span>
00495         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
00496         <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
00497         {
00498                 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
00499                 {
00500                         <span class="comment">// compute this pixel, and modulate</span>
00501                         <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, x, y, dest[y*stride + x]);
00502                 }
00503         }
00504 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_6" doxytag="NL3D::CPatch::packLumelBlock" ></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::CPatch::packLumelBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>alpha0</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>alpha1</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>
Pack a 4x4 lumel block<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l00261">261</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00053">NL3D::NL3DDecompressLumelFactor0Case0</a>, <a class="el" href="a06157.html#l00061">NL3D::NL3DDecompressLumelFactor0Case1</a>, <a class="el" href="a06157.html#l00057">NL3D::NL3DDecompressLumelFactor1Case0</a>, <a class="el" href="a06157.html#l00065">NL3D::NL3DDecompressLumelFactor1Case1</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l01132">value</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01267">packShadowMap()</a>.
<p>
<div class="fragment"><pre>00262 {
00263         <span class="comment">// Precalc the height values..</span>
00264         <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a658">value</a>[8];
00265 
00266         <span class="comment">// For each value</span>
00267         <a class="code" href="a04558.html#a15">uint</a> i;
00268         <span class="keywordflow">for</span> (i=0; i&lt;8; i++)
00269         {
00270                 <span class="comment">// Case 0 or 1 ?</span>
00271                 <span class="keywordflow">if</span> (alpha0&gt;alpha1)
00272                         <span class="comment">// Case 0</span>
00273                         <a class="code" href="a04223.html#a658">value</a>[i]=(<a class="code" href="a05363.html#a223">NL3DDecompressLumelFactor0Case0</a>[i]*alpha0+<a class="code" href="a05363.html#a224">NL3DDecompressLumelFactor1Case0</a>[i]*alpha1)/7;
00274                 <span class="keywordflow">else</span>
00275                 {
00276                         <span class="keywordflow">if</span> (i&lt;6)
00277                                 <a class="code" href="a04223.html#a658">value</a>[i]=(<a class="code" href="a05363.html#a225">NL3DDecompressLumelFactor0Case1</a>[i]*alpha0+<a class="code" href="a05363.html#a226">NL3DDecompressLumelFactor1Case1</a>[i]*alpha1)/5;
00278                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i==6)
00279                                 <a class="code" href="a04223.html#a658">value</a>[i]=0;
00280                         <span class="keywordflow">else</span>
00281                                 <a class="code" href="a04223.html#a658">value</a>[i]=255;
00282                 }
00283         }
00284 
00285         <span class="comment">// Store alpha value</span>
00286         dest[0]=alpha0;
00287         dest[1]=alpha1;
00288 
00289         <span class="comment">// Clear dest codes</span>
00290         <span class="keywordflow">for</span> (i=0; i&lt;6; i++)
00291         {
00292                 <span class="comment">// Clear the code</span>
00293                 dest[2+i]=0;
00294         }
00295 
00296         <span class="comment">// For each original select the best</span>
00297         <a class="code" href="a04558.html#a15">uint</a> codeOffset=2;
00298         <a class="code" href="a04558.html#a14">sint</a> codeShift=5;
00299         <span class="keywordflow">for</span> (i=0; i&lt;16; i++)
00300         {
00301                 <span class="comment">// Best dist and code</span>
00302                 <a class="code" href="a04558.html#a15">uint</a> bestDist=10000;
00303                 <a class="code" href="a04558.html#a7">uint8</a> bestCode=0;
00304 
00305                 <span class="comment">// Calc distance</span>
00306                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> code=0; code&lt;8; code++)
00307                 {
00308                         <span class="comment">// Distance from original value</span>
00309                         <a class="code" href="a04558.html#a15">uint</a> dist=abs ((<a class="code" href="a04558.html#a14">sint</a>)(source[i])-(<a class="code" href="a04558.html#a14">sint</a>)(value[code]));
00310 
00311                         <span class="comment">// The best ?</span>
00312                         <span class="keywordflow">if</span> (dist&lt;bestDist)
00313                         {
00314                                 <span class="comment">// New best</span>
00315                                 bestDist=dist;
00316                                 bestCode=code;
00317                         }
00318 
00319                         <span class="comment">// Perfect, stop searching</span>
00320                         <span class="keywordflow">if</span> (dist==0)
00321                                 <span class="keywordflow">break</span>;
00322                 }
00323 
00324                 <span class="comment">// Store the best</span>
00325                 <span class="keywordflow">if</span> (codeShift&gt;=0)
00326                         dest[codeOffset]|=bestCode&lt;&lt;codeShift;
00327                 <span class="keywordflow">else</span>
00328                 {
00329                         dest[codeOffset]|=bestCode&gt;&gt;(-codeShift);
00330                         dest[codeOffset+1]|=bestCode&lt;&lt;(8+codeShift);
00331                 }
00332 
00333 
00334                 <span class="comment">// Next shift</span>
00335                 codeShift-=3;
00336                 <span class="keywordflow">if</span> (codeShift&lt;=-3)
00337                 {
00338                         codeOffset++;
00339                         codeShift+=8;
00340                 }
00341         }
00342 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_1" doxytag="NL3D::CPatch::packShadowMap" ></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::CPatch::packShadowMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pLumel</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>
Pack the lumels of the patches. Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method compress the lumels passed in parameter and stored them in its Lumels member.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>pShadow</em>&nbsp;</td><td>is a pointer on the destination lumel buffer. Size must be (OrderS*4+1)*(OrderS*4+1). </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_2">resetCompressedLumels()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l01267">1267</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06157.html#l00244">evalLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06157.html#l00261">packLumelBlock()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>.
<p>
<div class="fragment"><pre>01268 {
01269         <span class="comment">// Number of lumel by lines</span>
01270         <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
01271 
01272         <span class="comment">// Number of block in a line</span>
01273         <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
01274         <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
01275 
01276         <span class="comment">// Number of line</span>
01277         <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
01278 
01279         <span class="comment">// Number of block line</span>
01280         <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
01281         <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
01282 
01283         <span class="comment">// Resize the compressed buffer</span>
01284         <a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>.resize (numLumelBlock*numLineBlock*NL_BLOCK_LUMEL_COMPRESSED_SIZE);
01285 
01286         <span class="comment">// Input of compresed data</span>
01287         <a class="code" href="a04558.html#a7">uint8</a> *compressedData=&amp;<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[0];
01288 
01289         <span class="comment">// Each line block</span>
01290         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lineBlock=0; lineBlock&lt;numLineBlock; lineBlock++)
01291         {
01292                 <span class="comment">// Block pointer</span>
01293                 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *blockLine=pLumelSrc;
01294 
01295                 <span class="comment">// Each lumel block</span>
01296                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lumelBlock=0; lumelBlock&lt;numLumelBlock; lumelBlock++)
01297                 {
01298                         <span class="comment">// *** Unpack the block</span>
01299                         <a class="code" href="a04558.html#a15">uint</a> countU;
01300 
01301                         <span class="comment">// Last block ?</span>
01302                         <span class="keywordflow">if</span> (lumelBlock==numLumelBlock-1)
01303                                 countU=lumelCount&amp;3;
01304                         <span class="keywordflow">else</span>
01305                                 countU=4;
01306 
01307                         <span class="comment">// Destination lumel</span>
01308                         <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *blockSrc=blockLine;
01309 
01310                         <span class="comment">// Temp block</span>
01311                         <a class="code" href="a04558.html#a7">uint8</a> originalBlock[4*4];
01312 
01313                         <span class="comment">// Copy the lumels in the bloc</span>
01314                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a576">v</a>++)
01315                         {
01316                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; u++)
01317                                 {
01318                                         <span class="comment">// Copy the lumel</span>
01319                                         originalBlock[(<a class="code" href="a04223.html#a576">v</a>&lt;&lt;2)+u]=blockSrc[u];
01320                                 }
01321 
01322                                 <span class="comment">// Next line</span>
01323                                 blockSrc+=lumelCount;
01324                         }
01325 
01326                         <span class="comment">// Get min and max alpha</span>
01327                         <a class="code" href="a04558.html#a7">uint8</a> alphaMin=255;
01328                         <a class="code" href="a04558.html#a7">uint8</a> alphaMax=0;
01329 
01330                         <span class="comment">// Scan</span>
01331                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;16; i++)
01332                         {
01333                                 <span class="comment">// Min ?</span>
01334                                 <span class="keywordflow">if</span> (originalBlock[i]&lt;alphaMin)
01335                                         alphaMin=originalBlock[i];
01336                                 <span class="keywordflow">if</span> (originalBlock[i]&gt;alphaMax)
01337                                         alphaMax=originalBlock[i];
01338                         }
01339 
01340                         <span class="comment">// *** Try to compress by 2 methods</span>
01341 
01342                         <span class="comment">// Blcok uncompressed</span>
01343                         <a class="code" href="a04558.html#a7">uint8</a> uncompressedBlock[4*4];
01344         
01345                         <span class="comment">// Pack the block</span>
01346                         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (compressedData, originalBlock, alphaMin, alphaMax);
01347 
01348                         <span class="comment">// Unpack the block</span>
01349                         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (uncompressedBlock, compressedData);
01350 
01351                         <span class="comment">// Eval error</span>
01352                         <a class="code" href="a04558.html#a15">uint</a> firstMethod=<a class="code" href="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (originalBlock, uncompressedBlock, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE);
01353 
01354                         <span class="comment">// second compression</span>
01355                         <a class="code" href="a04558.html#a7">uint8</a> secondCompressedBlock[<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>];
01356                         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (secondCompressedBlock, originalBlock, alphaMax, alphaMin);
01357 
01358                         <span class="comment">// Unpack the block</span>
01359                         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (uncompressedBlock, secondCompressedBlock);
01360 
01361                         <span class="comment">// Eval error</span>
01362                         <a class="code" href="a04558.html#a15">uint</a> secondMethod=<a class="code" href="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (originalBlock, uncompressedBlock, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE);
01363 
01364                         <span class="comment">// Second best ?</span>
01365                         <span class="keywordflow">if</span> (secondMethod&lt;firstMethod)
01366                         {
01367                                 <span class="comment">// Copy compressed data</span>
01368                                 memcpy (compressedData, secondCompressedBlock, NL_BLOCK_LUMEL_COMPRESSED_SIZE);
01369                         }
01370 
01371                         <span class="comment">// Next source block</span>
01372                         compressedData+=<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>;
01373 
01374                         <span class="comment">// Next block on the line</span>
01375                         blockLine+=4;
01376                 }
01377 
01378                 <span class="comment">// Next line of block</span>
01379                 pLumelSrc+=lumelCount*4;
01380         }
01381 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_3" doxytag="NL3D::CPatch::preRender" ></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::CPatch::preRender </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>patchSphere</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>
preRender this patch. Build Max faces / pass etc... 
<p>

<p>
Definition at line <a class="el" href="a06161.html#l00249">249</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06497.html#l00083">NL3D::CTileMaterial::appendTileToEachRenderPass()</a>, <a class="el" href="a06491.html#l00146">NL3D::CTessBlock::clip()</a>, <a class="el" href="a06491.html#l00160">NL3D::CTessBlock::clipFar()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06491.html#l00139">NL3D::CTessBlock::forceClip()</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06492.html#l00090">NL3D::CTessBlock::RdrTileRoot</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06491.html#l00267">NL3D::CTessBlock::refillFaceVectorTile()</a>, <a class="el" href="a06491.html#l00130">NL3D::CTessBlock::resetClip()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06161.html#l00744">updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, <a class="el" href="a06161.html#l00774">updateTileVBAlloc()</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
<div class="fragment"><pre>00250 {
00251         <span class="comment">// 0. Classify the patch, and update TextureInfo.</span>
00252         <span class="comment">//=======================</span>
00253         <a class="code" href="a04558.html#a14">sint</a>    newFar0,newFar1;
00254         <span class="comment">// compute new Far0 and new Far1.</span>
00255         <a class="code" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a>(patchSphere, newFar0, newFar1);
00256 
00257 
00258         <span class="comment">// 2. Update vertices in VB</span>
00259         <span class="comment">//========================</span>
00260         <a class="code" href="a04558.html#a14">sint</a>    oldFar0= <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>, oldFar1= <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>;
00261 
00262         <span class="comment">// Test if go in or go out tileMode.</span>
00263         <span class="keywordtype">bool</span>    changeTileMode;
00264         <span class="comment">// this is true if a change is made, and if old or current is in TileMode.</span>
00265         changeTileMode= (newFar0!=oldFar0) &amp;&amp; (newFar0==0 || oldFar0==0);
00266         <span class="comment">// Or this is true if Far0 / Far1 was invalid before.</span>
00267         changeTileMode= changeTileMode || oldFar0==-1 || oldFar1==-1;
00268 
00269         <span class="comment">// Pre VB change.</span>
00270         <span class="comment">//------------------</span>
00271         <span class="comment">// In this case, major change: delete all VB, then recreate after.</span>
00272         <span class="keywordflow">if</span>(changeTileMode)
00273         {
00274                 <span class="comment">// delete the old VB (NB: isRenderClipped()==false here). </span>
00275                 <span class="comment">// NB: Far0 and Far1 are still unmodified, so deleteVB() will do the good job.</span>
00276                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
00277         }
00278         <span class="keywordflow">else</span>
00279         {
00280                 <span class="comment">// minor change: Far0 UV, or Far1.</span>
00281                 <span class="comment">// Far0 UV: do nothing here.</span>
00282                 <span class="comment">// If change in Far1, must delete Far1</span>
00283                 <span class="keywordflow">if</span>(newFar1!=oldFar1)
00284                 {
00285                         <span class="comment">// NB: Far1 is still unmodified, so deleteVB() will do the good job.</span>
00286                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_4">deleteVBAndFaceVectorFar1Only</a>();
00287                 }
00288         }
00289 
00290         <span class="comment">// Far change.</span>
00291         <span class="comment">//------------------</span>
00292         <span class="comment">// Set new far values</span>
00293         Far0= newFar0;
00294         Far1= newFar1;
00295 
00296 
00297         <span class="comment">// Post VB change.</span>
00298         <span class="comment">//------------------</span>
00299         <span class="keywordflow">if</span>(changeTileMode)
00300         {
00301                 <span class="comment">// major change: recreate all the VB.</span>
00302                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a>();
00303                 <span class="comment">// Then try to refill if possible.</span>
00304                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
00305         }
00306         <span class="keywordflow">else</span>
00307         {
00308                 <span class="comment">// minor change: Far0 UV, or Far1.</span>
00309                 <span class="comment">// If change in Far0</span>
00310                 <span class="keywordflow">if</span>(newFar0!=oldFar0)
00311                 {
00312                         <span class="comment">// Then must recompute VB with good UVs.</span>
00313                         <span class="comment">// An optimisation is to check if UVs had really change (see UScale ...)</span>
00314                         <span class="comment">// but the case they don't change is very rare: 1/16.</span>
00315                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_8">fillVBFar0Only</a>();
00316                 }
00317 
00318                 <span class="comment">// If change in Far1, must allcoate and recompute UVs.</span>
00319                 <span class="keywordflow">if</span>(newFar1!=oldFar1)
00320                 {
00321                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_1">allocateVBAndFaceVectorFar1Only</a>();
00322                         <span class="comment">// try to fill if no reallocation problem</span>
00323                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_9">fillVBFar1Only</a>();
00324                 }
00325         }
00326 
00327 
00328         <span class="comment">// 3. Append patch to renderList.</span>
00329         <span class="comment">//=====================</span>
00330         <span class="comment">// This patch is visible. So if good far, append.</span>
00331         <span class="keywordflow">if</span>(Far0&gt;0)
00332         {
00333                 <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>-&gt;appendRdrPatchFar0(<span class="keyword">this</span>);
00334         }
00335         <span class="comment">// Same for Far1.</span>
00336         <span class="keywordflow">if</span>(Far1&gt;0)
00337         {
00338                 <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>-&gt;appendRdrPatchFar1(<span class="keyword">this</span>);
00339         }
00340 
00341 
00342         <span class="comment">// 4. Clip tess blocks.</span>
00343         <span class="comment">//=====================</span>
00344         <span class="comment">// If we are in Tile/FarTransition</span>
00345         <span class="keywordtype">bool</span>    doClipFar= Far0==0 &amp;&amp; Far1==1;
00346         <span class="comment">// Parse all TessBlocks.</span>
00347         <a class="code" href="a04558.html#a15">uint</a>                    nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
00348         CTessBlock              *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
00349         <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
00350         {
00351                 CTessBlock              &amp;tblock= *pTessBlock;
00352 
00353                 <span class="comment">// bkup the old result for clipping</span>
00354                 <span class="keywordtype">bool</span>    oldVisibleFar0= tblock.visibleFar0();
00355                 <span class="keywordtype">bool</span>    oldVisibleTile= tblock.visibleTile();
00356                 <span class="keywordtype">bool</span>    oldVisibleFar1= tblock.visibleFar1();
00357 
00358                 <span class="comment">// If this TessBlock is empty, do not need to clip</span>
00359                 <span class="keywordflow">if</span>(tblock.FaceTileMaterialRefCount==0)
00360                 {
00361                         <span class="comment">// Simply force the clip.</span>
00362                         tblock.forceClip();
00363                 }
00364                 <span class="keywordflow">else</span>
00365                 {
00366                         <span class="comment">// clip the tessBlock.</span>
00367                         tblock.resetClip();
00368                         tblock.clip();
00369                         <span class="comment">// If we are in Tile/FarTransition</span>
00370                         <span class="keywordflow">if</span>(doClipFar)
00371                                 tblock.clipFar(CLandscapeGlobals::RefineCenter, CLandscapeGlobals::TileDistNear, CLandscapeGlobals::FarTransition);
00372 
00373                         <span class="comment">// If TileMode, and if tile visible</span>
00374                         <span class="keywordflow">if</span>(Far0==0 &amp;&amp; tblock.visibleTile() )
00375                         {
00376                                 <span class="comment">// Append all tiles (if any) to the renderPass list!</span>
00377                                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0;j&lt;<a class="code" href="a05069.html#a1">NL3D_TESSBLOCK_TILESIZE</a>; j++)
00378                                 {
00379                                         <span class="comment">// If tile exist</span>
00380                                         <span class="keywordflow">if</span>(tblock.RdrTileRoot[j])
00381                                                 <span class="comment">// add it to the renderList</span>
00382                                                 tblock.RdrTileRoot[j]-&gt;appendTileToEachRenderPass(NumRenderableFaces);
00383                                 }
00384                         }       
00385                 }
00386 
00387                 <span class="comment">// If change of clip in tessBlock, must update the tessBlock</span>
00388                 <span class="keywordflow">if</span>( Far0&gt; 0 &amp;&amp; oldVisibleFar0 != tblock.visibleFar0() )
00389                 {
00390                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
00391                         {
00392                                 <span class="comment">// allocate</span>
00393                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
00394                                 <span class="comment">// fill only if possible.</span>
00395                                 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs())
00396                                         <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
00397                                 <span class="comment">// rebuild triangles index list.</span>
00398                                 tblock.refillFaceVectorFar0();
00399                         }
00400                         <span class="keywordflow">else</span>
00401                         {
00402                                 <span class="comment">// delete</span>
00403                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
00404                         }
00405                 }
00406                 <span class="keywordflow">if</span>( Far0==0 &amp;&amp; oldVisibleTile != tblock.visibleTile() )
00407                 {
00408                         <span class="keywordflow">if</span>( tblock.visibleTile() )
00409                         {
00410                                 <span class="comment">// allocate</span>
00411                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, <span class="keyword">true</span>);
00412                                 <span class="comment">// fill only if possible.</span>
00413                                 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs())
00414                                         <a class="code" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a>(tblock.NearVertexList);
00415                                 <span class="comment">// rebuild triangles index list.</span>
00416                                 tblock.refillFaceVectorTile();
00417                         }
00418                         <span class="keywordflow">else</span>
00419                         {
00420                                 <span class="comment">// delete</span>
00421                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, <span class="keyword">false</span>);
00422                         }
00423                 }
00424                 <span class="keywordflow">if</span>( Far1&gt; 0 &amp;&amp; oldVisibleFar1 != tblock.visibleFar1() )
00425                 {
00426                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
00427                         {
00428                                 <span class="comment">// allocate</span>
00429                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
00430                                 <span class="comment">// fill only if possible.</span>
00431                                 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs())
00432                                         <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
00433                                 <span class="comment">// rebuild triangles index list.</span>
00434                                 tblock.refillFaceVectorFar1();
00435                         }
00436                         <span class="keywordflow">else</span>
00437                         {
00438                                 <span class="comment">// delete</span>
00439                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
00440                         }
00441                 }
00442         }
00443 
00444 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz657_2" doxytag="NL3D::CPatch::processDLMLight" ></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::CPatch::processDLMLight </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03065.html">CPatchDLMPointLight</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pl</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>
Process a Dynamic light, creating the DLMContext if necessary. Increment RefCount. Called by <a class="el" href="a02702.html">CLandscape</a>.
<p>
Definition at line <a class="el" href="a06157.html#l02021">2021</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06163.html#l00648">NL3D::CPatchDLMContext::addPointLightInfluence()</a>, <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06164.html#l00128">NL3D::CPatchDLMContext::CurPointLightCount</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
<p>
<div class="fragment"><pre>02022 {
02023         <span class="comment">// add reference to currentLight, creating DLMContext if needed</span>
02024         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a>();
02025 
02026         <span class="comment">// add curLight counter</span>
02027         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount++;
02028 
02029         <span class="comment">// compute lighting, only if patch is visible</span>
02030         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
02031                 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;addPointLightInfluence(pl);
02032 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz651_1" doxytag="NL3D::CPatch::recreateAllVegetableIgs" ></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::CPatch::recreateAllVegetableIgs </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>
Recreate any vegetable block (as possible) in this patch. (usefull for edition). 
<p>

<p>
Definition at line <a class="el" href="a06162.html#l00260">260</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
<p>
References <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03168">NL3D::CLandscape::isVegetableActive()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03120">NL3D::CLandscape::enableVegetable()</a>.
<p>
<div class="fragment"><pre>00261 {
00262         <span class="comment">// For all TessBlocks, try to release their VegetableBlock</span>
00263         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> numtb=0; numtb&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); numtb++)
00264         {
00265                 <span class="comment">// if the vegetableBlock is deleted, and if there is at least one Material in the tessBlock, and if possible</span>
00266                 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].VegetableBlock==NULL &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount&gt;0
00267                         &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;isVegetableActive())
00268                 {
00269                         <span class="comment">// compute tessBlock coordinate</span>
00270                         <a class="code" href="a04558.html#a15">uint</a> tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
00271                         <a class="code" href="a04558.html#a15">uint</a> ts= numtb&amp;(tbWidth-1);
00272                         <a class="code" href="a04558.html#a15">uint</a> tt= numtb/tbWidth;
00273                         <span class="comment">// crate the vegetable with tilecooridante (ie tessBlock coord *2);</span>
00274                         <a class="code" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a>(numtb, ts*2, tt*2);
00275                 }
00276         }
00277 
00278 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz649_12" doxytag="NL3D::CPatch::recreateTessBlockFaceVector" ></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::CPatch::recreateTessBlockFaceVector </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03475.html">CTessBlock</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>block</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>

<p>
Definition at line <a class="el" href="a06161.html#l00705">705</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06491.html#l00198">NL3D::CTessBlock::createFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00242">NL3D::CTessBlock::createFaceVectorFar1()</a>, <a class="el" href="a06491.html#l00302">NL3D::CTessBlock::createFaceVectorTile()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, and <a class="el" href="a06156.html#l00884">MasterBlock</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00896">NL3D::CLandscape::updateTessBlocksFaceVector()</a>.
<p>
<div class="fragment"><pre>00706 {
00707         <span class="comment">// Do it Only if patch is visible.</span>
00708         <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
00709         {
00710                 <span class="comment">// Far0.</span>
00711                 <span class="comment">// If Far Mode.</span>
00712                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
00713                 {
00714                         <span class="comment">// Create the face for this TessBlock only.</span>
00715                         block.createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00716                 }
00717                 <span class="comment">// Or If Tile Mode.</span>
00718                 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
00719                 {
00720                         <span class="comment">// No tiles in MasterBlock! So no need to call createFaceVectorTile(), if this block is the MasterBlock.</span>
00721                         <span class="keywordflow">if</span>(&amp;block != &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>)
00722                                 block.createFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00723                 }
00724 
00725                 <span class="comment">// Far1.</span>
00726                 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00727                 {
00728                         <span class="comment">// Create the face for this TessBlock only.</span>
00729                         block.createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
00730                 }
00731         }
00732 
00733 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha22" doxytag="NL3D::CPatch::recreateTileUvs" ></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::CPatch::recreateTileUvs </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="a06155.html#l02150">2150</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTileFace &gt;::clear()</a>, <a class="el" href="a06116.html#l00124">NLMISC::CObjectVector&lt; CTessBlock &gt;::clear()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>.
<p>
<div class="fragment"><pre>02151 {
02152         <span class="comment">// Reset the Tile rdr list.</span>
02153         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> tb=0; tb&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();tb++)
02154         {
02155                 <span class="comment">// Vertices must all be reseted.</span>
02156                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[tb].NearVertexList.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_0">clear</a>();
02157                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a05069.html#a1">NL3D_TESSBLOCK_TILESIZE</a>;i++)
02158                 {
02159                         CTileMaterial   *tm= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[tb].RdrTileRoot[i];
02160                         <span class="keywordflow">if</span>(tm)
02161                         {
02162                                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> pass=0;pass&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;pass++)
02163                                 {
02164                                         tm-&gt;TileFaceList[pass].<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_0">clear</a>();
02165                                 }
02166                         }
02167                 }
02168         }
02169 
02170         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;recreateTileUvs();
02171         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;recreateTileUvs();
02172 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha23" doxytag="NL3D::CPatch::refineAll" ></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::CPatch::refineAll </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>
Refine this patch. Even if clipped. Refine all nodes. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l01493">1493</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06497.html#l01783">NL3D::CTessFace::refineAll()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01132">NL3D::CZone::refineAll()</a>.
<p>
<div class="fragment"><pre>01494 {
01495         <span class="comment">// refineAll.</span>
01496         <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
01497         <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
01498         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;refineAll();
01499         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;refineAll();
01500 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha24" doxytag="NL3D::CPatch::refreshTesselationGeometry" ></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::CPatch::refreshTesselationGeometry </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="a06155.html#l01531">1531</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>.
<p>
<div class="fragment"><pre>01532 {
01533         <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
01534         <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
01535 
01536         <span class="comment">// Recompute the BaseVertices.</span>
01537         CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
01538         CTessVertex *b= BaseVertices[1];
01539         CTessVertex *c= BaseVertices[2];
01540         CTessVertex *d= BaseVertices[3];
01541         <span class="comment">// Set positions.</span>
01542         a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
01543         b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
01544         c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
01545         d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
01546 
01547 
01548         <span class="comment">// refresh the tesselation of sons.</span>
01549         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;refreshTesselationGeometry();
01550         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;refreshTesselationGeometry();
01551 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha25" doxytag="NL3D::CPatch::release" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CPatch::release </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>
Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op. 
<p>

<p>
Definition at line <a class="el" href="a06155.html#l00115">115</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06760.html#l00581">NL3D::CZone::_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">NL3D::CZone::_PatchRenderClipped</a>, <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a05862.html#l03052">NL3D::CLandscape::deleteTessFace()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, <a class="el" href="a06155.html#l01555">resetRenderFar()</a>, <a class="el" href="a05485.html#l00075">NLMISC::CBitSet::set()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00603">NL3D::CZone::release()</a>, and <a class="el" href="a06155.html#l00109">~CPatch()</a>.
<p>
<div class="fragment"><pre>00116 {
00117         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
00118         {
00119                 <span class="comment">// First, delete the VB if the zone was removed while the patch is visible.</span>
00120                 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
00121                 {
00122                         <span class="comment">// release VertexBuffer.</span>
00123                         <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
00124                         <span class="comment">// Flag RenderClipped in Zone</span>
00125                         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchRenderClipped.set(PatchId, <span class="keyword">true</span>);
00126                 }
00127 
00128                 <span class="comment">// THIS PATCH MSUT BE UNBOUND FIRST!!!!!</span>
00129                 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
00130                 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
00131                 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
00132                 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
00133                 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
00134                 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
00135 
00136                 <span class="comment">// Free renderPass of landscape, and maybe force computation of texture info on next preRender().</span>
00137                 <span class="comment">// Must do it here, before deletion of Zone, OrderS/T etc...</span>
00138                 <a class="code" href="a03057.html#NL3D_1_1CPatcha26">resetRenderFar</a>();
00139 
00140                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;deleteTessFace(Son0);
00141                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;deleteTessFace(Son1);
00142                 <span class="comment">// Vertices are smartptr/deleted in zone.</span>
00143         }
00144 
00145         <span class="comment">// Flag the fact that this patch can't be rendered.</span>
00146         <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>=0;
00147         <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>=0;
00148         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>=NULL;
00149         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>=NULL;
00150         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
00151         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_18">resetMasterBlock</a>();
00152         <span class="comment">// Flag RenderClipped in Zone</span>
00153         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
00154         {
00155                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchRenderClipped.set( PatchId, <span class="keyword">true</span>);
00156                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchOldRenderClipped.set( PatchId, <span class="keyword">true</span>);
00157         }
00158 
00159         <span class="comment">// the pathc is uncompiled. must do it after clearTessBlocks(), because may use it </span>
00160         <span class="comment">// for vegetable manager, and for updateLighting</span>
00161         <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= NULL;
00162 
00163         <span class="comment">// uncompile: reset UpdateLighting circular list to NULL.</span>
00164         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>!= NULL)
00165         {
00166                 <span class="comment">// verify the patch is correctly unlinked from any ciruclar list.</span>
00167                 <a class="code" href="a04199.html#a6">nlassert</a>(_ULNearPrec==<span class="keyword">this</span> &amp;&amp; _ULNearNext==<span class="keyword">this</span>);
00168         }
00169         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= NULL;
00170         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= NULL;
00171 
00172         <span class="comment">// DynamciLightMap: release the _DLMContext if still exist.</span>
00173         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
00174                 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>;
00175         <span class="comment">// reset</span>
00176         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
00177         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>= 0;
00178 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz666_22" doxytag="NL3D::CPatch::releaseTileLightMap" ></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::CPatch::releaseTileLightMap </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>ts</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>tt</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>

<p>
Definition at line <a class="el" href="a06157.html#l01247">1247</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05862.html#l02026">NL3D::CLandscape::releaseTileLightMap()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>.
<p>
<div class="fragment"><pre>01248 {
01249         <span class="comment">// TessBlocks must have been allocated.</span>
01250         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
01251 
01252         <span class="comment">// get what tessBlock to use.</span>
01253         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01254         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
01255         CTessBlock      &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
01256 
01257         <span class="comment">// If no more tileMaterial use this lightmap, release it.</span>
01258         <a class="code" href="a04199.html#a6">nlassert</a>(tessBlock.LightMapRefCount&gt;0);
01259         tessBlock.LightMapRefCount--;
01260         <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
01261         {
01262                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;releaseTileLightMap(tessBlock.LightMapId);
01263         }
01264 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz671_4" doxytag="NL3D::CPatch::releaseVegetableBlock" ></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::CPatch::releaseVegetableBlock </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>numTb</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>
release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist 
<p>

<p>
Definition at line <a class="el" href="a06162.html#l00326">326</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
<p>
References <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
<p>
<div class="fragment"><pre>00327 {
00328         <span class="comment">// if exist, must delete the VegetableBlock.</span>
00329         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock)
00330         {
00331                 <span class="comment">// delete Igs, and remove from list.</span>
00332                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock-&gt;release(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableBlockList);
00333                 <span class="comment">// delete.</span>
00334                 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock;
00335                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock= NULL;
00336         }
00337 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_13" doxytag="NL3D::CPatch::removeFaceFromRenderList" ></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::CPatch::removeFaceFromRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00848">848</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTessFace &gt;::remove()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
<p>
<div class="fragment"><pre>00849 {
00850         <span class="comment">// Update the number of renderable Faces</span>
00851         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>--;
00852         <a class="code" href="a04199.html#a6">nlassert</a>(NumRenderableFaces&gt;=0);
00853 
00854         <span class="comment">// Update Gnal render.</span>
00855         <span class="comment">//====================</span>
00856         <span class="keywordflow">if</span>(face-&gt;Level&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
00857         {
00858                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.remove(face);
00859                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FaceTileMaterialRefCount--;
00860 
00861                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00862                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(MasterBlock);
00863         }
00864         <span class="keywordflow">else</span>
00865         {
00866                 <span class="comment">// link the face to the good tessblock.</span>
00867                 <a class="code" href="a04558.html#a15">uint</a>    numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
00868                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarFaceList.remove(face);
00869                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount--;
00870 
00871                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00872                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
00873 
00874                 <span class="comment">// Update Tile render (no need to do it if face not at least at tessblock level).</span>
00875                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_14">removeFaceFromTileRenderList</a>(face);
00876 
00877                 <span class="comment">// Destroy if necessary the TessBlocks.</span>
00878                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
00879         }
00880 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_14" doxytag="NL3D::CPatch::removeFaceFromTileRenderList" ></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::CPatch::removeFaceFromTileRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>face</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="a06155.html#l00913">913</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTileFace &gt;::remove()</a>, <a class="el" href="a05862.html#l03669">NL3D::CLandscape::removeFromShadowPolyReceiver()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>, <a class="el" href="a06498.html#l00261">NL3D::CTessFace::TileFaces</a>, <a class="el" href="a06498.html#l00259">NL3D::CTessFace::TileMaterial</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, and <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>.
<p>
<div class="fragment"><pre>00914 {
00915         <span class="keywordflow">if</span>(face-&gt;TileMaterial)
00916         {
00917                 <span class="comment">// For all valid faces, update their links.</span>
00918                 <span class="comment">// Do not do this for lightmap, since it use same face from RGB0 pass.</span>
00919                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
00920                 {
00921                         <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a>   *tilePass= face-&gt;TileMaterial-&gt;Pass[i].PatchRdrPass;
00922                         <span class="comment">// If tile i enabled.</span>
00923                         <span class="keywordflow">if</span>(tilePass)
00924                         {
00925                                 <span class="comment">// a face should have created for this pass.</span>
00926                                 <a class="code" href="a04199.html#a6">nlassert</a>(face-&gt;TileFaces[i]);
00927                                 face-&gt;TileMaterial-&gt;TileFaceList[i].remove(face-&gt;TileFaces[i]);
00928                         }
00929                 }
00930 
00931                 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
00932                 <a class="code" href="a04558.html#a15">uint</a>    numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
00933                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
00934 
00935                 <span class="comment">// Shadow: remove it from the Shadow Triangles.</span>
00936                 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;removeFromShadowPolyReceiver(face);
00937         }
00938 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_15" doxytag="NL3D::CPatch::removeFarVertexFromRenderList" ></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::CPatch::removeFarVertexFromRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fv</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="a06155.html#l01062">1062</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTessFarVertex &gt;::remove()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06156.html#l00931">TFarVertType</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>.
<p>
<div class="fragment"><pre>01063 {
01064         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a>    <a class="code" href="a04223.html#a581">type</a>;
01065         <a class="code" href="a04558.html#a15">uint</a>                    numtb;
01066         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(fv-&gt;PCoord, type, numtb);
01067         
01068         
01069         <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> || <a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>)
01070         {
01071                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.remove(fv);
01072                 fv-&gt;OwnerBlock= NULL;
01073         }
01074         <span class="keywordflow">else</span> 
01075         {
01076                 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarVertexList.remove(fv);
01077                 fv-&gt;OwnerBlock= NULL;
01078 
01079                 <span class="comment">// Destroy if necessary the TessBlocks.</span>
01080                 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
01081         }
01082 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_16" doxytag="NL3D::CPatch::removeNearVertexFromRenderList" ></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::CPatch::removeNearVertexFromRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>tileMat</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>nv</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>

<p>
Definition at line <a class="el" href="a06155.html#l01099">1099</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>.
<p>
<div class="fragment"><pre>01100 {
01101         <a class="code" href="a04199.html#a6">nlassert</a>(tileMat);
01102 
01103         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01104         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tileMat-&gt;TileS, tileMat-&gt;TileT);
01105         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].NearVertexList.remove(nv);
01106         nv-&gt;OwnerBlock= NULL;
01107 
01108         <span class="comment">// Destroy if necessary the TessBlocks.</span>
01109         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
01110 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_17" doxytag="NL3D::CPatch::removeTileMaterialFromRenderList" ></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::CPatch::removeTileMaterialFromRenderList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tm</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="a06155.html#l01002">1002</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00622">NL3D::CLandscape::getTileCallback()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, <a class="el" href="a03932.html#NL3D_1_1ULandscapeTileCallbacka1">NL3D::ULandscapeTileCallback::tileRemoved()</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
<p>
Referenced by <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>.
<p>
<div class="fragment"><pre>01003 {
01004         <a class="code" href="a04199.html#a6">nlassert</a>(tm);
01005 
01006         <a class="code" href="a04558.html#a15">uint</a>    numtb, numtm;
01007         <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tm-&gt;TileS, tm-&gt;TileT);
01008         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].RdrTileRoot[numtm]= NULL;
01009         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount--;
01010         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount--;
01011         <span class="comment">// The master block contains the whole patch TileMaterialRefCount</span>
01012         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount--;
01013 
01014         <span class="comment">// if no more tiles in this tessBlock, delete the vegetable Block.</span>
01015         <span class="comment">//==========</span>
01016         <span class="comment">// if no more tiles in this tessBlock</span>
01017         <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount==0 )
01018         {
01019                 <span class="comment">// release the vegetableBlock (if any)</span>
01020                 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a>(numtb);
01021         }
01022 
01023         <span class="comment">// Destroy if necessary the TessBlocks.</span>
01024         <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
01025 
01026         <span class="comment">// DynamicLighting. When in near, must compute the context, to have good UVs.</span>
01027         <span class="comment">//==========</span>
01028         <span class="comment">// dec ref the context, deleting it if needed.</span>
01029         <a class="code" href="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a>();
01030 
01031         ULandscapeTileCallback *tileCallback = <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileCallback();
01032         <span class="keywordflow">if</span> (tileCallback)
01033         {
01034                 tileCallback-&gt;tileRemoved((<a class="code" href="a04558.html#a13">uint64</a>) tm); <span class="comment">// pointer to tile material serves as a unique identifier</span>
01035         }
01036 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_4" doxytag="NL3D::CPatch::renderFar0" ></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::CPatch::renderFar0 </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>
Render this patch, if not clipped. Call PatchCurrentDriver-&gt;renderSimpleTriangles(). 
<p>

<p>
Definition at line <a class="el" href="a06161.html#l00528">528</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06492.html#l00067">NL3D::CTessBlock::Far0FaceVector</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a06161.html#l00455">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00054">NL3D::ProfNPatchRdrFar0</a>, <a class="el" href="a05872.html#l00037">NL3D::ProfNRdrFar0</a>, <a class="el" href="a06161.html#l00460">NL3D::renderFaceVector()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00529 {
00530         <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNPatchRdrFar0, 1);
00531 
00532 <span class="preprocessor">#ifdef NL_DEBUG</span>
00533 <span class="preprocessor"></span>        <span class="comment">// Must be visible, and must be called only if the RdrPass is enabled.</span>
00534         <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; _PatchRdrPassFar0);
00535 <span class="preprocessor">#endif</span>
00536 <span class="preprocessor"></span>
00537         <span class="comment">// Render tris of MasterBlock.</span>
00538         <a class="code" href="a05363.html#a453">renderFaceVector</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far0FaceVector);
00539         <span class="comment">// profile</span>
00540         <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar0, <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far0FaceVector);
00541 
00542         <span class="comment">// Render tris of TessBlocks.</span>
00543         <a class="code" href="a04558.html#a15">uint</a>                    nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
00544         CTessBlock              *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
00545         <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
00546         {
00547                 CTessBlock              &amp;tblock= *pTessBlock;
00548                 <span class="comment">// if block visible, render</span>
00549                 <span class="keywordflow">if</span>( tblock.visibleFar0() )
00550                 {
00551                         <a class="code" href="a05363.html#a453">renderFaceVector</a>(tblock.Far0FaceVector);
00552                         <span class="comment">// profile</span>
00553                         <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar0, tblock.Far0FaceVector);
00554                 }
00555         }
00556 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_5" doxytag="NL3D::CPatch::renderFar1" ></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::CPatch::renderFar1 </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="a06161.html#l00560">560</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06492.html#l00068">NL3D::CTessBlock::Far1FaceVector</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a06161.html#l00455">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00055">NL3D::ProfNPatchRdrFar1</a>, <a class="el" href="a05872.html#l00038">NL3D::ProfNRdrFar1</a>, <a class="el" href="a06161.html#l00460">NL3D::renderFaceVector()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
<p>
<div class="fragment"><pre>00561 {
00562         <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNPatchRdrFar1, 1);
00563 
00564 <span class="preprocessor">#ifdef NL_DEBUG</span>
00565 <span class="preprocessor"></span>        <span class="comment">// Must be visible, and must be called only if the RdrPass is enabled.</span>
00566         <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; _PatchRdrPassFar1);
00567 <span class="preprocessor">#endif</span>
00568 <span class="preprocessor"></span>
00569         <span class="comment">// Render tris of MasterBlock.</span>
00570         <a class="code" href="a05363.html#a453">renderFaceVector</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far1FaceVector);
00571         <span class="comment">// profile.</span>
00572         <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar1, <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far1FaceVector);
00573 
00574         <span class="comment">// Render tris of TessBlocks.</span>
00575         <a class="code" href="a04558.html#a15">uint</a>                    nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
00576         CTessBlock              *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
00577         <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
00578         {
00579                 CTessBlock              &amp;tblock= *pTessBlock;
00580                 <span class="comment">// if block visible, render</span>
00581                 <span class="keywordflow">if</span>( tblock.visibleFar1() )
00582                 {
00583                         <a class="code" href="a05363.html#a453">renderFaceVector</a>(tblock.Far1FaceVector);
00584                         <span class="comment">// profile.</span>
00585                         <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar1, tblock.Far1FaceVector);
00586                 }
00587         }
00588 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_2" doxytag="NL3D::CPatch::resetCompressedLumels" ></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::CPatch::resetCompressedLumels </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>
Rebuild the packed lumels without shadow. Only the interpolated color will be used.<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l01384">1384</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>.
<p>
<div class="fragment"><pre>01385 {
01386         <span class="comment">// Number of lumel by lines</span>
01387         <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
01388 
01389         <span class="comment">// Number of block in a line</span>
01390         <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
01391         <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
01392 
01393         <span class="comment">// Number of line</span>
01394         <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
01395 
01396         <span class="comment">// Number of block line</span>
01397         <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
01398         <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
01399 
01400         <span class="comment">// Size of the lumel array</span>
01401         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a>=numLineBlock*numLumelBlock*8;
01402 
01403         <span class="comment">// 4 bits per lumel</span>
01404         <a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>.resize (size);
01405 
01406         <span class="comment">// No line have shadows.</span>
01407         memset (&amp;CompressedLumels[0], 0, size);
01408 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz663_18" doxytag="NL3D::CPatch::resetMasterBlock" ></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::CPatch::resetMasterBlock </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>

<p>
Definition at line <a class="el" href="a06155.html#l00709">709</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTessFace &gt;::clear()</a>, <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTessFarVertex &gt;::clear()</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CTessNearVertex &gt;::size()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.
<p>
<div class="fragment"><pre>00710 {
00711         <span class="comment">// We should be not visible so FaceVector no more exist.</span>
00712         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>());
00713 
00714         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.clear();
00715         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.clear();
00716         <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>= 0;
00717         <span class="comment">// no tiles should be here!!</span>
00718         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.NearVertexList.size()==0);
00719 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha26" doxytag="NL3D::CPatch::resetRenderFar" ></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::CPatch::resetRenderFar </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="a06155.html#l01555">1555</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, and <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00115">release()</a>.
<p>
<div class="fragment"><pre>01556 {
01557         <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>)
01558         {
01559                 <span class="comment">// free the render pass.</span>
01560                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
01561                 <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>= NULL;
01562         }
01563         <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>)
01564         {
01565                 <span class="comment">// free the render pass.</span>
01566                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
01567                 <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>= NULL;
01568         }
01569 
01570         <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= -1;
01571         <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= -1;
01572 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz653_0" doxytag="NL3D::CPatch::resetTileLightInfluences" ></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::CPatch::resetTileLightInfluences </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>
make a valid empty array of TileLightInfluences (ie resized to good size, but with empty light influences
<p>
Definition at line <a class="el" href="a06157.html#l01529">1529</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a05862.html#l03298">NL3D::CLandscape::removeAllPointLights()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>.
<p>
<div class="fragment"><pre>01530 {
01531         <span class="comment">// Fill default.</span>
01532         <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>.resize((OrderS/2 +1) * (OrderT/2 +1));
01533         <span class="comment">// Disable All light influence on all points</span>
01534         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i &lt;<a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>.size(); i++)
01535         {
01536                 <span class="comment">// Disable all light influence on this point.</span>
01537                 <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>[i].Light[0]= 0xFF;
01538         }
01539 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha27" doxytag="NL3D::CPatch::serial" ></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::CPatch::serial </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>f</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>

<p>
Definition at line <a class="el" href="a06155.html#l01576">1576</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a06155.html#l00057">_Version</a>, <a class="el" href="a06539.html#l00048">NL3D::CTileColor::Color565</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a06156.html#l00057">NL_PATCH_SMOOTH_FLAG_MASK</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a06157.html#l01529">resetTileLightInfluences()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06462.html#l00759">NLMISC::IStream::xmlPop()</a>, <a class="el" href="a06462.html#l00701">NLMISC::IStream::xmlPush()</a>, and <a class="el" href="a06462.html#l00647">NLMISC::IStream::xmlSerial()</a>.
<p>
<div class="fragment"><pre>01577 {
01578         <span class="comment">/*</span>
01579 <span class="comment">        Version 7:</span>
01580 <span class="comment">                - remove unused information from CTileColor. just keep 565 color</span>
01581 <span class="comment">        Version 6:</span>
01582 <span class="comment">                - default UnderWater flags for tileElements before version 6.</span>
01583 <span class="comment">        Version 5:</span>
01584 <span class="comment">                - TileLightInfluences serialized.</span>
01585 <span class="comment">        Version 4:</span>
01586 <span class="comment">                - Smooth flag serialized</span>
01587 <span class="comment">        Version 3:</span>
01588 <span class="comment">                - NoiseRotation.</span>
01589 <span class="comment">                - NoiseSmooth.</span>
01590 <span class="comment">        Version 2:</span>
01591 <span class="comment">                - Lumels.</span>
01592 <span class="comment">        Version 1:</span>
01593 <span class="comment">                - Tile color.</span>
01594 <span class="comment">        Version 0:</span>
01595 <span class="comment">                - base version.</span>
01596 <span class="comment">        */</span>
01597         <a class="code" href="a04558.html#a15">uint</a>    ver= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(_Version);
01598 
01599         <span class="comment">// No more compatibility before version 2, because OrderS / OrderT not serialized in preceding version</span>
01600         <span class="comment">// Doens't matter since CZone::serial() do not support it too.</span>
01601         <span class="keywordflow">if</span> (ver&lt;2)
01602         {
01603                 <span class="keywordflow">throw</span> <a class="code" href="a03798.html">EOlderStream</a>(f);
01604         }
01605 
01606         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (Vertices[0], Vertices[1], Vertices[2], Vertices[3], <span class="stringliteral">"VERTICIES"</span>);
01607 
01608         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TANGENTS"</span>);
01609         f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a> (Tangents[0], Tangents[1], Tangents[2], Tangents[3]);
01610         f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a> (Tangents[4], Tangents[5], Tangents[6], Tangents[7]);
01611         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01612         
01613         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (Interiors[0], Interiors[1], Interiors[2], Interiors[3], <span class="stringliteral">"INTERIORS"</span>);
01614 
01615         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILES"</span>);
01616         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(Tiles);
01617         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01618 
01619         <span class="keywordflow">if</span>(ver&gt;=1)
01620         {
01621                 <span class="comment">// Read/Write TileColors.</span>
01622                 <span class="keywordflow">if</span>(ver&lt;=6)
01623                 {
01624                         <a class="code" href="a04199.html#a6">nlassert</a>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>());
01625 
01626                         <span class="comment">// read old version of tilesColors (ie with LightX/LightY/LightZ, which are deprecated now)</span>
01627                         vector&lt;CTileColorOldPatchVersion6&gt;      tmpArray;
01628                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_COLORS"</span>);
01629                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(tmpArray);
01630                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01631 
01632                         <span class="comment">// then just copy to TileColors.</span>
01633                         <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize(tmpArray.size());
01634                         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size()&gt;0)
01635                         {
01636                                 memcpy(&amp;TileColors[0], &amp;tmpArray[0], <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size()*<span class="keyword">sizeof</span>(CTileColor));
01637                         }
01638                 }
01639                 <span class="keywordflow">else</span>
01640                 {
01641                         <span class="comment">// version &gt;=7, just serial array of TileColors (16 bits TileColor only)</span>
01642                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_COLORS"</span>);
01643                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(TileColors);
01644 <span class="preprocessor">#ifdef NEL_FORCE_NO_USER_COLOR</span>
01645 <span class="preprocessor"></span>                        CTileColor color;
01646                         color.Color565 = 0xffff;
01647                         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size ();
01648                         <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize (0);
01649                         <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize (size, color);
01650 <span class="preprocessor">#endif // NEL_FORCE_NO_USER_COLOR</span>
01651 <span class="preprocessor"></span>                        f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01652                 }
01653         }
01654         <span class="keywordflow">if</span>(ver&gt;=2)
01655         {
01656                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (OrderS, <span class="stringliteral">"ORDER_S"</span>);
01657                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (OrderT, <span class="stringliteral">"ORDER_T"</span>);
01658 
01659                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"COMPRESSED_LUMELS"</span>);
01660                         f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(CompressedLumels);
01661                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01662         }
01663         <span class="comment">// Else cannot create here the TileColors, because we need the OrderS/OrderT information... Done into CZone serial.</span>
01664         <span class="keywordflow">if</span>(ver&gt;=3)
01665         {
01666                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (NoiseRotation, <span class="stringliteral">"NOISE_ROTATION"</span>);
01667                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (_CornerSmoothFlag, <span class="stringliteral">"CORNER_SMOOTH_FLAG"</span>);
01668         }
01669         <span class="keywordflow">else</span>
01670         {
01671                 <span class="comment">// No Rotation / not smooth by default.</span>
01672                 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a>= 0;
01673                 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>= 0;
01674         }
01675         <span class="keywordflow">if</span>(ver&gt;=4)
01676         {
01677                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a>(Flags, <span class="stringliteral">"FLAGS"</span>);
01678         }
01679         <span class="keywordflow">else</span>
01680         {
01681                 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>=<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>;
01682         }
01683 
01684         <span class="comment">// Serialize TileLightInfluences</span>
01685         <span class="keywordflow">if</span>(ver&gt;=5)
01686         {
01687                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_LIGHT_INFLUENCES"</span>);
01688                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(TileLightInfluences);
01689                 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
01690         }
01691         <span class="keywordflow">else</span>
01692         {
01693                 <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
01694                 {
01695                         <span class="comment">// Fill default.</span>
01696                         <a class="code" href="a03057.html#NL3D_1_1CPatchz653_0">resetTileLightInfluences</a>();
01697                 }
01698         }
01699 
01700         <span class="comment">// if read a too old version, </span>
01701         <span class="keywordflow">if</span>(ver&lt;6 &amp;&amp; f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
01702         {
01703                 <span class="comment">// reset tileElements vegetableState to AboveWater.</span>
01704                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>.size(); i++)
01705                 {
01706                         <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[i].setVegetableState(CTileElement::AboveWater);
01707                 }
01708         }
01709 
01710 
01711 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz637_1" doxytag="NL3D::CPatch::setCornerSmoothFlag" ></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::CPatch::setCornerSmoothFlag </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>corner</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>smooth</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 Smooth flags for Noise on corner: used for Noise geometry and for lighting. NB: convention: corner0==A, corner1==B ...
<p>
Definition at line <a class="el" href="a06158.html#l00951">951</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</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="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>.
<p>
<div class="fragment"><pre>00952 {
00953         <a class="code" href="a04199.html#a6">nlassert</a>(corner&lt;=3);
00954         <a class="code" href="a04558.html#a15">uint</a>    mask= 1&lt;&lt;corner;
00955         <span class="keywordflow">if</span>(smooth)
00956                 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>|= mask;
00957         <span class="keywordflow">else</span>
00958                 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>&amp;= ~mask;
00959 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz641_1" doxytag="NL3D::CPatch::setSmoothFlag" ></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::CPatch::setSmoothFlag </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>edge</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>flag</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

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

<p>
Set the smooth flag for the n-th edge. flag is false if this edge must by smoothed, true else.
<p>
Definition at line <a class="el" href="a06156.html#l00567">567</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
References <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00568         {
00569                 <span class="comment">// Erase it</span>
00570                 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;=~(1&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
00571                 
00572                 <span class="comment">// Set it</span>
00573                 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>|=(((<a class="code" href="a04558.html#a15">uint</a>)flag)&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
00574         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_3" doxytag="NL3D::CPatch::setupColorsFromTileFlags" ></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::CPatch::setupColorsFromTileFlags </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>colors</em>[4]          </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>
debug coloring 
<p>
Debug purpose only : setup the colors of this patch so that it shows which tiles have vegetable disabled, or are above, below water. User provides a table with 4 colors for each state : color 0 = above water color 1 = underwater color 2 = intersect water color 3 = vegetable disabled
<p>
Definition at line <a class="el" href="a06155.html#l02231">2231</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06340.html#l00154">NLMISC::CRGBA::get565()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>02232 {
02233         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a626">s</a> = 0; <a class="code" href="a04223.html#a626">s</a> &lt;= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>; ++<a class="code" href="a04223.html#a626">s</a>)
02234         {
02235                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a627">t</a> = 0; <a class="code" href="a04223.html#a627">t</a> &lt;= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>; ++<a class="code" href="a04223.html#a627">t</a>)
02236                 {
02237                         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = <a class="code" href="a04061.html#a0">std::min</a>(t, (<a class="code" href="a04558.html#a15">uint</a>) (OrderT - 1)) * OrderS 
02238                                          + <a class="code" href="a04061.html#a0">std::min</a>(s, (<a class="code" href="a04558.html#a15">uint</a>) (OrderS - 1));
02239                         <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>[<a class="code" href="a04223.html#a626">s</a> + <a class="code" href="a04223.html#a627">t</a> * (OrderS + 1)].Color565 = colors[(<a class="code" href="a04558.html#a15">uint</a>) (<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[<a class="code" href="a04223.html#a566">index</a>].getVegetableState())].<a class="code" href="a03337.html#NLMISC_1_1CRGBAa6">get565</a>();                                 
02240                 }
02241         }
02242 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha28" doxytag="NL3D::CPatch::unbind" ></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::CPatch::unbind </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>
unbind the patch from All neighbors. neighbors patchs links are modified too. The tesselation is forcemerged.
<p>
Definition at line <a class="el" href="a06155.html#l01724">1724</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06497.html#l02412">NL3D::CTessFace::forceMerge()</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06497.html#l02274">NL3D::CTessFace::unbind()</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>, and <a class="el" href="a06758.html#l00868">NL3D::CZone::unbindPatch()</a>.
<p>
<div class="fragment"><pre>01725 {
01726         <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
01727 
01728         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;unbind();
01729         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;unbind();
01730         <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;forceMerge();
01731         <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;forceMerge();
01732         <span class="comment">// forcemerge should have be completed.</span>
01733         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
01734         <span class="comment">// unbind should have be completed.</span>
01735         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
01736         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
01737         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
01738         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
01739 
01740 
01741         <span class="comment">// unbind Noise.</span>
01742         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[0]= NULL;
01743         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[1]= NULL;
01744         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[2]= NULL;
01745         <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[3]= NULL;
01746 
01747 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz655_3" doxytag="NL3D::CPatch::unlinkNearUL" ></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::CPatch::unlinkNearUL </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>
For lighting update, unlink (CiruclarList). 
<p>

<p>
Definition at line <a class="el" href="a06157.html#l01897">1897</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, and <a class="el" href="a06156.html#l01202">_ULNearPrec</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>.
<p>
<div class="fragment"><pre>01898 {
01899         <span class="comment">// first, unlink others from me. NB: works even if _ULNearPrec==_ULNearNext==this.</span>
01900         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>;
01901         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;
01902         <span class="comment">// reset</span>
01903         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= <span class="keyword">this</span>;
01904         <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= <span class="keyword">this</span>;
01905 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha29" doxytag="NL3D::CPatch::unpack" ></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::CPatch::unpack </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a06155.html#l00192">192</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06760.html#l00485">NL3D::CZone::getPatchBias()</a>, <a class="el" href="a06760.html#l00486">NL3D::CZone::getPatchScale()</a>, <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, <a class="el" href="a06156.html#l00121">NL3D::CVector3s::unpack()</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
<p>
<div class="fragment"><pre>00193 {
00194         <a class="code" href="a04558.html#a14">sint</a>    i;
00195         <span class="keyword">const</span>   CVector &amp;bias= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getPatchBias();
00196         <span class="keywordtype">float</span>   scale= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getPatchScale();
00197 
00198         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
00199                 <a class="code" href="a03057.html#NL3D_1_1CPatcho6">Vertices</a>[i].unpack(p.Vertices[i], bias, scale);
00200         <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
00201                 <a class="code" href="a03057.html#NL3D_1_1CPatcho2">Tangents</a>[i].unpack(p.Tangents[i], bias, scale);
00202         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
00203                 <a class="code" href="a03057.html#NL3D_1_1CPatcho1">Interiors</a>[i].unpack(p.Interiors[i], bias, scale);
00204 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcha30" doxytag="NL3D::CPatch::unpackIntoCache" ></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="a02258.html">CBezierPatch</a> * NL3D::CPatch::unpackIntoCache </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>

<p>
Definition at line <a class="el" href="a06155.html#l00182">182</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
References <a class="el" href="a06155.html#l00055">CachePatch</a>, <a class="el" href="a06155.html#l00056">LastPatch</a>, and <a class="el" href="a06155.html#l00192">unpack()</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00504">addPatchBlocksInBBox()</a>, <a class="el" href="a06155.html#l00270">addTrianglesInBBox()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l00257">buildBBox()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06158.html#l00874">computeNoise()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, and <a class="el" href="a06768.html#l03346">NL3D::CZoneLighter::processZonePointLightRT()</a>.
<p>
<div class="fragment"><pre>00183 {
00184         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a>!=<span class="keyword">this</span>)
00185         {
00186                 <a class="code" href="a03057.html#NL3D_1_1CPatcha29">unpack</a>(CachePatch);
00187                 <a class="code" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a>=<span class="keyword">this</span>;
00188         }
00189         <span class="keywordflow">return</span> &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchv1">CachePatch</a>;
00190 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_7" doxytag="NL3D::CPatch::unpackLumelBlock" ></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::CPatch::unpackLumelBlock </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>src</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>
Unpack a 4x4 lumel block<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l00070">70</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a06157.html#l01267">packShadowMap()</a>, and <a class="el" href="a06157.html#l00170">unpackShadowMap()</a>.
<p>
<div class="fragment"><pre>00071 {
00072         <span class="comment">// Take the two alpha values</span>
00073         <a class="code" href="a04558.html#a15">uint</a> alpha0=<a class="code" href="a04223.html#a652">src</a>[0];
00074         <a class="code" href="a04558.html#a15">uint</a> alpha1=<a class="code" href="a04223.html#a652">src</a>[1];
00075 
00076         <span class="comment">// precompute the 8 possible values, for each possible code.</span>
00077         <span class="comment">// ------------------</span>
00078         <a class="code" href="a04558.html#a7">uint8</a>   values[8];
00079         <span class="comment">// Case 0</span>
00080         <span class="keywordflow">if</span> (alpha0&gt;alpha1)
00081         {
00082                 <span class="comment">// unrolled, and hardcoded for faster compute</span>
00083                 values[0]= alpha0;
00084                 values[1]= alpha1;
00085                 values[2]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*219 + alpha1*37 ) &gt;&gt;8 ) ;  <span class="comment">// 6*256/7</span>
00086                 values[3]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*183 + alpha1*73 ) &gt;&gt;8 ) ;  <span class="comment">// 5*256/7</span>
00087                 values[4]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*146 + alpha1*110) &gt;&gt;8 ) ;  <span class="comment">// 4*256/7</span>
00088                 values[5]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*110 + alpha1*146) &gt;&gt;8 ) ;  <span class="comment">// 3*256/7</span>
00089                 values[6]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*73  + alpha1*183) &gt;&gt;8 ) ;  <span class="comment">// 2*256/7</span>
00090                 values[7]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*37  + alpha1*219) &gt;&gt;8 ) ;  <span class="comment">// 1*256/7</span>
00091         }
00092         <span class="comment">// Case 1</span>
00093         <span class="keywordflow">else</span>
00094         {
00095                 <span class="comment">// unrolled, and hardcoded for faster compute</span>
00096                 values[0]= alpha0;
00097                 values[1]= alpha1;
00098                 values[2]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*205 + alpha1*51 ) &gt;&gt;8 ) ;  <span class="comment">// 4*256/5</span>
00099                 values[3]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*154 + alpha1*102) &gt;&gt;8 ) ;  <span class="comment">// 3*256/5</span>
00100                 values[4]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*102 + alpha1*154) &gt;&gt;8 ) ;  <span class="comment">// 2*256/5</span>
00101                 values[5]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*51  + alpha1*205) &gt;&gt;8 ) ;  <span class="comment">// 1*256/5</span>
00102                 values[6]= 0;
00103                 values[7]= 255;
00104         }
00105 
00106 
00107         <span class="comment">// For each pixel, set the value according to the code</span>
00108         <span class="comment">// ------------------</span>
00109         <a class="code" href="a04558.html#a15">uint</a>    block8Pixs[2];
00110         <span class="comment">// Split the 48 bits data in 2 24 bits pass.</span>
00111         block8Pixs[0]= ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[2]&lt;&lt;16) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[3]&lt;&lt;8) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[4]) ;
00112         block8Pixs[1]= ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[5]&lt;&lt;16) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[6]&lt;&lt;8) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[7]) ;
00113 
00114         <span class="comment">// write all lumels</span>
00115         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;2; i++)
00116         {
00117                 <a class="code" href="a04558.html#a15">uint</a>    blockPix= block8Pixs[i];
00118                 <span class="comment">// parse the 8 pixs, and write seq to dest</span>
00119                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> n=8; n&gt;0; n--, dest++)
00120                 {
00121                         <a class="code" href="a04558.html#a15">uint</a> code= (blockPix&gt;&gt;21)&amp;0x7;
00122 
00123                         <span class="comment">// read LUT, and store</span>
00124                         *dest= values[code];
00125 
00126                         <span class="comment">// shift the block</span>
00127                         blockPix&lt;&lt;= 3;
00128                 }
00129         }
00130 
00131 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz640_4" doxytag="NL3D::CPatch::unpackShadowMap" ></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::CPatch::unpackShadowMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pShadow</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>
Unpack the lumels of the patches. Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method uncompress the lumels stored in its Lumels member.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>pShadow</em>&nbsp;</td><td>is a pointer on the destination lumel buffer. Size must be ((OrderS*4/ratio)+1)*((OrderT*4/ratio)+1). </td></tr>
    <tr><td valign=top><em>ratio</em>&nbsp;</td><td>is the one over the ratio of the texture destination. Must be 1 or 2. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_2">resetCompressedLumels()</a></dd></dl>

<p>
Definition at line <a class="el" href="a06157.html#l00170">170</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
<p>
Referenced by <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.
<p>
<div class="fragment"><pre>00171 {
00172         <span class="comment">// Input of compresed data</span>
00173         <a class="code" href="a04558.html#a7">uint8</a> *compressedData=&amp;<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[0];
00174 
00175         <span class="comment">// Number of lumel by lines</span>
00176         <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
00177 
00178         <span class="comment">// Number of block in a line</span>
00179         <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
00180         <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
00181 
00182         <span class="comment">// Number of line</span>
00183         <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
00184 
00185         <span class="comment">// Number of block line</span>
00186         <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
00187         <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
00188 
00189         <span class="comment">// Destination lumel block size</span>
00190         <a class="code" href="a04558.html#a15">uint</a> lumelDestBlockSize=4;
00191 
00192         <span class="comment">// Destination lumel line block size</span>
00193         <a class="code" href="a04558.html#a15">uint</a> lumelDestLineBlockSize=lumelCount*lumelDestBlockSize;
00194 
00195         <span class="comment">// Each line block</span>
00196         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lineBlock=0; lineBlock&lt;numLineBlock; lineBlock++)
00197         {
00198                 <a class="code" href="a04558.html#a15">uint</a> countVx4=16;
00199 
00200                 <span class="comment">// Block pointer</span>
00201                 <a class="code" href="a04558.html#a7">uint8</a> *blockLine=pLumelDest;
00202 
00203                 <span class="comment">// Each lumel block</span>
00204                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lumelBlock=0; lumelBlock&lt;numLumelBlock; lumelBlock++)
00205                 {
00206                         <span class="comment">// *** Unpack the block</span>
00207                         <a class="code" href="a04558.html#a15">uint</a> countU=4;
00208 
00209                         <span class="comment">// Destination lumel</span>
00210                         <a class="code" href="a04558.html#a7">uint8</a> *blockDest=blockLine;
00211 
00212                         <span class="comment">// Temp block</span>
00213                         <a class="code" href="a04558.html#a7">uint8</a> block[4*4];
00214 
00215                         <span class="comment">// Block unpacking...</span>
00216                         <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (block, compressedData);
00217 
00218                         <span class="comment">// Copy the lumels</span>
00219                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;countVx4; <a class="code" href="a04223.html#a576">v</a>+=4)
00220                         {
00221                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;countU; u++)
00222                                 {
00223                                         <span class="comment">// Copy the lumel</span>
00224                                         blockDest[u]=block[<a class="code" href="a04223.html#a576">v</a>+u];
00225                                 }
00226 
00227                                 <span class="comment">// Next line</span>
00228                                 blockDest+=lumelCount;
00229                         }
00230 
00231                         <span class="comment">// Next source block</span>
00232                         compressedData+=<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>;
00233 
00234                         <span class="comment">// Next block on the line</span>
00235                         blockLine+=lumelDestBlockSize;
00236                 }
00237 
00238                 <span class="comment">// Next line of block</span>
00239                 pLumelDest+=lumelDestLineBlockSize;
00240         }
00241 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_6" doxytag="NL3D::CPatch::updateClipPatchVB" ></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::CPatch::updateClipPatchVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>renderClipped</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>

<p>
Definition at line <a class="el" href="a06161.html#l01464">1464</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06116.html#l00180">NLMISC::CObjectVector&lt; CTessBlock &gt;::empty()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06491.html#l00139">NL3D::CTessBlock::forceClip()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>01465 {
01466         <span class="comment">// If now the patch is invisible</span>
01467         <span class="keywordflow">if</span>(renderClipped)
01468         {
01469                 <span class="comment">// Then delete vertices.</span>
01470                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
01471 
01472                 <span class="comment">// Now, all vertices in VB are deleted.</span>
01473                 <span class="comment">// Force clip state of all TessBlocks, so no allocation will be done on Vertices in VB.</span>
01474                 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_0">empty</a>())
01475                 {
01476                         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();i++)
01477                         {
01478                                 CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
01479                                 tblock.forceClip();
01480                         }
01481                 }
01482         }
01483         <span class="keywordflow">else</span>
01484         {
01485                 <span class="comment">// else allocate / fill them.</span>
01486                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a>();
01487                 <span class="comment">// NB: fillVB() test if any reallocation occurs.</span>
01488                 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
01489         }
01490 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd29" doxytag="NL3D::CPatch::updateFar0VBAlloc" ></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::CPatch::updateFar0VBAlloc </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vertList</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>alloc</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>

<p>
Definition at line <a class="el" href="a06161.html#l00744">744</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
<p>
<div class="fragment"><pre>00745 {
00746         <span class="comment">// Traverse the vertList.</span>
00747         CTessFarVertex  *pVert;
00748         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
00749         {
00750                 <span class="keywordflow">if</span>(alloc)
00751                         pVert-&gt;Index0= CLandscapeGlobals::CurrentFar0VBAllocator-&gt;allocateVertex();
00752                 <span class="keywordflow">else</span>
00753                         CLandscapeGlobals::CurrentFar0VBAllocator-&gt;deleteVertex(pVert-&gt;Index0);
00754         }
00755 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd30" doxytag="NL3D::CPatch::updateFar1VBAlloc" ></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::CPatch::updateFar1VBAlloc </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vertList</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>alloc</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>

<p>
Definition at line <a class="el" href="a06161.html#l00759">759</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
<p>
<div class="fragment"><pre>00760 {
00761         <span class="comment">// Traverse the vertList.</span>
00762         CTessFarVertex  *pVert;
00763         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
00764         {
00765                 <span class="keywordflow">if</span>(alloc)
00766                         pVert-&gt;Index1= CLandscapeGlobals::CurrentFar1VBAllocator-&gt;allocateVertex();
00767                 <span class="keywordflow">else</span>
00768                         CLandscapeGlobals::CurrentFar1VBAllocator-&gt;deleteVertex(pVert-&gt;Index1);
00769         }
00770 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz655_4" doxytag="NL3D::CPatch::updateTessBlockLighting" ></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::CPatch::updateTessBlockLighting </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>numTb</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>
recompute the near lightmap of tessBlock "numTb". return the number of pixels updated by computing of this tessBlock. Actually 0 if the tessBlock lightmap is not computed, or 100 (NL_TILE_LIGHTMAP_SIZE*NL_TILE_LIGHTMAP_SIZE) pixels.
<p>
Definition at line <a class="el" href="a06157.html#l01909">1909</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
<p>
References <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05862.html#l02048">NL3D::CLandscape::refillTileLightMap()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
<p>
<div class="fragment"><pre>01910 {
01911         <span class="comment">// TessBlocks must have been allocated and tessBlockId must be ok.</span>
01912         <a class="code" href="a04199.html#a6">nlassert</a>(numTb&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>());
01913 
01914         <span class="comment">// compute tessBlock coordinate</span>
01915         <a class="code" href="a04558.html#a15">uint</a> tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
01916         <a class="code" href="a04558.html#a15">uint</a> ts= numTb&amp;(tbWidth-1);
01917         <a class="code" href="a04558.html#a15">uint</a> tt= numTb/tbWidth;
01918         <span class="comment">// expand to tile coordinate.</span>
01919         ts*= 2;
01920         tt*= 2;
01921 
01922         <span class="comment">// get what tessBlock to use.</span>
01923         CTessBlock      &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb];
01924 
01925         <span class="comment">// If the lightmap Id has not been computed, quit</span>
01926         <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
01927                 <span class="keywordflow">return</span> 0;
01928         <span class="keywordflow">else</span>
01929         {
01930                 <span class="comment">// Recompute the lightmap texture, with help of TileColors, with neighboring info etc...</span>
01931                 <a class="code" href="a03337.html">CRGBA</a>   lightText[<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>];
01932                 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a>(ts&amp;(~1), tt&amp;(~1), lightText);
01933 
01934                 <span class="comment">// donlod this texture to Driver etc...</span>
01935                 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;refillTileLightMap(tessBlock.LightMapId, lightText);
01936 
01937                 <span class="comment">// return number of pixels computed.</span>
01938                 <span class="keywordflow">return</span>  <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>;
01939         }
01940 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz639_7" doxytag="NL3D::CPatch::updateTextureFarOnly" ></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::CPatch::updateTextureFarOnly </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>patchSphere</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>

<p>
Definition at line <a class="el" href="a06161.html#l00226">226</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
<p>
<div class="fragment"><pre>00227 {
00228         <a class="code" href="a04558.html#a14">sint</a>    newFar0,newFar1;
00229         <span class="comment">// compute new Far0 and new Far1.</span>
00230         <a class="code" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a>(patchSphere, newFar0, newFar1);
00231 
00232         <span class="comment">// Far change.</span>
00233         <span class="comment">//------------------</span>
00234         <span class="comment">// Set new far values</span>
00235         <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= newFar0;
00236         <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= newFar1;
00237 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd31" doxytag="NL3D::CPatch::updateTileVBAlloc" ></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::CPatch::updateTileVBAlloc </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>vertList</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>alloc</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>

<p>
Definition at line <a class="el" href="a06161.html#l00774">774</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
<p>
<div class="fragment"><pre>00775 {
00776         <span class="comment">// Traverse the vertList.</span>
00777         CTessNearVertex *pVert;
00778         <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
00779         {
00780                 <span class="keywordflow">if</span>(alloc)
00781                         pVert-&gt;Index= CLandscapeGlobals::CurrentTileVBAllocator-&gt;allocateVertex();
00782                 <span class="keywordflow">else</span>
00783                         CLandscapeGlobals::CurrentTileVBAllocator-&gt;deleteVertex(pVert-&gt;Index);
00784         }
00785 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchd32" doxytag="NL3D::CPatch::updateVBAlloc" ></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::CPatch::updateVBAlloc </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>alloc</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="a06161.html#l00789">789</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
<p>
References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00744">updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, <a class="el" href="a06161.html#l00774">updateTileVBAlloc()</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>.
<p>
<div class="fragment"><pre>00790 {
00791         <span class="comment">// update Far0.</span>
00792         <span class="comment">//=======</span>
00793         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
00794         {
00795                 <span class="comment">// alloc Far0 VB.</span>
00796                 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, alloc);
00797                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00798                 {
00799                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00800                         <span class="comment">// need update VB only if tessBlock is visible.</span>
00801                         <span class="keywordflow">if</span>( tblock.visibleFar0() )
00802                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, alloc);
00803                 }
00804         }
00805         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
00806         {
00807                 <span class="comment">// alloc Tile VB.</span>
00808                 <span class="comment">// No Tiles in MasterBlock!!</span>
00809                 <span class="comment">// Traverse the TessBlocks to add vertices.</span>
00810                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00811                 {
00812                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00813                         <span class="comment">// Add the vertices.</span>
00814                         <span class="comment">// need update VB only if tessBlock is visible.</span>
00815                         <span class="keywordflow">if</span>( tblock.visibleTile() )
00816                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, alloc);
00817                 }
00818         }
00819 
00820         <span class="comment">// update Far1.</span>
00821         <span class="comment">//=======</span>
00822         <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
00823         {
00824                 <span class="comment">// alloc VB.</span>
00825                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, alloc);
00826                 <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>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
00827                 {
00828                         CTessBlock      &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
00829                         <span class="comment">// need update VB only if tessBlock is visible.</span>
00830                         <span class="keywordflow">if</span>( tblock.visibleFar1() )
00831                                 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, alloc);
00832                 }
00833         }
00834 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CPatchn0" doxytag="NL3D::CPatch::CLandscapeVegetableBlock" ></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="a02717.html">CLandscapeVegetableBlock</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="a06156.html#l00796">796</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchn1" doxytag="NL3D::CPatch::CPatchRdrPass" ></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="a03069.html">CPatchRdrPass</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="a06156.html#l00797">797</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchn2" doxytag="NL3D::CPatch::CTessFace" ></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="a03476.html">CTessFace</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="a06156.html#l00794">794</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchn3" doxytag="NL3D::CPatch::CZone" ></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="a03730.html">CZone</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="a06156.html#l00795">795</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CPatchz669_1" doxytag="NL3D::CPatch::_BindZoneNeighbor" ></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="a03730.html">CZone</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz669_1">NL3D::CPatch::_BindZoneNeighbor</a>[4]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The 4 neighbors zone of this patch (setuped at <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a> time). NB: NULL if zone not loaded, or if no patch near us. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l01110">1110</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz637_3" doxytag="NL3D::CPatch::_CornerSmoothFlag" ></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#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz637_3">NL3D::CPatch::_CornerSmoothFlag</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Put here for packing with NoiseRotation. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00362">362</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06158.html#l00951">setCornerSmoothFlag()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz675_2" doxytag="NL3D::CPatch::_DLMContext" ></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="a03060.html">CPatchDLMContext</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz675_2">NL3D::CPatch::_DLMContext</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The Dynamic LightMap context. created only when compiled, AND (when in Near OR (when in Far AND touched by pointLight)) else NULL.
<p>
Definition at line <a class="el" href="a06156.html#l01214">1214</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06157.html#l02005">beginDLMLighting()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06157.html#l02035">endDLMLighting()</a>, <a class="el" href="a06161.html#l01609">fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>, <a class="el" href="a06157.html#l02021">processDLMLight()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz675_3" doxytag="NL3D::CPatch::_DLMContextRefCount" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz675_3">NL3D::CPatch::_DLMContextRefCount</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The reference count for DLMContext. Each TileMaterial created add a reference. Each pointLight wich touch the patch too.
<p>
Definition at line <a class="el" href="a06156.html#l01219">1219</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr0" doxytag="NL3D::CPatch::_NextRdrFar0" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr0">NL3D::CPatch::_NextRdrFar0</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="a06156.html#l00872">872</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06156.html#l00465">getNextFar0ToRdr()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr1" doxytag="NL3D::CPatch::_NextRdrFar1" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr1">NL3D::CPatch::_NextRdrFar1</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="a06156.html#l00874">874</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06156.html#l00467">getNextFar1ToRdr()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr2" doxytag="NL3D::CPatch::_PatchRdrPassFar0" ></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="a03069.html">CPatchRdrPass</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr2">NL3D::CPatch::_PatchRdrPassFar0</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="a06156.html#l00871">871</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, and <a class="el" href="a06155.html#l01555">resetRenderFar()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr3" doxytag="NL3D::CPatch::_PatchRdrPassFar1" ></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="a03069.html">CPatchRdrPass</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr3">NL3D::CPatch::_PatchRdrPassFar1</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="a06156.html#l00873">873</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, and <a class="el" href="a06155.html#l01555">resetRenderFar()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz673_0" doxytag="NL3D::CPatch::_ULNearNext" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz673_0">NL3D::CPatch::_ULNearNext</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="a06156.html#l01203">1203</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06156.html#l00750">getNextNearUL()</a>, <a class="el" href="a06157.html#l01880">linkBeforeNearUL()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06157.html#l01897">unlinkNearUL()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz673_1" doxytag="NL3D::CPatch::_ULNearPrec" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz673_1">NL3D::CPatch::_ULNearPrec</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="a06156.html#l01202">1202</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01880">linkBeforeNearUL()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06157.html#l01897">unlinkNearUL()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchv0" doxytag="NL3D::CPatch::_Version" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03057.html#NL3D_1_1CPatchv0">NL3D::CPatch::_Version</a> = 7<code> [static, private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Stream version of the class.
<p>
Definition at line <a class="el" href="a06155.html#l00057">57</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01576">serial()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr4" doxytag="NL3D::CPatch::BaseFarVertices" ></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="a03480.html">CTessFarVertex</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr4">NL3D::CPatch::BaseFarVertices</a>[4]<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="a06156.html#l00822">822</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr5" doxytag="NL3D::CPatch::BaseVertices" ></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="a03482.html">CTessVertex</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr5">NL3D::CPatch::BaseVertices</a>[4]<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="a06156.html#l00820">820</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a06156.html#l00659">getCornerVertex()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchv1" doxytag="NL3D::CPatch::CachePatch" ></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="a02258.html">CBezierPatch</a> <a class="el" href="a03057.html#NL3D_1_1CPatchv1">NL3D::CPatch::CachePatch</a><code> [static, 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="a06155.html#l00055">55</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho0" doxytag="NL3D::CPatch::CompressedLumels" ></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="a04558.html#a7">uint8</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho0">NL3D::CPatch::CompressedLumels</a>
      </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="a06156.html#l00337">337</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06157.html#l00670">getTileLumelmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a06157.html#l01267">packShadowMap()</a>, <a class="el" href="a06157.html#l01384">resetCompressedLumels()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06157.html#l00170">unpackShadowMap()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr6" doxytag="NL3D::CPatch::ErrorSize" ></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="a03057.html#NL3D_1_1CPatchr6">NL3D::CPatch::ErrorSize</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="a06156.html#l00816">816</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06156.html#l00395">getErrorSize()</a>, and <a class="el" href="a06155.html#l01124">makeRoots()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr7" doxytag="NL3D::CPatch::ExcludeFromRefineAll" ></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="a03057.html#NL3D_1_1CPatchr7">NL3D::CPatch::ExcludeFromRefineAll</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="a06156.html#l00807">807</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06758.html#l01132">NL3D::CZone::refineAll()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr8" doxytag="NL3D::CPatch::Far0" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr8">NL3D::CPatch::Far0</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="a06156.html#l00867">867</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr9" doxytag="NL3D::CPatch::Far0UBias" ></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="a03057.html#NL3D_1_1CPatchr9">NL3D::CPatch::Far0UBias</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr10" doxytag="NL3D::CPatch::Far0UScale" ></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="a03057.html#NL3D_1_1CPatchr10">NL3D::CPatch::Far0UScale</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr11" doxytag="NL3D::CPatch::Far0VBias" ></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="a03057.html#NL3D_1_1CPatchr11">NL3D::CPatch::Far0VBias</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr12" doxytag="NL3D::CPatch::Far0VScale" ></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="a03057.html#NL3D_1_1CPatchr12">NL3D::CPatch::Far0VScale</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr13" doxytag="NL3D::CPatch::Far1" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr13">NL3D::CPatch::Far1</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="a06156.html#l00868">868</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr14" doxytag="NL3D::CPatch::Far1UBias" ></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="a03057.html#NL3D_1_1CPatchr14">NL3D::CPatch::Far1UBias</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr15" doxytag="NL3D::CPatch::Far1UScale" ></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="a03057.html#NL3D_1_1CPatchr15">NL3D::CPatch::Far1UScale</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr16" doxytag="NL3D::CPatch::Far1VBias" ></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="a03057.html#NL3D_1_1CPatchr16">NL3D::CPatch::Far1VBias</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr17" doxytag="NL3D::CPatch::Far1VScale" ></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="a03057.html#NL3D_1_1CPatchr17">NL3D::CPatch::Far1VScale</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr18" doxytag="NL3D::CPatch::Flags" ></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#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr18">NL3D::CPatch::Flags</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Flags NL_PATCH_FAR0_ROTATED and NL_PATCH_FAR1_ROTATED NL_PATCH_FAR0_ROTATED for Far0, NL_PATCH_FAR1_ROTATED for Far1 If the flag is set, the far texture of the patch is rotated of 1 (to the left of course)<p>
Flags NL_PATCH_SMOOTH_FLAG_MASK 4 flag for smooth edge. Same as <a class="el" href="a03067.html">CPatchInfo::CBindInfo</a> shifted by (&lt;&lt;NL_PATCH_SMOOTH_FLAG_SHIFT). See CPatchInfo::CBindInfo::Flags for details.
<p>
Definition at line <a class="el" href="a06156.html#l00840">840</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho1" doxytag="NL3D::CPatch::Interiors" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho1">NL3D::CPatch::Interiors</a>[4]
      </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="a06156.html#l00329">329</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchv2" doxytag="NL3D::CPatch::LastPatch" ></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"> const <a class="el" href="a03057.html">CPatch</a> * <a class="el" href="a03057.html#NL3D_1_1CPatchv2">NL3D::CPatch::LastPatch</a> = NULL<code> [static, 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="a06155.html#l00056">56</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz659_0" doxytag="NL3D::CPatch::MasterBlock" ></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="a03475.html">CTessBlock</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_0">NL3D::CPatch::MasterBlock</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="a06156.html#l00884">884</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06156.html#l00788">getTileMaterialRefCount()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz637_2" doxytag="NL3D::CPatch::NoiseRotation" ></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#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz637_2">NL3D::CPatch::NoiseRotation</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00352">352</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz659_1" doxytag="NL3D::CPatch::NumRenderableFaces" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_1">NL3D::CPatch::NumRenderableFaces</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="a06156.html#l00879">879</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, and <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr19" doxytag="NL3D::CPatch::OOTransitionSqrDelta" ></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="a03057.html#NL3D_1_1CPatchr19">NL3D::CPatch::OOTransitionSqrDelta</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="a06156.html#l00845">845</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr20" doxytag="NL3D::CPatch::OrderS" ></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#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr20">NL3D::CPatch::OrderS</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="a06156.html#l00804">804</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr21" doxytag="NL3D::CPatch::OrderT" ></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#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr21">NL3D::CPatch::OrderT</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="a06156.html#l00804">804</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr22" doxytag="NL3D::CPatch::PatchId" ></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#a9">uint16</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr22">NL3D::CPatch::PatchId</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="a06156.html#l00802">802</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr23" doxytag="NL3D::CPatch::Son0" ></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="a03476.html">CTessFace</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr23">NL3D::CPatch::Son0</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="a06156.html#l00818">818</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l02176">appendTessellationLeaves()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02142">deleteTileUvs()</a>, <a class="el" href="a06155.html#l02022">forceMergeAtTileLevel()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06155.html#l00579">getTesselatedPos()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06155.html#l01493">refineAll()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr24" doxytag="NL3D::CPatch::Son1" ></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="a03476.html">CTessFace</a> * <a class="el" href="a03057.html#NL3D_1_1CPatchr24">NL3D::CPatch::Son1</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="a06156.html#l00818">818</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l02176">appendTessellationLeaves()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02142">deleteTileUvs()</a>, <a class="el" href="a06155.html#l02022">forceMergeAtTileLevel()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06155.html#l00579">getTesselatedPos()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06155.html#l01493">refineAll()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr25" doxytag="NL3D::CPatch::SquareLimitLevel" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr25">NL3D::CPatch::SquareLimitLevel</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="a06156.html#l00814">814</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, and <a class="el" href="a06497.html#l02954">NL3D::CTessFace::isRectangular()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho2" doxytag="NL3D::CPatch::Tangents" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho2">NL3D::CPatch::Tangents</a>[8]
      </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="a06156.html#l00328">328</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr26" doxytag="NL3D::CPatch::TessBlockLimitLevel" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr26">NL3D::CPatch::TessBlockLimitLevel</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="a06156.html#l00810">810</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, and <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz659_2" doxytag="NL3D::CPatch::TessBlockRefCount" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_2">NL3D::CPatch::TessBlockRefCount</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="a06156.html#l00886">886</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz659_3" doxytag="NL3D::CPatch::TessBlocks" ></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="a03000.html">NLMISC::CObjectVector</a>&lt;<a class="el" href="a03475.html">CTessBlock</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatchz659_3">NL3D::CPatch::TessBlocks</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="a06156.html#l00882">882</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>, <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06156.html#l00753">getNumNearTessBlocks()</a>, <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, <a class="el" href="a06157.html#l01225">getTileLightMapUvInfo()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06157.html#l01247">releaseTileLightMap()</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>, <a class="el" href="a06157.html#l01909">updateTessBlockLighting()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho3" doxytag="NL3D::CPatch::TileColors" ></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="a03520.html">CTileColor</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho3">NL3D::CPatch::TileColors</a>
      </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="a06156.html#l00343">343</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06163.html#l00888">NL3D::CPatchDLMContext::compileLighting()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06155.html#l02231">setupColorsFromTileFlags()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho4" doxytag="NL3D::CPatch::TileLightInfluences" ></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="a03527.html">CTileLightInfluence</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho4">NL3D::CPatch::TileLightInfluences</a>
      </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="a06156.html#l00346">346</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06157.html#l01529">resetTileLightInfluences()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr27" doxytag="NL3D::CPatch::TileLimitLevel" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr27">NL3D::CPatch::TileLimitLevel</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="a06156.html#l00812">812</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06497.html#l00216">NL3D::CTessFace::computeNearLimit()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06497.html#l02448">NL3D::CTessFace::forceMergeAtTileLevel()</a>, <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>, <a class="el" href="a06497.html#l01783">NL3D::CTessFace::refineAll()</a>, <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, <a class="el" href="a06497.html#l00278">NL3D::CTessFace::updateErrorMetric()</a>, <a class="el" href="a06497.html#l02108">NL3D::CTessFace::updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho5" doxytag="NL3D::CPatch::Tiles" ></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="a03522.html">CTileElement</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho5">NL3D::CPatch::Tiles</a>
      </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="a06156.html#l00340">340</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06155.html#l02245">copyTileFlagsFromPatch()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06155.html#l02265">getTileElement()</a>, <a class="el" href="a06155.html#l02040">getTileRenderPass()</a>, <a class="el" href="a06155.html#l02080">getTileUvInfo()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06155.html#l02231">setupColorsFromTileFlags()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr28" doxytag="NL3D::CPatch::TransitionSqrMin" ></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="a03057.html#NL3D_1_1CPatchr28">NL3D::CPatch::TransitionSqrMin</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="a06156.html#l00844">844</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchz661_0" doxytag="NL3D::CPatch::VegetableClipBlocks" ></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="a03673.html">CVegetableClipBlock</a>*&gt; <a class="el" href="a03057.html#NL3D_1_1CPatchz661_0">NL3D::CPatch::VegetableClipBlocks</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
list of vegetable clipBlocks, created/destroyed at same time as TessBlocks. 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00893">893</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, and <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatcho6" doxytag="NL3D::CPatch::Vertices" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho6">NL3D::CPatch::Vertices</a>[4]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The patch coordinates (see <a class="el" href="a02258.html">CBezierPatch</a>). 
<p>

<p>
Definition at line <a class="el" href="a06156.html#l00327">327</a> of file <a class="el" href="a06156.html">patch.h</a>.
<p>
Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CPatchr29" doxytag="NL3D::CPatch::Zone" ></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="a03730.html">CZone</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr29">NL3D::CPatch::Zone</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="a06156.html#l00799">799</a> of file <a class="el" href="a06156.html">patch.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06156.html">patch.h</a><li><a class="el" href="a06155.html">patch.cpp</a><li><a class="el" href="a06157.html">patch_lightmap.cpp</a><li><a class="el" href="a06158.html">patch_noise.cpp</a><li><a class="el" href="a06161.html">patch_render.cpp</a><li><a class="el" href="a06162.html">patch_vegetable.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:00:40 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>