aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03478.html
blob: 89fe1ad57cbd716a6dc5685acdf32a163552e38e (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NL3D::CTessFacePriorityList class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CTessFacePriorityList Class Reference</h1><code>#include &lt;<a class="el" href="a06494.html">tess_face_priority_list.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class manage a Priority list of elements, inserted with a "distance". The priority list can be shifted, so elements with new distance &lt;=0 are pulled from the priority list.<p>
NB: it works quite well if you have (as example) a distStep of 1, and you shift only with value of 0.01 etc.., because it manages a "Remainder system", which do the good stuff. How does it works? in essence, it is a Rolling table, with 1+ shift back when necessary (maybe not at each <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista6">shift()</a>).<p>
Additionally, it includes a "2D quadrant" notion. If you use this class to know when the "camera" enters a specific area, then Quadrants help you because the notion of direction is kept. Only the XY plane is used here.<p>
Instead, if you use this class to know when the "camera" leaves a specific area, then the quadrant notion is not interesting since the camera can leave the area in any direction...<p>
<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00112">112</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista0">clear</a> ()</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#NL3D_1_1CTessFacePriorityLista1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista2">getQuadrantDirection</a> (<a class="el" href="a04558.html#a15">uint</a> quadrantId) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista3">init</a> (float distStep, <a class="el" href="a04558.html#a15">uint</a> numEntries, float distMaxMod, <a class="el" href="a04558.html#a15">uint</a> numQuadrant)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista4">insert</a> (<a class="el" href="a04558.html#a15">uint</a> quadrantId, float distance, <a class="el" href="a03476.html">CTessFace</a> *<a class="el" href="a04223.html#a658">value</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista5">selectQuadrant</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;direction)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista6">shift</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;direction, <a class="el" href="a03477.html">CTessFacePListNode</a> &amp;pulledElements)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista7">shiftAll</a> (<a class="el" href="a03477.html">CTessFacePListNode</a> &amp;pulledElements)</td></tr>

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

<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">_EntryModStart</a></td></tr>

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

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

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

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

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

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr6">_QuarterQuadrantEnd</a> [4]</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr7">_QuarterQuadrantStart</a> [4]</td></tr>

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

<tr><td colspan="2"><div class="groupHeader">The rolling tables</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03479.html">CRollingTable</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista1" doxytag="NL3D::CTessFacePriorityList::CTessFacePriorityList" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CTessFacePriorityList::CTessFacePriorityList </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Constructor. 
<p>

<p>
Definition at line <a class="el" href="a06493.html#l00134">134</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00187">_EntryModStart</a>, <a class="el" href="a06494.html#l00186">_MaskEntries</a>, <a class="el" href="a06494.html#l00185">_NEntries</a>, <a class="el" href="a06494.html#l00188">_NumQuadrant</a>, and <a class="el" href="a06494.html#l00184">_OODistStep</a>.
<p>
<div class="fragment"><pre>00135 {
00136         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr5">_OODistStep</a>= 1;
00137         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>= 0;
00138         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr1">_MaskEntries</a>= 0;
00139         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">_EntryModStart</a>= 0;
00140         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>= 0;
00141 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista8" doxytag="NL3D::CTessFacePriorityList::~CTessFacePriorityList" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CTessFacePriorityList::~<a class="el" href="a03478.html">CTessFacePriorityList</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a06493.html#l00144">144</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06493.html#l00201">clear()</a>.
<p>
<div class="fragment"><pre>00145 {
00146         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityLista0">clear</a>();
00147 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista0" doxytag="NL3D::CTessFacePriorityList::clear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CTessFacePriorityList::clear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Clear the priority list. All elements are removed. NB: for convenience, the remainder is reset.
<p>
Definition at line <a class="el" href="a06493.html#l00201">201</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00243">_RollingTables</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00144">~CTessFacePriorityList()</a>.
<p>
<div class="fragment"><pre>00202 {
00203         <span class="comment">// just clear all the rolling tables.</span>
00204         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.clear();
00205 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista2" doxytag="NL3D::CTessFacePriorityList::getQuadrantDirection" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const <a class="el" href="a03128.html">NLMISC::CVector</a>&amp; NL3D::CTessFacePriorityList::getQuadrantDirection </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>quadrantId</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
get the quadrant dir associated to the Id. Undefined if 0.
<p>
Definition at line <a class="el" href="a06494.html#l00145">145</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
References <a class="el" href="a06494.html#l00243">_RollingTables</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.
<p>
<div class="fragment"><pre>00145 {<span class="keywordflow">return</span> <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[quadrantId].QuadrantDirection;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista3" doxytag="NL3D::CTessFacePriorityList::init" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CTessFacePriorityList::init </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>distStep</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>numEntries</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>distMaxMod</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>numQuadrant</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Clear and Init the priority list. It reserve (numQuadrants+1) Rolling table of numEntries entries.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>numEntries</em>&nbsp;</td><td>gives the number of entries and MUST be powerOf2. distMax= numEntries*distStep  distMaxMod is important for performance and MUST be &lt; 1. eg: distMaxMod= 0.8. It is a trick to avoid the "Too Far Priority problem". Imagine you have a setup such distMax= 1000, and you insert(1100, an element). If we clamp to the max, it may be a bad thing, because ALL elements inserted after 1000 will be poped in one <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista6">shift()</a>, after 1000 shift(1) for example. To avoid this, if distMaxMod==0.8, then insert(1050) will really insert at 850, so elements will be poped not as the same time (for the extra cost of some elements get poped too early...).</td></tr>
    <tr><td valign=top><em>numQuadrant</em>&nbsp;</td><td>set 0 if don't want to support quadrant notion. else set &gt;=4 and a power of 2 (else nlassert)</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06493.html#l00150">150</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00187">_EntryModStart</a>, <a class="el" href="a06494.html#l00186">_MaskEntries</a>, <a class="el" href="a06494.html#l00190">_MaskQuadrant</a>, <a class="el" href="a06494.html#l00185">_NEntries</a>, <a class="el" href="a06494.html#l00188">_NumQuadrant</a>, <a class="el" href="a06494.html#l00184">_OODistStep</a>, <a class="el" href="a06494.html#l00192">_QuarterQuadrantEnd</a>, <a class="el" href="a06494.html#l00191">_QuarterQuadrantStart</a>, <a class="el" href="a06494.html#l00243">_RollingTables</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06493.html#l00201">clear()</a>, <a class="el" href="a05972.html#l00427">NLMISC::CMatrix::getJ()</a>, <a class="el" href="a05586.html#l00371">NLMISC::isPowerOf2()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a05972.html#l00578">NLMISC::CMatrix::rotateZ()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00178">NL3D::CLandscape::CLandscape()</a>.
<p>
<div class="fragment"><pre>00151 {
00152         <a class="code" href="a04558.html#a15">uint</a> i;
00153         <a class="code" href="a04199.html#a6">nlassert</a>(distStep&gt;0);
00154         <a class="code" href="a04199.html#a6">nlassert</a>(numEntries&gt;0 &amp;&amp; <a class="code" href="a05378.html#a264">isPowerOf2</a>(numEntries));
00155         <a class="code" href="a04199.html#a6">nlassert</a>(distMaxMod&lt;1);
00156         <a class="code" href="a04199.html#a6">nlassert</a>(numQuadrant==0 || (numQuadrant&gt;=4 &amp;&amp; <a class="code" href="a05378.html#a264">isPowerOf2</a>(numQuadrant)) );
00157 
00158         <span class="comment">// clear the prioriy list before.</span>
00159         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityLista0">clear</a>();
00160 
00161         <span class="comment">// setup</span>
00162         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr5">_OODistStep</a>= 1.0f / distStep;
00163         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>= numEntries;
00164         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr1">_MaskEntries</a>= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>-1;
00165         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">_EntryModStart</a>= (<a class="code" href="a04558.html#a15">uint</a>)ceil(distMaxMod * _NEntries);
00166         <a class="code" href="a05378.html#a374">NLMISC::clamp</a>(_EntryModStart, 0U, _NEntries-1);
00167         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>= numQuadrant;
00168 
00169         <span class="comment">// Build the Rolling tables.</span>
00170         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.resize(1+_NumQuadrant);
00171         <span class="keywordflow">for</span>(i=0;i&lt;<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.size();i++)
00172         {
00173                 <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i].init(_NEntries);
00174                 <span class="comment">// setup the quadrant direction. NB: 0 not used since "Direction less rolling table"</span>
00175                 <span class="keywordflow">if</span>(i&gt;=1)
00176                 {
00177                         <a class="code" href="a04558.html#a15">uint</a>    idx= i-1;
00178                         <span class="comment">// split evenly the plane with direction.</span>
00179                         <span class="keywordtype">float</span>   angle= float(2*Pi*idx)/<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>;
00180                         CMatrix mat;
00181                         mat.rotateZ(angle);
00182                         <span class="comment">// setup the vector</span>
00183                         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i].QuadrantDirection= mat.getJ();
00184                 }
00185         }
00186 
00187         <span class="comment">// Build Quarter Selection. In is in CCW order. Out: see selectQuadrant()</span>
00188         <span class="keyword">const</span>   <a class="code" href="a04558.html#a15">uint</a>    quarterLut[4]= {1,3,2,0};
00189         <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr2">_MaskQuadrant</a>= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>-1;
00190         <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
00191         {
00192                 <span class="comment">// Re-Order for faster ASM acces. see selectQuadrant()</span>
00193                 <a class="code" href="a04558.html#a15">uint</a>    idx= quarterLut[i];
00194                 <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr7">_QuarterQuadrantStart</a>[idx]= i*<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>/4;
00195                 <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr6">_QuarterQuadrantEnd</a>[idx]= 1+ (i+1)*<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>/4;
00196         }
00197 
00198 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista4" doxytag="NL3D::CTessFacePriorityList::insert" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CTessFacePriorityList::insert </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>quadrantId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>distance</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Insert an element at a given distance, and in a given quadrant. Insert at the closest step. eg insert(1.2, elt) will insert elt at entry 1 (assuming distStep==1 here). Special case: if distance&lt;=0, it is ensured that at each <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista6">shift()</a>, the element will be pulled. NB: manage correctly the entry where it is inserted, according to the Remainder system.<p>
USE OptFastFloor if distance&gt;0 =&gt; MUST be enclosed in OptFastFloorBegin/OptFastFloorEnd()<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>quadrantId</em>&nbsp;</td><td>set 0 if you want to insert in the "direction less" rolling table. else set the value returned by <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista5">selectQuadrant()</a> </td></tr>
    <tr><td valign=top><em>distance</em>&nbsp;</td><td>if quadrantId==0, distance should be the norm()-SphereSize, else it shoudl be direction*quadrantDirection-SphereSize.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06493.html#l00273">273</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00187">_EntryModStart</a>, <a class="el" href="a06494.html#l00186">_MaskEntries</a>, <a class="el" href="a06494.html#l00185">_NEntries</a>, <a class="el" href="a06494.html#l00184">_OODistStep</a>, <a class="el" href="a06494.html#l00243">_RollingTables</a>, <a class="el" href="a06493.html#l00422">NL3D::CTessFacePriorityList::CRollingTable::insertInRollTable()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a06494.html#l00206">NL3D::CTessFacePriorityList::CRollingTable::Remainder</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l01132">value</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, <a class="el" href="a06497.html#l02108">NL3D::CTessFace::updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.
<p>
<div class="fragment"><pre>00274 {
00275         <span class="comment">// plist must be inited.</span>
00276         <a class="code" href="a04199.html#a6">nlassert</a>(_NEntries&gt;0 &amp;&amp; quadrantId&lt;<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.size());
00277 
00278         <span class="comment">// First, setup in our basis.</span>
00279         distance*= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr5">_OODistStep</a>;
00280 
00281         <span class="comment">// Insert int the good quadrant</span>
00282         CRollingTable   &amp;rollTable= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[quadrantId];
00283 
00284         <span class="comment">// Then, look where we must insert it.</span>
00285         <a class="code" href="a04558.html#a14">sint</a>    idInsert;
00286         <span class="keywordflow">if</span>(distance&lt;=0)
00287                 idInsert= 0;
00288         <span class="keywordflow">else</span>
00289         {
00290                 <span class="comment">// Must insert so we can't miss it when a shift occurs (=&gt; floor).</span>
00291                 idInsert= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(distance + rollTable.Remainder);
00292         }
00293         idInsert= std::max(0, idInsert);
00294 
00295         <span class="comment">// Manage Mod.</span>
00296         <span class="comment">// If the element to insert must be inserted at  distance &gt; distMax.</span>
00297         <span class="keywordflow">if</span>(idInsert&gt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr1">_MaskEntries</a>)
00298         {
00299                 <span class="comment">// Compute number of entries to apply the mod.</span>
00300                 <a class="code" href="a04558.html#a15">uint</a>    nMod= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a> - <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">_EntryModStart</a>;
00301                 <span class="comment">// Of how many entries are we too far.</span>
00302                 idInsert= idInsert - <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr1">_MaskEntries</a>;
00303                 <span class="comment">// Then loop in the interval [_EntryModStart, _NEntries[.</span>
00304                 idInsert= idInsert % nMod;
00305                 idInsert= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">_EntryModStart</a> + idInsert;
00306         }
00307 
00308         <span class="comment">// insert in the Roll Table.</span>
00309         rollTable.insertInRollTable(idInsert, value);
00310 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista5" doxytag="NL3D::CTessFacePriorityList::selectQuadrant" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CTessFacePriorityList::selectQuadrant </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>direction</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
prior to insert an element with a direction notion, select which quadrant according to the direction Camera -&gt; center of interest. <dl compact><dt><b>Returns:</b></dt><dd>0 if no quadrant available, else the quadrant id</dd></dl>

<p>
Definition at line <a class="el" href="a06493.html#l00209">209</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00190">_MaskQuadrant</a>, <a class="el" href="a06494.html#l00188">_NumQuadrant</a>, <a class="el" href="a06494.html#l00192">_QuarterQuadrantEnd</a>, <a class="el" href="a06494.html#l00191">_QuarterQuadrantStart</a>, <a class="el" href="a06494.html#l00243">_RollingTables</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
<p>
Referenced by <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.
<p>
<div class="fragment"><pre>00210 {
00211         <span class="comment">// if numQuadrants=0, ret 0.</span>
00212         <span class="keywordflow">if</span>(<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">_NumQuadrant</a>==0)
00213                 <span class="keywordflow">return</span> 0;
00214 
00215 
00216         <span class="comment">// select the quarter.</span>
00217         <a class="code" href="a04558.html#a15">uint</a>    quarterId;
00218 <span class="preprocessor">#ifdef  NL_OS_WINDOWS</span>
00219 <span class="preprocessor"></span>        __asm
00220         {
00221                 mov             esi, direction
00222                 mov             eax, [esi]direction.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>
00223                 mov             ebx, [esi]direction.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>
00224                 <span class="comment">// read the sign</span>
00225                 and             eax, 0x80000000
00226                 and             ebx, 0x80000000
00227                 <span class="comment">// set the bit</span>
00228                 shr             eax, 30
00229                 shr             ebx, 31
00230                 <span class="comment">// assemble</span>
00231                 or              eax, ebx
00232                 mov             quarterId, eax
00233         }
00234 <span class="preprocessor">#else</span>
00235 <span class="preprocessor"></span>        <span class="keywordflow">if</span>(direction.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>&gt;0)
00236         {
00237                 <span class="keywordflow">if</span>(direction.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>&gt;0)       quarterId= 0;
00238                 <span class="keywordflow">else</span>                            quarterId= 1;
00239         }
00240         <span class="keywordflow">else</span>
00241         {
00242                 <span class="keywordflow">if</span>(direction.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>&gt;0)       quarterId= 2;
00243                 <span class="keywordflow">else</span>                            quarterId= 3;
00244         }
00245 <span class="preprocessor">#endif</span>
00246 <span class="preprocessor"></span>
00247         <span class="comment">// Run only the quadrants of the associated quarter.</span>
00248         <a class="code" href="a04558.html#a15">uint</a>    quadrantStart= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr7">_QuarterQuadrantStart</a>[quarterId];
00249         <a class="code" href="a04558.html#a15">uint</a>    quadrantEnd= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr6">_QuarterQuadrantEnd</a>[quarterId];
00250 
00251 
00252         <span class="comment">// For all quadrants of the quarter, return the best direction</span>
00253         <span class="keywordtype">float</span>   bestDirPs= -FLT_MAX;
00254         <a class="code" href="a04558.html#a15">uint</a>    bestQuadrant= 0;
00255         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=quadrantStart;i&lt;quadrantEnd;i++)
00256         {
00257                 <span class="comment">// get the quadrant Id. Must mask for last (0). And Start at 1 in the _RollingTables.</span>
00258                 <a class="code" href="a04558.html#a15">uint</a>    quadrantId= (i&amp;<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr2">_MaskQuadrant</a>)+1;
00259                 <span class="comment">// Test with this quadrant</span>
00260                 <span class="keywordtype">float</span>   ps= direction*<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i].QuadrantDirection;
00261                 <span class="keywordflow">if</span>(ps&gt;bestDirPs)
00262                 {
00263                         bestDirPs= ps;
00264                         bestQuadrant= i;
00265                 }
00266         }
00267 
00268         <span class="keywordflow">return</span> bestQuadrant;
00269 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista6" doxytag="NL3D::CTessFacePriorityList::shift" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CTessFacePriorityList::shift </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>direction</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03477.html">CTessFacePListNode</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pulledElements</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Shift the Priority list in a given direction. NB: for each rolling table, even if shiftDistance==0, all elements in the entry 0 are pulled out.  pulledElements is the root of the list which will contains elements pulled from the list.
<p>
Definition at line <a class="el" href="a06493.html#l00314">314</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00185">_NEntries</a>, <a class="el" href="a06494.html#l00184">_OODistStep</a>, <a class="el" href="a06494.html#l00243">_RollingTables</a>, <a class="el" href="a06493.html#l00088">NL3D::CTessFacePListNode::appendPList()</a>, <a class="el" href="a06493.html#l00431">NL3D::CTessFacePriorityList::CRollingTable::getRollTableEntry()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06494.html#l00203">NL3D::CTessFacePriorityList::CRollingTable::QuadrantDirection</a>, <a class="el" href="a06494.html#l00206">NL3D::CTessFacePriorityList::CRollingTable::Remainder</a>, <a class="el" href="a06493.html#l00477">NL3D::CTessFacePriorityList::CRollingTable::shiftEntries()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06493.html#l00071">NL3D::CTessFacePListNode::unlinkInPList()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
<p>
<div class="fragment"><pre>00315 {
00316         <span class="comment">// plist must be inited.</span>
00317         <a class="code" href="a04199.html#a6">nlassert</a>(_NEntries&gt;0);
00318 
00319         pulledElements.unlinkInPList();
00320 
00321         <span class="comment">// Shift all the rolling tables</span>
00322         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.size();i++)
00323         {
00324                 CRollingTable   &amp;rollTable= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i];
00325                 <span class="keywordtype">float</span>   shiftDistance;
00326 
00327                 <span class="comment">// if quadrant 0, Direction less =&gt; get distance with Euler norm.</span>
00328                 <span class="keywordflow">if</span>(i==0)
00329                 {
00330                         shiftDistance= direction.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2049_0">norm</a>();
00331                 }
00332                 <span class="comment">// Else compute the effective distance we run to the plane.</span>
00333                 <span class="keywordflow">else</span>
00334                 {
00335                         shiftDistance= direction*rollTable.QuadrantDirection;
00336                         <span class="comment">// For now, just clamp, but may be interesting to shift Back the rolling table !!</span>
00337                         shiftDistance= max(0.f, shiftDistance);
00338                 }
00339 
00340                 <span class="comment">// First, setup in our basis.</span>
00341                 shiftDistance*= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr5">_OODistStep</a>;
00342 
00343                 <span class="comment">// at least, fill OUT with elements of entry 0.</span>
00344                 <span class="comment">// For all elements of the entry 0 of , pull them, and insert in result list.</span>
00345                 pulledElements.appendPList(rollTable.getRollTableEntry(0));
00346 
00347                 <span class="comment">// shift.</span>
00348                 rollTable.Remainder+= shiftDistance;
00349                 <span class="comment">// If Remainder&gt;=1, it means that we must shift the rolling table, and get elements deleted.</span>
00350                 <a class="code" href="a04558.html#a15">uint</a>    entryShift= (<a class="code" href="a04558.html#a15">uint</a>)floor(rollTable.Remainder);
00351                 rollTable.Remainder= rollTable.Remainder - entryShift;
00352 
00353                 <span class="comment">// shift full array??</span>
00354                 <span class="keywordflow">if</span>( entryShift &gt;= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>)
00355                 {
00356                         entryShift= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>;
00357                         <span class="comment">// The entire array is pulled, _Remainder should get a good value.</span>
00358                         rollTable.Remainder= 0;
00359                 }
00360 
00361                 <span class="comment">// If some real shift, do it.</span>
00362                 rollTable.shiftEntries(entryShift, pulledElements);
00363         }
00364 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityLista7" doxytag="NL3D::CTessFacePriorityList::shiftAll" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CTessFacePriorityList::shiftAll </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03477.html">CTessFacePListNode</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pulledElements</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Same as <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityLista6">shift()</a>, but shift all the array.
<p>
Definition at line <a class="el" href="a06493.html#l00368">368</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
<p>
References <a class="el" href="a06494.html#l00185">_NEntries</a>, <a class="el" href="a06494.html#l00243">_RollingTables</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06493.html#l00071">NL3D::CTessFacePListNode::unlinkInPList()</a>.
<p>
Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
<p>
<div class="fragment"><pre>00369 {
00370         <span class="comment">// plist must be inited.</span>
00371         <a class="code" href="a04199.html#a6">nlassert</a>(_NEntries&gt;0);
00372 
00373         pulledElements.unlinkInPList();
00374 
00375         <span class="comment">// Do it for all rolling tables.</span>
00376         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>.size();i++)
00377         {
00378                 <span class="comment">// The entire array is pulled, _Remainder should get a good value.</span>
00379                 <a class="code" href="a04558.html#a15">uint</a> entryShift= <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">_NEntries</a>;
00380                 <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i].Remainder= 0;
00381 
00382                 <span class="comment">// shift the entire array.</span>
00383                 <a class="code" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">_RollingTables</a>[i].shiftEntries(entryShift, pulledElements);
00384         }
00385 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr0" doxytag="NL3D::CTessFacePriorityList::_EntryModStart" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr0">NL3D::CTessFacePriorityList::_EntryModStart</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00187">187</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00134">CTessFacePriorityList()</a>, <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00273">insert()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr1" doxytag="NL3D::CTessFacePriorityList::_MaskEntries" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr1">NL3D::CTessFacePriorityList::_MaskEntries</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00186">186</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00134">CTessFacePriorityList()</a>, <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00273">insert()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr2" doxytag="NL3D::CTessFacePriorityList::_MaskQuadrant" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr2">NL3D::CTessFacePriorityList::_MaskQuadrant</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00190">190</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00209">selectQuadrant()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr3" doxytag="NL3D::CTessFacePriorityList::_NEntries" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr3">NL3D::CTessFacePriorityList::_NEntries</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00185">185</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00134">CTessFacePriorityList()</a>, <a class="el" href="a06493.html#l00150">init()</a>, <a class="el" href="a06493.html#l00273">insert()</a>, <a class="el" href="a06493.html#l00314">shift()</a>, and <a class="el" href="a06493.html#l00368">shiftAll()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr4" doxytag="NL3D::CTessFacePriorityList::_NumQuadrant" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr4">NL3D::CTessFacePriorityList::_NumQuadrant</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00188">188</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00134">CTessFacePriorityList()</a>, <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00209">selectQuadrant()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr5" doxytag="NL3D::CTessFacePriorityList::_OODistStep" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr5">NL3D::CTessFacePriorityList::_OODistStep</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00184">184</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00134">CTessFacePriorityList()</a>, <a class="el" href="a06493.html#l00150">init()</a>, <a class="el" href="a06493.html#l00273">insert()</a>, and <a class="el" href="a06493.html#l00314">shift()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr6" doxytag="NL3D::CTessFacePriorityList::_QuarterQuadrantEnd" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr6">NL3D::CTessFacePriorityList::_QuarterQuadrantEnd</a>[4]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00192">192</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00209">selectQuadrant()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr7" doxytag="NL3D::CTessFacePriorityList::_QuarterQuadrantStart" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr7">NL3D::CTessFacePriorityList::_QuarterQuadrantStart</a>[4]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00191">191</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00150">init()</a>, and <a class="el" href="a06493.html#l00209">selectQuadrant()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListr8" doxytag="NL3D::CTessFacePriorityList::_Remainder" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListr8">NL3D::CTessFacePriorityList::_Remainder</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00183">183</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CTessFacePriorityListz966_0" doxytag="NL3D::CTessFacePriorityList::_RollingTables" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03479.html">CRollingTable</a>&gt; <a class="el" href="a03478.html#NL3D_1_1CTessFacePriorityListz966_0">NL3D::CTessFacePriorityList::_RollingTables</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06494.html#l00243">243</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
<p>
Referenced by <a class="el" href="a06493.html#l00201">clear()</a>, <a class="el" href="a06494.html#l00145">getQuadrantDirection()</a>, <a class="el" href="a06493.html#l00150">init()</a>, <a class="el" href="a06493.html#l00273">insert()</a>, <a class="el" href="a06493.html#l00209">selectQuadrant()</a>, <a class="el" href="a06493.html#l00314">shift()</a>, and <a class="el" href="a06493.html#l00368">shiftAll()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06494.html">tess_face_priority_list.h</a><li><a class="el" href="a06493.html">tess_face_priority_list.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:48:49 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>