aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/nel_patch_mesh_h-source.html
blob: 9c095c6059f5bbfd2515a3e06ebddcd77751ea16 (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
<!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.2 on Tue May 29 22:01:15 2001 -->
<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>nel_patch_mesh.h</h1><a href="nel_patch_mesh_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.
</font>00008 <font class="comment"> *
</font>00009 <font class="comment"> * This file is part of NEVRAX NEL.
</font>00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify
</font>00011 <font class="comment"> * it under the terms of the GNU General Public License as published by
</font>00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)
</font>00013 <font class="comment"> * any later version.
</font>00014 <font class="comment">
</font>00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but
</font>00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of
</font>00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
</font>00018 <font class="comment"> * General Public License for more details.
</font>00019 <font class="comment">
</font>00020 <font class="comment"> * You should have received a copy of the GNU General Public License
</font>00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the
</font>00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
</font>00023 <font class="comment"> * MA 02111-1307, USA.
</font>00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#ifndef __RYKOL_PATCH_MESH_H
</font>00027 <font class="preprocessor"></font><font class="preprocessor">#define __RYKOL_PATCH_MESH_H
</font>00028 <font class="preprocessor"></font>
00029 <font class="preprocessor">#pragma warning (disable : 4786)
</font>00030 <font class="preprocessor"></font><font class="preprocessor">#include &lt;vector&gt;</font>
00031 <font class="preprocessor">#include &lt;set&gt;</font>
00032 <font class="preprocessor">#include &lt;string&gt;</font>
00033 <font class="preprocessor">#include &lt;<a class="code" href="debug_h.html">nel/misc/debug.h</a>&gt;</font>
00034 <font class="preprocessor">#include &lt;<a class="code" href="tile_bank_h.html">nel/3d/tile_bank.h</a>&gt;</font>
00035 <font class="preprocessor">#include &lt;<a class="code" href="file_h.html">nel/misc/file.h</a>&gt;</font>
00036 <font class="preprocessor">#include &lt;<a class="code" href="rgba_h.html">nel/misc/rgba.h</a>&gt;</font>
00037 <font class="preprocessor">#include "<a class="code" href="path_mesh_alloc_h.html">path_mesh_alloc.h</a>"</font>
00038 
00039 <font class="comment">//#define USE_CACHE</font>
00040 
00041 <font class="keyword">namespace</font> NL3D
00042 {
00043 <font class="keyword">class </font>CZone;
00044 };
00045 
00046 <font class="keyword">typedef</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> uint;
00047 
<a name="l00048"></a><a class="code" href="nel_patch_mesh_h.html#a0">00048</a> <font class="preprocessor">#define RYKOLPATCHOBJ_CLASS_ID  Class_ID(0x368c679f, 0x711c22ee)
</font>00049 <font class="preprocessor"></font>
00050 <font class="keyword">extern</font> TCHAR *<a class="code" href="plugin_max_nel_export_DllEntry_cpp.html#a6">GetString</a>(<font class="keywordtype">int</font> id);
00051 
00052 <font class="keyword">extern</font> HINSTANCE hInstance;
00053 
00054 <font class="keyword">extern</font> <a class="code" href="class_ClassDesc.html">ClassDesc</a>* <a class="code" href="plugin_max_nel_patch_converter_DllEntry_cpp.html#a2">GetRPODesc</a>();
00055 
<a name="l00056"></a><a class="code" href="nel_patch_mesh_h.html#a1">00056</a> <font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_7 7
</font><a name="l00057"></a><a class="code" href="nel_patch_mesh_h.html#a2">00057</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_6 6
</font><a name="l00058"></a><a class="code" href="nel_patch_mesh_h.html#a3">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_5 5
</font><a name="l00059"></a><a class="code" href="nel_patch_mesh_h.html#a4">00059</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_4 4
</font><a name="l00060"></a><a class="code" href="nel_patch_mesh_h.html#a5">00060</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_3 3
</font><a name="l00061"></a><a class="code" href="nel_patch_mesh_h.html#a6">00061</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_2 2
</font><a name="l00062"></a><a class="code" href="nel_patch_mesh_h.html#a7">00062</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION_1 1
</font><a name="l00063"></a><a class="code" href="nel_patch_mesh_h.html#a8">00063</a> <font class="preprocessor"></font><font class="preprocessor">#define RPATCHMESH_SERIALIZE_VERSION RPATCHMESH_SERIALIZE_VERSION_7
</font>00064 <font class="preprocessor"></font>
<a name="l00065"></a><a class="code" href="nel_patch_mesh_h.html#a9">00065</a> <font class="preprocessor">#define EP_OBJECT       0
</font><a name="l00066"></a><a class="code" href="nel_patch_mesh_h.html#a10">00066</a> <font class="preprocessor"></font><font class="preprocessor">#define EP_VERTEX       1
</font><a name="l00067"></a><a class="code" href="nel_patch_mesh_h.html#a11">00067</a> <font class="preprocessor"></font><font class="preprocessor">#define EP_EDGE         2
</font><a name="l00068"></a><a class="code" href="nel_patch_mesh_h.html#a12">00068</a> <font class="preprocessor"></font><font class="preprocessor">#define EP_PATCH        3
</font><a name="l00069"></a><a class="code" href="nel_patch_mesh_h.html#a13">00069</a> <font class="preprocessor"></font><font class="preprocessor">#define EP_TILE         4
</font>00070 <font class="preprocessor"></font>
<a name="l00071"></a><a class="code" href="nel_patch_mesh_h.html#a14">00071</a> <font class="preprocessor">#define PO_TILE         4
</font>00072 <font class="preprocessor"></font>
<a name="l00073"></a><a class="code" href="nel_patch_mesh_h.html#a15">00073</a> <font class="preprocessor">#define PATCH_HIT_TILE (PATCH_HIT_INTERIOR+1)
</font>00074 <font class="preprocessor"></font>
<a name="l00075"></a><a class="code" href="nel_patch_mesh_h.html#a16">00075</a> <font class="preprocessor">#define MAX_TILE_IN_PATCH 16
</font><a name="l00076"></a><a class="code" href="nel_patch_mesh_h.html#a17">00076</a> <font class="preprocessor"></font><font class="preprocessor">#define NUM_TILE_SEL (MAX_TILE_IN_PATCH*MAX_TILE_IN_PATCH)
</font>00077 <font class="preprocessor"></font>
00078 <font class="preprocessor">#pragma warning (disable : 4786)
</font>00079 <font class="preprocessor"></font>
00080 <font class="comment">// ------------------------------------------------------------------------------------------------------------------------------------------------</font>
00081 
00082 <font class="comment">/*
</font>00083 <font class="comment">
</font>00084 <font class="comment">  Here the user infos (UI) for face, edge, vertex, vertex-face.
</font>00085 <font class="comment">  All these infos are stored in one class (RPO_UI) through vectors 
</font>00086 <font class="comment">
</font>00087 <font class="comment">
</font>00088 <font class="comment">*/</font>
00089 
00090 <font class="keyword">class </font><a class="code" href="class_CVertexNeighborhood.html">CVertexNeighborhood</a>;
00091 
00092 <font class="keywordtype">int</font> <a class="code" href="nel_patch_mesh_cpp.html#a16">CheckBind</a> (<font class="keywordtype">int</font> nVert, <font class="keywordtype">int</font> nSeg, <font class="keywordtype">int</font>&amp; v0, <font class="keywordtype">int</font>&amp; v1, <font class="keywordtype">int</font>&amp; v2, <font class="keywordtype">int</font>&amp; v3, <font class="keyword">const</font> <a class="code" href="class_CVertexNeighborhood.html">CVertexNeighborhood</a>&amp; tab, <font class="keyword">const</font> PatchMesh&amp; patch, <font class="keywordtype">bool</font> bAssert, <font class="keywordtype">bool</font> bCreate);
00093 std::string <a class="code" href="nel_patch_mesh_cpp.html#a7">GetBankPathName</a> ();
00094 <font class="keywordtype">int</font> <a class="code" href="nel_patch_mesh_cpp.html#a8">GetBankTileSetSet</a> ();
00095 <font class="keywordtype">void</font> <a class="code" href="nel_patch_mesh_cpp.html#a9">SetBankPathName</a> (<font class="keyword">const</font> std::string&amp; path);
00096 <font class="keywordtype">void</font> <a class="code" href="nel_patch_mesh_cpp.html#a10">SetBankTileSetSet</a> (<font class="keywordtype">int</font>);
00097 <font class="keywordtype">int</font> <a class="code" href="nel_patch_mesh_cpp.html#a18">WhereIsTheEdge</a> (<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nEdge, <font class="keyword">const</font> PatchMesh&amp; patch);
00098 
00099 <font class="keyword">extern</font> <a class="code" href="class_NL3D__CTileBank.html">NL3D::CTileBank</a> bank;
00100 
<a name="l00101"></a><a class="code" href="nel_patch_mesh_h.html#a18">00101</a> <font class="preprocessor">#define RPO_DEFAULT_TESSEL 4
</font>00102 <font class="preprocessor"></font>
<a name="l00103"></a><a class="code" href="nel_patch_mesh_h.html#a27">00103</a> <font class="keyword">enum</font> typeBind { BIND_25=0, BIND_75, BIND_50, BIND_SINGLE, BIND_COUNT, BIND_ALIGN=0xffffffff };
00104 
00105 <font class="keyword">extern</font> <font class="keywordtype">float</font> bindWhere[BIND_COUNT];
00106 
<a name="l00107"></a><a class="code" href="class_bindingDesc.html">00107</a> <font class="keyword">class </font><a class="code" href="class_bindingDesc.html">bindingDesc</a>
00108 {
00109 <font class="keyword">public</font>:
<a name="l00110"></a><a class="code" href="class_bindingDesc.html#m0">00110</a>         uint8                   bBinded;                        <font class="comment">// true, this vertex is binded, false, is not. default 0</font>
<a name="l00111"></a><a class="code" href="class_bindingDesc.html#m1">00111</a>         uint8                   nType;                          <font class="comment">// Type of the vertex</font>
<a name="l00112"></a><a class="code" href="class_bindingDesc.html#m2">00112</a>         uint16                  nPatch;                         <font class="comment">// # of the patch on which the vertex is binded. Valid only if bBinded==true.</font>
<a name="l00113"></a><a class="code" href="class_bindingDesc.html#m3">00113</a>         uint16                  nEdge;                          <font class="comment">// # of the edge in the patch on which the vertex is binded. Valid only if bBinded==true.</font>
<a name="l00114"></a><a class="code" href="class_bindingDesc.html#m4">00114</a>         uint16                  nPrimVert;                      <font class="comment">// # of the primary vertex in this bind</font>
<a name="l00115"></a><a class="code" href="class_bindingDesc.html#m5">00115</a>         uint16                  nBefore;                        <font class="comment">// # of the before tangant</font>
<a name="l00116"></a><a class="code" href="class_bindingDesc.html#m6">00116</a>         uint16                  nBefore2;                       <font class="comment">// # of the before tangant</font>
<a name="l00117"></a><a class="code" href="class_bindingDesc.html#m7">00117</a>         uint16                  nAfter;                         <font class="comment">// # of the after tangant</font>
<a name="l00118"></a><a class="code" href="class_bindingDesc.html#m8">00118</a>         uint16                  nAfter2;                        <font class="comment">// # of the after tangant</font>
<a name="l00119"></a><a class="code" href="class_bindingDesc.html#m9">00119</a>         uint16                  nT;                                     <font class="comment">// # of the tangant of the binded edge</font>
<a name="l00120"></a><a class="code" href="class_bindingDesc.html#m10">00120</a>         uint16                  fnslmq;
00121         <font class="comment">//float                 fWhere;                         // Where on the edge the vertex is binded. Value must be 0.25f, 0.5f or 0.75f.</font>
00122                                                                                 <font class="comment">// Valid only if bBinded==true.</font>
00123 };
00124 
<a name="l00125"></a><a class="code" href="class_tileIndex.html">00125</a> <font class="keyword">class </font><a class="code" href="class_tileIndex.html">tileIndex</a>
00126 {
00127 <font class="keyword">public</font>:
<a name="l00128"></a><a class="code" href="class_tileIndex.html#a0">00128</a>         <a class="code" href="class_tileIndex.html#a0">tileIndex</a> ()<font class="keyword">
</font>00129 <font class="keyword">        </font>{}
<a name="l00130"></a><a class="code" href="class_tileIndex.html#a1">00130</a>         <a class="code" href="class_tileIndex.html#a0">tileIndex</a> ( <font class="keywordtype">bool</font> invert, <font class="keywordtype">int</font> tile, <font class="keywordtype">int</font> rotate)<font class="keyword">
</font>00131 <font class="keyword">        </font>{
00132                 Invert=invert;
00133                 Tile=tile;
00134                 Rotate=rotate;
00135         }
<a name="l00136"></a><a class="code" href="class_tileIndex.html#m0">00136</a>         uint Tile:16;
<a name="l00137"></a><a class="code" href="class_tileIndex.html#m1">00137</a>         <font class="keywordtype">int</font> Rotate:8;
<a name="l00138"></a><a class="code" href="class_tileIndex.html#m2">00138</a>         <font class="keywordtype">int</font> Invert:1;
00139 };
00140 
<a name="l00141"></a><a class="code" href="class_tileDesc.html">00141</a> <font class="keyword">class </font><a class="code" href="class_tileDesc.html">tileDesc</a>
00142 {
<a name="l00143"></a><a class="code" href="nel_patch_mesh_h.html#a19">00143</a> <font class="preprocessor">#define CASE_MASK 0x7
</font><a name="l00144"></a><a class="code" href="class_tileDesc.html#l0">00144</a> <font class="preprocessor"></font>        <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="class_RPatchMesh.html">RPatchMesh</a>;
00145 <font class="keyword">public</font>:
<a name="l00146"></a><a class="code" href="class_tileDesc.html#a0">00146</a>         <font class="keywordtype">void</font> <a class="code" href="class_tileDesc.html#a0">setTile</a> (<font class="keywordtype">int</font> num, <font class="keywordtype">int</font> ncase, <a class="code" href="class_tileIndex.html">tileIndex</a> tile0, <a class="code" href="class_tileIndex.html">tileIndex</a> tile1, <a class="code" href="class_tileIndex.html">tileIndex</a> tile2)<font class="keyword">
</font>00147 <font class="keyword">        </font>{
00148                 _Num=num;
00149                 _MatIDTab[0]=tile0;
00150                 _MatIDTab[1]=tile1;
00151                 _MatIDTab[2]=tile2;
00152                 <a class="code" href="class_tileDesc.html#a8">setCase</a> (ncase);
00153         }
<a name="l00154"></a><a class="code" href="class_tileDesc.html#a1">00154</a>         <a class="code" href="class_tileIndex.html">tileIndex</a>&amp; <a class="code" href="class_tileDesc.html#a1">getLayer</a> (<font class="keywordtype">int</font> num)<font class="keyword">
</font>00155 <font class="keyword">        </font>{
00156                 <font class="keywordflow">return</font> _MatIDTab[num];
00157         }
<a name="l00158"></a><a class="code" href="class_tileDesc.html#a2">00158</a>         <font class="keyword">const</font> <a class="code" href="class_tileIndex.html">tileIndex</a>&amp; <a class="code" href="class_tileDesc.html#a1">getLayer</a> (<font class="keywordtype">int</font> num)<font class="keyword"> const
</font>00159 <font class="keyword">        </font>{
00160                 <font class="keywordflow">return</font> _MatIDTab[num];
00161         }
<a name="l00162"></a><a class="code" href="class_tileDesc.html#a3">00162</a>         <font class="keywordtype">int</font> <a class="code" href="class_tileDesc.html#a3">getNumLayer</a> ()<font class="keyword">
</font>00163 <font class="keyword">        </font>{
00164                 <font class="keywordflow">return</font> _Num;
00165         }
<a name="l00166"></a><a class="code" href="class_tileDesc.html#a4">00166</a>         <font class="keywordtype">void</font> <a class="code" href="class_tileDesc.html#a4">setEmpty</a> ()<font class="keyword">
</font>00167 <font class="keyword">        </font>{
00168                 _Num=0;
00169                 _Flags=0;
00170         }
<a name="l00171"></a><a class="code" href="class_tileDesc.html#a5">00171</a>         <font class="keywordtype">bool</font> <a class="code" href="class_tileDesc.html#a5">isEmpty</a> ()<font class="keyword">
</font>00172 <font class="keyword">        </font>{
00173                 <font class="keywordflow">return</font> _Num==0;
00174         }
<a name="l00175"></a><a class="code" href="class_tileDesc.html#a6">00175</a>         <font class="keywordtype">void</font> <a class="code" href="class_tileDesc.html#a6">rotate</a> (<font class="keywordtype">int</font> nRotate)<font class="keyword">
</font>00176 <font class="keyword">        </font>{
00177                 <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i=0; i&lt;3; i++)
00178                 {
00179                         _MatIDTab[i].Rotate+=nRotate;
00180                         _MatIDTab[i].Rotate&amp;=3;
00181                 }
00182         }
<a name="l00183"></a><a class="code" href="class_tileDesc.html#a7">00183</a>         <font class="keywordtype">int</font> <a class="code" href="class_tileDesc.html#a7">getCase</a>()<font class="keyword"> const
</font>00184 <font class="keyword">        </font>{
00185                 <font class="keywordflow">return</font> _Flags&amp;CASE_MASK;
00186         }
<a name="l00187"></a><a class="code" href="class_tileDesc.html#a8">00187</a>         <font class="keywordtype">void</font> <a class="code" href="class_tileDesc.html#a8">setCase</a>(<font class="keywordtype">int</font> nCase)<font class="keyword">
</font>00188 <font class="keyword">        </font>{
00189                 <a class="code" href="debug_h.html#a6">nlassert</a> ((nCase&gt;=0)&amp;&amp;(nCase&lt;5));
00190                 _Flags&amp;=~CASE_MASK;
00191                 _Flags|=nCase;
00192         }
00193 <font class="keyword">private</font>:
<a name="l00194"></a><a class="code" href="class_tileDesc.html#o0">00194</a>         <a class="code" href="class_tileIndex.html">tileIndex</a> _MatIDTab[3];
<a name="l00195"></a><a class="code" href="class_tileDesc.html#o1">00195</a>         USHORT  _Num;
<a name="l00196"></a><a class="code" href="class_tileDesc.html#o2">00196</a>         USHORT  _Flags;
00197 };
00198 
<a name="l00199"></a><a class="code" href="class_UI_VERTEX.html">00199</a> <font class="keyword">class </font><a class="code" href="class_UI_VERTEX.html">UI_VERTEX</a>
00200 {
00201 <font class="keyword">public</font>:
<a name="l00202"></a><a class="code" href="class_UI_VERTEX.html#m0">00202</a>         <a class="code" href="class_bindingDesc.html">bindingDesc</a>             Binding;                        <font class="comment">// Binding struct for the vertex</font>
<a name="l00203"></a><a class="code" href="class_UI_VERTEX.html#a0">00203</a>         <font class="keywordtype">void</font> <a class="code" href="class_UI_VERTEX.html#a0">Init</a> ()<font class="keyword">
</font>00204 <font class="keyword">        </font>{
00205                 Binding.bBinded=<font class="keyword">false</font>;
00206         }
00207 };
00208 
00209 <font class="comment">// Edge flags for no smoothing</font>
<a name="l00210"></a><a class="code" href="nel_patch_mesh_h.html#a20">00210</a> <font class="preprocessor">#define UI_EDGE_FLAGS_NO_SMOOTH_MASK    0x1
</font>00211 <font class="preprocessor"></font>
00212 <font class="comment">// User info for edge</font>
<a name="l00213"></a><a class="code" href="class_CEdgeInfo.html">00213</a> <font class="keyword">class </font><a class="code" href="class_CEdgeInfo.html">CEdgeInfo</a>
00214 {
00215 <font class="keyword">public</font>:
00216         <font class="comment">// Default Ctor</font>
<a name="l00217"></a><a class="code" href="class_CEdgeInfo.html#a0">00217</a>         <a class="code" href="class_CEdgeInfo.html#a0">CEdgeInfo</a> ()<font class="keyword">
</font>00218 <font class="keyword">        </font>{
00219                 <font class="comment">// No flags </font>
00220                 Flags=0;
00221         }
00222 
00223         <font class="comment">// Flags for a edge</font>
<a name="l00224"></a><a class="code" href="class_CEdgeInfo.html#m0">00224</a>         uint32  Flags;
00225 };
00226 
<a name="l00227"></a><a class="code" href="class_UI_PATCH.html">00227</a> <font class="keyword">class </font><a class="code" href="class_UI_PATCH.html">UI_PATCH</a>
00228 {
00229 <font class="keyword">public</font>:
<a name="l00230"></a><a class="code" href="class_UI_PATCH.html#m0">00230</a>         <font class="keywordtype">int</font>                                     NbTilesU;               <font class="comment">// Default = 3 (2^3 = 8)</font>
<a name="l00231"></a><a class="code" href="class_UI_PATCH.html#m1">00231</a>         <font class="keywordtype">int</font>                                     NbTilesV;               <font class="comment">// Default = 3 (2^3 = 8)</font>
00232 
00233 <font class="keyword">private</font>:
00234         <font class="comment">// Tabl for tile number ( size: (2^NbTilesU) * (2^NbTilesV) ) default, all 0</font>
<a name="l00235"></a><a class="code" href="class_UI_PATCH.html#o0">00235</a>         <a class="code" href="class_tileDesc.html">tileDesc</a>                        Tile[16*16];
00236 
00237         <font class="comment">// Tabl for color on tile ( size: ((2^NbTilesU)+1) * ((2^NbTilesV)+1) ) default, all 0xffffffff. Color in 32 bits ARGB.</font>
<a name="l00238"></a><a class="code" href="class_UI_PATCH.html#o1">00238</a>         uint                            Colors[17*17];
00239 
00240         <font class="comment">// Info by edges</font>
<a name="l00241"></a><a class="code" href="class_UI_PATCH.html#o2">00241</a>         <a class="code" href="class_CEdgeInfo.html">CEdgeInfo</a>                       _Edges[4];
00242 <font class="keyword">public</font>:
00243         <font class="comment">// Return  a tileDesc ref</font>
<a name="l00244"></a><a class="code" href="class_UI_PATCH.html#a0">00244</a>         <a class="code" href="class_tileDesc.html">tileDesc</a>&amp; <a class="code" href="class_UI_PATCH.html#a0">getTileDesc</a> (uint iD)<font class="keyword">
</font>00245 <font class="keyword">        </font>{
00246                 <font class="comment">// Debug</font>
00247                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getTileSize ());
00248 
00249                 <font class="comment">// Return the ref</font>
00250                 <font class="keywordflow">return</font> Tile[iD];
00251         }
00252 
00253         <font class="comment">// Return a const tileDesc ref</font>
<a name="l00254"></a><a class="code" href="class_UI_PATCH.html#a1">00254</a>         <font class="keyword">const</font> <a class="code" href="class_tileDesc.html">tileDesc</a>&amp; <a class="code" href="class_UI_PATCH.html#a0">getTileDesc</a> (uint iD)<font class="keyword"> const
</font>00255 <font class="keyword">        </font>{
00256                 <font class="comment">// Debug</font>
00257                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getTileSize ());
00258 
00259                 <font class="comment">// Return the ref</font>
00260                 <font class="keywordflow">return</font> Tile[iD];
00261         }
00262 
00263         <font class="comment">// Return  a color ref</font>
<a name="l00264"></a><a class="code" href="class_UI_PATCH.html#a2">00264</a>         uint <a class="code" href="class_UI_PATCH.html#a2">getColor</a> (uint iD)<font class="keyword"> const
</font>00265 <font class="keyword">        </font>{
00266                 <font class="comment">// Debug</font>
00267                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getColorSize ());
00268 
00269                 <font class="comment">// Return the ref</font>
00270                 <font class="keywordflow">return</font> Colors[iD];
00271         }
00272 
00273         <font class="comment">// Return a const tileDesc ref</font>
<a name="l00274"></a><a class="code" href="class_UI_PATCH.html#a3">00274</a>         <font class="keywordtype">void</font> <a class="code" href="class_UI_PATCH.html#a3">setColor</a> (uint iD, uint newColor)<font class="keyword">
</font>00275 <font class="keyword">        </font>{
00276                 <font class="comment">// Debug</font>
00277                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getColorSize ());
00278 
00279                 <font class="comment">// Return the ref</font>
00280                 Colors[iD]=newColor;
00281         }
00282 
00283         <font class="comment">// Return the size of the Tile array</font>
<a name="l00284"></a><a class="code" href="class_UI_PATCH.html#a4">00284</a>         uint <a class="code" href="class_UI_PATCH.html#a4">getTileSize</a> ()<font class="keyword"> const
</font>00285 <font class="keyword">        </font>{
00286                 <font class="keywordflow">return</font> (1&lt;&lt;NbTilesU)*(1&lt;&lt;NbTilesV);
00287         }
00288 
00289         <font class="comment">// Return the size of the Color array</font>
<a name="l00290"></a><a class="code" href="class_UI_PATCH.html#a5">00290</a>         uint <a class="code" href="class_UI_PATCH.html#a5">getColorSize</a> ()<font class="keyword"> const
</font>00291 <font class="keyword">        </font>{
00292                 <font class="keywordflow">return</font> ((1&lt;&lt;NbTilesU)+1)*((1&lt;&lt;NbTilesV)+1);
00293         }
00294 
00295         <font class="comment">// Return edge flags</font>
<a name="l00296"></a><a class="code" href="class_UI_PATCH.html#a6">00296</a>         <font class="keywordtype">bool</font> <a class="code" href="class_UI_PATCH.html#a6">getEdgeFlag</a> (uint edge)<font class="keyword">
</font>00297 <font class="keyword">        </font>{
00298                 <a class="code" href="debug_h.html#a6">nlassert</a> ((edge&gt;=0)&amp;&amp;(edge&lt;4));
00299                 <font class="keywordflow">return</font> (_Edges[edge].Flags&amp;UI_EDGE_FLAGS_NO_SMOOTH_MASK)!=0;
00300         }
00301 
00302         <font class="comment">// Set edge flags</font>
<a name="l00303"></a><a class="code" href="class_UI_PATCH.html#a7">00303</a>         <font class="keywordtype">void</font> <a class="code" href="class_UI_PATCH.html#a7">setEdgeFlag</a> (uint edge, <font class="keywordtype">bool</font> flags)<font class="keyword">
</font>00304 <font class="keyword">        </font>{
00305                 <a class="code" href="debug_h.html#a6">nlassert</a> ((edge&gt;=0)&amp;&amp;(edge&lt;4));
00306                 <font class="comment">// Erase and set the flag</font>
00307                 _Edges[edge].Flags&amp;=~UI_EDGE_FLAGS_NO_SMOOTH_MASK;
00308                 _Edges[edge].Flags|=(uint32)flags;
00309         }
00310 
00311         <font class="comment">// Get edge</font>
<a name="l00312"></a><a class="code" href="class_UI_PATCH.html#a8">00312</a>         <a class="code" href="class_CEdgeInfo.html">CEdgeInfo</a>&amp; <a class="code" href="class_UI_PATCH.html#a8">getEdge</a> (uint edge)<font class="keyword">
</font>00313 <font class="keyword">        </font>{
00314                 <font class="keywordflow">return</font> _Edges[edge];
00315         }
00316 
00317         <font class="comment">// Get edge</font>
<a name="l00318"></a><a class="code" href="class_UI_PATCH.html#a9">00318</a>         <font class="keyword">const</font> <a class="code" href="class_CEdgeInfo.html">CEdgeInfo</a>&amp; <a class="code" href="class_UI_PATCH.html#a8">getEdge</a> (uint edge)<font class="keyword"> const
</font>00319 <font class="keyword">        </font>{
00320                 <font class="keywordflow">return</font> _Edges[edge];
00321         }
00322 <font class="keyword">public</font>:
<a name="l00323"></a><a class="code" href="class_UI_PATCH.html#a10">00323</a>         <font class="keywordtype">void</font> <a class="code" href="class_UI_PATCH.html#a10">Init</a> (<font class="keywordtype">int</font> nU=RPO_DEFAULT_TESSEL, <font class="keywordtype">int</font> nV=RPO_DEFAULT_TESSEL, <font class="keywordtype">bool</font> bKeep=<font class="keyword">false</font>)<font class="keyword">
</font>00324 <font class="keyword">        </font>{
00325                 <font class="comment">// Copy old patch infos</font>
00326                 <a class="code" href="class_UI_PATCH.html">UI_PATCH</a> old=*<font class="keyword">this</font>;
00327 
00328                 <font class="comment">// New size</font>
00329                 <font class="keywordtype">int</font> nOldU=old.NbTilesU;
00330                 <font class="keywordtype">int</font> nOldV=old.NbTilesV;
00331                 <font class="keywordtype">int</font> nNewU=1&lt;&lt;nU;
00332                 <font class="keywordtype">int</font> nNewV=1&lt;&lt;nV;
00333                 NbTilesU=nU;
00334                 NbTilesV=nV;
00335                 <font class="keywordtype">int</font> nTileCount=(1&lt;&lt;NbTilesU)*(1&lt;&lt;NbTilesV);
00336                 <font class="keywordtype">int</font> nVertexCount=((1&lt;&lt;NbTilesU)+1)*((1&lt;&lt;NbTilesV)+1);
00337 
00338                 <font class="comment">// Keep old infos</font>
00339                 <font class="keywordflow">if</font> (bKeep)
00340                 {
00341                         <font class="comment">// Copy old coord...</font>
00342                         <font class="keywordtype">int</font> i,j;
00343                         <font class="keywordtype">int</font> nMinU=<a class="code" href="bit_set_cpp.html#a0">std::min</a> (nOldU, nNewU);
00344                         <font class="keywordtype">int</font> nMinV=<a class="code" href="bit_set_cpp.html#a0">std::min</a> (nOldV, nNewV);
00345                         <font class="keywordflow">for</font> (j=0; j&lt;nMinV; j++)
00346                         {
00347                                 <font class="keywordflow">for</font> (i=0; i&lt;nMinU; i++)
00348                                 {
00349                                         Tile[i+j*nNewU]=old.<a class="code" href="class_UI_PATCH.html#a0">getTileDesc</a> (i+j*nOldU);
00350                                 }
00351                                 <font class="keywordflow">for</font> (; i&lt;nNewU; i++)
00352                                 {
00353                                         Tile[i+j*nNewU].<a class="code" href="class_tileDesc.html#a4">setEmpty</a> ();
00354                                 }
00355                         }
00356                         <font class="keywordflow">for</font> (; j&lt;nNewV; j++)
00357                         {
00358                                 <font class="keywordflow">for</font> (i=0; i&lt;nNewU; i++)
00359                                 {
00360                                         Tile[i+j*nNewU].<a class="code" href="class_tileDesc.html#a4">setEmpty</a> ();
00361                                 }
00362                         }
00363                         <font class="keywordflow">for</font> (j=0; j&lt;nMinV+1; j++)
00364                         {
00365                                 <font class="keywordflow">for</font> (i=0; i&lt;nMinU+1; i++)
00366                                 {
00367                                         Colors[i+j*(nNewU+1)]=old.<a class="code" href="class_UI_PATCH.html#a2">getColor</a> (i+j*(nOldU+1));
00368                                 }
00369                                 <font class="keywordflow">for</font> (; i&lt;nNewU+1; i++)
00370                                 {
00371                                         Colors[i+j*nNewU]=0xffffff;
00372                                 }
00373                         }
00374                         <font class="keywordflow">for</font> (; j&lt;nNewV+1; j++)
00375                         {
00376                                 <font class="keywordflow">for</font> (i=0; i&lt;nMinU+1; i++)
00377                                 {
00378                                         Colors[i+j*nNewU]=0xffffff;
00379                                 }
00380                         }
00381                 }
00382                 <font class="keywordflow">else</font>
00383                 {
00384                         <font class="comment">// Init new coord</font>
00385                         <font class="keywordtype">int</font> j;
00386                         <font class="keywordflow">for</font>(j=0; j&lt;nTileCount; j++)
00387                         {
00388                                 Tile[j].<a class="code" href="class_tileDesc.html#a4">setEmpty</a> ();
00389                         }
00390                         <font class="keywordflow">for</font>(j=0; j&lt;nVertexCount; j++)
00391                         {
00392                                 Colors[j]=0xffffff;
00393                         }
00394                 }
00395         }
00396 };
00397 
<a name="l00398"></a><a class="code" href="class_CPatchAllocator.html">00398</a> <font class="keyword">class </font><a class="code" href="class_CPatchAllocator.html">CPatchAllocator</a>
00399 {
00400 <font class="keyword">public</font>:
00401         <a class="code" href="class_CPatchAllocator.html#a0">CPatchAllocator</a> ();
<a name="l00402"></a><a class="code" href="class_CPatchAllocator.html#m0">00402</a>         <a class="code" href="class_CPathMeshAlloc.html">CPathMeshAlloc&lt;UI_PATCH&gt;</a>        AllocPatch;             <font class="comment">// 100 patch by mesh</font>
<a name="l00403"></a><a class="code" href="class_CPatchAllocator.html#m1">00403</a>         <a class="code" href="class_CPathMeshAlloc.html">CPathMeshAlloc&lt;UI_VERTEX&gt;</a>       AllocVertex;            <font class="comment">// 100 vertices by mesh</font>
<a name="l00404"></a><a class="code" href="class_CPatchAllocator.html#m2">00404</a>         <a class="code" href="class_CPathMeshAlloc.html">CPathMeshAlloc&lt;int&gt;</a>                     AllocInt;
00405 };
00406 
<a name="l00407"></a><a class="code" href="class_RPOTess.html">00407</a> <font class="keyword">struct </font><a class="code" href="class_RPOTess.html">RPOTess</a>
00408 {
<a name="l00409"></a><a class="code" href="class_RPOTess.html#m0">00409</a>         <font class="keywordtype">int</font>                             TileTesselLevel;
<a name="l00410"></a><a class="code" href="class_RPOTess.html#m1">00410</a>         <font class="keywordtype">bool</font>                    ModeTile;
<a name="l00411"></a><a class="code" href="class_RPOTess.html#m2">00411</a>         <font class="keywordtype">bool</font>                    KeepMapping;
<a name="l00412"></a><a class="code" href="class_RPOTess.html#m3">00412</a>         <font class="keywordtype">int</font>                             TransitionType;
00413 };
00414 
<a name="l00415"></a><a class="code" href="class_CBankManager.html">00415</a> <font class="keyword">class </font><a class="code" href="class_CBankManager.html">CBankManager</a>
00416 {
00417 <font class="keyword">public</font>:
<a name="l00418"></a><a class="code" href="class_CBankManager.html#a0">00418</a>         <a class="code" href="class_CBankManager.html#a0">CBankManager</a> ()<font class="keyword">
</font>00419 <font class="keyword">        </font>{
00420                 _lastPath=<font class="stringliteral">""</font>;
00421         }
<a name="l00422"></a><a class="code" href="class_CBankManager.html#a1">00422</a>         <font class="keyword">const</font> <a class="code" href="class_NL3D__CTileBank.html">NL3D::CTileBank</a>&amp; <a class="code" href="class_CBankManager.html#a1">getBank</a> (std::string&amp; path=GetBankPathName ())
00423         {
00424                 <font class="keywordflow">if</font> (path!=_lastPath)
00425                 {
00426                         <font class="keywordflow">try</font>
00427                         {
00428                                 <a class="code" href="class_NLMISC__CIFile.html">NLMISC::CIFile</a> file;
00429                                 <font class="keywordflow">if</font> (file.<a class="code" href="class_NLMISC__CIFile.html#a3">open</a> (path))
00430                                 {
00431                                         _bank.<a class="code" href="class_NL3D__CTileBank.html#a14">clear</a>();
00432                                         _bank.<a class="code" href="class_NL3D__CTileBank.html#a22">serial</a> (file);
00433                                 }
00434                         }
00435                         <font class="keywordflow">catch</font> (<a class="code" href="class_NLMISC__EStream.html">NLMISC::EStream</a>&amp; excp)
00436                         {
00437                                 MessageBox (NULL, excp.what(), <font class="stringliteral">"Load error"</font>, MB_OK|MB_ICONEXCLAMATION);
00438                         }
00439                 }
00440                 <font class="keywordflow">return</font> _bank;
00441         }
00442 <font class="keyword">private</font>:
<a name="l00443"></a><a class="code" href="class_CBankManager.html#o0">00443</a>         <a class="code" href="class_NL3D__CTileBank.html">NL3D::CTileBank</a> _bank;
<a name="l00444"></a><a class="code" href="class_CBankManager.html#o1">00444</a>         std::string _lastPath;
00445 };
00446 
00447 <font class="comment">// Class container of data with copy operator</font>
<a name="l00448"></a><a class="code" href="class_CPatchMeshData.html">00448</a> <font class="keyword">class </font><a class="code" href="class_CPatchMeshData.html">CPatchMeshData</a>
00449 {
00450 <font class="keyword">public</font>:
00451         <font class="comment">// Default constructor, allocate the array</font>
00452         <a class="code" href="class_CPatchMeshData.html#a0">CPatchMeshData</a> ();
00453 
00454         <font class="comment">// Copy constructor, allocate the array</font>
00455         <a class="code" href="class_CPatchMeshData.html#a0">CPatchMeshData</a> (<font class="keyword">const</font> <a class="code" href="class_CPatchMeshData.html">CPatchMeshData</a>&amp; src);
00456         <font class="comment">// Destructor</font>
00457         <a class="code" href="class_CPatchMeshData.html#a2">~CPatchMeshData</a> ();
00458 
00459         <font class="comment">// Copy</font>
00460         <a class="code" href="class_CPatchMeshData.html">CPatchMeshData</a>&amp; <a class="code" href="class_CPatchMeshData.html#a3">operator= </a>(<font class="keyword">const</font> <a class="code" href="class_CPatchMeshData.html">CPatchMeshData</a>&amp; src);
00461 
00462         <font class="comment">// The pointers</font>
<a name="l00463"></a><a class="code" href="class_CPatchMeshData.html#m0">00463</a>         std::vector&lt;UI_PATCH&gt;   *_UIPatch;
<a name="l00464"></a><a class="code" href="class_CPatchMeshData.html#m1">00464</a>         std::vector&lt;UI_VERTEX&gt;  *_UIVertex;
<a name="l00465"></a><a class="code" href="class_CPatchMeshData.html#m2">00465</a>         std::vector&lt;int&gt;                *_MapHitToTileIndex;
00466 };
00467 
<a name="l00468"></a><a class="code" href="class_RPatchMesh.html">00468</a> <font class="keyword">class </font><a class="code" href="class_RPatchMesh.html">RPatchMesh</a>
00469 {
<a name="l00470"></a><a class="code" href="class_RPatchMesh.html#l0">00470</a>         <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="class_RPO.html">RPO</a>;
00471 <font class="keyword">public</font>:
00472         <a class="code" href="class_RPatchMesh.html#a0">RPatchMesh</a> ();
00473         <a class="code" href="class_RPatchMesh.html#a1">~RPatchMesh</a> ();
00474 
00475         <font class="comment">// Info per patch</font>
00476         
00477 <font class="keyword">private</font>:
<a name="l00478"></a><a class="code" href="class_RPatchMesh.html#o0">00478</a>         <a class="code" href="class_CPatchMeshData.html">CPatchMeshData</a>          _Data;
00479 <font class="keyword">private</font>:
00480         <font class="comment">// Remap the map hit size</font>
<a name="l00481"></a><a class="code" href="class_RPatchMesh.html#c0">00481</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c0">resizeMapHit</a> (uint size)<font class="keyword">
</font>00482 <font class="keyword">        </font>{
00483                 _Data._MapHitToTileIndex-&gt;resize (size);
00484         }
00485 
00486         <font class="comment">// Remap the map hit size</font>
<a name="l00487"></a><a class="code" href="class_RPatchMesh.html#c1">00487</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c1">setRemapEntry</a> (uint iD, uint remap)<font class="keyword">
</font>00488 <font class="keyword">        </font>{
00489                 (*_Data._MapHitToTileIndex)[iD]=remap;
00490         }
00491 
00492         <font class="comment">// Resize the user info size</font>
<a name="l00493"></a><a class="code" href="class_RPatchMesh.html#c2">00493</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c2">resizeUIPatch</a> (uint size)<font class="keyword">
</font>00494 <font class="keyword">        </font>{
00495                 _Data._UIPatch-&gt;resize (size);
00496         }
00497 
00498         <font class="comment">// Resize the user info size</font>
<a name="l00499"></a><a class="code" href="class_RPatchMesh.html#c3">00499</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c3">resizeUIVertex</a> (uint size)<font class="keyword">
</font>00500 <font class="keyword">        </font>{
00501                 _Data._UIVertex-&gt;resize (size);
00502         }
00503 <font class="keyword">public</font>:
00504         <font class="comment">// Get map hit size</font>
<a name="l00505"></a><a class="code" href="class_RPatchMesh.html#a2">00505</a>         uint <a class="code" href="class_RPatchMesh.html#a2">getMapHitSize</a> ()<font class="keyword"> const
</font>00506 <font class="keyword">        </font>{
00507                 <font class="keywordflow">return</font> _Data._MapHitToTileIndex-&gt;<a class="code" href="lexlang_cpp.html#a56">size</a> ();
00508         }
00509 
00510         <font class="comment">// Remap a triangle</font>
<a name="l00511"></a><a class="code" href="class_RPatchMesh.html#a3">00511</a>         uint <a class="code" href="class_RPatchMesh.html#a3">remapTriangle</a> (uint iD)<font class="keyword"> const
</font>00512 <font class="keyword">        </font>{
00513                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getMapHitSize ());
00514                 <font class="keywordflow">return</font> (*_Data._MapHitToTileIndex)[iD];
00515         }
00516 
00517         <font class="comment">// Get the patch user info size</font>
<a name="l00518"></a><a class="code" href="class_RPatchMesh.html#a4">00518</a>         uint <a class="code" href="class_RPatchMesh.html#a4">getUIPatchSize</a> ()<font class="keyword"> const
</font>00519 <font class="keyword">        </font>{
00520                 <font class="keywordflow">return</font> _Data._UIPatch-&gt;<a class="code" href="lexlang_cpp.html#a56">size</a>();
00521         }
00522 
00523         <font class="comment">// Get a patch user info</font>
<a name="l00524"></a><a class="code" href="class_RPatchMesh.html#a5">00524</a>         <a class="code" href="class_UI_PATCH.html">UI_PATCH</a>&amp; <a class="code" href="class_RPatchMesh.html#a5">getUIPatch</a> (uint iD)<font class="keyword">
</font>00525 <font class="keyword">        </font>{
00526                 <font class="comment">// Check</font>
00527                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getUIPatchSize ());
00528 
00529                 <font class="keywordflow">return</font> (*_Data._UIPatch)[iD];
00530         }
00531 
00532         <font class="comment">// Get a const patch user info</font>
<a name="l00533"></a><a class="code" href="class_RPatchMesh.html#a6">00533</a>         <font class="keyword">const</font> <a class="code" href="class_UI_PATCH.html">UI_PATCH</a>&amp; <a class="code" href="class_RPatchMesh.html#a5">getUIPatch</a> (uint iD)<font class="keyword"> const
</font>00534 <font class="keyword">        </font>{
00535                 <font class="comment">// Check</font>
00536                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getUIPatchSize ());
00537 
00538                 <font class="keywordflow">return</font> (*_Data._UIPatch)[iD];
00539         }
00540 
00541         <font class="comment">// Get vertex user info size</font>
<a name="l00542"></a><a class="code" href="class_RPatchMesh.html#a7">00542</a>         uint <a class="code" href="class_RPatchMesh.html#a7">getUIVertexSize</a> ()<font class="keyword"> const
</font>00543 <font class="keyword">        </font>{
00544                 <font class="keywordflow">return</font> _Data._UIVertex-&gt;<a class="code" href="lexlang_cpp.html#a56">size</a>();
00545         }
00546 
00547         <font class="comment">// Get a vertex user info</font>
<a name="l00548"></a><a class="code" href="class_RPatchMesh.html#a8">00548</a>         <a class="code" href="class_UI_VERTEX.html">UI_VERTEX</a>&amp; <a class="code" href="class_RPatchMesh.html#a8">getUIVertex</a> (uint iD)<font class="keyword">
</font>00549 <font class="keyword">        </font>{
00550                 <font class="comment">// Check</font>
00551                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getUIVertexSize ());
00552 
00553                 <font class="keywordflow">return</font> (*_Data._UIVertex)[iD];
00554         }
00555 
00556         <font class="comment">// Get a const vertex user info</font>
<a name="l00557"></a><a class="code" href="class_RPatchMesh.html#a9">00557</a>         <font class="keyword">const</font> <a class="code" href="class_UI_VERTEX.html">UI_VERTEX</a>&amp; <a class="code" href="class_RPatchMesh.html#a8">getUIVertex</a> (uint iD)<font class="keyword"> const
</font>00558 <font class="keyword">        </font>{
00559                 <font class="comment">// Check</font>
00560                 <a class="code" href="debug_h.html#a6">nlassert</a> (iD&lt;getUIVertexSize ());
00561 
00562                 <font class="keywordflow">return</font> (*_Data._UIVertex)[iD];
00563         }
00564 
00565 <font class="keyword">public</font>:
00566         <font class="comment">// Validity of the mesh</font>
<a name="l00567"></a><a class="code" href="class_RPatchMesh.html#m0">00567</a>         Interval                        ValidGeom;
<a name="l00568"></a><a class="code" href="class_RPatchMesh.html#m1">00568</a>         Interval                        ValidTopo;
<a name="l00569"></a><a class="code" href="class_RPatchMesh.html#m2">00569</a>         Interval                        ValidTexmap;
<a name="l00570"></a><a class="code" href="class_RPatchMesh.html#m3">00570</a>         Interval                        ValidSelect;
<a name="l00571"></a><a class="code" href="class_RPatchMesh.html#m4">00571</a>         Interval                        ValidDisplay;
<a name="l00572"></a><a class="code" href="class_RPatchMesh.html#m5">00572</a>         Interval                        ValidBindingPos;
<a name="l00573"></a><a class="code" href="class_RPatchMesh.html#m6">00573</a>         Interval                        ValidBindingInfo;
<a name="l00574"></a><a class="code" href="class_RPatchMesh.html#m7">00574</a>         BitArray                        tileSel;
00575 <font class="preprocessor">#pragma warning (disable : 4786)
</font>00576 <font class="preprocessor"></font>
00577         <font class="comment">// Tessel mode</font>
<a name="l00578"></a><a class="code" href="class_RPatchMesh.html#m8">00578</a>         <a class="code" href="class_RPOTess.html">RPOTess</a>                         rTess;
00579 <font class="keyword">private</font>:
00580         <font class="comment">// cached Mesh for the ModeRykolPatchMesh mode</font>
<a name="l00581"></a><a class="code" href="class_RPatchMesh.html#o1">00581</a>         Mesh                            mesh;
00582 
<a name="l00583"></a><a class="code" href="class_RPatchMesh.html#o2">00583</a>         <font class="keywordtype">int</font>                                     selLevel;
<a name="l00584"></a><a class="code" href="class_RPatchMesh.html#o3">00584</a>         <font class="keywordtype">int</font>                                     tileSet;
<a name="l00585"></a><a class="code" href="class_RPatchMesh.html#o4">00585</a>         <font class="keywordtype">int</font>                                     build;
00586 <font class="keyword">public</font>:
<a name="l00587"></a><a class="code" href="class_RPatchMesh.html#m9">00587</a>         <font class="keywordtype">bool</font>                            paint;
<a name="l00588"></a><a class="code" href="class_RPatchMesh.html#m10">00588</a>         <font class="keywordtype">bool</font>                            paintHack;
00589 <font class="keyword">private</font>:
<a name="l00590"></a><a class="code" href="class_RPatchMesh.html#r0">00590</a>         <font class="keyword">static</font> <a class="code" href="class_CBankManager.html">CBankManager</a>     manager;
00591 
00592         <font class="comment">// Fill the binding info for a vertex. Don't forget to call UpdateBindingInfo after</font>
00593         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c4">BindingVertex</a> (<font class="keywordtype">int</font> nVertex, <font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nEdge, <font class="keywordtype">int</font> nPrimary, typeBind nType);
00594 
00595         <font class="comment">// Unbind a vertex</font>
00596         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c5">UnBindingVertex</a> (<font class="keywordtype">int</font> nVertex);
00597 
00598         <font class="comment">// Unbind vertex associed to the patch</font>
00599         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c6">UnbindRelatedPatch</a> (<font class="keywordtype">int</font> nPatch, PatchMesh&amp; patch);
00600 
00601         <font class="comment">// Unbind vertex associed to the vertex</font>
00602         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c7">UnbindRelatedVertex</a> (<font class="keywordtype">int</font> nPatch, PatchMesh&amp; patch);
00603 
00604         <font class="comment">// Update binded vertices's position BIND SAFE</font>
00605         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c8">UpdateBindingPos</a> (PatchMesh&amp; patch);
00606 
00607         <font class="comment">// Build internal binding info</font>
00608         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c9">UpdateBindingInfo</a> (PatchMesh&amp; patch);
00609 
00610         <font class="comment">// Look for a patch with this edge</font>
00611         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#c10">FindPatch</a> (PatchMesh *patch, <font class="keywordtype">int</font> nEdge, <font class="keywordtype">int</font> &amp;WhichEdge, <font class="keywordtype">int</font> &amp;nPatch, <font class="keywordtype">int</font> nFirstPatch);
00612 <font class="keyword">public</font>:
00613         <font class="comment">// Constructor</font>
00614         <a class="code" href="class_RPatchMesh.html#a0">RPatchMesh</a> (PatchMesh *pmesh);          <font class="comment">// Patch mesh</font>
00615 
00616         <font class="comment">// Invalidate binding infos</font>
<a name="l00617"></a><a class="code" href="class_RPatchMesh.html#a11">00617</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a11">InvalidateBindingPos</a> ()<font class="keyword"> </font>{ ValidBindingPos=NEVER; };
<a name="l00618"></a><a class="code" href="class_RPatchMesh.html#a12">00618</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a12">InvalidateBindingInfo</a> ()<font class="keyword"> </font>{ ValidBindingInfo=NEVER; <a class="code" href="class_RPatchMesh.html#a11">InvalidateBindingPos</a> (); };
00619 
00620         <font class="comment">// Update binding</font>
00621         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a13">UpdateBinding</a> (PatchMesh&amp; patch, TimeValue t);
00622 
00623         <font class="comment">// Check the validity of the RPatchMesh's data with the RPO's data (debug stuff) BIND SAFE</font>
00624         <font class="keywordtype">bool</font> <a class="code" href="class_RPatchMesh.html#a14">Validity</a> (<font class="keyword">const</font> PatchMesh&amp; patch, <font class="keywordtype">bool</font> bAssert);
00625 
00626         <font class="comment">// Resize vertex buffer BIND SAFE</font>
00627         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a15">SetNumVerts</a> (<font class="keywordtype">int</font> nVert);
00628 
00629         <font class="comment">// Resize patches buffer BIND SAFE</font>
00630         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a16">SetNumPatches</a> (<font class="keywordtype">int</font> nPatch);
00631 
00632         <font class="comment">// Subdivide both way BIND SAFE</font>
00633         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a17">Subdivide</a> (<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nV0, <font class="keywordtype">int</font> nV1, <font class="keywordtype">int</font> nV2, <font class="keywordtype">int</font> nV3, <font class="keywordtype">int</font> nCenter, <font class="keywordtype">int</font> nFirstPatch, PatchMesh&amp; patch);
00634 
00635         <font class="comment">// Subdivide edge 1 and 3 BIND SAFE</font>
00636         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a18">SubdivideU</a> (<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nV0, <font class="keywordtype">int</font> nV1, <font class="keywordtype">int</font> nFirstPatch, PatchMesh&amp; patch);
00637 
00638         <font class="comment">// Subdivide edge 0 and 2 BIND SAFE</font>
00639         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a19">SubdivideV</a> (<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nV0, <font class="keywordtype">int</font> nV1, <font class="keywordtype">int</font> nFirstPatch, PatchMesh&amp; patch);
00640 
00641         <font class="comment">// AddHook BIND SAFE</font>
00642         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a20">AddHook</a> (<font class="keywordtype">int</font> nVert, <font class="keywordtype">int</font> nSeg, PatchMesh&amp; patch);
00643 
00644         <font class="comment">// AddHook BIND SAFE</font>
00645         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a20">AddHook</a> (<font class="keywordtype">int</font> nVert0, <font class="keywordtype">int</font> nVert1, <font class="keywordtype">int</font> nVert2, <font class="keywordtype">int</font> nSeg, PatchMesh&amp; patch);
00646 
00647         <font class="comment">// RemoveHook BIND SAFE</font>
00648         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a22">RemoveHook</a> (PatchMesh&amp; patch);
00649 
00650         <font class="comment">// Attach BIND SAFE</font>
00651         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a23">Attach</a>(<a class="code" href="class_RPatchMesh.html">RPatchMesh</a> *rattPatch, PatchMesh&amp; patch);
00652 
00653         <font class="comment">// Extrude BIND SAFE</font>
00654         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a24">CreateExtrusion</a> (PatchMesh *rpatch);
00655 
00656         <font class="comment">// Weld BIND SAFE</font>
00657         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a25">Weld</a> (PatchMesh *patch);
00658 
00659         <font class="comment">// Add a patch BIND SAFE</font>
00660         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a26">AddPatch</a> (<font class="keywordtype">int</font> nEdge, <font class="keywordtype">int</font> nFirstPatch, PatchMesh *patch);
00661 
00662         <font class="comment">// Delete patches and vertices BIND SAFE</font>
00663         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a27">DeleteAndSweep</a> (<font class="keyword">const</font> BitArray &amp;remapVerts, <font class="keyword">const</font> BitArray &amp;remapPatches, PatchMesh&amp; patch);
00664 
00665         <font class="comment">// Invalidate channels BIND SAFE</font>
00666         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a28">InvalidateChannels</a>(ChannelMask channels);
00667 
00668         <font class="comment">// Update topo change BIND SAFE</font>
00669         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a29">ResolveTopoChanges</a>(PatchMesh *patch);
00670 
00671         <font class="comment">// Change sel level BIND SAFE</font>
<a name="l00672"></a><a class="code" href="class_RPatchMesh.html#a30">00672</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a30">SetSelLevel</a> (<font class="keywordtype">int</font> sellevel)<font class="keyword">
</font>00673 <font class="keyword">        </font>{
00674                 selLevel=sellevel;
00675                 <a class="code" href="class_RPatchMesh.html#a28">InvalidateChannels</a>(PART_SELECT);
00676         }
00677 
00678         <font class="comment">// Get sel level BIND SAFE</font>
<a name="l00679"></a><a class="code" href="class_RPatchMesh.html#a31">00679</a>         <font class="keywordtype">int</font> <a class="code" href="class_RPatchMesh.html#a31">GetSelLevel</a> ()<font class="keyword">
</font>00680 <font class="keyword">        </font>{
00681                 <font class="keywordflow">return</font> selLevel;
00682         }
00683 
00684         <font class="comment">// Load</font>
00685         IOResult <a class="code" href="class_RPatchMesh.html#a32">Load</a>(ILoad *iload);
00686 
00687         <font class="comment">// Save</font>
00688         IOResult <a class="code" href="class_RPatchMesh.html#a33">Save</a>(ISave *isave);
00689 
00690         <font class="comment">// *** Tile Methods</font>
00691 
00692         <font class="comment">// Get the matrix of the selected tiles</font>
00693         Matrix3 <a class="code" href="class_RPatchMesh.html#a34">GetSelTileTm</a>(PatchMesh&amp; patch, TimeValue t, INode *node, <font class="keywordtype">bool</font>&amp; bHasSel) <font class="keyword">const</font>;
00694 
00695         <font class="comment">// Get the center of the selected tiles</font>
00696         Point3 <a class="code" href="class_RPatchMesh.html#a35">GetSelTileCenter</a>(PatchMesh&amp; patch, TimeValue t, INode *node, <font class="keywordtype">bool</font>&amp; bHasSel) <font class="keyword">const</font>;
00697 
00698         <font class="comment">// Hittest method</font>
00699         BOOL <a class="code" href="class_RPatchMesh.html#a36">SubObjectHitTest</a>(GraphicsWindow *gw, Material *ma, HitRegion *hr, DWORD flags, SubPatchHitList&amp; hitList, TimeValue t, 
00700                 PatchMesh&amp; patch);
00701 
00702         <font class="comment">// Return the tile number</font>
<a name="l00703"></a><a class="code" href="class_RPatchMesh.html#a37">00703</a>         <font class="keywordtype">int</font> <a class="code" href="class_RPatchMesh.html#a37">GetTileNumber</a>(<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font> nU, <font class="keywordtype">int</font> nV)<font class="keyword"> const
</font>00704 <font class="keyword">        </font>{
00705                 <a class="code" href="debug_h.html#a6">nlassert</a> (nU&gt;=0);
00706                 <a class="code" href="debug_h.html#a6">nlassert</a> (nU&lt;MAX_TILE_IN_PATCH);
00707                 <a class="code" href="debug_h.html#a6">nlassert</a> (nV&gt;=0);
00708                 <a class="code" href="debug_h.html#a6">nlassert</a> (nV&lt;MAX_TILE_IN_PATCH);
00709                 <font class="keywordflow">return</font> nV*MAX_TILE_IN_PATCH+nU+nPatch*NUM_TILE_SEL;
00710         }
00711 
00712         <font class="comment">// Build the mesh</font>
00713         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a38">BuildMesh</a>(TimeValue t, PatchMesh&amp; patch, Mesh *pMesh=NULL);
00714 
00715         <font class="comment">// Get tessel level of a patch</font>
00716         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a39">GetPatchTess</a> (<font class="keywordtype">int</font> nPatch, <font class="keywordtype">int</font>&amp; nUTess, <font class="keywordtype">int</font>&amp; nVTess);
00717 
00718         <font class="comment">// Display</font>
00719         <font class="keywordtype">int</font> <a class="code" href="class_RPatchMesh.html#a40">Display</a>(TimeValue t, INode* inode, ViewExp *vpt, <font class="keywordtype">int</font> flags, PatchMesh&amp; patch);
00720 
00721         <font class="comment">// Tile access</font>
00722         <a class="code" href="class_tileDesc.html">tileDesc</a>&amp; <a class="code" href="class_RPatchMesh.html#a41">getTileDesc</a> (<font class="keywordtype">int</font> nTile);
00723 
00724         <font class="comment">// Tile access</font>
00725         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a42">setTileDesc</a> (<font class="keywordtype">int</font> nTile, <font class="keyword">const</font> <a class="code" href="class_tileDesc.html">tileDesc</a>&amp; desc);
00726 
00727         <font class="comment">// Turn selected patch</font>
00728         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a43">TurnPatch</a>(PatchMesh *patch);
00729 
00730         <font class="comment">// Export a zone to NeL format</font>
00731         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a44">exportZone</a>(INode* pNode, PatchMesh* pPM, <a class="code" href="class_NL3D__CZone.html">NL3D::CZone</a>&amp; zone, <font class="keywordtype">int</font> zoneId);
00732 
00733         <font class="comment">// *** Vertex color Methods</font>
00734 
00735         <font class="comment">// Get the vertex color of a patch</font>
<a name="l00736"></a><a class="code" href="class_RPatchMesh.html#a45">00736</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a45">getVertexColor</a> (<font class="keywordtype">int</font> patch, <font class="keywordtype">int</font> s, <font class="keywordtype">int</font> t, <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>&amp; dest)<font class="keyword">
</font>00737 <font class="keyword">        </font>{
00738                 <font class="comment">// Get the color</font>
00739                 uint encodedColor=<a class="code" href="class_RPatchMesh.html#a5">getUIPatch</a> (patch).<a class="code" href="class_UI_PATCH.html#a2">getColor</a> (t*((1&lt;&lt;getUIPatch (patch).NbTilesU)+1)+s);
00740 
00741                 <font class="comment">// Store the color</font>
00742                 dest.A=encodedColor&gt;&gt;24;
00743                 dest.R=(encodedColor&gt;&gt;16)&amp;0xff;
00744                 dest.G=(encodedColor&gt;&gt;8)&amp;0xff;
00745                 dest.B=encodedColor&amp;0xff;
00746         }
00747 
00748         <font class="comment">// Set the vertex color of a patch</font>
<a name="l00749"></a><a class="code" href="class_RPatchMesh.html#a46">00749</a>         <font class="keywordtype">void</font> <a class="code" href="class_RPatchMesh.html#a46">setVertexColor</a> (<font class="keywordtype">int</font> patch, <font class="keywordtype">int</font> s, <font class="keywordtype">int</font> t, <font class="keyword">const</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>&amp; newColor)<font class="keyword">
</font>00750 <font class="keyword">        </font>{
00751                 <font class="comment">// Get the color</font>
00752                 uint encodedColor=(newColor.A&lt;&lt;24)|(newColor.R&lt;&lt;16)|(newColor.G&lt;&lt;8)|newColor.B;
00753                 
00754                 <font class="comment">// Store the color</font>
00755                 <a class="code" href="class_RPatchMesh.html#a5">getUIPatch</a> (patch).<a class="code" href="class_UI_PATCH.html#a3">setColor</a> (t*((1&lt;&lt;getUIPatch (patch).NbTilesU)+1)+s, encodedColor);
00756         }
00757 };
00758 
00759 <font class="comment">// ------------------------------------------------------------------------------------------------------------------------------------------------</font>
00760 
00761 <font class="preprocessor">#endif // __RYKOL_PATCH_MESH_H
</font></div></pre>

<!-- 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>