aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03754.html
blob: 8271d1011fef07bc09bb75217aa2c7393e5ff177 (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
<!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::CZoneSearch 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::CZoneSearch Class Reference</h1><code>#include &lt;<a class="el" href="a06775.html">zone_search.h</a>&gt;</code>
<p>
<p>Inheritance diagram for NL3D::CZoneSearch:
<p><center><img src="a03754.png" usemap="#NL3D::CZoneSearch_map" border="0" alt=""></center>
<map name="NL3D::CZoneSearch_map">
<area href="a03753.html" alt="NL3D::CZoneManager" shape="rect" coords="0,56,140,80">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="a03754.html">CZoneSearch</a> is a class that determine which zone cooresponding to a coordinate and zones are around a position <dl compact><dt><b>Author:</b></dt><dd>Alain Saffray <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06775.html#l00044">44</a> of file <a class="el" href="a06775.html">zone_search.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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha0">CZoneSearch</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#NL3D_1_1CZoneSearcha0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha1">getListZoneId</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a04558.html#a15">uint</a> sizeArea, std::vector&lt; <a class="el" href="a04558.html#a9">uint16</a> &gt; &amp;l)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha2">getListZoneName</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a04558.html#a15">uint</a> sizeArea, std::list&lt; std::pair&lt; std::string, <a class="el" href="a04558.html#a11">uint32</a> &gt; &gt; &amp;l)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha3">getZoneId</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::pair&lt; std::string, <a class="el" href="a04558.html#a11">uint32</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha4">getZoneName</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a04558.html#a15">uint</a> cx, <a class="el" href="a04558.html#a15">uint</a> cy)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha5">getZoneNameFromId</a> (<a class="el" href="a04558.html#a9">uint16</a> zoneid)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearcha6">getZonePos</a> (<a class="el" href="a04558.html#a9">uint16</a> zoneId, <a class="el" href="a04558.html#a15">uint</a> &amp;<a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> &amp;<a class="el" href="a04223.html#a573">y</a>) const </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="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</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="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number zones on Y axis of landscape.  <a href="#NL3D_1_1CZoneSearchr1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</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="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CZoneSearcha0" doxytag="NL3D::CZoneSearch::CZoneSearch" ></a><p>
<table class="mdTable" 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::CZoneSearch::CZoneSearch </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>
Constructor : Initialize some privates members<p>
Size X is named of AA to ZZ, current size is IB = 26 * 8 + 2 (AA is zone number 1, AZ zone number 26, BA zone number 27...)<p>
Number zones on Y axis of landscape<p>
Size X of one zone (in meters)<p>
Size X of one zone (in meters) 
<p>
Definition at line <a class="el" href="a06774.html#l00043">43</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00078">_NbZoneX</a>, <a class="el" href="a06775.html#l00081">_NbZoneY</a>, <a class="el" href="a06775.html#l00084">_SizeZoneX</a>, and <a class="el" href="a06775.html#l00087">_SizeZoneY</a>.
<p>
<div class="fragment"><pre>00044 {
00046         <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> = 26 * 8 + 2;
00047 
00049         <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> = 297;
00050         
00052         <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a> = 160;
00053 
00055         <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> = 160;
00056 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CZoneSearcha1" doxytag="NL3D::CZoneSearch::getListZoneId" ></a><p>
<table class="mdTable" 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::CZoneSearch::getListZoneId </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td 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>sizeArea</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; <a class="el" href="a04558.html#a9">uint16</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>l</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>

<p>
Definition at line <a class="el" href="a06774.html#l00158">158</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00078">_NbZoneX</a>, <a class="el" href="a06775.html#l00081">_NbZoneY</a>, <a class="el" href="a06775.html#l00084">_SizeZoneX</a>, <a class="el" href="a06775.html#l00087">_SizeZoneY</a>, <a class="el" href="a06774.html#l00144">getZoneId()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06770.html#l00080">NL3D::CZoneManager::checkZonesAround()</a>.
<p>
<div class="fragment"><pre>00159 {
00160         <a class="code" href="a04558.html#a14">sint</a> startPosX, startPosY;
00161         <a class="code" href="a04558.html#a15">uint</a> lastPosX, lastPosY, sizeAreaX, sizeAreaY;
00162 
00163         startPosX = <a class="code" href="a04223.html#a572">x</a> - sizeArea;
00164         startPosY = <a class="code" href="a04223.html#a573">y</a> - sizeArea;
00165 
00166         sizeArea += sizeArea;
00167         sizeAreaX = sizeAreaY = sizeArea;
00168 
00169         <span class="keywordflow">if</span>(startPosX &lt; 0)
00170         {
00171                 sizeAreaX += startPosX;
00172                 startPosX = 0;
00173         }
00174 
00175         lastPosX = startPosX + sizeAreaX;
00176         <span class="keywordflow">if</span>(lastPosX &gt;= (<a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>))
00177         {
00178                 sizeAreaX -= <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a> - lastPosX;
00179                 lastPosX = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a> - 1;
00180         }
00181 
00182         <span class="keywordflow">if</span>(startPosY &lt; 0)
00183         {
00184                 sizeAreaY += startPosY;
00185                 startPosY = 0;
00186         }
00187 
00188         lastPosY = startPosY + sizeAreaY;
00189         <span class="keywordflow">if</span>(lastPosY &gt;= (<a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>))
00190         {
00191                 sizeAreaY -= <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> - lastPosY;
00192                 lastPosY = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> - 1;
00193         }
00194 
00195         <a class="code" href="a05373.html#a2">l</a>.clear();
00196 
00197         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i = startPosY; i &lt;= lastPosY; i += <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>)
00198         {
00199                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j = startPosX; j &lt;= lastPosX; j += <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>)
00200                 {
00201                         <a class="code" href="a05373.html#a2">l</a>.push_back(<a class="code" href="a03754.html#NL3D_1_1CZoneSearcha3">getZoneId</a>(j, i));
00202                 }
00203         }
00204 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearcha2" doxytag="NL3D::CZoneSearch::getListZoneName" ></a><p>
<table class="mdTable" 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::CZoneSearch::getListZoneName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td 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>sizeArea</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::list&lt; std::pair&lt; std::string, <a class="el" href="a04558.html#a11">uint32</a> &gt; &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>l</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>

<p>
Definition at line <a class="el" href="a06774.html#l00096">96</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00078">_NbZoneX</a>, <a class="el" href="a06775.html#l00081">_NbZoneY</a>, <a class="el" href="a06775.html#l00084">_SizeZoneX</a>, <a class="el" href="a06775.html#l00087">_SizeZoneY</a>, <a class="el" href="a06774.html#l00067">getZoneName()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
<div class="fragment"><pre>00097 {
00098         <a class="code" href="a04558.html#a14">sint</a> startPosX, startPosY;
00099         <a class="code" href="a04558.html#a15">uint</a> lastPosX, lastPosY, sizeAreaX, sizeAreaY;
00100 
00101         startPosX = <a class="code" href="a04223.html#a572">x</a> - sizeArea;
00102         startPosY = <a class="code" href="a04223.html#a573">y</a> - sizeArea;
00103 
00104         sizeArea += sizeArea;
00105         sizeAreaX = sizeAreaY = sizeArea;
00106 
00107         <span class="keywordflow">if</span>(startPosX &lt; 0)
00108         {
00109                 sizeAreaX += startPosX;
00110                 startPosX = 0;
00111         }
00112 
00113         lastPosX = startPosX + sizeAreaX;
00114         <span class="keywordflow">if</span>(lastPosX &gt;= (<a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>))
00115         {
00116                 sizeAreaX -= <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a> - lastPosX;
00117                 lastPosX = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr0">_NbZoneX</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a> - 1;
00118         }
00119 
00120         <span class="keywordflow">if</span>(startPosY &lt; 0)
00121         {
00122                 sizeAreaY += startPosY;
00123                 startPosY = 0;
00124         }
00125 
00126         lastPosY = startPosY + sizeAreaY;
00127         <span class="keywordflow">if</span>(lastPosY &gt;= (<a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>))
00128         {
00129                 sizeAreaY -= <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> - lastPosY;
00130                 lastPosY = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr1">_NbZoneY</a> * <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> - 1;
00131         }
00132 
00133         <a class="code" href="a05373.html#a2">l</a>.clear();
00134 
00135         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i = startPosY; i &lt;= lastPosY; i += <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>)
00136         {
00137                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j = startPosX; j &lt;= lastPosX; j += <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>)
00138                 {
00139                         <a class="code" href="a05373.html#a2">l</a>.push_back(<a class="code" href="a03754.html#NL3D_1_1CZoneSearcha4">getZoneName</a>(j, i, x, y));
00140                 }
00141         }
00142 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearcha3" doxytag="NL3D::CZoneSearch::getZoneId" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a9">uint16</a> NL3D::CZoneSearch::getZoneId </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</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="a06774.html#l00144">144</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00084">_SizeZoneX</a>, <a class="el" href="a06775.html#l00087">_SizeZoneY</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00158">getListZoneId()</a>.
<p>
<div class="fragment"><pre>00145 {
00146         <a class="code" href="a04558.html#a15">uint</a> zoneY = <a class="code" href="a04223.html#a573">y</a> / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>;
00147         <a class="code" href="a04558.html#a15">uint</a> zoneX = <a class="code" href="a04223.html#a572">x</a> / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>;
00148         
00149         <span class="keywordflow">return</span> (zoneX&amp;255)+(zoneY&lt;&lt;8);
00150 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearcha4" doxytag="NL3D::CZoneSearch::getZoneName" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> pair&lt; string, <a class="el" href="a04558.html#a11">uint32</a> &gt; NL3D::CZoneSearch::getZoneName </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td 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>cx</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>cy</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>
Get the zone name corresponding to coordinate <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>is axis X coordinate (in meters) </td></tr>
    <tr><td valign=top><em>y</em>&nbsp;</td><td>is axis Y coordinate (in meters) </td></tr>
    <tr><td valign=top><em>cx</em>&nbsp;</td><td>is axis X coordinate of center area (in meters) </td></tr>
    <tr><td valign=top><em>cy</em>&nbsp;</td><td>is axis Y coordinate of center area (in meters) </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>a pair of the zone name and square distance between zone and center area (in zone unit)</dd></dl>

<p>
Definition at line <a class="el" href="a06774.html#l00067">67</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00084">_SizeZoneX</a>, <a class="el" href="a06775.html#l00087">_SizeZoneY</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00096">getListZoneName()</a>, and <a class="el" href="a05874.html#l00406">NL3D::CLandscapeUser::getZoneName()</a>.
<p>
<div class="fragment"><pre>00068 {
00069         <span class="keywordtype">char</span> name[13];
00070 
00071         <a class="code" href="a04558.html#a15">uint</a> zoneY = <a class="code" href="a04223.html#a573">y</a> / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> + 1;
00072         <a class="code" href="a04558.html#a15">uint</a> zoneX = <a class="code" href="a04223.html#a572">x</a> / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>;
00073 
00074         <a class="code" href="a04558.html#a15">uint</a> zoneCenterY = cy / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a> + 1;
00075         <a class="code" href="a04558.html#a15">uint</a> zoneCenterX = cx / <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr2">_SizeZoneX</a>;
00076 
00077         <a class="code" href="a04558.html#a11">uint32</a> distance = (zoneX - zoneCenterX) * (zoneX - zoneCenterX) + (zoneY - zoneCenterY) * (zoneY - zoneCenterY);
00078 
00079         <span class="keywordtype">char</span> firstLetter = zoneX / 26 + <span class="charliteral">'A'</span>;
00080         <span class="keywordtype">char</span> secondLetter = zoneX % 26 + <span class="charliteral">'A'</span>;
00081 
00082         sprintf(name, <span class="stringliteral">"%d_%c%c.zonel"</span>, zoneY, firstLetter, secondLetter);
00083 
00084         <span class="keywordflow">return</span> make_pair&lt;string, uint32&gt;(string(name), distance);
00085 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearcha5" doxytag="NL3D::CZoneSearch::getZoneNameFromId" ></a><p>
<table class="mdTable" 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::string NL3D::CZoneSearch::getZoneNameFromId </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>zoneid</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a06774.html#l00206">206</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06770.html#l00080">NL3D::CZoneManager::checkZonesAround()</a>, and <a class="el" href="a06770.html#l00168">NL3D::CZoneManager::isWorkComplete()</a>.
<p>
<div class="fragment"><pre>00207 {
00208         <span class="keywordtype">char</span> name[16];
00209 
00210         <a class="code" href="a04558.html#a14">sint</a>    <a class="code" href="a04223.html#a572">x</a> = zoneid &amp; 255;
00211         <a class="code" href="a04558.html#a14">sint</a>    <a class="code" href="a04223.html#a573">y</a> = zoneid &gt;&gt; 8;
00212         sprintf (name, <span class="stringliteral">"%d_%c%c.zonel"</span>, y+1, (<span class="keywordtype">char</span>)(<span class="charliteral">'A'</span>+(x/26)), (<span class="keywordtype">char</span>)(<span class="charliteral">'A'</span>+(x%26)));
00213         <span class="keywordflow">return</span> string(name);
00214 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearcha6" doxytag="NL3D::CZoneSearch::getZonePos" ></a><p>
<table class="mdTable" 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::CZoneSearch::getZonePos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>zoneId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</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="a06774.html#l00152">152</a> of file <a class="el" href="a06774.html">zone_search.cpp</a>.
<p>
References <a class="el" href="a06775.html#l00087">_SizeZoneY</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a06770.html#l00080">NL3D::CZoneManager::checkZonesAround()</a>.
<p>
<div class="fragment"><pre>00153 {
00154         <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>*(zoneId&amp;255);
00155         <a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a03754.html#NL3D_1_1CZoneSearchr3">_SizeZoneY</a>*(zoneId&gt;&gt;8);     
00156 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CZoneSearchr0" doxytag="NL3D::CZoneSearch::_NbZoneX" ></a><p>
<table class="mdTable" 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="a03754.html#NL3D_1_1CZoneSearchr0">NL3D::CZoneSearch::_NbZoneX</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="a06775.html#l00078">78</a> of file <a class="el" href="a06775.html">zone_search.h</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00043">CZoneSearch()</a>, <a class="el" href="a06774.html#l00158">getListZoneId()</a>, and <a class="el" href="a06774.html#l00096">getListZoneName()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearchr1" doxytag="NL3D::CZoneSearch::_NbZoneY" ></a><p>
<table class="mdTable" 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="a03754.html#NL3D_1_1CZoneSearchr1">NL3D::CZoneSearch::_NbZoneY</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Number zones on Y axis of landscape. 
<p>

<p>
Definition at line <a class="el" href="a06775.html#l00081">81</a> of file <a class="el" href="a06775.html">zone_search.h</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00043">CZoneSearch()</a>, <a class="el" href="a06774.html#l00158">getListZoneId()</a>, and <a class="el" href="a06774.html#l00096">getListZoneName()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearchr2" doxytag="NL3D::CZoneSearch::_SizeZoneX" ></a><p>
<table class="mdTable" 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="a03754.html#NL3D_1_1CZoneSearchr2">NL3D::CZoneSearch::_SizeZoneX</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="a06775.html#l00084">84</a> of file <a class="el" href="a06775.html">zone_search.h</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00043">CZoneSearch()</a>, <a class="el" href="a06774.html#l00158">getListZoneId()</a>, <a class="el" href="a06774.html#l00096">getListZoneName()</a>, <a class="el" href="a06774.html#l00144">getZoneId()</a>, and <a class="el" href="a06774.html#l00067">getZoneName()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CZoneSearchr3" doxytag="NL3D::CZoneSearch::_SizeZoneY" ></a><p>
<table class="mdTable" 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="a03754.html#NL3D_1_1CZoneSearchr3">NL3D::CZoneSearch::_SizeZoneY</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="a06775.html#l00087">87</a> of file <a class="el" href="a06775.html">zone_search.h</a>.
<p>
Referenced by <a class="el" href="a06774.html#l00043">CZoneSearch()</a>, <a class="el" href="a06774.html#l00158">getListZoneId()</a>, <a class="el" href="a06774.html#l00096">getListZoneName()</a>, <a class="el" href="a06774.html#l00144">getZoneId()</a>, <a class="el" href="a06774.html#l00067">getZoneName()</a>, and <a class="el" href="a06774.html#l00152">getZonePos()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06775.html">zone_search.h</a><li><a class="el" href="a06774.html">zone_search.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:36:22 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>