aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/patch_8h-source.html
blob: ba5001d3d6e4eb16737948f264904e7cee307b44 (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
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
	<TITLE>nevrax.org : docs</TITLE>
	<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">

<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0>
 <TR>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>

<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 height=100%>
 <TR>
	<TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

		<!------ Begin Box ------>
		<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0  cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
		<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td  colspan=2 bgcolor=#FFFFFF>
		<TABLE cellspacing=0 cellpadding=1 border=0>
			<tr><td ALIGN=middle><a  class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- block -->
<TABLE  bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>patch.h</h1><a href="patch_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00011 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
00012 <font class="comment"> *</font>
00013 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00014 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00015 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00016 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00017 <font class="comment"> * any later version.</font>
00018 <font class="comment"></font>
00019 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00020 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00021 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00022 <font class="comment"> * General Public License for more details.</font>
00023 <font class="comment"></font>
00024 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00025 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00026 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00027 <font class="comment"> * MA 02111-1307, USA.</font>
00028 <font class="comment"> */</font>
00029 
00030 <font class="preprocessor">#ifndef NL_PATCH_H</font>
00031 <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_H</font>
00032 <font class="preprocessor"></font>
00033 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="vector_8h.html">nel/misc/vector.h</a>"</font>
00035 <font class="preprocessor">#include "<a class="code" href="vector__2f_8h.html">nel/misc/vector_2f.h</a>"</font>
00036 <font class="preprocessor">#include "<a class="code" href="tessellation_8h.html">3d/tessellation.h</a>"</font>
00037 <font class="preprocessor">#include "<a class="code" href="aabbox_8h.html">nel/misc/aabbox.h</a>"</font>
00038 <font class="preprocessor">#include "<a class="code" href="bsphere_8h.html">nel/misc/bsphere.h</a>"</font>
00039 <font class="preprocessor">#include "<a class="code" href="triangle_8h.html">nel/misc/triangle.h</a>"</font>
00040 <font class="preprocessor">#include "<a class="code" href="geom__ext_8h.html">nel/misc/geom_ext.h</a>"</font>
00041 <font class="preprocessor">#include "<a class="code" href="tile__element_8h.html">3d/tile_element.h</a>"</font>
00042 <font class="preprocessor">#include "<a class="code" href="tile__color_8h.html">3d/tile_color.h</a>"</font>
00043 <font class="preprocessor">#include "<a class="code" href="tess__block_8h.html">3d/tess_block.h</a>"</font>
00044 <font class="preprocessor">#include "<a class="code" href="tile__light__influence_8h.html">3d/tile_light_influence.h</a>"</font>
00045 <font class="preprocessor">#include "<a class="code" href="point__light__influence_8h.html">nel/3d/point_light_influence.h</a>"</font>
00046 
00047 
00048 <font class="keyword">namespace </font>NL3D {
00049 
<a name="l00050"></a><a class="code" href="patch_8h.html#a0">00050</a> <font class="preprocessor">#define NL_MAX_TILES_BY_PATCH_EDGE_SHIFT 4                                                                              // max 16x16 tiles by patch (shift version)</font>
<a name="l00051"></a><a class="code" href="patch_8h.html#a1">00051</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_MAX_TILES_BY_PATCH_EDGE (1&lt;&lt;NL_MAX_TILES_BY_PATCH_EDGE_SHIFT)                // max 16x16 tiles by patch</font>
<a name="l00052"></a><a class="code" href="patch_8h.html#a2">00052</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_FAR0_ROTATED 0x1                                                                                               // Flags far0 rotated</font>
<a name="l00053"></a><a class="code" href="patch_8h.html#a3">00053</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_FAR1_ROTATED 0x2                                                                                               // Flags far1 rotated</font>
<a name="l00054"></a><a class="code" href="patch_8h.html#a4">00054</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_SMOOTH_FLAG_SHIFT 0x2                                                                                  // Smooth flags shift</font>
<a name="l00055"></a><a class="code" href="patch_8h.html#a5">00055</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_SMOOTH_FLAG_MASK 0x3c                                                                                  // Smooth flags mask</font>
00056 <font class="preprocessor"></font>
<a name="l00057"></a><a class="code" href="patch_8h.html#a6">00057</a> <font class="preprocessor">#define NL_LUMEL_BY_TILE_SHIFT 2                                                                                                // 4 lumels by tile</font>
<a name="l00058"></a><a class="code" href="patch_8h.html#a7">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_LUMEL_BY_TILE (1&lt;&lt;NL_LUMEL_BY_TILE_SHIFT)                                                    // 4 lumels by tile</font>
<a name="l00059"></a><a class="code" href="patch_8h.html#a8">00059</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_BLOCK_LUMEL_COMPRESSED_SIZE 8                                                                                // Compressed block size 8 bytes</font>
00060 <font class="preprocessor"></font>
00061 
<a name="l00062"></a><a class="code" href="patch_8h.html#a9">00062</a> <font class="preprocessor">#define NL_PATCH_BLOCK_MAX_QUAD 4                                                                                               // Max quad per CPatchQuadBlock.</font>
<a name="l00063"></a><a class="code" href="patch_8h.html#a10">00063</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_PATCH_BLOCK_MAX_VERTEX (NL_PATCH_BLOCK_MAX_QUAD+1)                                   // Max vertex per CPatchQuadBlock.</font>
00064 <font class="preprocessor"></font>
00065 
00066 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>;
00067 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CPlane.html">NLMISC::CPlane</a>;
00068 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a>;
00069 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CBSphere.html">NLMISC::CBSphere</a>;
00070 
00071 
00072 <font class="keyword">class   </font>CLandscape;
00073 <font class="keyword">class   </font>CZone;
00074 <font class="keyword">class   </font>CBezierPatch;
00075 <font class="keyword">class   </font>ITexture;
00076 <font class="keyword">class   </font>CVegetableClipBlock;
00077 <font class="keyword">class   </font>CVegetableManager;
00078 <font class="keyword">class   </font>CVegetableInstanceGroup;
00079 <font class="keyword">class   </font>CLandscapeVegetableBlock;
00080 <font class="keyword">class   </font>CLandscapeVegetableBlockCreateContext;
00081 <font class="keyword">class   </font>CPatchDLMContext;
00082 <font class="keyword">class   </font>CPatchDLMPointLight;
00083 
00084 
00085 <font class="comment">// ***************************************************************************</font>
<a name="l00086"></a><a class="code" href="patch_8h.html#a11">00086</a> <font class="preprocessor">#define NL3D_NOISE_MAX  1</font>
00087 <font class="preprocessor"></font>
00088 
00089 <font class="comment">// ***************************************************************************</font>
00090 <font class="comment">/* </font>
00091 <font class="comment">        NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK == 2 means that </font>
00092 <font class="comment">        clipBlocks enclose 2*2 tessBlocks (hence 4*4 tiles).</font>
00093 <font class="comment">*/</font>
<a name="l00094"></a><a class="code" href="patch_8h.html#a12">00094</a> <font class="preprocessor">#define NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT  1</font>
<a name="l00095"></a><a class="code" href="patch_8h.html#a13">00095</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK                (1&lt;&lt;NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT)</font>
00096 <font class="preprocessor"></font>
00097 
00098 <font class="comment">// ***************************************************************************</font>
<a name="l00099"></a><a class="code" href="classNL3D_1_1CVector3s.html">00099</a> <font class="keyword">class   </font>CVector3s
00100 {
00101 <font class="keyword">public</font>:
<a name="l00102"></a><a class="code" href="classNL3D_1_1CVector3s.html#m2">00102</a>         sint16  <a class="code" href="classNL3D_1_1CVector3s.html#m0">x</a>,<a class="code" href="classNL3D_1_1CVector3s.html#m1">y</a>,<a class="code" href="classNL3D_1_1CVector3s.html#m2">z</a>;
00103 
00104 <font class="keyword">public</font>:
<a name="l00105"></a><a class="code" href="classNL3D_1_1CVector3s.html#a0">00105</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1CVector3s.html#a0">pack</a>(<font class="keyword">const</font> CVector &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>, <font class="keyword">const</font> CVector &amp;bias, <font class="keywordtype">float</font> scale)
00106         {
00107                 <font class="keywordtype">float</font>   xr,yr,zr;
00108                 xr= (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.x - bias.x)/scale;
00109                 yr= (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.y - bias.y)/scale;
00110                 zr= (<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.z - bias.z)/scale;
00111                 <a class="code" href="namespaceNLMISC.html#a215">NLMISC::clamp</a>(xr, -32768, 32767);
00112                 <a class="code" href="namespaceNLMISC.html#a215">NLMISC::clamp</a>(yr, -32768, 32767);
00113                 <a class="code" href="namespaceNLMISC.html#a215">NLMISC::clamp</a>(zr, -32768, 32767);
00114                 <a class="code" href="classNL3D_1_1CVector3s.html#m0">x</a>= (sint16)xr;
00115                 <a class="code" href="classNL3D_1_1CVector3s.html#m1">y</a>= (sint16)yr;
00116                 <a class="code" href="classNL3D_1_1CVector3s.html#m2">z</a>= (sint16)zr;
00117         }
<a name="l00118"></a><a class="code" href="classNL3D_1_1CVector3s.html#a1">00118</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1CVector3s.html#a1">unpack</a>(CVector &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>, <font class="keyword">const</font> CVector &amp;bias, <font class="keywordtype">float</font> scale)<font class="keyword"> const</font>
00119 <font class="keyword">        </font>{
00120                 <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.x= <a class="code" href="classNL3D_1_1CVector3s.html#m0">x</a>*scale + bias.x;
00121                 <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.y= <a class="code" href="classNL3D_1_1CVector3s.html#m1">y</a>*scale + bias.y;
00122                 <a class="code" href="driver__opengl__extension__def_8h.html#a368">v</a>.z= <a class="code" href="classNL3D_1_1CVector3s.html#m2">z</a>*scale + bias.z;
00123         }
<a name="l00124"></a><a class="code" href="classNL3D_1_1CVector3s.html#a2">00124</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1CVector3s.html#a2">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f)
00125         {
00126                 f.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(<a class="code" href="classNL3D_1_1CVector3s.html#m0">x</a>,<a class="code" href="classNL3D_1_1CVector3s.html#m1">y</a>,<a class="code" href="classNL3D_1_1CVector3s.html#m2">z</a>);
00127         }
00128 };
00129 
00130 
00131 <font class="comment">// ***************************************************************************</font>
<a name="l00139"></a><a class="code" href="structNL3D_1_1CPatchIdent.html">00139</a> <font class="comment"></font><font class="keyword">struct  </font>CPatchIdent
00140 {
<a name="l00141"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#m0">00141</a>         sint32          <a class="code" href="structNL3D_1_1CPatchIdent.html#m0">ZoneId</a>;         <font class="comment">// From which zone this patch come from...</font>
<a name="l00142"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#m1">00142</a>         uint16          <a class="code" href="structNL3D_1_1CPatchIdent.html#m1">PatchId</a>;        <font class="comment">// Id of this patch.</font>
00143 
00144         <font class="comment">// default ctor</font>
<a name="l00145"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#a0">00145</a>         <a class="code" href="structNL3D_1_1CPatchIdent.html#a0">CPatchIdent</a>() {}
00146         <font class="comment">//</font>
<a name="l00147"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#a1">00147</a>         <a class="code" href="structNL3D_1_1CPatchIdent.html#a0">CPatchIdent</a>(sint32 zoneId, uint16 patchId) : <a class="code" href="structNL3D_1_1CPatchIdent.html#m0">ZoneId</a>(zoneId), <a class="code" href="structNL3D_1_1CPatchIdent.html#m1">PatchId</a>(patchId) {}
00148 <font class="keyword">public</font>:
<a name="l00149"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#a2">00149</a>         <font class="keywordtype">bool</font>                    <a class="code" href="structNL3D_1_1CPatchIdent.html#a2">operator&lt;</a>(<font class="keyword">const</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#a0">CPatchIdent</a> &amp;p)<font class="keyword"> const</font>
00150 <font class="keyword">        </font>{
00151                 <font class="keywordflow">if</font>(<a class="code" href="structNL3D_1_1CPatchIdent.html#m0">ZoneId</a>!=p.ZoneId) <font class="keywordflow">return</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#m0">ZoneId</a>&lt;p.ZoneId;
00152                 <font class="keywordflow">return</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#m1">PatchId</a>&lt;p.PatchId;
00153         }
00154 
<a name="l00155"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#a3">00155</a>         <font class="keywordtype">bool</font>                    <a class="code" href="structNL3D_1_1CPatchIdent.html#a3">operator==</a>(<font class="keyword">const</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#a0">CPatchIdent</a> &amp;p)<font class="keyword"> const</font>
00156 <font class="keyword">        </font>{
00157                 <font class="keywordflow">return</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#m0">ZoneId</a>==p.ZoneId &amp;&amp; <a class="code" href="structNL3D_1_1CPatchIdent.html#m1">PatchId</a>==p.PatchId;
00158         }
<a name="l00159"></a><a class="code" href="structNL3D_1_1CPatchIdent.html#a4">00159</a>         <font class="keywordtype">bool</font>                    <a class="code" href="structNL3D_1_1CPatchIdent.html#a4">operator!=</a>(<font class="keyword">const</font> <a class="code" href="structNL3D_1_1CPatchIdent.html#a0">CPatchIdent</a> &amp;p)<font class="keyword"> const</font>
00160 <font class="keyword">        </font>{
00161                 <font class="keywordflow">return</font> !(*<font class="keyword">this</font>==p);
00162         }
00163 
00164 };
00165 
00166 
00167 <font class="comment">// ***************************************************************************</font>
<a name="l00175"></a><a class="code" href="structNL3D_1_1CTrianglePatch.html">00175</a> <font class="comment"></font><font class="keyword">struct  </font>CTrianglePatch : <font class="keyword">public</font> NLMISC::CTriangleUV
00176 {
<a name="l00178"></a><a class="code" href="structNL3D_1_1CTrianglePatch.html#m0">00178</a>         CPatchIdent             <a class="code" href="structNL3D_1_1CTrianglePatch.html#m0">PatchId</a>;
00179 };
00180 
00181 
00182 <font class="comment">// ***************************************************************************</font>
<a name="l00190"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html">00190</a> <font class="comment"></font><font class="keyword">class   </font>CPatchBlockIdent
00191 {
00192 <font class="keyword">public</font>:
<a name="l00194"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m0">00194</a>         CPatchIdent             <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m0">PatchId</a>;
<a name="l00196"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m2">00196</a>         uint8                   <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m1">OrderS</a>,<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m2">OrderT</a>;
<a name="l00198"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m6">00198</a>         uint8                   <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m3">S0</a>,<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m4">S1</a>,<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m5">T0</a>,<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m6">T1</a>;
00199 
00200 <font class="keyword">public</font>:
00202         <font class="comment">// @{</font>
<a name="l00203"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_0">00203</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_0">operator==</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00204 <font class="keyword">        </font>{
00205                 <font class="keywordflow">return</font> PatchId==pb.PatchId &amp;&amp;
00206                         <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m3">S0</a>==pb.S0 &amp;&amp; <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m4">S1</a>==pb.S1 &amp;&amp;
00207                         <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m5">T0</a>==pb.T0 &amp;&amp; <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m6">T1</a>==pb.T1;
00208         }
<a name="l00209"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_1">00209</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_1">operator!=</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00210 <font class="keyword">        </font>{
00211                 <font class="keywordflow">return</font> !(*<font class="keyword">this</font>==pb);
00212         }
00213 
<a name="l00214"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_2">00214</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_2">operator&lt;</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00215 <font class="keyword">        </font>{
00216                 <font class="keywordflow">if</font>(PatchId!=pb.PatchId)
00217                         <font class="keywordflow">return</font> PatchId&lt;pb.PatchId;
00218                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m3">S0</a>!=pb.S0)   <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m3">S0</a>&lt;pb.S0;
00219                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m4">S1</a>!=pb.S1)   <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m4">S1</a>&lt;pb.S1;
00220                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m5">T0</a>!=pb.T0)   <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m5">T0</a>&lt;pb.T0;
00221                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#m6">T1</a>&lt;pb.T1;
00222         }
<a name="l00223"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_3">00223</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_3">operator&lt;=</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00224 <font class="keyword">        </font>{
00225                 <font class="keywordflow">return</font> (*<font class="keyword">this</font>&lt;pb) || (*<font class="keyword">this</font>==pb);
00226         }
<a name="l00227"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_4">00227</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_4">operator&gt;</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00228 <font class="keyword">        </font>{
00229                 <font class="keywordflow">return</font> !(*<font class="keyword">this</font>&lt;=pb);
00230         }
<a name="l00231"></a><a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_5">00231</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatchBlockIdent.html#z667_5">operator&gt;=</a>(<font class="keyword">const</font> CPatchBlockIdent &amp;pb)<font class="keyword"> const</font>
00232 <font class="keyword">        </font>{
00233                 <font class="keywordflow">return</font> !(*<font class="keyword">this</font>&lt;pb);
00234         }
00235 
00236         <font class="comment">// @}</font>
00237 };
00238 
00239 
00240 <font class="comment">// ***************************************************************************</font>
<a name="l00248"></a><a class="code" href="classNL3D_1_1CPatchQuadBlock.html">00248</a> <font class="comment"></font><font class="keyword">class   </font>CPatchQuadBlock
00249 {
00250 <font class="keyword">public</font>:
<a name="l00252"></a><a class="code" href="classNL3D_1_1CPatchQuadBlock.html#m0">00252</a>         CPatchBlockIdent        <a class="code" href="classNL3D_1_1CPatchQuadBlock.html#m0">PatchBlockId</a>;
00253 
<a name="l00255"></a><a class="code" href="classNL3D_1_1CPatchQuadBlock.html#m1">00255</a>         CVector                         <a class="code" href="classNL3D_1_1CPatchQuadBlock.html#m1">Vertices</a>[<a class="code" href="patch_8h.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>*<a class="code" href="patch_8h.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
00256 
00257 <font class="keyword">public</font>:
00258 
00262         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatchQuadBlock.html#a0">buildTileTriangles</a>(uint8 quadId, CTrianglePatch  triangles[2]) <font class="keyword">const</font>;
00263 };
00264 
00265 
00266 
00267 <font class="comment">// ***************************************************************************</font>
<a name="l00299"></a><a class="code" href="classNL3D_1_1CPatch.html">00299</a> <font class="comment"></font><font class="keyword">class </font>CPatch
00300 {
00301 <font class="keyword">public</font>:
00302 
<a name="l00303"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html">00303</a>         <font class="keyword">struct  </font>CBindInfo
00304         {
00305                 <font class="comment">// The zone on this edge. NULL if not loaded (or if none).</font>
<a name="l00306"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m0">00306</a>                 CZone                   *<a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m0">Zone</a>;
00307 
00308                 <font class="comment">// The number of patchs on this edge. 0,1, 2 or 4. if MultipleBindNum&gt;1, NPatchs==1.</font>
<a name="l00309"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m1">00309</a>                 sint                    <a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m1">NPatchs</a>;
00310 
00311                 <font class="comment">// Special case: on this edge, we are a small patch connected to a bigger: this is the X of 1/X (1,2 or 4).</font>
00312                 <font class="comment">// 0 if this is not the case.</font>
<a name="l00313"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m2">00313</a>                 uint8                   <a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m2">MultipleBindNum</a>;
00314                 <font class="comment">// valid only if MultipleBindNum&gt;1. this tells our place in this MultipleBind: 0&lt;=MultipleBindId&lt;MultipleBindNum.</font>
<a name="l00315"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m3">00315</a>                 uint8                   <a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m3">MultipleBindId</a>;
00316 
00317 
<a name="l00318"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m4">00318</a>                 CPatch                  *<a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m4">Next</a>[4];       <font class="comment">// The neighbor patch i.</font>
<a name="l00319"></a><a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m5">00319</a>                 sint                    <a class="code" href="structNL3D_1_1CPatch_1_1CBindInfo.html#m5">Edge</a>[4];        <font class="comment">// On which edge of Nexti we are binded.</font>
00320         };
00321 
00322 <font class="keyword">public</font>:
<a name="l00324"></a><a class="code" href="classNL3D_1_1CPatch.html#m0">00324</a>         CVector3s               <a class="code" href="classNL3D_1_1CPatch.html#m0">Vertices</a>[4];
<a name="l00325"></a><a class="code" href="classNL3D_1_1CPatch.html#m1">00325</a>         CVector3s               <a class="code" href="classNL3D_1_1CPatch.html#m1">Tangents</a>[8];
<a name="l00326"></a><a class="code" href="classNL3D_1_1CPatch.html#m2">00326</a>         CVector3s               <a class="code" href="classNL3D_1_1CPatch.html#m2">Interiors</a>[4];
00327         <font class="comment">/*</font>
00328 <font class="comment">                \todo yoyo: TODO_NOISE: - displacement map (ptr/index).</font>
00329 <font class="comment">                \todo yoyo: TODO_UVCORRECT: - "UV correction" infos.</font>
00330 <font class="comment">                </font>
00331 <font class="comment">        */</font>
00332 
00333         <font class="comment">// Lumel array compressed.</font>
<a name="l00334"></a><a class="code" href="classNL3D_1_1CPatch.html#m3">00334</a>         std::vector&lt;uint8&gt;                      <a class="code" href="classNL3D_1_1CPatch.html#m3">CompressedLumels</a>;
00335 
00336         <font class="comment">// There is OrderS*OrderT tiles. CZone build it at build() time.</font>
<a name="l00337"></a><a class="code" href="classNL3D_1_1CPatch.html#m4">00337</a>         std::vector&lt;CTileElement&gt;       <a class="code" href="classNL3D_1_1CPatch.html#m4">Tiles</a>;
00338 
00339         <font class="comment">// There is OrderS*OrderT tiles color. CZone build it at build() time.</font>
<a name="l00340"></a><a class="code" href="classNL3D_1_1CPatch.html#m5">00340</a>         std::vector&lt;CTileColor&gt;         <a class="code" href="classNL3D_1_1CPatch.html#m5">TileColors</a>;
00341 
00342         <font class="comment">// There is OrderS/2+1 * OrderT/2+1 tiles light influence. CZone build it at build() time.</font>
<a name="l00343"></a><a class="code" href="classNL3D_1_1CPatch.html#m6">00343</a>         std::vector&lt;CTileLightInfluence&gt;                <a class="code" href="classNL3D_1_1CPatch.html#m6">TileLightInfluences</a>;
00344 
00345 
00347         <font class="comment">// @{</font>
<a name="l00349"></a><a class="code" href="classNL3D_1_1CPatch.html#z668_2">00349</a> <font class="comment">        uint8                   NoiseRotation;</font>
00350 
00354         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z668_0">setCornerSmoothFlag</a>(uint corner, <font class="keywordtype">bool</font> smooth);
00355         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z668_1">getCornerSmoothFlag</a>(uint corner) <font class="keyword">const</font>;
00356 
00357 <font class="keyword">private</font>:
<a name="l00359"></a><a class="code" href="classNL3D_1_1CPatch.html#z668_3">00359</a>         uint8                   <a class="code" href="classNL3D_1_1CPatch.html#z668_3">_CornerSmoothFlag</a>;
00360 
00361 <font class="keyword">public</font>:
00362         <font class="comment">// @}</font>
00363 
00364 
00365 <font class="keyword">public</font>:
00366 
00368         <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a>();
00370         <a class="code" href="classNL3D_1_1CPatch.html#a1">~CPatch</a>();
00371 
00381         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a2">compile</a>(<a class="code" href="classNL3D_1_1CPatch.html#l1">CZone</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a366">z</a>, uint patchId, uint8 orderS, uint8 orderT, CTessVertex *baseVertices[4], <font class="keywordtype">float</font> errorSize=0);
00383         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a3">release</a>();
00384 
00385 
00387         CLandscape              *<a class="code" href="classNL3D_1_1CPatch.html#a4">getLandscape</a> () <font class="keyword">const</font>;
<a name="l00388"></a><a class="code" href="classNL3D_1_1CPatch.html#a5">00388</a>         <a class="code" href="classNL3D_1_1CPatch.html#l1">CZone</a>                   *<a class="code" href="classNL3D_1_1CPatch.html#a5">getZone</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o0">Zone</a>;}
<a name="l00389"></a><a class="code" href="classNL3D_1_1CPatch.html#a6">00389</a>         uint8                   <a class="code" href="classNL3D_1_1CPatch.html#a6">getOrderS</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o2">OrderS</a>;}
<a name="l00390"></a><a class="code" href="classNL3D_1_1CPatch.html#a7">00390</a>         uint8                   <a class="code" href="classNL3D_1_1CPatch.html#a7">getOrderT</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o3">OrderT</a>;}
00391         uint8                   <a class="code" href="classNL3D_1_1CPatch.html#a8">getOrderForEdge</a>(sint8 edge) <font class="keyword">const</font>;
<a name="l00392"></a><a class="code" href="classNL3D_1_1CPatch.html#a9">00392</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#a9">getErrorSize</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o8">ErrorSize</a>;}
<a name="l00393"></a><a class="code" href="classNL3D_1_1CPatch.html#a10">00393</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#a10">getFar0</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o14">Far0</a>;}
<a name="l00394"></a><a class="code" href="classNL3D_1_1CPatch.html#a11">00394</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#a11">getFar1</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o15">Far1</a>;}
<a name="l00395"></a><a class="code" href="classNL3D_1_1CPatch.html#a12">00395</a>         uint16                  <a class="code" href="classNL3D_1_1CPatch.html#a12">getPatchId</a> ()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o1">PatchId</a>;}
00397         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a13">getBindNeighbor</a>(uint edge, CBindInfo &amp;neighborEdge) <font class="keyword">const</font>;
00398 
00400         CAABBox                 <a class="code" href="classNL3D_1_1CPatch.html#a14">buildBBox</a>() <font class="keyword">const</font>;
00401 
<a name="l00403"></a><a class="code" href="classNL3D_1_1CPatch.html#a15">00403</a>         <font class="keyword">const</font> CBSphere  &amp;<a class="code" href="classNL3D_1_1CPatch.html#a15">getBSphere</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o13">BSphere</a>;}
00404 
00412         CVector                 <a class="code" href="classNL3D_1_1CPatch.html#a16">computeVertex</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) <font class="keyword">const</font>;
00413 
00414 
00422         CVector                 <a class="code" href="classNL3D_1_1CPatch.html#a17">computeContinousVertex</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) <font class="keyword">const</font>;
00423 
00424 
00427         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a18">unbind</a>();
00428 
00433         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a19">bind</a>(CBindInfo  Edges[4], <font class="keywordtype">bool</font> rebind);
00434 
00436         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a20">forceMergeAtTileLevel</a>();
00437 
00440         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a21">averageTesselationVertices</a>();
00441 
<a name="l00443"></a><a class="code" href="classNL3D_1_1CPatch.html#a22">00443</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a22">forceNoClip</a>() {<a class="code" href="classNL3D_1_1CPatch.html#o25">Clipped</a>= <font class="keyword">false</font>;}
<a name="l00445"></a><a class="code" href="classNL3D_1_1CPatch.html#a23">00445</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a23">forceClip</a>() {<a class="code" href="classNL3D_1_1CPatch.html#o25">Clipped</a>= <font class="keyword">true</font>;}
<a name="l00447"></a><a class="code" href="classNL3D_1_1CPatch.html#a24">00447</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a24">forceNoRenderClip</a>() {<a class="code" href="classNL3D_1_1CPatch.html#o26">RenderClipped</a>= <font class="keyword">false</font>;}
<a name="l00449"></a><a class="code" href="classNL3D_1_1CPatch.html#a25">00449</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a25">forceRenderClip</a>() {<a class="code" href="classNL3D_1_1CPatch.html#o26">RenderClipped</a>= <font class="keyword">true</font>;}
00451         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a26">clip</a>(<font class="keyword">const</font> std::vector&lt;CPlane&gt;  &amp;pyramid);
00453         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a27">refineAll</a>();
00454 
00455 
00457 
00458 
00460         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z669_0">preRender</a>();
00461         <font class="comment">// like preRender(), but update TextureFar only. no-op if(!RenderClipped). (you should call preRender() in this case).</font>
00462         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z669_1">updateTextureFarOnly</a>();
00464         <font class="comment">// Global Setup setup it in CLandscape::render().</font>
00465         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z669_2">renderFar0</a>();
00466         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z669_3">renderFar1</a>();
00467         <font class="comment">// NB: renderTile() is now in CTileMaterial.</font>
00468         <font class="comment">// For All Far0/Far1/Tile etc..., compute Geomorph and Alpha in software (no VertexShader).</font>
00469         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z669_4">computeSoftwareGeomorphAndAlpha</a>();
00471 
00472 
00473         <font class="comment">// release Far render pass/reset Tile/Far render.</font>
00474         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a28">resetRenderFar</a>();
00475 
00476 
00477 
00478         <font class="comment">// For CZone changePatchTexture only.</font>
00479         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a29">deleteTileUvs</a>();
00480         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a30">recreateTileUvs</a>();
00481         <font class="comment">// For CZone::refreshTesselationGeometry() only.</font>
00482         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a31">refreshTesselationGeometry</a>();
00483 
00484 
00485         <font class="comment">// Serial just the un-compiled part.</font>
00486         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a32">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f);
00487 
00488         <font class="comment">// unpack the patch into a floating point one.</font>
00489         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a33">unpack</a>(CBezierPatch     &amp;p) <font class="keyword">const</font>;
00490 
00492 
00502         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a34">unpackShadowMap</a> (uint8 *pShadow);
00503 
00512         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a35">packShadowMap</a> (<font class="keyword">const</font> uint8 *pLumel);
00513 
00519         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a36">resetCompressedLumels</a> ();
00520 
00529         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPatch.html#a37">setupColorsFromTileFlags</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> colors[4]);
00530 
00534         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPatch.html#a38">copyTileFlagsFromPatch</a>(<font class="keyword">const</font> <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>);
00535         
00536 <font class="keyword">private</font>:
00537 
00538         <font class="comment">// Methods used internaly to compute shadowmaps</font>
00539 
00545         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#c0">packLumelBlock</a> (uint8 *dest, <font class="keyword">const</font> uint8 *source, uint8 alpha0, uint8 alpha1);
00546 
00552         uint                    <a class="code" href="classNL3D_1_1CPatch.html#c1">evalLumelBlock</a> (<font class="keyword">const</font> uint8 *original, <font class="keyword">const</font> uint8 *unCompressed, uint <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
00553 
00559         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#c2">unpackLumelBlock</a> (uint8 *dest, <font class="keyword">const</font> uint8 *<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>);
00560 
00561 <font class="keyword">public</font>:
00562 
00564 
<a name="l00568"></a><a class="code" href="classNL3D_1_1CPatch.html#a39">00568</a>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CPatch.html#a39">setSmoothFlag</a> (uint edge, <font class="keywordtype">bool</font> flag)
00569         {
00570                 <font class="comment">// Erase it</font>
00571                 <a class="code" href="classNL3D_1_1CPatch.html#o24">Flags</a>&amp;=~(1&lt;&lt;(edge+<a class="code" href="patch_8h.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
00572                 
00573                 <font class="comment">// Set it</font>
00574                 <a class="code" href="classNL3D_1_1CPatch.html#o24">Flags</a>|=(((uint)flag)&lt;&lt;(edge+<a class="code" href="patch_8h.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
00575         }
00576 
<a name="l00580"></a><a class="code" href="classNL3D_1_1CPatch.html#a40">00580</a>         <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CPatch.html#a40">getSmoothFlag</a> (uint edge)<font class="keyword"> const</font>
00581 <font class="keyword">        </font>{
00582                 <font class="comment">// Test it</font>
00583                 <font class="keywordflow">return</font> ((<a class="code" href="classNL3D_1_1CPatch.html#o24">Flags</a>&amp;(1&lt;&lt;(edge+<a class="code" href="patch_8h.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>)))!=0);
00584         }
00585 
00586 
00588         <font class="comment">// @{</font>
00596 <font class="comment"></font>        <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z670_0">addTrianglesInBBox</a>(CPatchIdent paId, <font class="keyword">const</font> CAABBox &amp;bbox, std::vector&lt;CTrianglePatch&gt; &amp;triangles, uint8 tileTessLevel) <font class="keyword">const</font>;
00597 
00601         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z670_1">fillPatchQuadBlock</a>(CPatchQuadBlock &amp;quadBlock) <font class="keyword">const</font>;
00602 
00609         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z670_2">addPatchBlocksInBBox</a>(CPatchIdent paId, <font class="keyword">const</font> CAABBox &amp;bbox, std::vector&lt;CPatchBlockIdent&gt; &amp;paBlockIds) <font class="keyword">const</font>;
00610 
00611 
00614         CVector         <a class="code" href="classNL3D_1_1CPatch.html#z670_3">getTesselatedPos</a>(CUV uv) <font class="keyword">const</font>;
00615 
00616 
00619         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z670_4">appendTessellationLeaves</a>(std::vector&lt;const CTessFace*&gt;  &amp;leaves) <font class="keyword">const</font>;
00620 
00621 
00622         <font class="comment">// @}</font>
00623 
00624 
00626         <font class="comment">// @{</font>
00627 
00629         uint8           <a class="code" href="classNL3D_1_1CPatch.html#z671_0">getLumel</a>(<font class="keyword">const</font> CUV &amp;uv) <font class="keyword">const</font>;
00630 
00632         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z671_1">appendTileLightInfluences</a>(<font class="keyword">const</font> CUV &amp;uv, 
00633                 std::vector&lt;CPointLightInfluence&gt; &amp;pointLightList) <font class="keyword">const</font>;
00634 
00638         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z671_2">computeCurrentTLILightmap</a>(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *array) <font class="keyword">const</font>;
00639 
00640         <font class="comment">// @}</font>
00641 
00642 
00644         <font class="comment">// @{</font>
00645 
00647         CTileElement    *<a class="code" href="classNL3D_1_1CPatch.html#z672_0">getTileElement</a>(<font class="keyword">const</font> CUV &amp;uv);
00648 
00649         <font class="comment">// @}</font>
00650 
00651 <font class="keyword">public</font>:
00652 
00653         <font class="comment">// only usefull for CZone refine.</font>
<a name="l00654"></a><a class="code" href="classNL3D_1_1CPatch.html#a41">00654</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a41">isClipped</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o25">Clipped</a>;}
00655         <font class="comment">// only usefull for CZone preRender.</font>
<a name="l00656"></a><a class="code" href="classNL3D_1_1CPatch.html#a42">00656</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#a42">isRenderClipped</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o26">RenderClipped</a>;}
00657 
00658 
00659         <font class="comment">// get the according vertex for a corner. use wisely</font>
<a name="l00660"></a><a class="code" href="classNL3D_1_1CPatch.html#a43">00660</a>         <font class="keyword">const</font> CTessVertex       *<a class="code" href="classNL3D_1_1CPatch.html#a43">getCornerVertex</a>(uint corner)
00661         {
00662                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#o11">BaseVertices</a>[corner];
00663         }
00664 
00665 
00666 <font class="keyword">public</font>:
00667 
00669         <font class="comment">// @{</font>
00670 
00671         <font class="comment">// delete all VB allocated in VertexBuffers, according to Far0 and Far1. Do not Test RenderClipped state.</font>
00672         <font class="comment">// With VB, allocate to he faces array.</font>
00673         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_0">deleteVBAndFaceVector</a>();
00674 
00675         <font class="comment">// allocate all VB, according to Far0 and Far1. Do not Test RenderClipped state.</font>
00676         <font class="comment">// With VB, allocate to he faces array.</font>
00677         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_1">allocateVBAndFaceVector</a>();
00678 
00679         <font class="comment">// fill all VB, according to Far0, Far1 and CTessFace VBInfos. Do not Test RenderClipped state.</font>
00680         <font class="comment">// Do not fill a VB if reallocationOccurs().</font>
00681         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_2">fillVB</a>();
00682 
00683         <font class="comment">// if RenderClipped==false, fillVB().</font>
00684         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_3">fillVBIfVisible</a>();
00685 
00686         <font class="comment">// delete Far1 VB allocated in VertexBuffers. do it only if Far1==true. Do not Test RenderClipped state.</font>
00687         <font class="comment">// With VB, allocate to he faces array.</font>
00688         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_4">deleteVBAndFaceVectorFar1Only</a>();
00689 
00690         <font class="comment">// allocate Far1 VB, . do it only if Far1==true. Do not Test RenderClipped state.</font>
00691         <font class="comment">// With VB, allocate to he faces array.</font>
00692         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_5">allocateVBAndFaceVectorFar1Only</a>();
00693 
00694         <font class="comment">// fill Far0 VB according CTessFace VBInfos and Far0 (do not fill if !Far0). Do not Test RenderClipped state.</font>
00695         <font class="comment">// Do not fill a VB if reallocationOccurs().</font>
00696         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_6">fillVBFar0Only</a>();
00697         <font class="comment">// same for Far1</font>
00698         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_7">fillVBFar1Only</a>();
00699 
00700 
00701         <font class="comment">// fill DLM Uv (ie UV1) for Far0 and Far1 VB only. NB: do not fill Far0 if !Far0 (idem fro Far1). </font>
00702         <font class="comment">// Do not Test RenderClipped state. Do not fill a VB if reallocationOccurs().</font>
00703         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_8">fillVBFarsDLMUvOnly</a>();
00704         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_9">fillFar0DLMUvOnlyVertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
00705         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_10">fillFar1DLMUvOnlyVertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
00706 
00707 
00708         <font class="comment">// Test Old anc Current RenderClipped test, and fill VBuffer/face/renderPass according to.</font>
00709         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_11">updateClipPatchVB</a>();
00710 
00711 
00712         <font class="comment">// For Debug only.</font>
00713         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_12">debugAllocationMarkIndices</a>(uint marker);
00714 
00715 
00716         <font class="comment">// Because of refine... tessBlock FaceVector may have been deleted, this method do nothing if RenderClipped.</font>
00717         <font class="comment">// If not, recreate FaceVector for this tessBlock only, according to Far0 and Far1.</font>
00718         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z673_13">recreateTessBlockFaceVector</a>(CTessBlock &amp;block);
00719 
00720 
00721         <font class="comment">// @}</font>
00722 
00723 
00724 <font class="keyword">public</font>:
00725 
00727         <font class="comment">// @{</font>
00728 
00730         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z674_0">deleteAllVegetableIgs</a>();
00731 
00733         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z674_1">recreateAllVegetableIgs</a>();
00734 
00735         <font class="comment">// @}</font>
00736 
00737 
00739         <font class="comment">// @{</font>
00743 <font class="comment"></font>        <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z675_0">resetTileLightInfluences</a>();
00744         <font class="comment">// @}</font>
00745 
00746 
00748         <font class="comment">// @{</font>
00749 
00751         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z676_0">linkBeforeNearUL</a>(<a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a> *patchNext);
00753         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z676_1">unlinkNearUL</a>();
<a name="l00755"></a><a class="code" href="classNL3D_1_1CPatch.html#z676_2">00755</a>         <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a>          *<a class="code" href="classNL3D_1_1CPatch.html#z676_2">getNextNearUL</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#z687_1">_ULNearNext</a>;}
00756 
<a name="l00758"></a><a class="code" href="classNL3D_1_1CPatch.html#z676_3">00758</a>         uint            <a class="code" href="classNL3D_1_1CPatch.html#z676_3">getNumNearTessBlocks</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#z678_1">TessBlocks</a>.size();}
00759 
00766         uint            <a class="code" href="classNL3D_1_1CPatch.html#z676_4">updateTessBlockLighting</a>(uint numTb);
00767 
00768         <font class="comment">// @}</font>
00769 
00770 
00772         <font class="comment">// @{</font>
00773 
00778         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z677_0">beginDLMLighting</a>();
00782         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z677_1">processDLMLight</a>(CPatchDLMPointLight &amp;pl);
00787         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z677_2">endDLMLighting</a>();
00788 
00789         <font class="comment">// @}</font>
00790 
00791 
<a name="l00793"></a><a class="code" href="classNL3D_1_1CPatch.html#a44">00793</a>         uint            <a class="code" href="classNL3D_1_1CPatch.html#a44">getTileMaterialRefCount</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CPatch.html#z678_0">MasterBlock</a>.TileMaterialRefCount;}
00794 
00795 <font class="comment">// Private part.</font>
00796 <font class="keyword">private</font>:
00797 <font class="comment">/*********************************/</font>
00798 
<a name="l00799"></a><a class="code" href="classNL3D_1_1CPatch.html#l0">00799</a>         <font class="keyword">friend</font>  <font class="keyword">class </font><a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a>;
<a name="l00800"></a><a class="code" href="classNL3D_1_1CPatch.html#l1">00800</a>         <font class="keyword">friend</font>  <font class="keyword">class </font><a class="code" href="classNL3D_1_1CPatch.html#l1">CZone</a>;
<a name="l00801"></a><a class="code" href="classNL3D_1_1CPatch.html#l2">00801</a>         <font class="keyword">friend</font>  <font class="keyword">class </font><a class="code" href="classNL3D_1_1CPatch.html#l2">CLandscapeVegetableBlock</a>;
00802 
<a name="l00803"></a><a class="code" href="classNL3D_1_1CPatch.html#o0">00803</a>         <a class="code" href="classNL3D_1_1CPatch.html#l1">CZone</a>                   *<a class="code" href="classNL3D_1_1CPatch.html#o0">Zone</a>;
00804 
00805         <font class="comment">// Number of this patch in the zone. valid at compile Time.</font>
<a name="l00806"></a><a class="code" href="classNL3D_1_1CPatch.html#o1">00806</a>         uint16                  <a class="code" href="classNL3D_1_1CPatch.html#o1">PatchId</a>;
00807         <font class="comment">// Tile Order for the patch.</font>
<a name="l00808"></a><a class="code" href="classNL3D_1_1CPatch.html#o3">00808</a>         uint8                   <a class="code" href="classNL3D_1_1CPatch.html#o2">OrderS</a>, <a class="code" href="classNL3D_1_1CPatch.html#o3">OrderT</a>;
00809 
00810         <font class="comment">// This is especially for Pacs. false by default, and used by CZone::refineAll() and CZone::excludePatchFromRefineAll().</font>
<a name="l00811"></a><a class="code" href="classNL3D_1_1CPatch.html#o4">00811</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#o4">ExcludeFromRefineAll</a>;
00812 
00813         <font class="comment">// For this patch, which level is required for a face to be inserted in the secondary TessBlocks (and not the masterblock)??</font>
<a name="l00814"></a><a class="code" href="classNL3D_1_1CPatch.html#o5">00814</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#o5">TessBlockLimitLevel</a>;
00815         <font class="comment">// For this patch, which level is required for a face to be a valid Tile??</font>
<a name="l00816"></a><a class="code" href="classNL3D_1_1CPatch.html#o6">00816</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#o6">TileLimitLevel</a>;
00817         <font class="comment">// For this patch, which level is required for a face to be a "square" face (not rectangular)??</font>
<a name="l00818"></a><a class="code" href="classNL3D_1_1CPatch.html#o7">00818</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#o7">SquareLimitLevel</a>;
00819         <font class="comment">// The Base Size*bumpiness of the patch (/2 at each subdivide).</font>
<a name="l00820"></a><a class="code" href="classNL3D_1_1CPatch.html#o8">00820</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#o8">ErrorSize</a>;
00821         <font class="comment">// The root for tesselation.</font>
<a name="l00822"></a><a class="code" href="classNL3D_1_1CPatch.html#o10">00822</a>         <a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a>               *<a class="code" href="classNL3D_1_1CPatch.html#o9">Son0</a>, *<a class="code" href="classNL3D_1_1CPatch.html#o10">Son1</a>;
00823         <font class="comment">// The base vertices.</font>
<a name="l00824"></a><a class="code" href="classNL3D_1_1CPatch.html#o11">00824</a>         CTessVertex             *<a class="code" href="classNL3D_1_1CPatch.html#o11">BaseVertices</a>[4];
00825         <font class="comment">// The base Far vertices (always here!!).</font>
<a name="l00826"></a><a class="code" href="classNL3D_1_1CPatch.html#o12">00826</a>         CTessFarVertex  <a class="code" href="classNL3D_1_1CPatch.html#o12">BaseFarVertices</a>[4];
00827         <font class="comment">// BSphere.</font>
<a name="l00828"></a><a class="code" href="classNL3D_1_1CPatch.html#o13">00828</a>         CBSphere                <a class="code" href="classNL3D_1_1CPatch.html#o13">BSphere</a>;
00829 
00830 
00831         <font class="comment">// Local info for CTessFace tiles. CPatch must setup them at the begining at refine()/render().</font>
00832         <font class="comment">// For Far Texture coordinates.</font>
<a name="l00833"></a><a class="code" href="classNL3D_1_1CPatch.html#o14">00833</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#o14">Far0</a>;                   <font class="comment">// The level of First Far: 0,1,2 or 3. 0 means Tile.</font>
<a name="l00834"></a><a class="code" href="classNL3D_1_1CPatch.html#o15">00834</a>         sint                    <a class="code" href="classNL3D_1_1CPatch.html#o15">Far1</a>;                   <font class="comment">// The level of second Far, for transition: 1,2 or 3. 0 means none.</font>
<a name="l00835"></a><a class="code" href="classNL3D_1_1CPatch.html#o17">00835</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#o16">Far0UScale</a>, <a class="code" href="classNL3D_1_1CPatch.html#o17">Far0VScale</a>, <a class="code" href="classNL3D_1_1CPatch.html#o18">Far0UBias</a>, <a class="code" href="classNL3D_1_1CPatch.html#o19">Far0VBias</a>;
<a name="l00836"></a><a class="code" href="classNL3D_1_1CPatch.html#o21">00836</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#o20">Far1UScale</a>, <a class="code" href="classNL3D_1_1CPatch.html#o21">Far1VScale</a>, <a class="code" href="classNL3D_1_1CPatch.html#o22">Far1UBias</a>, <a class="code" href="classNL3D_1_1CPatch.html#o23">Far1VBias</a>;
00837 
00838         <font class="comment">// Pack 4 bytes</font>
00839         <font class="comment">// {</font>
<a name="l00850"></a><a class="code" href="classNL3D_1_1CPatch.html#o24">00850</a> <font class="comment"></font>        uint8                   <a class="code" href="classNL3D_1_1CPatch.html#o24">Flags</a>;
00851                                                                 
00852         <font class="comment">// are we cliped?</font>
<a name="l00853"></a><a class="code" href="classNL3D_1_1CPatch.html#o25">00853</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#o25">Clipped</a>;
00854         <font class="comment">// are we cliped in Render? Yes by default.</font>
<a name="l00855"></a><a class="code" href="classNL3D_1_1CPatch.html#o26">00855</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#o26">RenderClipped</a>;
00856         <font class="comment">// are we cliped in prec Render? Yes by default. updated by updateClipPatchVB().</font>
<a name="l00857"></a><a class="code" href="classNL3D_1_1CPatch.html#o27">00857</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CPatch.html#o27">OldRenderClipped</a>;
00858 
00859         <font class="comment">// }</font>
00860         
00861         <font class="comment">// The render Pass of Far0 and Far1.</font>
<a name="l00862"></a><a class="code" href="classNL3D_1_1CPatch.html#o29">00862</a>         CRdrPatchId             <a class="code" href="classNL3D_1_1CPatch.html#o28">Pass0</a>, <a class="code" href="classNL3D_1_1CPatch.html#o29">Pass1</a>;
00863         <font class="comment">// Info for alpha transition with Far1.</font>
<a name="l00864"></a><a class="code" href="classNL3D_1_1CPatch.html#o30">00864</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#o30">TransitionSqrMin</a>;
<a name="l00865"></a><a class="code" href="classNL3D_1_1CPatch.html#o31">00865</a>         <font class="keywordtype">float</font>                   <a class="code" href="classNL3D_1_1CPatch.html#o31">OOTransitionSqrDelta</a>;
00866 
00868         <font class="comment">// @{</font>
00869         <font class="comment">// The block render of far only. Only Far faces bigger than a block are inserted here.</font>
<a name="l00870"></a><a class="code" href="classNL3D_1_1CPatch.html#z678_0">00870</a>         CTessBlock                                      <a class="code" href="classNL3D_1_1CPatch.html#z678_0">MasterBlock</a>;
00871         <font class="comment">// The 2*2 block render. For memory optimisation, none is allocated when no faces need it.</font>
00872         <font class="comment">// There is (OrderT/2)*(OrderS/2) TessBlocks.</font>
<a name="l00873"></a><a class="code" href="classNL3D_1_1CPatch.html#z678_1">00873</a>         std::vector&lt;CTessBlock&gt;         <a class="code" href="classNL3D_1_1CPatch.html#z678_1">TessBlocks</a>;
00874         <font class="comment">// The counter of faces which need TessBlocks (FarFaces, TileMaterial and FarVertices). When 0, the vector is contReset()-ed.</font>
<a name="l00875"></a><a class="code" href="classNL3D_1_1CPatch.html#z678_2">00875</a>         sint                                            <a class="code" href="classNL3D_1_1CPatch.html#z678_2">TessBlockRefCount</a>;
00876         <font class="comment">// Tells how many Renderable Face this Patch has. updated in append/remove/FaceToRenderList()</font>
<a name="l00877"></a><a class="code" href="classNL3D_1_1CPatch.html#z678_3">00877</a>         sint                                            <a class="code" href="classNL3D_1_1CPatch.html#z678_3">NumRenderableFaces</a>;
00878         <font class="comment">// @}</font>
00879 
00880 
00882         <font class="comment">// @{</font>
<a name="l00884"></a><a class="code" href="classNL3D_1_1CPatch.html#z679_0">00884</a> <font class="comment">        std::vector&lt;CVegetableClipBlock*&gt;       VegetableClipBlocks;</font>
00885         <font class="comment">// @}</font>
00886 
00887 
00891         <font class="keyword">static</font> uint32   <a class="code" href="classNL3D_1_1CPatch.html#r0">_Version</a>;
00892 
00893 <font class="keyword">private</font>:
00894         <font class="comment">// Guess.</font>
00895         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#c3">computeDefaultErrorSize</a>();
00896         <font class="comment">// based on BaseVertices, recompute positions, and Make Face roots Son0 and Son1.</font>
00897         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#c4">makeRoots</a>();
00898         <font class="comment">// Guess. For bind() reasons.</font>
00899         <a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a>               *<a class="code" href="classNL3D_1_1CPatch.html#c5">getRootFaceForEdge</a>(sint edge) <font class="keyword">const</font>;
00900         <font class="comment">// Guess. For bind() reasons. return the vertex 0 of edge.</font>
00901         CTessVertex             *<a class="code" href="classNL3D_1_1CPatch.html#c6">getRootVertexForEdge</a>(sint edge) <font class="keyword">const</font>;
00902         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#c7">changeEdgeNeighbor</a>(sint edge, <a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *to);
00903 
00904 
00906         <font class="comment">// @{</font>
00907 
00908         <font class="comment">// reset all list of MasterBlock.</font>
00909         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_1">resetMasterBlock</a>();
00910         <font class="comment">// simply clear the tessnbloc array and reset cout to 0.</font>
00911         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_2">clearTessBlocks</a>();
00912         <font class="comment">// add a ref to tess blocks, allocate them if necessary.</font>
00913         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_3">addRefTessBlocks</a>();
00914         <font class="comment">// dec a ref to tess blocks, destroy them if necessary.</font>
00915         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_4">decRefTessBlocks</a>();
00916         <font class="comment">// UGLY SIDE EFFECT: when refcount TessBlocks RefCount reach 0, tessblockas are deleted. think of it in tesselation.cpp.</font>
00917 
00918 
00919         <font class="comment">// Retrieve the tessblockId, depending on face info.</font>
00920         uint                    <a class="code" href="classNL3D_1_1CPatch.html#z680_5">getNumTessBlock</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00921         <font class="comment">// FarVertType.</font>
<a name="l00922"></a><a class="code" href="classNL3D_1_1CPatch.html#z680_0">00922</a>         <font class="keyword">enum</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_0">TFarVertType</a> {<a class="code" href="classNL3D_1_1CPatch.html#z680_0u0">FVMasterBlock</a>=0, <a class="code" href="classNL3D_1_1CPatch.html#z680_0u1">FVTessBlock</a>, <a class="code" href="classNL3D_1_1CPatch.html#z680_0u2">FVTessBlockEdge</a>};
00923         <font class="comment">// Retrieve the tessblockId, depending on a ParamCoord.</font>
00924         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_5">getNumTessBlock</a>(CParamCoord pc, <a class="code" href="classNL3D_1_1CPatch.html#z680_0">TFarVertType</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, uint &amp;numtb);
00925 
00926 
00927         <font class="comment">// If pathc is visible, force deletion of this TessBlock.</font>
00928         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_7">dirtTessBlockFaceVector</a>(CTessBlock &amp;block);
00929 
00930 
00931         <font class="comment">// For rdr. Insert in the GOOD TessBlock the face (depending on level, patchcoordinates etc...)</font>
00932         <font class="comment">// call appendFaceToTileRenderList() to insert his TileFaces into the good renderList.</font>
00933         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_8">appendFaceToRenderList</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00934         <font class="comment">// Remove a face and his tileface from the patch renderlist.</font>
00935         <font class="comment">// call removeFaceFromTileRenderList() to insert his TileFaces into the good renderList.</font>
00936         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_9">removeFaceFromRenderList</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00937         <font class="comment">// for changePatchTexture, insert just the TileFace into the good render List.</font>
00938         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_10">appendFaceToTileRenderList</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00939         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_11">removeFaceFromTileRenderList</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00940         <font class="comment">// For refreshTesselationGeometry() only. enlarge the TessBlock (if any) with face-&gt;V*-&gt;EndPos.</font>
00941         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_12">extendTessBlockWithEndPos</a>(<a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *face);
00942 
00943         <font class="comment">// Set/Unset (to NULL) a TileMaterial from the TessBlocks. Material must exist for both functions.</font>
00944         <font class="comment">// And TileS/TileT must be OK.</font>
00945         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_13">appendTileMaterialToRenderList</a>(CTileMaterial *tm);
00946         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_14">removeTileMaterialFromRenderList</a>(CTileMaterial *tm);
00947 
00948         <font class="comment">// Add/Remove FarVertices. Use fv-&gt;PCoord to know where.</font>
00949         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_15">appendFarVertexToRenderList</a>(CTessFarVertex *fv);
00950         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_16">removeFarVertexFromRenderList</a>(CTessFarVertex *fv);
00951         <font class="comment">// Add/Remove NearVertices. Use tileMat to know where.</font>
00952         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_17">appendNearVertexToRenderList</a>(CTileMaterial *tileMat, CTessNearVertex *nv);
00953         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z680_18">removeNearVertexFromRenderList</a>(CTileMaterial *tileMat, CTessNearVertex *nv);
00954 
00955         <font class="comment">// @}</font>
00956 
00957 
00958 
00960         <font class="comment">// @{</font>
00961         <font class="comment">// For CTessFace::computeMaterial(). Return the render pass for this material, given the number of the tile, and the</font>
00962         <font class="comment">// desired pass. NULL may be returned if the pass is not present (eg: no additive for this tile...).</font>
00963         CPatchRdrPass   *<a class="code" href="classNL3D_1_1CPatch.html#z681_0">getTileRenderPass</a>(sint tileId, sint pass);
00964         <font class="comment">// For CTessFace::computeMaterial(). Return the orient/scalebias for the tile in the patchtexture, and the</font>
00965         <font class="comment">// desired pass (and the desired stage: RGB/Alpha).</font>
00966         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CPatch.html#z681_1">getTileUvInfo</a>(sint tileId, sint pass, <font class="keywordtype">bool</font> <a class="code" href="driver__opengl__extension__def_8h.html#a420">alpha</a>, uint8 &amp;orient, CVector &amp;uvScaleBias, <font class="keywordtype">bool</font> &amp;is256x256, uint8 &amp;uvOff);
00967         <font class="comment">// @}</font>
00968 
00969         <font class="comment">// Tile LightMap mgt.</font>
00970         <font class="comment">// @{</font>
00971         <font class="comment">// for a given tile (accessed from the (ts,tt) coordinates), compute a lightmap if necessary, and get a RenderPass.</font>
00972         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_0">getTileLightMap</a>(uint ts, uint tt, CPatchRdrPass *&amp;rdrpass);
00973         <font class="comment">// get uvInfo for tile. NB: ts,tt form because simpler.</font>
00974         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_1">getTileLightMapUvInfo</a>(uint ts, uint tt, CVector &amp;uvScaleBias);
00975         <font class="comment">// release the tile lightmap. NB: ts,tt form because simpler.</font>
00976         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_2">releaseTileLightMap</a>(uint ts, uint tt);
00977 
00978         <font class="comment">// Compute the Lightmap for 2x2 tiles. =&gt; 10x10 pixels. ts, tt is in [0,OrderS], [0, OrderT].</font>
00979         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_3">computeNearBlockLightmap</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>        *lightText);
00980         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_4">computeTileLightmapPixelAroundCorner</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector2f.html">NLMISC::CVector2f</a> &amp;stIn, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, <font class="keywordtype">bool</font> lookAround);
00981 
00982         <font class="comment">// Compute a lightmap for a tile (ts,tt). 4x4 lumels are processed. NB: result= lumel*userColor.</font>
00983         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_5">computeTileLightmap</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
00984         <font class="comment">// Compute a lightmap for an edge of a tile. 1x4 lumels. "edge" say what edge of the tile to compute.</font>
00985         <font class="comment">// pixels will be written in (dest+i*stride), where i vary from 0 to 3 or 3 to 0 (according to "inverse").</font>
00986         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_6">computeTileLightmapEdge</a>(uint ts, uint tt, uint edge, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, <font class="keywordtype">bool</font> inverse);
00987         <font class="comment">// Compute a lightmap just for a pixel (s,t) of a tile (ts,tt). (s,t) E [0;3], [0;3].</font>
00988         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_7">computeTileLightmapPixel</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest);
00989 
00990 
00991         <font class="comment">// Methods for automatic Lighting. NB: result= lumel only (no TileColors).</font>
00992         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_8">computeTileLightmapAutomatic</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
00993         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_9">computeTileLightmapEdgeAutomatic</a>(uint ts, uint tt, uint edge, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, <font class="keywordtype">bool</font> inverse);
00994         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_10">computeTileLightmapPixelAutomatic</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest);
00995         <font class="comment">// Methods for Precomputed Lighting. NB: result= lumel only (no TileColors).</font>
00996         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_11">computeTileLightmapPrecomputed</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
00997         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_12">computeTileLightmapEdgePrecomputed</a>(uint ts, uint tt, uint edge, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, <font class="keywordtype">bool</font> inverse);
00998         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_13">computeTileLightmapPixelPrecomputed</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest);
00999         <font class="comment">// Methods to modulate dest with TileColors. NB: A unmodified.</font>
01000         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_14">modulateTileLightmapWithTileColors</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
01001         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_15">modulateTileLightmapEdgeWithTileColors</a>(uint ts, uint tt, uint edge, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, <font class="keywordtype">bool</font> inverse);
01002         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_16">modulateTileLightmapPixelWithTileColors</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest);
01003         <font class="comment">// get the tileColors at the corners of the tile. corner order: 0,0; 1,0; 0,1; 1,1. NB: A undefined.</font>
01004         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_17">getTileTileColors</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> corners[4]);
01005 
01006 
01007         <font class="comment">// get the current TLIColor given a TLI coordinate (in (0..OrderS/2+1, 0..OrderT/2+1) )</font>
01008         <font class="comment">// NB: returned color is modulated by landscape material and precomputed diffuse factor</font>
01009         CRGBA           <a class="code" href="classNL3D_1_1CPatch.html#z682_18">CPatch::getCurrentTLIColor</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>) <font class="keyword">const</font>;
01010         <font class="comment">// get the current TLIColors at the corners of the tile (according to pointLights current colors)</font>
01011         <font class="comment">// corner order: 0,0; 1,0; 0,1; 1,1. NB: A undefined.</font>
01012         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_19">getCurrentTileTLIColors</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> corners[4]);
01013         <font class="comment">// Methods to add dest with result of TLI lighting. NB: A unmodified.</font>
01014         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_20">addTileLightmapWithTLI</a>(uint ts, uint tt, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
01015         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_21">addTileLightmapEdgeWithTLI</a>(uint ts, uint tt, uint edge, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>, <font class="keywordtype">bool</font> inverse);
01016         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z682_22">addTileLightmapPixelWithTLI</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> *dest);
01017 
01018         <font class="comment">// @}</font>
01019 
01020 
01021         <font class="comment">// Recompute of new Far Values, according to globals. Don't erase Far0 and Far1.</font>
01022         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c8">computeNewFar</a>(sint &amp;newFar0, sint &amp;newFar1);
01023 
01024 
01025         <font class="comment">// For Render. Those methods compute the vertices for Driver (in CTessFace::Current*VB).</font>
01026         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c9">fillFar0VertexVB</a>(CTessFarVertex *pVert);
01027         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c10">fillFar1VertexVB</a>(CTessFarVertex *pVert);
01028         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c11">fillTileVertexVB</a>(CTessNearVertex *pVert);
01029         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c12">fillFar0VertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
01030         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c13">fillFar1VertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
01031         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c14">fillTileVertexListVB</a>(CTessList&lt;CTessNearVertex&gt; &amp;vertList);
01032         <font class="comment">// For Render. Those methods allocate/delete vertices in VB.</font>
01033         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c15">updateFar0VBAlloc</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList, <font class="keywordtype">bool</font> alloc);
01034         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c16">updateFar1VBAlloc</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList, <font class="keywordtype">bool</font> alloc);
01035         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c17">updateTileVBAlloc</a>(CTessList&lt;CTessNearVertex&gt;  &amp;vertList, <font class="keywordtype">bool</font> alloc);
01036         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c18">updateVBAlloc</a>(<font class="keywordtype">bool</font> alloc);
01037         <font class="comment">// For Debug Allcoation only.</font>
01038         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c19">debugAllocationMarkIndicesFarList</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList, uint marker);
01039         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c20">debugAllocationMarkIndicesNearList</a>(CTessList&lt;CTessNearVertex&gt;  &amp;vertList, uint marker);
01040         <font class="comment">// For Render. Allocate / Fill FaceVector, according to Far0/Far1.</font>
01041         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c21">createFaceVectorFar1</a>();
01042         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c22">deleteFaceVectorFar1</a>();
01043         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c23">createFaceVectorFar0OrTile</a>();
01044         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c24">deleteFaceVectorFar0OrTile</a>();
01045 
01046 
01047 
01048         <font class="comment">// For Refine. Those methods do all the good job, and test if they can allocate the VB.</font>
01049         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c25">checkCreateVertexVBFar</a>(CTessFarVertex *pVert);
01050         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c26">checkCreateVertexVBNear</a>(CTessNearVertex *pVert);
01051         <font class="comment">// For Refine. Those methods do all the good job, and test if they can fill the VB.</font>
01052         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c27">checkFillVertexVBFar</a>(CTessFarVertex *pVert);
01053         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c28">checkFillVertexVBNear</a>(CTessNearVertex   *pVert);
01054         <font class="comment">// For Refine. Those methods do all the good job, and test if they have to delete the VB.</font>
01055         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c29">checkDeleteVertexVBFar</a>(CTessFarVertex *pVert);
01056         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c30">checkDeleteVertexVBNear</a>(CTessNearVertex *pVert);
01057 
01058         <font class="comment">// For Render, geomorph / Alpha in software.</font>
01059         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c31">computeGeomorphVertexList</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
01060         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c32">computeGeomorphFar0VertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
01061         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c33">computeGeomorphAlphaFar1VertexListVB</a>(CTessList&lt;CTessFarVertex&gt;  &amp;vertList);
01062         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c34">computeGeomorphTileVertexListVB</a>(CTessList&lt;CTessNearVertex&gt;  &amp;vertList);
01063 
01065         <font class="comment">// @{</font>
01067 <font class="comment">        void            buildBBoxFromBezierPatch(const CBezierPatch &amp;p, CAABBox &amp;ret) const;</font>
01073 <font class="comment"></font>        <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z683_1">addTrianglesInBBoxRecurs</a>(CPatchIdent paId, <font class="keyword">const</font> CAABBox &amp;bbox, std::vector&lt;CTrianglePatch&gt; &amp;triangles, uint8 tessLevel, 
01074                 <font class="keyword">const</font> CBezierPatch &amp;pa, uint8 s0, uint8 s1, uint8 t0, uint8 t1) <font class="keyword">const</font>;
01079         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z683_2">addTileTrianglesInBBox</a>(CPatchIdent paId, <font class="keyword">const</font> CAABBox &amp;bbox, std::vector&lt;CTrianglePatch&gt; &amp;triangles, uint8 tessLevel, 
01080                 uint8 s0, uint8 t0) <font class="keyword">const</font>;
01081 
01084         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z683_3">addPatchBlocksInBBoxRecurs</a>(CPatchIdent paId, <font class="keyword">const</font> CAABBox &amp;bbox, std::vector&lt;CPatchBlockIdent&gt; &amp;paBlockIds, 
01085                 <font class="keyword">const</font> CBezierPatch &amp;pa, uint8 s0, uint8 s1, uint8 t0, uint8 t1) <font class="keyword">const</font>;
01086 
01088         CVector         <a class="code" href="classNL3D_1_1CPatch.html#z683_4">computeVertexButCorner</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, <font class="keywordtype">bool</font> &amp;onCorner) <font class="keyword">const</font>;
01089 
01090         <font class="comment">// @}</font>
01091 
01092 
01093 <font class="keyword">private</font>:
01094 
01095 
01096 
01098         <font class="comment">// @{</font>
01099 
<a name="l01101"></a><a class="code" href="classNL3D_1_1CPatch.html#z684_1">01101</a>         <a class="code" href="classNL3D_1_1CPatch.html#l1">CZone</a>           *<a class="code" href="classNL3D_1_1CPatch.html#z684_1">_BindZoneNeighbor</a>[4];
01102 
01106         <a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a>       *<a class="code" href="classNL3D_1_1CPatch.html#z684_0">linkTessFaceWithEdge</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector2f.html">NLMISC::CVector2f</a> &amp;uv0, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector2f.html">NLMISC::CVector2f</a> &amp;uv1, <a class="code" href="classNL3D_1_1CPatch.html#l0">CTessFace</a> *linkTo);
01107 
01108         <font class="comment">// @}</font>
01109 
01110 
01111 
01113         <font class="comment">// @{</font>
01114 
01115 
01116         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_0">computeDisplaceRawInteger</a>(sint ts, sint tt, sint ms, sint mt) <font class="keyword">const</font>;
01117         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z685_1">computeDisplaceRawCoordinates</a>(<font class="keywordtype">float</font> sTile, <font class="keywordtype">float</font> tTile, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>,
01118         sint &amp;ts, sint &amp;tt, sint &amp;ms, sint &amp;mt) <font class="keyword">const</font>;
01124         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_2">computeDisplaceRaw</a>(<font class="keywordtype">float</font> sTile, <font class="keywordtype">float</font> tTile, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) <font class="keyword">const</font>;
01128         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_3">computeDisplaceRawOnNeighbor</a>(<font class="keywordtype">float</font> sTile, <font class="keywordtype">float</font> tTile, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) <font class="keyword">const</font>;
01129 
01130 
01133         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_4">computeDisplaceInteriorSmooth</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>) <font class="keyword">const</font>;
01136         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_5">computeDisplaceEdgeSmooth</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, sint8 smoothBorderX, sint8 smoothBorderY) <font class="keyword">const</font>;
01139         <font class="keywordtype">float</font>           <a class="code" href="classNL3D_1_1CPatch.html#z685_6">computeDisplaceCornerSmooth</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, sint8 smoothBorderX, sint8 smoothBorderY) <font class="keyword">const</font>;
01140 
01141 
01144         CVector         <a class="code" href="classNL3D_1_1CPatch.html#z685_7">computeNormalEdgeSmooth</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, sint8 smoothBorderX, sint8 smoothBorderY) <font class="keyword">const</font>;
01147         CVector         <a class="code" href="classNL3D_1_1CPatch.html#z685_8">computeNormalCornerSmooth</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, sint8 smoothBorderX, sint8 smoothBorderY) <font class="keyword">const</font>;
01150         CVector         <a class="code" href="classNL3D_1_1CPatch.html#z685_9">computeNormalOnNeighbor</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, uint edgeExclude) <font class="keyword">const</font>;
01151 
01152 
01156         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z685_10">computeNoise</a>(<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, CVector &amp;displace) <font class="keyword">const</font>;
01157 
01158         <font class="comment">// @}</font>
01159 
01160 
01161         <font class="comment">// From tile coordinates, return the tessBlockId, and the id of the material in this tessBlock.</font>
01162         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#c35">computeTbTm</a>(uint &amp;numtb, uint &amp;numtm, uint ts, uint tt);
01163 
01164 
01166         <font class="comment">// @{</font>
01167 
01169         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z686_0">createVegetableBlock</a>(uint numTb, uint ts, uint tt);
01171         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z686_1">releaseVegetableBlock</a>(uint numTb);
01172 
01173         <font class="comment">/*</font>
01174 <font class="comment">                generate the vegetables for a given tile in the vegetable manager.</font>
01175 <font class="comment">                instances are added to vegetIg.</font>
01176 <font class="comment">                Warning! Use OptFastFloor()! So call must be enclosed with a OptFastFloorBegin()/OptFastFloorEnd().</font>
01177 <font class="comment">        */</font>
01178         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z686_2">generateTileVegetable</a>(CVegetableInstanceGroup *vegetIg, uint distType, uint ts, uint tt,
01179                 CLandscapeVegetableBlockCreateContext &amp;vbCreateCtx);
01180 
01181         <font class="comment">// same as computeTileLightmapPrecomputed(), but brut result, not modified by colorTable.</font>
01182         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z686_3">getTileLumelmapPrecomputed</a>(uint ts, uint tt, uint8 *dest, uint <a class="code" href="driver__opengl__extension__def_8h.html#a374">stride</a>);
01186         <font class="keywordtype">void</font>            <a class="code" href="classNL3D_1_1CPatch.html#z686_4">getTileLumelmapPixelPrecomputed</a>(uint ts, uint tt, uint <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, uint8 &amp;dest) <font class="keyword">const</font>;
01187 
01188         <font class="comment">// @}</font>
01189 
01190 
01192         <font class="comment">// @{</font>
<a name="l01193"></a><a class="code" href="classNL3D_1_1CPatch.html#z687_0">01193</a>         <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a>          *<a class="code" href="classNL3D_1_1CPatch.html#z687_0">_ULNearPrec</a>;
<a name="l01194"></a><a class="code" href="classNL3D_1_1CPatch.html#z687_1">01194</a>         <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a>          *<a class="code" href="classNL3D_1_1CPatch.html#z687_1">_ULNearNext</a>;
01195         <font class="comment">// @}</font>
01196 
01197 
01199         <font class="comment">// @{</font>
01200 
<a name="l01205"></a><a class="code" href="classNL3D_1_1CPatch.html#z688_2">01205</a>         CPatchDLMContext        *<a class="code" href="classNL3D_1_1CPatch.html#z688_2">_DLMContext</a>;
01206 
<a name="l01210"></a><a class="code" href="classNL3D_1_1CPatch.html#z688_3">01210</a>         sint                            <a class="code" href="classNL3D_1_1CPatch.html#z688_3">_DLMContextRefCount</a>;
01211 
01213         <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CPatch.html#z688_0">addRefDLMContext</a>();
01215         <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CPatch.html#z688_1">decRefDLMContext</a>(uint count= 1);
01216 
01217         <font class="comment">// @}</font>
01218 
01219 
01220 <font class="keyword">private</font>:
01221         <font class="comment">// NB: All global render info are stored in CTessFace class static members....</font>
01222 
01223         <font class="comment">// The Patch cache (may be a short list/vector later...).</font>
01224         <font class="keyword">static</font>  CBezierPatch    <a class="code" href="classNL3D_1_1CPatch.html#r1">CachePatch</a>;
01225         <font class="comment">// For cahcing.</font>
01226         <font class="keyword">static</font>  <font class="keyword">const</font> <a class="code" href="classNL3D_1_1CPatch.html#a0">CPatch</a>    *<a class="code" href="classNL3D_1_1CPatch.html#r2">LastPatch</a>;
01227 
01228 <font class="keyword">public</font>:
01229         <font class="comment">// unpack the patch into the cache.</font>
01230         CBezierPatch    *<a class="code" href="classNL3D_1_1CPatch.html#a45">unpackIntoCache</a>() <font class="keyword">const</font>;
01231 
01232 };
01233 
01234 
01235 } <font class="comment">// NL3D</font>
01236 
01237 
01238 <font class="preprocessor">#endif // NL_PATCH_H</font>
01239 <font class="preprocessor"></font>
01240 <font class="comment">/* End of patch.h */</font>
</pre></div>

<!-- footer -->
<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>