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
|
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>nevrax.org : docs</TITLE>
<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF='/'><b>Home</B></FONT></A> </TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=><b>nevrax.com</B></FONT></A> </TD>
</TR>
</TABLE>
<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
<TR><TD BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>
<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!------ Begin Box ------>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
<TABLE cellspacing=0 cellpadding=1 border=0>
<tr><td ALIGN=middle><a class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
</TABLE>
</TD></TR></TABLE></TD></TR></TABLE>
<!------ End Box ------>
</TD>
<TD WIDTH=15><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD ALIGN=left valign=top><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!-- title -->
<TABLE background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
<!-- block -->
<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
<TD><B>Documentation</B></TD>
<TD ALIGN=RIGHT> </td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> </center>
<hr><h1>global_retriever.h</h1><a href="global__retriever_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025
00026 <font class="preprocessor">#ifndef NL_GLOBAL_RETRIEVER_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_GLOBAL_RETRIEVER_H</font>
00028 <font class="preprocessor"></font>
00029 <font class="preprocessor">#include <vector></font>
00030 <font class="preprocessor">#include <list></font>
00031
00032 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="vector_8h.html">nel/misc/vector.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="file_8h.html">nel/misc/file.h</a>"</font>
00035
00036 <font class="preprocessor">#include "<a class="code" href="vector_8h.html">nel/misc/vector.h</a>"</font>
00037 <font class="preprocessor">#include "<a class="code" href="vectord_8h.html">nel/misc/vectord.h</a>"</font>
00038 <font class="preprocessor">#include "<a class="code" href="aabbox_8h.html">nel/misc/aabbox.h</a>"</font>
00039
00040 <font class="preprocessor">#include "<a class="code" href="local__retriever_8h.html">pacs/local_retriever.h</a>"</font>
00041 <font class="preprocessor">#include "<a class="code" href="retriever__instance_8h.html">pacs/retriever_instance.h</a>"</font>
00042 <font class="preprocessor">#include "<a class="code" href="vector__2s_8h.html">pacs/vector_2s.h</a>"</font>
00043 <font class="preprocessor">#include "<a class="code" href="collision__surface__temp_8h.html">pacs/collision_surface_temp.h</a>"</font>
00044 <font class="preprocessor">#include "<a class="code" href="retriever__bank_8h.html">pacs/retriever_bank.h</a>"</font>
00045
00046 <font class="preprocessor">#include "<a class="code" href="u__global__retriever_8h.html">nel/pacs/u_global_retriever.h</a>"</font>
00047
00048
00049 <font class="preprocessor">#include "<a class="code" href="pacs_2quad__grid_8h.html">pacs/quad_grid.h</a>"</font>
00050
00051
00052 <font class="keyword">namespace </font>NLPACS
00053 {
00054
<a name="l00061"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html">00061</a> <font class="keyword">class </font>CGlobalRetriever : <font class="keyword">public</font> UGlobalRetriever
00062 {
00063 <font class="keyword">public</font>:
00064
<a name="l00072"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CGlobalPosition.html">00072</a> <font class="keyword">class </font>CGlobalPosition : <font class="keyword">public</font> UGlobalPosition
00073 {
00074 <font class="keyword">public</font>:
<a name="l00079"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CGlobalPosition.html#a0">00079</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CGlobalPosition.html#a0">CGlobalPosition</a>(sint32 instanceId=-1,
00080 <font class="keyword">const</font> CLocalRetriever::CLocalPosition &localPosition=CLocalRetriever::CLocalPosition::CLocalPosition())
00081 {
00082 <a class="code" href="classNLPACS_1_1UGlobalPosition.html#m0">InstanceId</a>=instanceId;
00083 <a class="code" href="classNLPACS_1_1UGlobalPosition.html#m1">LocalPosition</a>=localPosition;
00084 }
00085
00087 <font class="comment">//void serial(NLMISC::IStream &f) { f.serial(InstanceId, LocalPosition); }</font>
00088 };
00089
<a name="l00090"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html">00090</a> <font class="keyword">class </font>CLocalPath
00091 {
00092 <font class="keyword">public</font>:
<a name="l00093"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m0">00093</a> sint32 <a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m0">InstanceId</a>;
<a name="l00094"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m1">00094</a> CLocalRetriever::CLocalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m1">Start</a>;
<a name="l00095"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m2">00095</a> CLocalRetriever::CLocalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m2">End</a>;
<a name="l00096"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m3">00096</a> std::vector<CVector2s> <a class="code" href="classNLPACS_1_1CGlobalRetriever_1_1CLocalPath.html#m3">Path</a>;
00097 };
00098
<a name="l00099"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#s0">00099</a> <font class="keyword">typedef</font> std::vector<CLocalPath> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#s0">CGlobalPath</a>;
00100
00101 <font class="keyword">private</font>:
<a name="l00103"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#o0">00103</a> <font class="keyword">mutable</font> CCollisionSurfaceTemp <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#o0">_InternalCST</a>;
00104
<a name="l00106"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#o1">00106</a> <font class="keyword">mutable</font> std::vector<uint8> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#o1">_RetrieveTable</a>;
00107
00108 <font class="keyword">protected</font>:
00109
<a name="l00111"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">00111</a> <font class="keyword">const</font> CRetrieverBank *<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">_RetrieverBank</a>;
00112
<a name="l00114"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">00114</a> <font class="keyword">mutable</font> std::vector<CRetrieverInstance> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>;
00115
<a name="l00117"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n2">00117</a> <font class="keyword">mutable</font> CQuadGrid<uint32> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n2">_InstanceGrid</a>;
00118
<a name="l00120"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n3">00120</a> <a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n3">_BBox</a>;
00121
00122 <font class="keyword">public</font>:
00124 <font class="comment">// @{</font>
00125
<a name="l00130"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_0">00130</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_0">CGlobalRetriever</a>(<font class="keyword">const</font> CRetrieverBank *bank=NULL)
00131 : <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">_RetrieverBank</a>(bank)
00132 { }
<a name="l00133"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_1">00133</a> <font class="keyword">virtual</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_1">~CGlobalRetriever</a>() {}
00134
00135
00137 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_2">init</a>();
00138
00140 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_3">initQuadGrid</a>();
00141
00143 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z934_4">initRetrieveTable</a>();
00144
00145 <font class="comment">// @}</font>
00146
00147
00149
00150
00151
<a name="l00153"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_0">00153</a> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_0">getBBox</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> _BBox; }
00154
00155
<a name="l00157"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_1">00157</a> <font class="keyword">const</font> std::vector<CRetrieverInstance> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_1">getInstances</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>; }
00158
<a name="l00160"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_2">00160</a> <font class="keyword">const</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_2">getInstance</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>]; }
00161
00162
00166 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_3">selectInstances</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> &bbox, CCollisionSurfaceTemp &cst) <font class="keyword">const</font>;
00167
<a name="l00169"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_4">00169</a> <font class="keyword">const</font> CRetrieverBank *<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_4">getRetrieverBank</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">_RetrieverBank</a>; }
00170
<a name="l00172"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_5">00172</a> <font class="keyword">const</font> CLocalRetriever &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_5">getRetriever</a>(uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">_RetrieverBank</a>->getRetriever(<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>); }
00173
00174
<a name="l00176"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_6">00176</a> uint32 <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_6">getMaterial</a>(<font class="keyword">const</font> UGlobalPosition &pos)<font class="keyword"> const</font>
00177 <font class="keyword"> </font>{
00178 <font class="keywordflow">if</font> (pos.InstanceId < 0 || pos.InstanceId >= (sint)<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>.size())
00179 <font class="keywordflow">return</font> 0xFFFFFFFF;
00180
00181 <font class="keyword">const</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a> &instance = <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[pos.InstanceId];
00182 <font class="keyword">const</font> CLocalRetriever &retriever = <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_5">getRetriever</a>(instance.getRetrieverId());
00183
00184 <font class="keywordflow">if</font> (pos.LocalPosition.Surface < 0 || pos.LocalPosition.Surface >= (sint)retriever.getSurfaces().size())
00185 <font class="keywordflow">return</font> 0xFFFFFFFF;
00186
00187 <font class="keywordflow">return</font> retriever.getSurface(pos.LocalPosition.Surface).getMaterial();
00188 }
00189
<a name="l00191"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_7">00191</a> <font class="keywordtype">bool</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_7">isInterior</a>(<font class="keyword">const</font> UGlobalPosition &pos)<font class="keyword"> const</font>
00192 <font class="keyword"> </font>{
00193 <font class="keywordflow">if</font> (pos.InstanceId < 0 || pos.InstanceId >= (sint)<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>.size())
00194 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00195
00196 <font class="keywordflow">return</font> (<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[pos.InstanceId].getType() == CLocalRetriever::Interior);
00197 }
00198
<a name="l00200"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_8">00200</a> <font class="keywordtype">bool</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_8">isWaterPosition</a>(<font class="keyword">const</font> UGlobalPosition &pos, <font class="keywordtype">float</font> &waterHeight)<font class="keyword"> const</font>
00201 <font class="keyword"> </font>{
00202 <font class="keywordflow">if</font> (pos.InstanceId < 0 || pos.InstanceId >= (sint)<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>.size())
00203 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00204
00205 <font class="keyword">const</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a> &instance = <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[pos.InstanceId];
00206 <font class="keyword">const</font> CLocalRetriever &retriever = <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z935_5">getRetriever</a>(instance.getRetrieverId());
00207 <font class="keyword">const</font> CRetrievableSurface &surface = retriever.getSurface(pos.LocalPosition.Surface);
00208
00209 waterHeight = surface.getWaterHeight();
00210
00211 <font class="keywordflow">return</font> (surface.getFlags() & CRetrievableSurface::IsUnderWaterBit) != 0;
00212 }
00213
00215
00217
00218
00220 UGlobalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_0">retrievePosition</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &estimated) <font class="keyword">const</font>;
00221
00223 UGlobalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_0">retrievePosition</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &estimated) <font class="keyword">const</font>;
00224
00226 UGlobalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_0">retrievePosition</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &estimated, <font class="keywordtype">float</font> threshold) <font class="keyword">const</font>;
00227
00229 UGlobalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_0">retrievePosition</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &estimated, <font class="keywordtype">double</font> threshold) <font class="keyword">const</font>;
00230
00232 sint32 <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_4">getIdentifier</a>(<font class="keyword">const</font> std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>) <font class="keyword">const</font>;
00233
00235 <font class="keyword">const</font> std::string &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_4">getIdentifier</a>(<font class="keyword">const</font> UGlobalPosition &position) <font class="keyword">const</font>;
00236
00243 <font class="keywordtype">bool</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_6">buildInstance</a>(<font class="keyword">const</font> std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &position, sint32 &instanceId);
00244
00248 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_7">removeInstance</a>(sint32 instanceId);
00249
00251 <font class="comment">// void snapToInteriorGround(UGlobalPosition &position) const;</font>
00252
00254 <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_8">getGlobalPosition</a>(<font class="keyword">const</font> UGlobalPosition &global) <font class="keyword">const</font>;
00255
00257 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_9">getDoubleGlobalPosition</a>(<font class="keyword">const</font> UGlobalPosition &global) <font class="keyword">const</font>;
00258
00260 <font class="keywordtype">bool</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z936_10">testRaytrace</a> (<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &v0, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &v1);
00261
00263
00264
00266
00267
00269 <font class="keyword">const</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_0">makeInstance</a>(uint32 retriever, uint8 orientation, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &origin);
00270
<a name="l00272"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_1">00272</a> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_1">getInstanceFullAccess</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>) { <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>]; }
00273
<a name="l00275"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_2">00275</a> <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_2">setRetrieverBank</a>(<font class="keyword">const</font> CRetrieverBank *bank) { <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n0">_RetrieverBank</a> = bank; }
00276
00277
00279 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_3">resetAllLinks</a>();
00280
00282 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_4">initAll</a>();
00284 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_5">makeLinks</a>(uint n);
00286 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_6">makeAllLinks</a>();
00287
00289 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_7">check</a>() <font class="keyword">const</font>;
00290
00292 <font class="keywordtype">float</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_8">distanceToBorder</a>(<font class="keyword">const</font> UGlobalPosition &pos) <font class="keyword">const</font>;
00294 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_9">getBorders</a>(<font class="keyword">const</font> UGlobalPosition &pos, std::vector<NLMISC::CLine> &edges);
00295
00296
00298 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z937_10">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &f);
00299
00301
00302
00304 <font class="comment">// @{</font>
00313 <font class="comment"></font> <font class="keyword">const</font> <a class="code" href="namespaceNLPACS.html#a0">TCollisionSurfaceDescVector</a> *<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_0">testCylinderMove</a>(<font class="keyword">const</font> UGlobalPosition &start, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &delta,
00314 <font class="keywordtype">float</font> radius, CCollisionSurfaceTemp &cst) <font class="keyword">const</font>;
00324 <font class="keyword">const</font> <a class="code" href="namespaceNLPACS.html#a0">TCollisionSurfaceDescVector</a> *<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_1">testBBoxMove</a>(<font class="keyword">const</font> UGlobalPosition &start, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &delta,
00325 <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &locI, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &locJ, CCollisionSurfaceTemp &cst) <font class="keyword">const</font>;
00339 UGlobalPosition <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_2">doMove</a>(<font class="keyword">const</font> UGlobalPosition &start, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &delta, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>, CCollisionSurfaceTemp &cst, <font class="keywordtype">bool</font> rebuildChains=<font class="keyword">false</font>) <font class="keyword">const</font>;
00342 <font class="keyword">const</font> CRetrievableSurface *<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_3">getSurfaceById</a>(<font class="keyword">const</font> CSurfaceIdent &surfId) <font class="keyword">const</font>;
00352 <font class="keyword">const</font> <a class="code" href="namespaceNLPACS.html#a0">TCollisionSurfaceDescVector</a> &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_4">testBBoxRot</a>(<font class="keyword">const</font> CGlobalPosition &start,
00353 <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &locI, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &locJ, CCollisionSurfaceTemp &cst) <font class="keyword">const</font>;
00354
00358 <font class="keywordtype">float</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_5">getMeanHeight</a>(<font class="keyword">const</font> UGlobalPosition &pos) <font class="keyword">const</font>;
00359
<a name="l00361"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_6">00361</a> <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_6">updateHeight</a>(UGlobalPosition &pos)<font class="keyword"> const </font>{ pos.LocalPosition.Estimation.z = <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z938_5">getMeanHeight</a>(pos); }
00362
00363 <font class="comment">// @}</font>
00364
00365
00367 <font class="comment">// @{</font>
00368
00371 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z939_0">findAStarPath</a>(<font class="keyword">const</font> UGlobalPosition &begin, <font class="keyword">const</font> UGlobalPosition &end, std::vector<CRetrieverInstance::CAStarNodeAccess> &path, uint32 forbidFlags) <font class="keyword">const</font>;
00372
00375 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z939_1">findPath</a>(<font class="keyword">const</font> UGlobalPosition &begin, <font class="keyword">const</font> UGlobalPosition &end, <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#s0">CGlobalPath</a> &path, uint32 forbidFlags=0) <font class="keyword">const</font>;
00376
00377 <font class="comment">// @}</font>
00378
00379 <font class="keyword">private</font>:
00381 <font class="comment">// @{</font>
00382
<a name="l00384"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z940_0">00384</a> CRetrieverInstance::CAStarNodeInfo &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z940_0">getNode</a>(CRetrieverInstance::CAStarNodeAccess &access)<font class="keyword"> const</font>
00385 <font class="keyword"> </font>{
00386 <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#n1">_Instances</a>[access.InstanceId]._NodesInformation[access.NodeId];
00387 }
00388
00389 <font class="comment">// @}</font>
00390
00391
00393 <font class="comment">// @{</font>
<a name="l00394"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_0">00394</a> <font class="keyword">enum</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_0">TCollisionType</a> { <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_0u0">Circle</a>, <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_0u1">BBox</a> };
00398 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_1">findCollisionChains</a>(CCollisionSurfaceTemp &cst, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CAABBox.html">NLMISC::CAABBox</a> &bboxMove, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a> &origin) <font class="keyword">const</font>;
00402 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_2">testCollisionWithCollisionChains</a>(CCollisionSurfaceTemp &cst, <font class="keyword">const</font> CVector2f &startCol, <font class="keyword">const</font> CVector2f &deltaCol,
00403 CSurfaceIdent startSurface, <font class="keywordtype">float</font> radius, <font class="keyword">const</font> CVector2f bbox[4], <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_0">TCollisionType</a> colType) <font class="keyword">const</font>;
00409 CSurfaceIdent <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_3">testMovementWithCollisionChains</a>(CCollisionSurfaceTemp &cst, <font class="keyword">const</font> CVector2f &startCol, <font class="keyword">const</font> CVector2f &deltaCol,
00410 CSurfaceIdent startSurface) <font class="keyword">const</font>;
00414 <font class="keywordtype">void</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_4">testRotCollisionWithCollisionChains</a>(CCollisionSurfaceTemp &cst, <font class="keyword">const</font> CVector2f &startCol, CSurfaceIdent startSurface, <font class="keyword">const</font> CVector2f bbox[4]) <font class="keyword">const</font>;
00416 <font class="keywordtype">bool</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#z941_5">verticalChain</a>(<font class="keyword">const</font> CCollisionChain &colChain) <font class="keyword">const</font>;
00417 <font class="comment">// @}</font>
00418
00419 <font class="keyword">protected</font>:
<a name="l00420"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">00420</a> <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#l0">CRetrieverInstance</a>;
00421
<a name="l00422"></a><a class="code" href="classNLPACS_1_1CGlobalRetriever.html#b0">00422</a> CCollisionSurfaceTemp &<a class="code" href="classNLPACS_1_1CGlobalRetriever.html#b0">getInternalCST</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNLPACS_1_1CGlobalRetriever.html#o0">_InternalCST</a>; }
00423 };
00424
00425 }; <font class="comment">// NLPACS</font>
00426
00427 <font class="preprocessor">#endif // NL_GLOBAL_RETRIEVER_H</font>
00428 <font class="preprocessor"></font>
00429 <font class="comment">/* End of global_retriever.h */</font>
</pre></div>
<!-- footer -->
<BR><FONT Size=+5> </FONT>
</TD>
<TD WIDTH=15><IMG SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|