aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02588.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a02588.html')
-rw-r--r--docs/doxygen/nel/a02588.html5832
1 files changed, 5832 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02588.html b/docs/doxygen/nel/a02588.html
new file mode 100644
index 00000000..d208ef44
--- /dev/null
+++ b/docs/doxygen/nel/a02588.html
@@ -0,0 +1,5832 @@
+<!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: NLPACS::CGlobalRetriever 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>NLPACS::CGlobalRetriever Class Reference</h1><code>#include &lt;<a class="el" href="a05762.html">global_retriever.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLPACS::CGlobalRetriever:
+<p><center><img src="a02588.png" usemap="#NLPACS::CGlobalRetriever_map" border="0" alt=""></center>
+<map name="NLPACS::CGlobalRetriever_map">
+<area href="a02589.html" alt="NLPACS::UGlobalRetriever" shape="rect" coords="0,0,165,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A class that allows to retrieve surface in a large amount of zones (referred as instances.) <dl compact><dt><b>Author:</b></dt><dd>Benjamin Legros <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="a05762.html#l00064">64</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Collisions part.</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0">TCollisionType</a> { <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery1">Circle</a>,
+<a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery0">BBox</a>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_1">findCollisionChains</a> (<a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;bboxMove, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;origin) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_2">testCollisionWithCollisionChains</a> (<a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, const <a class="el" href="a03660.html">CVector2f</a> &amp;startCol, const <a class="el" href="a03660.html">CVector2f</a> &amp;deltaCol, <a class="el" href="a03462.html">CSurfaceIdent</a> startSurface, float radius, const <a class="el" href="a03660.html">CVector2f</a> bbox[4], <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0">TCollisionType</a> colType) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03462.html">CSurfaceIdent</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_3">testMovementWithCollisionChains</a> (<a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, const <a class="el" href="a03660.html">CVector2f</a> &amp;startCol, const <a class="el" href="a03660.html">CVector2f</a> &amp;deltaCol, <a class="el" href="a03462.html">CSurfaceIdent</a> startSurface, <a class="el" href="a02591.html">UGlobalPosition</a> &amp;restart) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_4">testRotCollisionWithCollisionChains</a> (<a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, const <a class="el" href="a03660.html">CVector2f</a> &amp;startCol, <a class="el" href="a03462.html">CSurfaceIdent</a> startSurface, const <a class="el" href="a03660.html">CVector2f</a> bbox[4]) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_5">verticalChain</a> (const <a class="el" href="a02375.html">CCollisionChain</a> &amp;colChain) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">test if a collisionChain separate 2 walls. <a href="#NLPACS_1_1CGlobalRetrieverz1251_5"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw3">MissingLr</a> = -2,
+<a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a> = -1,
+<a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw4">Success</a> = 0
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::vector&lt; <a class="el" href="a02592.html">CLocalPath</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw1">CGlobalPath</a></td></tr>
+
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Position retrieving methods.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_0">buildInstance</a> (const std::string &amp;<a class="el" href="a04223.html#a564">id</a>, const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;position, <a class="el" href="a04558.html#a10">sint32</a> &amp;instanceId)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">NLMISC::CVectorD</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_1">getDoubleGlobalPosition</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;global) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a global position object into a 'human-readable' CVector (double instead.). <a href="#NLPACS_1_1CGlobalRetrieverz1239_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_2">getGlobalPosition</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;global) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts a global position object into a 'human-readable' CVector. <a href="#NLPACS_1_1CGlobalRetrieverz1239_2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const std::string &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_3">getIdentifier</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;position) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the identifier of the global position. <a href="#NLPACS_1_1CGlobalRetrieverz1239_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_4">getIdentifier</a> (const std::string &amp;<a class="el" href="a04223.html#a564">id</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the retriever id from the string id. <a href="#NLPACS_1_1CGlobalRetrieverz1239_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_5">getLocalRetrieverId</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;position) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the LocalRetrieverId of the global position. <a href="#NLPACS_1_1CGlobalRetrieverz1239_5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_6">insurePosition</a> (<a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insure position inside surface. <a href="#NLPACS_1_1CGlobalRetrieverz1239_6"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_7">removeInstance</a> (<a class="el" href="a04558.html#a10">sint32</a> instanceId)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_8">retrievePosition</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;estimated, <a class="el" href="a04558.html#a15">uint</a> h, <a class="el" href="a04558.html#a14">sint</a> &amp;result) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever (double instead.). <a href="#NLPACS_1_1CGlobalRetrieverz1239_8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_9">retrievePosition</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;estimated, double threshold, <a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a> retrieveSpec) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever (double instead.). <a href="#NLPACS_1_1CGlobalRetrieverz1239_9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_10">retrievePosition</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;estimated, double threshold) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever (double instead.). <a href="#NLPACS_1_1CGlobalRetrieverz1239_10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_11">retrievePosition</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;estimated, float threshold) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1239_11"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_12">retrievePosition</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;estimated) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever (double instead.). <a href="#NLPACS_1_1CGlobalRetrieverz1239_12"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;estimated) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the position of an estimated point in the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1239_13"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_14">testPosition</a> (<a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_15">testRaytrace</a> (const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;v0, const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;v1)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Make a raytrace test. For the time, always return false. <a href="#NLPACS_1_1CGlobalRetrieverz1239_15"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Initialisation</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_0">CGlobalRetriever</a> (const <a class="el" href="a03331.html">CRetrieverBank</a> *bank=NULL)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_1">init</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup an empty global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1235_1"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_2">initQuadGrid</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill the quadgrid with the instances. <a href="#NLPACS_1_1CGlobalRetrieverz1235_2"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_3">initRetrieveTable</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Init the retrieve table. <a href="#NLPACS_1_1CGlobalRetrieverz1235_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_4">~CGlobalRetriever</a> ()</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Mutators</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_0">check</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks the retriever for errors. <a href="#NLPACS_1_1CGlobalRetrieverz1241_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_1">distanceToBorder</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks the retriever for errors. <a href="#NLPACS_1_1CGlobalRetrieverz1241_1"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_2">getBorders</a> (const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;sbox, std::vector&lt; std::pair&lt; <a class="el" href="a02759.html">NLMISC::CLine</a>, <a class="el" href="a04558.html#a7">uint8</a> &gt; &gt; &amp;edges)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks the retriever for errors. <a href="#NLPACS_1_1CGlobalRetrieverz1241_2"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_3">getBorders</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos, std::vector&lt; std::pair&lt; <a class="el" href="a02759.html">NLMISC::CLine</a>, <a class="el" href="a04558.html#a7">uint8</a> &gt; &gt; &amp;edges)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks the retriever for errors. <a href="#NLPACS_1_1CGlobalRetrieverz1241_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03333.html">CRetrieverInstance</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_4">getInstanceFullAccess</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the instance by its id, with full read/write access. <a href="#NLPACS_1_1CGlobalRetrieverz1241_4"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_5">initAll</a> (bool initInstances=true)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inits all the instances inside the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1241_5"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_6">makeAllLinks</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Links all the instances inside the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1241_6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03333.html">CRetrieverInstance</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_7">makeInstance</a> (<a class="el" href="a04558.html#a11">uint32</a> retriever, <a class="el" href="a04558.html#a7">uint8</a> orientation, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;origin)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an instance of local retriever at the origine position with the given orientation. <a href="#NLPACS_1_1CGlobalRetrieverz1241_7"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_8">makeLinks</a> (<a class="el" href="a04558.html#a15">uint</a> n)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Links the instance referred by its id to its neighbors. <a href="#NLPACS_1_1CGlobalRetrieverz1241_8"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_9">resetAllLinks</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets all links within the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1241_9"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_10">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;f)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serialises the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1241_10"></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="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_11">setRetrieverBank</a> (const <a class="el" href="a03331.html">CRetrieverBank</a> *bank)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the retriever bank. <a href="#NLPACS_1_1CGlobalRetrieverz1241_11"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Collisions part.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02591.html">UGlobalPosition</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_0">doMove</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;start, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;delta, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, bool rebuildChains=false) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_1">getMeanHeight</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03328.html">CRetrievableSurface</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_2">getSurfaceById</a> (const <a class="el" href="a03462.html">CSurfaceIdent</a> &amp;surfId) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a05380.html#a0">TCollisionSurfaceDescVector</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_3">testBBoxMove</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;start, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;delta, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;locI, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;locJ, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a05380.html#a0">TCollisionSurfaceDescVector</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_4">testBBoxRot</a> (const <a class="el" href="a02590.html">CGlobalPosition</a> &amp;start, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;locI, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;locJ, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a05380.html#a0">TCollisionSurfaceDescVector</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_5">testCylinderMove</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;start, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;delta, float radius, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_6">updateHeight</a> (<a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Upadates the height of the given global position. <a href="#NLPACS_1_1CGlobalRetrieverz1245_6"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Pathfinding part.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1247_0">findAStarPath</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;begin, const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;end, std::vector&lt; <a class="el" href="a03334.html">CRetrieverInstance::CAStarNodeAccess</a> &gt; &amp;path, <a class="el" href="a04558.html#a11">uint32</a> forbidFlags) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1247_1">findPath</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;begin, const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;end, <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw1">CGlobalPath</a> &amp;path, <a class="el" href="a04558.html#a11">uint32</a> forbidFlags=0) const </td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Selectors</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_0">getBBox</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the BBox of the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1237_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03333.html">CRetrieverInstance</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the retriever instance referred by its id. <a href="#NLPACS_1_1CGlobalRetrieverz1237_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector&lt; <a class="el" href="a03333.html">CRetrieverInstance</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_2">getInstances</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the vector of retriever instances that compose the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1237_2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_3">getMaterial</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the material at this position. <a href="#NLPACS_1_1CGlobalRetrieverz1237_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02787.html">CLocalRetriever</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a> (<a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the local retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1237_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03331.html">CRetrieverBank</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_5">getRetrieverBank</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the retriever bank associated to this global retriever. <a href="#NLPACS_1_1CGlobalRetrieverz1237_5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_6">isInterior</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test if the position is an interior. <a href="#NLPACS_1_1CGlobalRetrieverz1237_6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_7">isWaterPosition</a> (const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;pos, float &amp;waterHeight) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test if the position is in water. <a href="#NLPACS_1_1CGlobalRetrieverz1237_7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a> (const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;bbox, <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;cst, <a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a> <a class="el" href="a04223.html#a581">type</a>=UGlobalPosition::Unspecified) const </td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Dynamic loading part.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1243_0">refreshLrAround</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;position, float radius)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1243_1">refreshLrAroundNow</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;position, float radius)</td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02589.html">UGlobalRetriever</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievere0">createGlobalRetriever</a> (const char *globalRetriever, const <a class="el" href="a03332.html">URetrieverBank</a> *retrieverBank)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievere1">deleteGlobalRetriever</a> (<a class="el" href="a02589.html">UGlobalRetriever</a> *retriever)</td></tr>
+
+<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverb0">getInternalCST</a> () const </td></tr>
+
+<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02156.html">NLMISC::CAABBox</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The axis aligned bounding box of the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverp0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a10">sint32</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forbidden instance for retrieve position. <a href="#NLPACS_1_1CGlobalRetrieverp1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03272.html">CQuadGrid</a>&lt; <a class="el" href="a04558.html#a11">uint32</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The grid of instances. <a href="#NLPACS_1_1CGlobalRetrieverp2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03333.html">CRetrieverInstance</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The instances of the global retriever. <a href="#NLPACS_1_1CGlobalRetrieverp3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::list&lt; <a class="el" href="a02593.html">CLrLoader</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03331.html">CRetrieverBank</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The <a class="el" href="a03331.html">CRetrieverBank</a> where the commmon retrievers are stored. <a href="#NLPACS_1_1CGlobalRetrieverp5"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
+<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Pathfinding part.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03335.html">CRetrieverInstance::CAStarNodeInfo</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1249_0">getNode</a> (<a class="el" href="a03334.html">CRetrieverInstance::CAStarNodeAccess</a> &amp;access) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the CAStarNodeInfo referred by its access. <a href="#NLPACS_1_1CGlobalRetrieverz1249_0"></a><br><br></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="a02387.html">CCollisionSurfaceTemp</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">_RetrieveTable</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to retrieve the surface. Internal use only, to avoid large amount of new/delete. <a href="#NLPACS_1_1CGlobalRetrieverr1"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrievern0">CLrLoader</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a></td></tr>
+
+</table>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverw1" doxytag="NLPACS::CGlobalRetriever::CGlobalPath" ></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"> typedef std::vector&lt;<a class="el" href="a02592.html">CLocalPath</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw1">NLPACS::CGlobalRetriever::CGlobalPath</a>
+ </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="a05762.html#l00109">109</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01062">findPath()</a>. </td>
+ </tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverw0" doxytag="NLPACS::CGlobalRetriever::@52" ></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"> anonymous enum
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw3" doxytag="MissingLr" ></a>MissingLr</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2" doxytag="Failed" ></a>Failed</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw4" doxytag="Success" ></a>Success</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00068">68</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+<div class="fragment"><pre>00069 {
+00070 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw3">MissingLr</a> = -2,
+00071 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a> = -1,
+00072 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw4">Success</a> = 0
+00073 };
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_0" doxytag="NLPACS::CGlobalRetriever::TCollisionType" ></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"> enum <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0">NLPACS::CGlobalRetriever::TCollisionType</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery1" doxytag="Circle" ></a>Circle</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery0" doxytag="BBox" ></a>BBox</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00494">494</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+<div class="fragment"><pre>00494 { <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery1">Circle</a>, <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0NLPACS_1_1CGlobalRetrievery0">BBox</a> };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1235_0" doxytag="NLPACS::CGlobalRetriever::CGlobalRetriever" ></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"> NLPACS::CGlobalRetriever::CGlobalRetriever </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03331.html">CRetrieverBank</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>bank</em> = NULL </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor. Creates a global retriever with given width, height and retriever bank.
+<p>
+Definition at line <a class="el" href="a05762.html#l00178">178</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>.
+<p>
+<div class="fragment"><pre>00179 : <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>(bank)
+00180 { }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1235_4" doxytag="NLPACS::CGlobalRetriever::~CGlobalRetriever" ></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"> virtual NLPACS::CGlobalRetriever::~<a class="el" href="a02588.html">CGlobalRetriever</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><code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor. Creates a global retriever with given width, height and retriever bank.
+<p>
+Definition at line <a class="el" href="a05762.html#l00181">181</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+<div class="fragment"><pre>00181 {}
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_0" doxytag="NLPACS::CGlobalRetriever::buildInstance" ></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"> bool NLPACS::CGlobalRetriever::buildInstance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>position</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>instanceId</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Builds a instance of retriever, and link it on the ground (or wherever) <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>id</em>&nbsp;</td><td>a valid retriever id to be instanciated </td></tr>
+ <tr><td valign=top><em>a</em>&nbsp;</td><td>valid position where the retriever should be instanciated </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>false if failed</dd></dl>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera0">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00766">766</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00736">getIdentifier()</a>, <a class="el" href="a06338.html#l00170">NLPACS::CRetrieverInstance::getInstanceId()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05761.html#l00430">makeInstance()</a>, <a class="el" href="a05761.html#l00367">makeLinks()</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
+<p>
+<div class="fragment"><pre>00767 {
+00768 NL_ALLOC_CONTEXT( Pacs )
+00769
+00770 <a class="code" href="a04558.html#a10">sint32</a> retrieverId = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_4">getIdentifier</a>(<span class="keywordtype">id</span>);
+00771
+00772 instanceId = -1;
+00773
+00774 <span class="comment">// check retriever exists</span>
+00775 <span class="keywordflow">if</span> (retrieverId &lt; 0)
+00776 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00777
+00778 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_7">makeInstance</a>(retrieverId, 0, CVector(position));
+00779
+00780 <span class="comment">// check make instance success</span>
+00781 <span class="keywordflow">if</span> (&amp;instance == NULL || instance.getInstanceId() == -1 || instance.getRetrieverId() != retrieverId)
+00782 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00783
+00784 <span class="comment">// links new instance to its neighbors</span>
+00785 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_8">makeLinks</a>(instance.getInstanceId());
+00786
+00787 instanceId = instance.getInstanceId();
+00788
+00789 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00790 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_0" doxytag="NLPACS::CGlobalRetriever::check" ></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 NLPACS::CGlobalRetriever::check </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> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Checks the retriever for errors.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00153">153</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06338.html#l00066">NLPACS::CRetrieverInstance::CLink::BorderChainId</a>, <a class="el" href="a06338.html#l00067">NLPACS::CRetrieverInstance::CLink::ChainId</a>, <a class="el" href="a05540.html#l00282">NLPACS::CChain::getBorderChainIndex()</a>, <a class="el" href="a06338.html#l00188">NLPACS::CRetrieverInstance::getBorderChainLink()</a>, <a class="el" href="a06338.html#l00186">NLPACS::CRetrieverInstance::getBorderChainLinks()</a>, <a class="el" href="a05930.html#l00394">NLPACS::CLocalRetriever::getBorderChains()</a>, <a class="el" href="a05930.html#l00391">NLPACS::CLocalRetriever::getChain()</a>, <a class="el" href="a05930.html#l00389">NLPACS::CLocalRetriever::getChains()</a>, <a class="el" href="a05540.html#l00142">NLPACS::COrderedChain::getIndexInParent()</a>, <a class="el" href="a06338.html#l00170">NLPACS::CRetrieverInstance::getInstanceId()</a>, <a class="el" href="a05540.html#l00269">NLPACS::CChain::getLeft()</a>, <a class="el" href="a05930.html#l00381">NLPACS::CLocalRetriever::getOrderedChain()</a>, <a class="el" href="a05930.html#l00379">NLPACS::CLocalRetriever::getOrderedChains()</a>, <a class="el" href="a05540.html#l00139">NLPACS::COrderedChain::getParentId()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a06336.html#l00076">NLPACS::CRetrieverBank::getRetrievers()</a>, <a class="el" href="a05540.html#l00274">NLPACS::CChain::getRight()</a>, <a class="el" href="a05540.html#l00266">NLPACS::CChain::getSubChain()</a>, <a class="el" href="a05540.html#l00263">NLPACS::CChain::getSubChains()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a06338.html#l00178">NLPACS::CRetrieverInstance::getType()</a>, <a class="el" href="a06338.html#l00065">NLPACS::CRetrieverInstance::CLink::Instance</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06338.html#l00068">NLPACS::CRetrieverInstance::CLink::SurfaceId</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00154 {
+00155 <a class="code" href="a04558.html#a15">uint</a> i, j, k;
+00156
+00157 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++i)
+00158 {
+00159 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i].getInstanceId() == -1)
+00160 {
+00161 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Uninitialized instance %d"</span>, i);
+00162 <span class="keywordflow">continue</span>;
+00163 }
+00164
+00165 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i].getInstanceId() != (<a class="code" href="a04558.html#a14">sint</a>)i)
+00166 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"InstanceId for instance %d is not correctly initialized"</span>, i);
+00167
+00168 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i].getRetrieverId() == -1)
+00169 {
+00170 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"No retriever at instance %d"</span>, i);
+00171 <span class="keywordflow">continue</span>;
+00172 }
+00173
+00174 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i];
+00175
+00176 <span class="keywordflow">if</span> (instance.getRetrieverId()&lt;0 || instance.getRetrieverId()&gt;=(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetrievers().size())
+00177 {
+00178 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Instance %d has wrong retriever reference"</span>, i);
+00179 <span class="keywordflow">continue</span>;
+00180 }
+00181
+00182 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00183
+00184 <span class="keywordflow">for</span> (j=0; j&lt;retriever.getChains().size(); ++j)
+00185 {
+00186 <span class="keyword">const</span> CChain &amp;chain = retriever.getChain(j);
+00187 <span class="keywordflow">for</span> (k=0; k&lt;chain.getSubChains().size(); ++k)
+00188 {
+00189 <span class="keywordflow">if</span> (chain.getSubChain(k) &gt;= retriever.getOrderedChains().size())
+00190 {
+00191 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, chain %d: subchain %d reference is not valid"</span>, instance.getRetrieverId(), j, k);
+00192 <span class="keywordflow">continue</span>;
+00193 }
+00194
+00195 <span class="keywordflow">if</span> (retriever.getOrderedChain(chain.getSubChain(k)).getParentId() != j)
+00196 {
+00197 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, ochain %d: reference on parent is not valid"</span>, instance.getRetrieverId(), chain.getSubChain(k));
+00198 <span class="keywordflow">continue</span>;
+00199 }
+00200
+00201 <span class="keywordflow">if</span> (retriever.getOrderedChain(chain.getSubChain(k)).getIndexInParent() != k)
+00202 {
+00203 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, ochain %d: index on parent is not valid"</span>, instance.getRetrieverId(), chain.getSubChain(k));
+00204 <span class="keywordflow">continue</span>;
+00205 }
+00206 }
+00207
+00208 <span class="keywordflow">if</span> (chain.getLeft()&lt;0 || chain.getLeft()&gt;=(<a class="code" href="a04558.html#a14">sint</a>)retriever.getSurfaces().size())
+00209 {
+00210 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, chain %d: reference on left surface is not valid"</span>, instance.getRetrieverId(), j);
+00211 }
+00212
+00213 <span class="keywordflow">if</span> (chain.getRight()&gt;=(<a class="code" href="a04558.html#a14">sint</a>)retriever.getSurfaces().size() ||
+00214 chain.getRight()&lt;=CChain::getDummyBorderChainId() &amp;&amp; !CChain::isBorderChainId(chain.getRight()))
+00215 {
+00216 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, chain %d: reference on right surface is not valid"</span>, instance.getRetrieverId(), j);
+00217 }
+00218
+00219 <span class="keywordflow">if</span> (CChain::isBorderChainId(chain.getRight()))
+00220 {
+00221 <a class="code" href="a04558.html#a14">sint</a> link = chain.getBorderChainIndex();
+00222
+00223 <span class="keywordflow">if</span> (link&lt;0 || link&gt;=(<a class="code" href="a04558.html#a14">sint</a>)instance.getBorderChainLinks().size())
+00224 {
+00225 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, instance %d, chain %d: reference on right link is not valid"</span>, instance.getRetrieverId(), instance.getInstanceId(), j);
+00226 }
+00227 <span class="keywordflow">else</span>
+00228 {
+00229 CRetrieverInstance::CLink lnk = instance.getBorderChainLink(link);
+00230
+00231 <span class="keywordflow">if</span> (lnk.Instance != 0xFFFF || lnk.SurfaceId != 0xFFFF ||
+00232 lnk.ChainId != 0xFFFF || lnk.BorderChainId != 0xFFFF)
+00233 {
+00234 <span class="keywordflow">if</span> (lnk.Instance &gt;= _Instances.size() ||
+00235 _Instances[lnk.Instance].getRetrieverId()&lt;0 ||
+00236 _Instances[lnk.Instance].getRetrieverId()&gt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetrievers().size() ||
+00237 lnk.SurfaceId &gt;= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[lnk.Instance].getRetrieverId()).getSurfaces().size() ||
+00238 ((lnk.ChainId &gt;= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[lnk.Instance].getRetrieverId()).getChains().size() ||
+00239 lnk.BorderChainId &gt;= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[lnk.Instance].getRetrieverId()).getBorderChains().size()) &amp;&amp; instance.getType() != CLocalRetriever::Interior ))
+00240 {
+00241 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"retriever %d, instance %d, link %d: reference on instance may be not valid [Inst=%d, Surf=%d, Chain=%d, BorderChain=%d]"</span>, instance.getRetrieverId(), instance.getInstanceId(), link, lnk.Instance, lnk.SurfaceId, lnk.ChainId, lnk.BorderChainId);
+00242 }
+00243 }
+00244 }
+00245 }
+00246 }
+00247 }
+00248 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1UGlobalRetrievere0" doxytag="NLPACS::CGlobalRetriever::createGlobalRetriever" ></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="a02589.html">NLPACS::UGlobalRetriever</a> * NLPACS::UGlobalRetriever::createGlobalRetriever </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>globalRetriever</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03332.html">URetrieverBank</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>retrieverBank</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Create a global retriever.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>globalRetriver</em>&nbsp;</td><td>is the global retriver path file name. This method use the CPath to find the file. </td></tr>
+ <tr><td valign=top><em>retriverBank</em>&nbsp;</td><td>is the global retriver bank associated to the global retriever. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>the pointer on the global retriver or NULL if the file is not found.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l02382">2382</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05538.html#l02654">file</a>, <a class="el" href="a05761.html#l00414">initAll()</a>, and <a class="el" href="a05762.html#l00366">setRetrieverBank()</a>.
+<p>
+<div class="fragment"><pre>02383 {
+02384 NL_ALLOC_CONTEXT( Pacs )
+02385
+02386 <span class="comment">// Cast</span>
+02387 <span class="comment">// nlassert (dynamic_cast&lt;const NLPACS::CRetrieverBank*&gt;(retrieverBank));</span>
+02388 <span class="keyword">const</span> <a class="code" href="a03331.html">NLPACS::CRetrieverBank</a>* bank=static_cast&lt;const NLPACS::CRetrieverBank*&gt;(retrieverBank);
+02389
+02390 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>;
+02391 <span class="keywordflow">if</span> (<a class="code" href="a04115.html#a95">file</a>.open(CPath::lookup(globalRetriever)))
+02392 {
+02393 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_0">CGlobalRetriever</a> *retriever = <span class="keyword">new</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_0">CGlobalRetriever</a>();
+02394
+02395 <span class="comment">// always set the retriever bank before serializing !!</span>
+02396 retriever-&gt;setRetrieverBank(bank);
+02397
+02398 <a class="code" href="a04115.html#a95">file</a>.serial(*retriever);
+02399 retriever-&gt;initAll(<span class="keyword">false</span>); <span class="comment">// don't init instances as we serialized them</span>
+02400
+02401 <span class="keywordflow">return</span> static_cast&lt;UGlobalRetriever *&gt;(retriever);
+02402 }
+02403 <span class="keywordflow">else</span>
+02404 <span class="keywordflow">return</span> NULL;
+02405 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1UGlobalRetrievere1" doxytag="NLPACS::CGlobalRetriever::deleteGlobalRetriever" ></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 NLPACS::UGlobalRetriever::deleteGlobalRetriever </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02589.html">UGlobalRetriever</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>retriever</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Delete a global retriever.
+<p>
+Definition at line <a class="el" href="a05761.html#l02409">2409</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05646.html#l00993">r</a>.
+<p>
+<div class="fragment"><pre>02410 {
+02411 <span class="comment">// Cast</span>
+02412 <a class="code" href="a04199.html#a6">nlassert</a> (dynamic_cast&lt;NLPACS::CGlobalRetriever*&gt;(retriever));
+02413 <a class="code" href="a02588.html">NLPACS::CGlobalRetriever</a>* <a class="code" href="a04223.html#a628">r</a>=static_cast&lt;NLPACS::CGlobalRetriever*&gt;(retriever);
+02414
+02415 <span class="comment">// Delete</span>
+02416 <span class="keyword">delete</span> <a class="code" href="a04223.html#a628">r</a>;
+02417 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_1" doxytag="NLPACS::CGlobalRetriever::distanceToBorder" ></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 NLPACS::CGlobalRetriever::distanceToBorder </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Checks the retriever for errors.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera1">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00252">252</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05929.html#l00291">NLPACS::CLocalRetriever::distanceToBorder()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00253 {
+00254 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00255 <span class="keywordflow">return</span> 0.0f;
+00256
+00257 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[pos.InstanceId].getRetrieverId()).distanceToBorder(pos.LocalPosition);
+00258 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_0" doxytag="NLPACS::CGlobalRetriever::doMove" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::doMove </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>start</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>delta</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>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>rebuildChains</em> = false</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>
+apply a movement of a point against surface world. This should be called after test???Move(). NB: It's up to you to give good t, relative to result of test???Move(). Else, undefined results... NB: if you don't give same start/delta as in preceding call to testMove(), and rebuildChains==false, start is returned (nlstop in debug).<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>start</em>&nbsp;</td><td>is the start position of the movement. (must be same as passed in test???Move()). </td></tr>
+ <tr><td valign=top><em>delta</em>&nbsp;</td><td>is the requested movement (must be same as passed in test???Move()). </td></tr>
+ <tr><td valign=top><em>t</em>&nbsp;</td><td>must be in [0,1]. t*delta is the actual requested movement. </td></tr>
+ <tr><td valign=top><em>cst</em>&nbsp;</td><td>is the <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> object used as temp computing (one per thread). (must be same as passed in test???Move()). </td></tr>
+ <tr><td valign=top><em>rebuildChains</em>&nbsp;</td><td>true if <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_0">doMove()</a> is not called just after the testMove(). Then <a class="el" href="a02588.html">CGlobalRetriever</a> must recompute some part of the data needed to performing his task. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>new position of the entity.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l02028">2028</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05761.html#l00840">getDoubleGlobalPosition()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05583.html#l00321">NLPACS::CCollisionSurfaceTemp::PrecDeltaPos</a>, <a class="el" href="a05583.html#l00320">NLPACS::CCollisionSurfaceTemp::PrecStartPos</a>, <a class="el" href="a05583.html#l00319">NLPACS::CCollisionSurfaceTemp::PrecStartSurface</a>, <a class="el" href="a05583.html#l00322">NLPACS::CCollisionSurfaceTemp::PrecValid</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a05578.html#l00069">NLPACS::CSurfaceIdent::RetrieverInstanceId</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06338.html#l00046">NLPACS::SnapPrecision</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05578.html#l00071">NLPACS::CSurfaceIdent::SurfaceId</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>, <a class="el" href="a06679.html#l00038">NLPACS::Vector2sAccuracy</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06207.html#l00201">NLPACS::CPrimitiveWorldImage::doMove()</a>, and <a class="el" href="a06207.html#l01167">NLPACS::CPrimitiveWorldImage::reaction()</a>.
+<p>
+<div class="fragment"><pre>02029 {
+02030 <span class="comment">// H_AUTO(PACS_GR_doMove);</span>
+02031
+02032 CSurfaceIdent startSurface(startPos.InstanceId, startPos.LocalPosition.Surface);
+02033
+02034 <span class="comment">// clamp factor.</span>
+02035 <a class="code" href="a05378.html#a374">clamp</a>(t, 0.0f, 1.0f);
+02036
+02037 <span class="comment">// 0. reset.</span>
+02038 <span class="comment">//===========</span>
+02039 <span class="comment">// reset CollisionDescs.</span>
+02040 cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo1">CollisionDescs</a>.clear();
+02041
+02042 <span class="comment">// In a surface ?</span>
+02043 <span class="keywordflow">if</span> (startPos.InstanceId==-1)
+02044 {
+02045 <span class="comment">// Warining: this primitive is not on a surface</span>
+02046 <span class="comment">//nlassertonce (0);</span>
+02047
+02048 <span class="comment">// Return startpos</span>
+02049 <span class="keywordflow">return</span> startPos;
+02050 }
+02051
+02052 <span class="keywordflow">if</span>(!rebuildChains)
+02053 {
+02054 <span class="comment">// same move request than prec testMove() ??.</span>
+02055 <span class="keywordflow">if</span>( cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo11">PrecStartSurface</a> != startSurface ||
+02056 cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo10">PrecStartPos</a>!=startPos.LocalPosition.Estimation ||
+02057 cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo9">PrecDeltaPos</a>!=delta ||
+02058 !cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo12">PrecValid</a>)
+02059 {
+02060 <span class="comment">// if not, just return start.</span>
+02061 <span class="comment">//nlstop;</span>
+02062 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"BEN: you must fix this, it s happen!!!"</span>);
+02063 <span class="keywordflow">return</span> startPos;
+02064 }
+02065 <span class="comment">// Since we are sure we have same movement than prec testMove(), no need to rebuild cst.CollisionChains.</span>
+02066 }
+02067 <span class="keywordflow">else</span>
+02068 {
+02069 <span class="comment">// we don't have same movement than prec testMove(), we must rebuild cst.CollisionChains.</span>
+02070 <span class="comment">// Prec settings no more valids.</span>
+02071 cst.<a class="code" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo12">PrecValid</a>= <span class="keyword">false</span>;
+02072 }
+02073
+02074
+02075
+02076
+02077 <span class="comment">// 1. Choose a local basis (same than in testMove()).</span>
+02078 <span class="comment">//===========</span>
+02079 <span class="comment">// Take the retrieverInstance of startPos as a local basis.</span>
+02080 CVector origin;
+02081 origin= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startPos.InstanceId).getOrigin();
+02082
+02083
+02084 <span class="comment">// 2. test collisions with CollisionChains.</span>
+02085 <span class="comment">//===========</span>
+02086 CVector start= startPos.LocalPosition.Estimation;
+02087 <span class="comment">// compute end with real delta position.</span>
+02088 CVector end= start + delta*<a class="code" href="a04223.html#a627">t</a>;
+02089
+02090 <span class="comment">// If asked, we must rebuild array of collision chains.</span>
+02091 <span class="keywordflow">if</span>(rebuildChains)
+02092 {
+02093 <span class="comment">// H_AUTO(PACS_GR_doMove_rebuildChains);</span>
+02094
+02095 <span class="comment">// compute bboxmove.</span>
+02096 <a class="code" href="a02156.html">CAABBox</a> bboxMove;
+02097 <span class="comment">// must add some extent, to be sure to include snapped CLocalRetriever vertex (2.0f/256 should be sufficient).</span>
+02098 <span class="comment">// Nb: this include the precision problem just below (move a little).</span>
+02099 <span class="keywordtype">float</span> radius= 4.0f/<a class="code" href="a05380.html#a15">Vector2sAccuracy</a>;
+02100 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(start-CVector(radius, radius, 0));
+02101 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(start+CVector(radius, radius, 0));
+02102 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(end-CVector(radius, radius, 0));
+02103 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(end+CVector(radius, radius, 0));
+02104
+02105 <span class="comment">// find possible collisions in bboxMove+origin. fill cst.CollisionChains.</span>
+02106 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_1">findCollisionChains</a>(cst, bboxMove, origin);
+02107 }
+02108
+02109
+02110 <span class="comment">// look where we arrive.</span>
+02111 CSurfaceIdent endSurface;
+02112 CVector endRequest= end;
+02113 <span class="keyword">const</span> <a class="code" href="a04558.html#a14">sint</a> maxPbPrec= 32; <span class="comment">// move away from 4 mm at max, in each 8 direction.</span>
+02114 <a class="code" href="a04558.html#a14">sint</a> pbPrecNum= 0;
+02115
+02116 <span class="comment">// must snap the end position.</span>
+02117 CRetrieverInstance::snapVector(endRequest);
+02118 end= endRequest;
+02119
+02120 <span class="comment">// verify start is already snapped</span>
+02121 {
+02122 CVector startTest= start;
+02123 CRetrieverInstance::snapVector(startTest);
+02124 <a class="code" href="a04199.html#a6">nlassert</a>( start == startTest );
+02125 }
+02126
+02127
+02128 <span class="comment">// Normally, just one iteration is made in this loop (but if precision problem (stopOnEdge, startOnEdge....).</span>
+02129 <span class="keywordflow">while</span>(<span class="keyword">true</span>)
+02130 {
+02131 <span class="comment">// must snap the end position.</span>
+02132 CRetrieverInstance::snapVector(end);
+02133
+02134 CVector2f startCol(start.x, start.y);
+02135 CVector2f endCol(end.x, end.y);
+02136
+02137 <span class="comment">// If same 2D position, just return startPos (suppose no movement)</span>
+02138 <span class="keywordflow">if</span>(endCol==startCol)
+02139 {
+02140 UGlobalPosition <a class="code" href="a04223.html#a643">res</a>;
+02141 <a class="code" href="a04223.html#a643">res</a>= startPos;
+02142 <span class="comment">// keep good z movement.</span>
+02143 <a class="code" href="a04223.html#a643">res</a>.LocalPosition.Estimation.z= end.z;
+02144 <span class="keywordflow">return</span> <a class="code" href="a04223.html#a643">res</a>;
+02145 }
+02146
+02147 <span class="comment">// search destination problem.</span>
+02148 UGlobalPosition restart;
+02149 endSurface= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_3">testMovementWithCollisionChains</a>(cst, startCol, endCol, startSurface, restart);
+02150
+02151 <span class="comment">// if no precision problem, Ok, we have found our destination surface (or anormal collide against a wall).</span>
+02152 <span class="keywordflow">if</span> (endSurface.SurfaceId &gt;= -1)
+02153 {
+02154 <span class="keywordflow">break</span>;
+02155 }
+02156 <span class="comment">// left an interior, retrieved position and ask to restart collision from retrieved position</span>
+02157 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (endSurface.SurfaceId == -3)
+02158 {
+02159 start = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_1">getDoubleGlobalPosition</a>(restart) - origin;
+02160 startSurface.RetrieverInstanceId = restart.InstanceId;
+02161 startSurface.SurfaceId = restart.LocalPosition.Surface;
+02162 <span class="comment">// should be snapped here</span>
+02163 CVector startTest= start;
+02164 CRetrieverInstance::snapVector(startTest);
+02165 <a class="code" href="a04199.html#a6">nlassert</a>( start == startTest );
+02166 }
+02167 <span class="comment">/* else we are in deep chit, for one on those reason:</span>
+02168 <span class="comment"> - traverse on point.</span>
+02169 <span class="comment"> - stop on a edge (dist==0).</span>
+02170 <span class="comment"> - start on a edge (dist==0).</span>
+02171 <span class="comment"> - run // on a edge (NB: dist==0 too).</span>
+02172 <span class="comment"> */</span>
+02173 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (endSurface.SurfaceId == -2)
+02174 {
+02175 <span class="comment">// For simplicty, just try to move a little the end position</span>
+02176 <span class="keywordflow">if</span>(pbPrecNum&lt;maxPbPrec)
+02177 {
+02178 <span class="keyword">static</span> <span class="keyword">struct </span>{<a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>;} dirs[8]= { {1,0}, {1,1}, {0,1}, {-1,1}, {-1,0}, {-1,-1}, {0,-1}, {1,-1}};
+02179 <a class="code" href="a04558.html#a14">sint</a> dir= pbPrecNum%8;
+02180 <a class="code" href="a04558.html#a14">sint</a> dist= pbPrecNum/8+1;
+02181 CVector dta;
+02182
+02183 <span class="comment">// compute small move.</span>
+02184 dta.x= dirs[dir].x * dist * 1.0f/<a class="code" href="a05380.html#a14">SnapPrecision</a>;
+02185 dta.y= dirs[dir].y * dist * 1.0f/<a class="code" href="a05380.html#a14">SnapPrecision</a>;
+02186 dta.z= 0;
+02187
+02188 <span class="comment">// add it to the original end pos requested.</span>
+02189 end= endRequest + dta;
+02190
+02191 pbPrecNum++;
+02192 }
+02193 <span class="keywordflow">else</span>
+02194 {
+02195 <span class="comment">// do not move at all.</span>
+02196 endSurface= CSurfaceIdent(-1,-1);
+02197 <span class="keywordflow">break</span>;
+02198 }
+02199 }
+02200 }
+02201
+02202 <span class="comment">// 3. return result.</span>
+02203 <span class="comment">//===========</span>
+02204 <span class="comment">// Problem?? do not move.</span>
+02205 <span class="keywordflow">if</span>(endSurface.SurfaceId==-1)
+02206 <span class="keywordflow">return</span> startPos;
+02207 <span class="keywordflow">else</span>
+02208 {
+02209 <span class="comment">// else must return good GlobalPosition.</span>
+02210 CGlobalPosition <a class="code" href="a04223.html#a643">res</a>;
+02211
+02212 <a class="code" href="a04223.html#a643">res</a>.InstanceId= endSurface.RetrieverInstanceId;
+02213 <a class="code" href="a04223.html#a643">res</a>.LocalPosition.Surface= endSurface.SurfaceId;
+02214
+02215 <span class="comment">// compute newPos, localy to the endSurface.</span>
+02216 <span class="comment">// get delta between startPos.instance and curInstance.</span>
+02217 <span class="comment">// NB: for float precision, it is important to compute deltaOrigin, and after compute newPos in local.</span>
+02218 CVector deltaOrigin;
+02219 deltaOrigin= origin - <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(<a class="code" href="a04223.html#a643">res</a>.InstanceId).getOrigin();
+02220
+02221 <span class="comment">// Because Origin precision is 1 meter, and end precision is 1/1024 meter, we have no precision problem.</span>
+02222 <span class="comment">// this is true because we cannot move more than, say 4*160 meters in one doMove().</span>
+02223 <span class="comment">// So global position should not be bigger than 1024 * 1024/1024 meters. =&gt; Hence 20 bits of precision is </span>
+02224 <span class="comment">// required. We have 23 with floats.</span>
+02225 <a class="code" href="a04223.html#a643">res</a>.LocalPosition.Estimation= end + deltaOrigin;
+02226
+02227
+02228 <span class="comment">// result.</span>
+02229 <span class="keywordflow">return</span> <a class="code" href="a04223.html#a643">res</a>;
+02230 }
+02231
+02232 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1247_0" doxytag="NLPACS::CGlobalRetriever::findAStarPath" ></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 NLPACS::CGlobalRetriever::findAStarPath </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>begin</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>end</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03334.html">CRetrieverInstance::CAStarNodeAccess</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>path</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>forbidFlags</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>
+Finds an A* path from a given global position to another. <dl compact><dt><b><a class="el" href="todo.html#_todo000042">Todo:</a></b></dt><dd>secure search to avoid crashes...</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00855">855</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a06338.html#l00116">NLPACS::CRetrieverInstance::_NodesInformation</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06338.html#l00108">NLPACS::CRetrieverInstance::CAStarNodeInfo::Cost</a>, <a class="el" href="a06338.html#l00109">NLPACS::CRetrieverInstance::CAStarNodeInfo::F</a>, <a class="el" href="a06338.html#l00188">NLPACS::CRetrieverInstance::getBorderChainLink()</a>, <a class="el" href="a05930.html#l00391">NLPACS::CLocalRetriever::getChain()</a>, <a class="el" href="a06334.html#l00178">NLPACS::CRetrievableSurface::getChains()</a>, <a class="el" href="a06334.html#l00172">NLPACS::CRetrievableSurface::getFlags()</a>, <a class="el" href="a05761.html#l00827">getGlobalPosition()</a>, <a class="el" href="a05540.html#l00269">NLPACS::CChain::getLeft()</a>, <a class="el" href="a05762.html#l00484">getNode()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05540.html#l00274">NLPACS::CChain::getRight()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a06338.html#l00065">NLPACS::CRetrieverInstance::CLink::Instance</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06338.html#l00086">NLPACS::CRetrieverInstance::CAStarNodeAccess::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a06338.html#l00087">NLPACS::CRetrieverInstance::CAStarNodeAccess::NodeId</a>, <a class="el" href="a06338.html#l00112">NLPACS::CRetrieverInstance::CAStarNodeInfo::Parent</a>, <a class="el" href="a06338.html#l00105">NLPACS::CRetrieverInstance::CAStarNodeInfo::Position</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a06338.html#l00068">NLPACS::CRetrieverInstance::CLink::SurfaceId</a>, <a class="el" href="a05761.html#l00049">ThisAStarTicks</a>, <a class="el" href="a06553.html#l00048">NLMISC::TTicks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01062">findPath()</a>.
+<p>
+<div class="fragment"><pre>00859 {
+00860 <a class="code" href="a05378.html#a243">TTicks</a> astarStart;
+00861 <a class="code" href="a04338.html#a6">ThisAStarTicks</a> = 0;
+00862 astarStart = CTime::getPerformanceTime();
+00863
+00864 <span class="comment">// open and close lists</span>
+00865 <span class="comment">// TODO: Use a smart allocator to avoid huge alloc/free and memory fragmentation</span>
+00866 <span class="comment">// open is a priority queue (implemented as a stl multimap)</span>
+00867 multimap&lt;float, CRetrieverInstance::CAStarNodeAccess&gt; open;
+00868 <span class="comment">// close is a simple stl vector</span>
+00869 vector&lt;CRetrieverInstance::CAStarNodeAccess&gt; close;
+00870
+00871 <span class="comment">// inits start node and info</span>
+00872 CRetrieverInstance::CAStarNodeAccess beginNode;
+00873 beginNode.InstanceId = begin.InstanceId;
+00874 beginNode.NodeId = (<a class="code" href="a04558.html#a9">uint16</a>)begin.LocalPosition.Surface;
+00875 CRetrieverInstance::CAStarNodeInfo &amp;beginInfo = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1249_0">getNode</a>(beginNode);
+00876
+00877 <span class="comment">// inits end node and info.</span>
+00878 CRetrieverInstance::CAStarNodeAccess endNode;
+00879 endNode.InstanceId = end.InstanceId;
+00880 endNode.NodeId = (<a class="code" href="a04558.html#a9">uint16</a>)end.LocalPosition.Surface;
+00881 CRetrieverInstance::CAStarNodeInfo &amp;endInfo = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1249_0">getNode</a>(endNode);
+00882
+00883 <span class="comment">// set up first node...</span>
+00884 CRetrieverInstance::CAStarNodeAccess node = beginNode;
+00885 beginInfo.Parent.InstanceId = -1;
+00886 beginInfo.Parent.NodeId = 0;
+00887 beginInfo.Parent.ThroughChain = 0;
+00888 beginInfo.Cost = 0;
+00889 beginInfo.F = (endInfo.Position-beginInfo.Position).norm();
+00890
+00891 <span class="comment">// ... and inserts it in the open list.</span>
+00892 open.insert(make_pair(beginInfo.F, node));
+00893
+00894 <span class="comment">// TO DO: use a CVector2f instead</span>
+00895 CVector2f endPosition = CVector2f(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_2">getGlobalPosition</a>(end));
+00896
+00897 <a class="code" href="a04558.html#a15">uint</a> i;
+00898
+00899 path.clear();
+00900
+00901 <span class="keywordflow">while</span> (<span class="keyword">true</span>)
+00902 {
+00903 <span class="keywordflow">if</span> (open.empty())
+00904 {
+00905 <span class="comment">// couldn't find a path</span>
+00906 <span class="keywordflow">return</span>;
+00907 }
+00908
+00909 multimap&lt;float, CRetrieverInstance::CAStarNodeAccess&gt;::iterator it;
+00910
+00911 it = open.begin();
+00912 node = it-&gt;second;
+00913 open.erase(it);
+00914
+00915 <span class="keywordflow">if</span> (node == endNode)
+00916 {
+00917 <span class="comment">// found a path</span>
+00918 CRetrieverInstance::CAStarNodeAccess pathNode = node;
+00919 <a class="code" href="a04558.html#a15">uint</a> numNodes = 0;
+00920 <span class="keywordflow">while</span> (pathNode.InstanceId != -1)
+00921 {
+00922 ++numNodes;
+00923 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pathNode.InstanceId];
+00924 CRetrieverInstance::CAStarNodeInfo &amp;pathInfo = instance._NodesInformation[pathNode.NodeId];
+00925 pathNode = pathInfo.Parent;
+00926 }
+00927
+00928 path.resize(numNodes);
+00929 pathNode = node;
+00930 <span class="keywordflow">while</span> (pathNode.InstanceId != -1)
+00931 {
+00932 path[--numNodes] = pathNode;
+00933 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pathNode.InstanceId];
+00934 CRetrieverInstance::CAStarNodeInfo &amp;pathInfo = instance._NodesInformation[pathNode.NodeId];
+00935 pathNode = pathInfo.Parent;
+00936 }
+00937
+00938 <a class="code" href="a04338.html#a6">ThisAStarTicks</a> += (CTime::getPerformanceTime()-astarStart);
+00939
+00940 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"found a path"</span>);
+00941 <span class="keywordflow">for</span> (i=0; i&lt;path.size(); ++i)
+00942 {
+00943 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[path[i].InstanceId];
+00944 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00945 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"pathNode %d = (Inst=%d, Node=%d, Through=%d)"</span>, i, path[i].InstanceId, path[i].NodeId, path[i].ThroughChain);
+00946 <span class="keywordflow">if</span> (path[i].ThroughChain != 0xffff)
+00947 {
+00948 <span class="keyword">const</span> CChain &amp;chain = retriever.getChain(path[i].ThroughChain);
+00949 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">" chain: left=%d right=%d"</span>, chain.getLeft(), chain.getRight());
+00950 <span class="keywordflow">if</span> (CChain::isBorderChainId(chain.getRight()))
+00951 {
+00952 CRetrieverInstance::CLink lnk = instance.getBorderChainLink(CChain::convertBorderChainId(chain.getRight()));
+00953 <a class="code" href="a04558.html#a14">sint</a> instanceid = lnk.Instance;
+00954 <a class="code" href="a04558.html#a14">sint</a> <span class="keywordtype">id</span> = lnk.SurfaceId;
+00955 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">" right: instance=%d surf=%d"</span>, instanceid, <span class="keywordtype">id</span>);
+00956 }
+00957 }
+00958 }
+00959 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"open.size()=%d"</span>, open.size());
+00960 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"close.size()=%d"</span>, close.size());
+00961
+00962 <span class="keywordflow">return</span>;
+00963 }
+00964
+00965 <span class="comment">// push successors of the current node</span>
+00966 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;inst = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[node.InstanceId];
+00967 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(inst.getRetrieverId());
+00968 <span class="keyword">const</span> CRetrievableSurface &amp;surf = retriever.getSurface(node.NodeId);
+00969 <span class="keyword">const</span> vector&lt;CRetrievableSurface::CSurfaceLink&gt; &amp;chains = surf.getChains();
+00970
+00971 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> *nextInstance;
+00972 <span class="keyword">const</span> CLocalRetriever *nextRetriever;
+00973 <span class="keyword">const</span> CRetrievableSurface *nextSurface;
+00974
+00975 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"examine node (instance=%d,surf=%d,cost=%g)"</span>, node.InstanceId, node.NodeId, inst._NodesInformation[node.NodeId].Cost);
+00976
+00977 <span class="keywordflow">for</span> (i=0; i&lt;chains.size(); ++i)
+00978 {
+00979 <a class="code" href="a04558.html#a10">sint32</a> nextNodeId = chains[i].Surface;
+00980 CRetrieverInstance::CAStarNodeAccess nextNode;
+00981
+00982 <span class="keywordflow">if</span> (CChain::isBorderChainId(nextNodeId))
+00983 {
+00984 <span class="comment">// if the chain points to another retriever</span>
+00985
+00986 <span class="comment">// first get the edge on the retriever</span>
+00987 CRetrieverInstance::CLink lnk = inst.getBorderChainLink(CChain::convertBorderChainId(nextNodeId));
+00988 nextNode.InstanceId = lnk.Instance;
+00989
+00990 <span class="keywordflow">if</span> (nextNode.InstanceId &lt; 0)
+00991 <span class="keywordflow">continue</span>;
+00992
+00993 nextInstance = &amp;_Instances[nextNode.InstanceId];
+00994 nextRetriever = &amp;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(nextInstance-&gt;getRetrieverId()));
+00995
+00996 <a class="code" href="a04558.html#a14">sint</a> nodeId = lnk.SurfaceId;
+00997 <a class="code" href="a04199.html#a6">nlassert</a>(nodeId &gt;= 0);
+00998 nextNode.NodeId = (<a class="code" href="a04558.html#a9">uint16</a>)nodeId;
+00999 }
+01000 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (nextNodeId &gt;= 0)
+01001 {
+01002 <span class="comment">// if the chain points to the same instance</span>
+01003 nextNode.InstanceId = node.InstanceId;
+01004 nextNode.NodeId = (<a class="code" href="a04558.html#a9">uint16</a>) nextNodeId;
+01005 nextInstance = &amp;inst;
+01006 nextRetriever = &amp;retriever;
+01007 }
+01008 <span class="keywordflow">else</span>
+01009 {
+01010 <span class="comment">// if the chain cannot be crossed</span>
+01011 <span class="keywordflow">continue</span>;
+01012 }
+01013
+01014 nextSurface = &amp;(nextRetriever-&gt;getSurface(nextNode.NodeId));
+01015
+01016 <span class="keywordflow">if</span> (nextSurface-&gt;getFlags() &amp; forbidFlags)
+01017 <span class="keywordflow">continue</span>;
+01018
+01019 <span class="comment">// compute new node value (heuristic and cost)</span>
+01020
+01021 CRetrieverInstance::CAStarNodeInfo &amp;nextInfo = nextInstance-&gt;_NodesInformation[nextNode.NodeId];
+01022 <span class="keywordtype">float</span> stepCost = (nextInfo.Position-inst._NodesInformation[node.NodeId].Position).norm();
+01023 <span class="keywordtype">float</span> nextCost = inst._NodesInformation[node.NodeId].Cost+stepCost;
+01024 <span class="keywordtype">float</span> nextHeuristic = (nextInfo.Position-endPosition).norm();
+01025 <span class="keywordtype">float</span> nextF = nextCost+nextHeuristic;
+01026
+01027 vector&lt;CRetrieverInstance::CAStarNodeAccess&gt;::iterator closeIt;
+01028 <span class="keywordflow">for</span> (closeIt=close.begin(); closeIt!=close.end() &amp;&amp; *closeIt!=nextNode; ++closeIt)
+01029 ;
+01030
+01031 <span class="keywordflow">if</span> (closeIt != close.end() &amp;&amp; nextInfo.F &lt; nextF)
+01032 <span class="keywordflow">continue</span>;
+01033
+01034 multimap&lt;float, CRetrieverInstance::CAStarNodeAccess&gt;::iterator openIt;
+01035 <span class="keywordflow">for</span> (openIt=open.begin(); openIt!=open.end() &amp;&amp; openIt-&gt;second!=nextNode; ++openIt)
+01036 ;
+01037
+01038 <span class="keywordflow">if</span> (openIt != open.end() &amp;&amp; nextInfo.F &lt; nextF)
+01039 <span class="keywordflow">continue</span>;
+01040
+01041 <span class="keywordflow">if</span> (openIt != open.end())
+01042 open.erase(openIt);
+01043
+01044 <span class="keywordflow">if</span> (closeIt != close.end())
+01045 close.erase(closeIt);
+01046
+01047 nextInfo.Parent = node;
+01048 nextInfo.Parent.ThroughChain = (<a class="code" href="a04558.html#a9">uint16</a>)(chains[i].Chain);
+01049 nextInfo.Cost = nextCost;
+01050 nextInfo.F = nextF;
+01051
+01052 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">" adding node (instance=%d,surf=%d) f=%g, through=%d"</span>, nextNode.InstanceId, nextNode.NodeId, nextInfo.F, i);
+01053
+01054 open.insert(make_pair(nextInfo.F, nextNode));
+01055 }
+01056 close.push_back(node);
+01057 }
+01058 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_1" doxytag="NLPACS::CGlobalRetriever::findCollisionChains" ></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 NLPACS::CGlobalRetriever::findCollisionChains </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bboxMove</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>origin</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset and fill cst.CollisionChains with possible collisions in bboxMove+origin. result: collisionChains, computed localy to origin.
+<p>
+<dl compact><dt><b><a class="el" href="todo.html#_todo000009">Todo:</a></b></dt><dd>yoyo/ben: TODO_INTERIOR: activate this and modify code below</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l01177">1177</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00074">NLPACS::CCollisionChain::ChainId</a>, <a class="el" href="a05583.html#l00299">NLPACS::CCollisionSurfaceTemp::CollisionChains</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a05583.html#l00078">NLPACS::CCollisionChain::ExteriorEdge</a>, <a class="el" href="a05540.html#l00282">NLPACS::CChain::getBorderChainIndex()</a>, <a class="el" href="a06338.html#l00188">NLPACS::CRetrieverInstance::getBorderChainLink()</a>, <a class="el" href="a05385.html#l00090">NLMISC::CAABBox::getCenter()</a>, <a class="el" href="a05930.html#l00391">NLPACS::CLocalRetriever::getChain()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06336.html#l00278">NLPACS::CRetrieverBank::getNamePrefix()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a06338.html#l00178">NLPACS::CRetrieverInstance::getType()</a>, <a class="el" href="a06338.html#l00065">NLPACS::CRetrieverInstance::CLink::Instance</a>, <a class="el" href="a05540.html#l00294">NLPACS::CChain::isBorderChain()</a>, <a class="el" href="a05540.html#l00288">NLPACS::CChain::isBorderChainId()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::LeftSurface</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05582.html#l00063">NLPACS::CCollisionSurfaceTemp::resetEdgeCollideNodes()</a>, <a class="el" href="a05578.html#l00069">NLPACS::CSurfaceIdent::RetrieverInstanceId</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::RightSurface</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06338.html#l00068">NLPACS::CRetrieverInstance::CLink::SurfaceId</a>, <a class="el" href="a05578.html#l00071">NLPACS::CSurfaceIdent::SurfaceId</a>, <a class="el" href="a05929.html#l01807">NLPACS::CLocalRetriever::testCollision()</a>, <a class="el" href="a06337.html#l00635">NLPACS::CRetrieverInstance::testExteriorCollision()</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="a05761.html#l02028">doMove()</a>, <a class="el" href="a05761.html#l01937">testBBoxMove()</a>, <a class="el" href="a05761.html#l02236">testBBoxRot()</a>, and <a class="el" href="a05761.html#l01864">testCylinderMove()</a>.
+<p>
+<div class="fragment"><pre>01178 {
+01179 <span class="comment">// H_AUTO(PACS_GR_findCollisionChains);</span>
+01180
+01181 <a class="code" href="a04558.html#a14">sint</a> i,j;
+01182
+01183 <span class="comment">// 0. reset.</span>
+01184 <span class="comment">//===========</span>
+01185 <span class="comment">// reset possible chains.</span>
+01186 <span class="comment">// H_BEFORE(PACS_GR_findCC_reset);</span>
+01187 cst.CollisionChains.clear();
+01188 cst.resetEdgeCollideNodes();
+01189 <span class="comment">// H_AFTER(PACS_GR_findCC_reset);</span>
+01190
+01191 <span class="comment">// 1. Find Instances which may hit this movement.</span>
+01192 <span class="comment">//===========</span>
+01193 <span class="comment">// H_BEFORE(PACS_GR_findCC_selectInstances);</span>
+01194 <a class="code" href="a02156.html">CAABBox</a> bboxMoveGlobal= bboxMove;
+01195 bboxMoveGlobal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(bboxMoveGlobal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_0">getCenter</a>()+origin);
+01196 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(bboxMoveGlobal, cst);
+01197 <span class="comment">// H_AFTER(PACS_GR_findCC_selectInstances);</span>
+01198 <span class="comment">// \todo yoyo: TODO_INTERIOR: add interiors meshes (static/dynamic houses etc...) to this list.</span>
+01199 <span class="comment">// -&gt; done automatically with the select</span>
+01200
+01201
+01202 <span class="comment">// 2. Fill CollisionChains.</span>
+01203 <span class="comment">//===========</span>
+01204 <span class="comment">// For each possible surface mesh, test collision.</span>
+01205 <span class="keywordflow">for</span>(i=0 ; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionInstances.size(); i++)
+01206 {
+01207 <span class="comment">// H_BEFORE(PACS_GR_findCC_getAndComputeMove);</span>
+01208 <span class="comment">// get retrieverInstance.</span>
+01209 <a class="code" href="a04558.html#a10">sint32</a> curInstance= cst.CollisionInstances[i];
+01210 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;retrieverInstance= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(curInstance);
+01211
+01212 <span class="comment">// Retrieve the localRetriever of this instance.</span>
+01213 <a class="code" href="a04558.html#a10">sint32</a> localRetrieverId= retrieverInstance.getRetrieverId();
+01214 <span class="comment">// If invalid one (hole), continue.</span>
+01215 <span class="keywordflow">if</span>(localRetrieverId&lt;0)
+01216 <span class="keywordflow">continue</span>;
+01217 <span class="keyword">const</span> CLocalRetriever &amp;localRetriever= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(localRetrieverId);
+01218
+01219 <span class="keywordflow">if</span> (!localRetriever.isLoaded())
+01220 {
+01221 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"local retriever %d in %s not loaded, findCollisionChains in this retriever aborted"</span>, localRetrieverId, <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getNamePrefix().c_str());
+01222 <span class="keywordflow">continue</span>;
+01223 }
+01224
+01225 <span class="comment">// get delta between startPos.instance and curInstance.</span>
+01226 CVector deltaOrigin;
+01227 deltaOrigin= origin - retrieverInstance.getOrigin();
+01228
+01229 <span class="comment">// compute movement relative to this localRetriever.</span>
+01230 <a class="code" href="a02156.html">CAABBox</a> bboxMoveLocal= bboxMove;
+01231 bboxMoveLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(bboxMoveLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_0">getCenter</a>()+deltaOrigin);
+01232
+01233 <span class="comment">// add possible collision chains with movement.</span>
+01234 <span class="comment">//================</span>
+01235 <a class="code" href="a04558.html#a14">sint</a> firstCollisionChain= cst.CollisionChains.size();
+01236 CVector2f transBase(-deltaOrigin.x, -deltaOrigin.y);
+01237 <span class="comment">// H_AFTER(PACS_GR_findCC_getAndComputeMove);</span>
+01238
+01239 <span class="comment">// H_BEFORE(PACS_GR_findCC_testCollision);</span>
+01240 <span class="comment">// Go! fill collision chains that this movement intersect.</span>
+01241 localRetriever.testCollision(cst, bboxMoveLocal, transBase);
+01242 <span class="comment">// if an interior, also test for external collisions</span>
+01244 <span class="comment"></span> <span class="keywordflow">if</span> (retrieverInstance.getType() == CLocalRetriever::Interior)
+01245 retrieverInstance.testExteriorCollision(cst, bboxMoveLocal, transBase, localRetriever);
+01246
+01247 <span class="comment">// how many collision chains added? : nCollisionChain-firstCollisionChain.</span>
+01248 <a class="code" href="a04558.html#a14">sint</a> nCollisionChain= cst.CollisionChains.size();
+01249 <span class="comment">// H_AFTER(PACS_GR_findCC_testCollision);</span>
+01250
+01251
+01252 <span class="comment">// For all collision chains added, fill good SurfaceIdent info.</span>
+01253 <span class="comment">//================</span>
+01254 <span class="comment">// H_BEFORE(PACS_GR_findCC_fillSurfIdent);</span>
+01255 <span class="keywordflow">for</span>(j=firstCollisionChain; j&lt;nCollisionChain; j++)
+01256 {
+01257 CCollisionChain &amp;cc= cst.CollisionChains[j];
+01258
+01259 <span class="comment">// info are already filled for exterior chains.</span>
+01260 <span class="keywordflow">if</span> (cc.ExteriorEdge)
+01261 <span class="keywordflow">continue</span>;
+01262
+01263 <span class="comment">// LeftSurface retrieverInstance is always curInstance.</span>
+01264 cc.LeftSurface.RetrieverInstanceId= curInstance;
+01265
+01266 <span class="comment">// If RightSurface is not an "edgeId" ie a pointer on a neighbor surface on an other retrieverInstance.</span>
+01267 <span class="keyword">const</span> CChain &amp;originalChain= localRetriever.getChain(cc.ChainId);
+01268 <span class="keywordflow">if</span>( !originalChain.isBorderChainId(cc.RightSurface.SurfaceId) )
+01269 {
+01270 cc.RightSurface.RetrieverInstanceId= curInstance;
+01271 }
+01272 <span class="keywordflow">else</span>
+01273 {
+01274 <span class="comment">// we must find the surfaceIdent of the neighbor.</span>
+01275 <span class="comment">// \todo yoyo: TODO_INTERIOR: this work only for zone. Must work too for houses.</span>
+01276
+01277 CRetrieverInstance::CLink link;
+01278 <span class="comment">// get the link to the next surface from the instance</span>
+01279 link = retrieverInstance.getBorderChainLink(CChain::convertBorderChainId(cc.RightSurface.SurfaceId));
+01280
+01281 <span class="comment">// get the neighbor instanceId.</span>
+01282 <a class="code" href="a04558.html#a14">sint</a> neighborInstanceId= (<a class="code" href="a04558.html#a8">sint16</a>)link.Instance;
+01283 <span class="comment">// store in the current collisionChain Right.</span>
+01284 cc.RightSurface.RetrieverInstanceId= neighborInstanceId;
+01285
+01286 <span class="comment">// If no instance near us, this is a WALL.</span>
+01287 <span class="keywordflow">if</span>(neighborInstanceId&lt;0)
+01288 {
+01289 <span class="comment">// mark as a Wall.</span>
+01290 cc.RightSurface.SurfaceId= -1;
+01291 }
+01292 <span class="keywordflow">else</span>
+01293 {
+01294 <span class="comment">// Get the good neighbor surfaceId.</span>
+01295 cc.RightSurface.SurfaceId= (<a class="code" href="a04558.html#a8">sint16</a>)link.SurfaceId;
+01296 }
+01297 }
+01298
+01299 <a class="code" href="a04199.html#a6">nlassert</a>(cc.LeftSurface.RetrieverInstanceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size());
+01300 <a class="code" href="a04199.html#a6">nlassert</a>(cc.RightSurface.RetrieverInstanceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size());
+01301 }
+01302 <span class="comment">// H_AFTER(PACS_GR_findCC_fillSurfIdent);</span>
+01303
+01304
+01305 <span class="comment">// For all collision chains added, look if they are a copy of preceding collsion chain (same Left/Right). Then delete them.</span>
+01306 <span class="comment">//================</span>
+01307 <span class="comment">// \todo yoyo: TODO_OPTIMIZE: this is a N² complexity.</span>
+01308 <span class="comment">// H_BEFORE(PACS_GR_findCC_removeDouble);</span>
+01309 <span class="keywordflow">for</span>(j=firstCollisionChain; j&lt;nCollisionChain; j++)
+01310 {
+01311 <span class="keyword">const</span> CCollisionChain &amp;cj = cst.CollisionChains[j];
+01312
+01313 <span class="keywordflow">if</span> (cj.ExteriorEdge &amp;&amp; cj.LeftSurface.RetrieverInstanceId!=-1)
+01314 <span class="keywordflow">continue</span>;
+01315
+01316 <span class="comment">// test for all collisionChain inserted before.</span>
+01317 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> k=0; k&lt;firstCollisionChain; k++)
+01318 {
+01319 <span class="keyword">const</span> CCollisionChain &amp;ck = cst.CollisionChains[k];
+01320
+01321 <span class="keywordflow">if</span> (cj.LeftSurface.RetrieverInstanceId != cj.RightSurface.RetrieverInstanceId &amp;&amp;
+01322 cj.LeftSurface == ck.RightSurface &amp;&amp; cj.RightSurface == ck.LeftSurface)
+01323 {
+01324 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instj = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(cj.LeftSurface.RetrieverInstanceId),
+01325 &amp;instk = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(ck.LeftSurface.RetrieverInstanceId);
+01326 <span class="keyword">const</span> CLocalRetriever &amp;retrj = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instj.getRetrieverId()),
+01327 &amp;retrk = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instk.getRetrieverId());
+01328
+01329 <span class="keywordflow">if</span> (!retrj.isLoaded() || !retrk.isLoaded())
+01330 {
+01331 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"using not loaded retriever %d or %d in bank '%s', aborted"</span>, instj.getRetrieverId(), instk.getRetrieverId(), <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getNamePrefix().c_str());
+01332 <span class="keywordflow">continue</span>;
+01333 }
+01334
+01335 <a class="code" href="a04199.html#a6">nlassert</a>(retrj.getChain(cj.ChainId).isBorderChain() &amp;&amp; retrk.getChain(ck.ChainId).isBorderChain());
+01336
+01337 <span class="keywordflow">if</span> (instj.getBorderChainLink(retrj.getChain(cj.ChainId).getBorderChainIndex()).ChainId != ck.ChainId ||
+01338 instk.getBorderChainLink(retrk.getChain(ck.ChainId).getBorderChainIndex()).ChainId != cj.ChainId)
+01339 {
+01340 <span class="keywordflow">continue</span>;
+01341 }
+01342
+01343 <span class="comment">// remove this jth entry.</span>
+01344 <span class="comment">// by swapping with last entry. Only if not already last.</span>
+01345 <span class="keywordflow">if</span>(j&lt;nCollisionChain-1)
+01346 {
+01347 swap(cst.CollisionChains[j], cst.CollisionChains[nCollisionChain-1]);
+01348 <span class="comment">// NB: some holes remain in cst._EdgeCollideNodes, but do not matters since reseted at </span>
+01349 <span class="comment">// each collision test.</span>
+01350 }
+01351
+01352 <span class="comment">// pop last entry.</span>
+01353 nCollisionChain--;
+01354 cst.CollisionChains.resize(nCollisionChain);
+01355
+01356 <span class="comment">// next entry??</span>
+01357 j--;
+01358 <span class="keywordflow">break</span>;
+01359 }
+01360 <span class="comment">/*</span>
+01361 <span class="comment"> // if same surface Ident Left/Right==Left/Right or swapped Left/Right==Right/Left</span>
+01362 <span class="comment"> if( cst.CollisionChains[j].sameSurfacesThan(cst.CollisionChains[k]) )</span>
+01363 <span class="comment"> {</span>
+01364 <span class="comment"> // remove this jth entry.</span>
+01365 <span class="comment"> // by swapping with last entry. Only if not already last.</span>
+01366 <span class="comment"> if(j&lt;nCollisionChain-1)</span>
+01367 <span class="comment"> {</span>
+01368 <span class="comment"> swap(cst.CollisionChains[j], cst.CollisionChains[nCollisionChain-1]);</span>
+01369 <span class="comment"> // NB: some holes remain in cst._EdgeCollideNodes, but do not matters since reseted at </span>
+01370 <span class="comment"> // each collision test.</span>
+01371 <span class="comment"> }</span>
+01372 <span class="comment"></span>
+01373 <span class="comment"> // pop last entry.</span>
+01374 <span class="comment"> nCollisionChain--;</span>
+01375 <span class="comment"> cst.CollisionChains.resize(nCollisionChain);</span>
+01376 <span class="comment"></span>
+01377 <span class="comment"> // next entry??</span>
+01378 <span class="comment"> j--;</span>
+01379 <span class="comment"> break;</span>
+01380 <span class="comment"> }</span>
+01381 <span class="comment">*/</span>
+01382 }
+01383
+01384 }
+01385 <span class="comment">// H_AFTER(PACS_GR_findCC_removeDouble);</span>
+01386 }
+01387
+01388 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1247_1" doxytag="NLPACS::CGlobalRetriever::findPath" ></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 NLPACS::CGlobalRetriever::findPath </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>begin</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>end</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw1">CGlobalPath</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>path</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>forbidFlags</em> = 0</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>
+Finds a path from a given global position to another <dl compact><dt><b><a class="el" href="todo.html#_todo000043">Todo:</a></b></dt><dd>include path width</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l01062">1062</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05761.html#l00045">AStarTicks</a>, <a class="el" href="a05762.html#l00109">CGlobalPath</a>, <a class="el" href="a05761.html#l00047">ChainTicks</a>, <a class="el" href="a05762.html#l00105">NLPACS::CGlobalRetriever::CLocalPath::End</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05761.html#l00855">findAStarPath()</a>, <a class="el" href="a05929.html#l01576">NLPACS::CLocalRetriever::findPath()</a>, <a class="el" href="a05930.html#l00391">NLPACS::CLocalRetriever::getChain()</a>, <a class="el" href="a05540.html#l00145">NLPACS::COrderedChain::getLength()</a>, <a class="el" href="a05540.html#l00279">NLPACS::CChain::getLength()</a>, <a class="el" href="a05930.html#l00381">NLPACS::CLocalRetriever::getOrderedChain()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a05540.html#l00266">NLPACS::CChain::getSubChain()</a>, <a class="el" href="a05540.html#l00263">NLPACS::CChain::getSubChains()</a>, <a class="el" href="a05540.html#l00133">NLPACS::COrderedChain::getVertices()</a>, <a class="el" href="a05762.html#l00103">NLPACS::CGlobalRetriever::CLocalPath::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05762.html#l00106">NLPACS::CGlobalRetriever::CLocalPath::Path</a>, <a class="el" href="a05761.html#l00046">PathTicks</a>, <a class="el" href="a05762.html#l00104">NLPACS::CGlobalRetriever::CLocalPath::Start</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05761.html#l00048">SurfTicks</a>, <a class="el" href="a05761.html#l00049">ThisAStarTicks</a>, <a class="el" href="a05761.html#l00051">ThisChainTicks</a>, <a class="el" href="a05761.html#l00050">ThisPathTicks</a>, <a class="el" href="a05761.html#l00052">ThisSurfTicks</a>, <a class="el" href="a06553.html#l00048">NLMISC::TTicks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>01066 {
+01067
+01068 vector&lt;CRetrieverInstance::CAStarNodeAccess&gt; astarPath;
+01069 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1247_0">findAStarPath</a>(begin, end, astarPath, forbidFlags);
+01070
+01071 <a class="code" href="a05378.html#a243">TTicks</a> surfStart;
+01072 <a class="code" href="a05378.html#a243">TTicks</a> chainStart;
+01073
+01074 <a class="code" href="a04338.html#a8">ThisChainTicks</a> = 0;
+01075 <a class="code" href="a04338.html#a9">ThisSurfTicks</a> = 0;
+01076 <a class="code" href="a04338.html#a7">ThisPathTicks</a> = 0;
+01077
+01078 path.clear();
+01079 path.resize(astarPath.size());
+01080
+01081 <a class="code" href="a04558.html#a15">uint</a> i, j;
+01082 <span class="keywordflow">for</span> (i=0; i&lt;astarPath.size(); ++i)
+01083 {
+01084 chainStart = CTime::getPerformanceTime();
+01085 CLocalPath &amp;surf = path[i];
+01086 surf.InstanceId = astarPath[i].InstanceId;
+01087 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(_Instances[surf.InstanceId].getRetrieverId());
+01088
+01089 <span class="comment">// computes start point</span>
+01090 <span class="keywordflow">if</span> (i == 0)
+01091 {
+01092 <span class="comment">// if it is the first point, just copy the begin</span>
+01093 surf.Start.ULocalPosition::operator= (begin.LocalPosition);
+01094 }
+01095 <span class="keywordflow">else</span>
+01096 {
+01097 <span class="comment">// else, take the previous value and convert it in the current instance axis</span>
+01098 <span class="comment">// TODO: avoid this if the instances are the same</span>
+01099 CVector prev = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[path[i-1].InstanceId].getGlobalPosition(path[i-1].End.Estimation);
+01100 CVector current = _Instances[surf.InstanceId].getLocalPosition(prev);
+01101 surf.Start.Surface = astarPath[i].NodeId;
+01102 surf.Start.Estimation = current;
+01103 }
+01104
+01105 <span class="comment">// computes end point</span>
+01106 <span class="keywordflow">if</span> (i == astarPath.size()-1)
+01107 {
+01108 surf.End.ULocalPosition::operator= (end.LocalPosition);
+01109 }
+01110 <span class="keywordflow">else</span>
+01111 {
+01112 <span class="comment">// get to the middle of the chain</span>
+01113 <span class="comment">// first get the chain between the 2 surfaces</span>
+01114 <span class="keyword">const</span> CChain &amp;chain = retriever.getChain(astarPath[i].ThroughChain);
+01115 <span class="keywordtype">float</span> cumulLength = 0.0f, midLength=chain.getLength()*0.5f;
+01116 <span class="keywordflow">for</span> (j=0; j&lt;chain.getSubChains().size() &amp;&amp; cumulLength&lt;=midLength; ++j)
+01117 cumulLength += retriever.getOrderedChain(chain.getSubChain(j)).getLength();
+01118 --j;
+01119 <span class="keyword">const</span> COrderedChain &amp;ochain = retriever.getOrderedChain(chain.getSubChain(j));
+01120 surf.End.Surface = astarPath[i].NodeId;
+01121 {
+01122 <span class="keywordflow">if</span> (ochain.getVertices().size() &amp; 1)
+01123 {
+01124 surf.End.Estimation = ochain[ochain.getVertices().size()/2].unpack3f();
+01125 }
+01126 <span class="keywordflow">else</span>
+01127 {
+01128 surf.End.Estimation = (ochain[ochain.getVertices().size()/2].unpack3f()+
+01129 ochain[ochain.getVertices().size()/2-1].unpack3f())*0.5f;
+01130 }
+01131 }
+01132 }
+01133 <a class="code" href="a04338.html#a8">ThisChainTicks</a> += (CTime::getPerformanceTime()-chainStart);
+01134
+01135 surfStart = CTime::getPerformanceTime();
+01136 retriever.findPath(surf.Start, surf.End, surf.Path, _InternalCST);
+01137 <a class="code" href="a04338.html#a9">ThisSurfTicks</a> += (CTime::getPerformanceTime()-surfStart);
+01138 }
+01139
+01140 <a class="code" href="a04338.html#a7">ThisPathTicks</a> = <a class="code" href="a04338.html#a6">ThisAStarTicks</a>+<a class="code" href="a04338.html#a8">ThisChainTicks</a>+<a class="code" href="a04338.html#a9">ThisSurfTicks</a>;
+01141 <a class="code" href="a04338.html#a3">PathTicks</a> += <a class="code" href="a04338.html#a7">ThisPathTicks</a>;
+01142 <a class="code" href="a04338.html#a5">SurfTicks</a> += <a class="code" href="a04338.html#a9">ThisSurfTicks</a>;
+01143 <a class="code" href="a04338.html#a2">AStarTicks</a> += <a class="code" href="a04338.html#a6">ThisAStarTicks</a>;
+01144 <a class="code" href="a04338.html#a4">ChainTicks</a> += <a class="code" href="a04338.html#a8">ThisChainTicks</a>;
+01145 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_0" doxytag="NLPACS::CGlobalRetriever::getBBox" ></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="a02156.html">NLMISC::CAABBox</a>&amp; NLPACS::CGlobalRetriever::getBBox </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> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Gets the BBox of the global retriever.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera2">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00201">201</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00078">initQuadGrid()</a>.
+<p>
+<div class="fragment"><pre>00201 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_2" doxytag="NLPACS::CGlobalRetriever::getBorders" ></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 NLPACS::CGlobalRetriever::getBorders </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>sbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; std::pair&lt; <a class="el" href="a02759.html">NLMISC::CLine</a>, <a class="el" href="a04558.html#a7">uint8</a> &gt; &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>edges</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Checks the retriever for errors.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera3">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00275">275</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a05583.html#l00287">NLPACS::CCollisionSurfaceTemp::EdgeChainEntries</a>, <a class="el" href="a05583.html#l00128">NLPACS::CEdgeChainEntry::EdgeEnd</a>, <a class="el" href="a05583.html#l00126">NLPACS::CEdgeChainEntry::EdgeStart</a>, <a class="el" href="a05385.html#l00090">NLMISC::CAABBox::getCenter()</a>, <a class="el" href="a05930.html#l00391">NLPACS::CLocalRetriever::getChain()</a>, <a class="el" href="a05930.html#l00500">NLPACS::CLocalRetriever::getChainQuad()</a>, <a class="el" href="a06334.html#l00172">NLPACS::CRetrievableSurface::getFlags()</a>, <a class="el" href="a05930.html#l00386">NLPACS::CLocalRetriever::getFullOrderedChain()</a>, <a class="el" href="a05930.html#l00384">NLPACS::CLocalRetriever::getFullOrderedChains()</a>, <a class="el" href="a05385.html#l00091">NLMISC::CAABBox::getHalfSize()</a>, <a class="el" href="a05540.html#l00269">NLPACS::CChain::getLeft()</a>, <a class="el" href="a05930.html#l00381">NLPACS::CLocalRetriever::getOrderedChain()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a05540.html#l00139">NLPACS::COrderedChain::getParentId()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05540.html#l00274">NLPACS::CChain::getRight()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a05540.html#l00294">NLPACS::CChain::isBorderChain()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05583.html#l00124">NLPACS::CEdgeChainEntry::OChainId</a>, <a class="el" href="a05541.html#l00289">NLPACS::CChainQuad::selectEdges()</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+<div class="fragment"><pre>00276 {
+00277 edges.clear();
+00278
+00279 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(sbox, _InternalCST);
+00280
+00281 <a class="code" href="a04558.html#a15">uint</a> inst;
+00282 <span class="keywordflow">for</span> (inst=0; inst&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++inst)
+00283 {
+00284 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[inst]];
+00285 CLocalRetriever &amp;retriever = const_cast&lt;CLocalRetriever &amp;&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId()));
+00286 <span class="keywordflow">if</span> (!retriever.isLoaded())
+00287 <span class="keywordflow">continue</span>;
+00288
+00289 CChainQuad &amp;chainquad = retriever.getChainQuad();
+00290
+00291 <a class="code" href="a02156.html">CAABBox</a> box;
+00292 CVector origin = instance.getOrigin();
+00293 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(sbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_0">getCenter</a>()-origin);
+00294 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(sbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_1">getHalfSize</a>());
+00295 chainquad.selectEdges(box, _InternalCST);
+00296
+00297 <a class="code" href="a04558.html#a15">uint</a> ece;
+00298
+00299 CVector dz(0.0f, 0.0f, 0.5f);
+00300 <span class="keywordtype">float</span> zp = (<span class="keywordtype">float</span>)sbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_0">getCenter</a>().z;
+00301 <span class="keywordflow">for</span> (ece=0; ece&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.EdgeChainEntries.size(); ++ece)
+00302 {
+00303 CEdgeChainEntry &amp;entry = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.EdgeChainEntries[ece];
+00304
+00305 <span class="comment">//</span>
+00306 <span class="keyword">const</span> CChain &amp;fchain = retriever.getChain(retriever.getOrderedChain(entry.OChainId).getParentId());
+00307 <a class="code" href="a04558.html#a7">uint8</a> chainType = (fchain.getRight() &gt;= 0 ? 1 : (fchain.isBorderChain() ? 2 : 0));
+00308
+00309 <span class="comment">//</span>
+00310 <span class="keywordflow">if</span> (chainType == 1)
+00311 {
+00312 <a class="code" href="a04558.html#a15">uint</a> left = fchain.getLeft();
+00313 <a class="code" href="a04558.html#a15">uint</a> right = fchain.getRight();
+00314
+00315 <span class="keyword">const</span> CRetrievableSurface &amp;lsurface = retriever.getSurface(left);
+00316 <span class="keyword">const</span> CRetrievableSurface &amp;rsurface = retriever.getSurface(right);
+00317
+00318 <span class="keywordtype">bool</span> luw = (lsurface.getFlags() &amp; (1 &lt;&lt; CRetrievableSurface::IsUnderWaterBit)) != 0;
+00319 <span class="keywordtype">bool</span> ruw = (rsurface.getFlags() &amp; (1 &lt;&lt; CRetrievableSurface::IsUnderWaterBit)) != 0;
+00320
+00321 <span class="keywordflow">if</span> (luw &amp;&amp; !ruw || !luw &amp;&amp; ruw)
+00322 chainType = 3;
+00323 }
+00324
+00325 <span class="keywordflow">if</span> (retriever.getFullOrderedChains().size() &gt; 0)
+00326 {
+00327 <span class="keyword">const</span> COrderedChain3f &amp;ochain = retriever.getFullOrderedChain(entry.OChainId);
+00328
+00329 <a class="code" href="a04558.html#a15">uint</a> edge;
+00330 <span class="keywordflow">for</span> (edge=entry.EdgeStart; edge&lt;entry.EdgeEnd; ++edge)
+00331 {
+00332 edges.push_back(make_pair(<a class="code" href="a02759.html">CLine</a>(), chainType));
+00333 edges.back().first.V0 = ochain[edge] + origin;
+00334 edges.back().first.V1 = ochain[edge+1] + origin;
+00335 <span class="comment">/*</span>
+00336 <span class="comment"> edges.push_back(make_pair(CLine(), chainType));</span>
+00337 <span class="comment"> edges.back().first.V0 = ochain[edge] + origin;</span>
+00338 <span class="comment"> edges.back().first.V1 = ochain[edge] + origin +dz;</span>
+00339 <span class="comment"></span>
+00340 <span class="comment"> edges.push_back(make_pair(CLine(), chainType));</span>
+00341 <span class="comment"> edges.back().first.V0 = ochain[edge+1] + origin;</span>
+00342 <span class="comment"> edges.back().first.V1 = ochain[edge+1] + origin +dz;</span>
+00343 <span class="comment">*/</span>
+00344 }
+00345 }
+00346 <span class="keywordflow">else</span>
+00347 {
+00348 <span class="keyword">const</span> COrderedChain &amp;ochain = retriever.getOrderedChain(entry.OChainId);
+00349
+00350 <a class="code" href="a04558.html#a15">uint</a> edge;
+00351 <span class="keywordflow">for</span> (edge=entry.EdgeStart; edge&lt;entry.EdgeEnd; ++edge)
+00352 {
+00353 edges.push_back(make_pair(<a class="code" href="a02759.html">CLine</a>(), chainType));
+00354 edges.back().first.V0 = ochain[edge].unpack3f() + origin;
+00355 edges.back().first.V0.z = zp;
+00356 edges.back().first.V1 = ochain[edge+1].unpack3f() + origin;
+00357 edges.back().first.V1.z = zp;
+00358 }
+00359 }
+00360 }
+00361 }
+00362 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_3" doxytag="NLPACS::CGlobalRetriever::getBorders" ></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 NLPACS::CGlobalRetriever::getBorders </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; std::pair&lt; <a class="el" href="a02759.html">NLMISC::CLine</a>, <a class="el" href="a04558.html#a7">uint8</a> &gt; &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>edges</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Checks the retriever for errors.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera4">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00260">260</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00840">getDoubleGlobalPosition()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, and <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>.
+<p>
+<div class="fragment"><pre>00261 {
+00262 edges.clear();
+00263
+00264 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0)
+00265 <span class="keywordflow">return</span>;
+00266
+00267 <a class="code" href="a03664.html">CVectorD</a> gpos = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_1">getDoubleGlobalPosition</a>(pos);
+00268 <a class="code" href="a02156.html">CAABBox</a> sbox;
+00269 sbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(gpos);
+00270 sbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector(50.0f, 50.0f, 100.0f));
+00271
+00272 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_3">getBorders</a>(sbox, edges);
+00273 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_1" doxytag="NLPACS::CGlobalRetriever::getDoubleGlobalPosition" ></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="a03664.html">CVectorD</a> NLPACS::CGlobalRetriever::getDoubleGlobalPosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>global</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Converts a global position object into a 'human-readable' CVector (double instead.).
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera5">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00840">840</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, and <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02028">doMove()</a>, <a class="el" href="a05761.html#l00260">getBorders()</a>, <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, and <a class="el" href="a06208.html#l00445">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPosKeepZ()</a>.
+<p>
+<div class="fragment"><pre>00841 {
+00842 <span class="keywordflow">if</span> (global.InstanceId &gt;= 0)
+00843 {
+00844 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[global.InstanceId].getDoubleGlobalPosition(global.LocalPosition.Estimation);
+00845 }
+00846 <span class="keywordflow">else</span>
+00847 {
+00848 <span class="comment">// it should be an error here</span>
+00849 <span class="keywordflow">return</span> <a class="code" href="a03664.html">CVectorD</a>(global.LocalPosition.Estimation);
+00850 }
+00851 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_2" doxytag="NLPACS::CGlobalRetriever::getGlobalPosition" ></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="a03128.html">CVector</a> NLPACS::CGlobalRetriever::getGlobalPosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>global</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Converts a global position object into a 'human-readable' CVector.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera6">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00827">827</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, and <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00855">findAStarPath()</a>.
+<p>
+<div class="fragment"><pre>00828 {
+00829 <span class="keywordflow">if</span> (global.InstanceId &gt;= 0)
+00830 {
+00831 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[global.InstanceId].getGlobalPosition(global.LocalPosition.Estimation);
+00832 }
+00833 <span class="keywordflow">else</span>
+00834 {
+00835 <span class="comment">// it should be an error here</span>
+00836 <span class="keywordflow">return</span> global.LocalPosition.Estimation;
+00837 }
+00838 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_3" doxytag="NLPACS::CGlobalRetriever::getIdentifier" ></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 string &amp; NLPACS::CGlobalRetriever::getIdentifier </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>position</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the identifier of the global position.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera7">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00746">746</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05930.html#l00419">NLPACS::CLocalRetriever::getIdentifier()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, and <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>.
+<p>
+<div class="fragment"><pre>00747 {
+00748 <span class="keyword">static</span> <span class="keyword">const</span> string nullString = string(<span class="stringliteral">""</span>);
+00749
+00750 <span class="keywordflow">if</span> (position.InstanceId == -1)
+00751 <span class="keywordflow">return</span> nullString;
+00752
+00753 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[position.InstanceId].getRetrieverId()).getIdentifier();
+00754 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_4" doxytag="NLPACS::CGlobalRetriever::getIdentifier" ></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#a10">sint32</a> NLPACS::CGlobalRetriever::getIdentifier </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the retriever id from the string id.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera8">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00736">736</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05930.html#l00419">NLPACS::CLocalRetriever::getIdentifier()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06336.html#l00076">NLPACS::CRetrieverBank::getRetrievers()</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00766">buildInstance()</a>.
+<p>
+<div class="fragment"><pre>00737 {
+00738 <a class="code" href="a04558.html#a10">sint32</a> i;
+00739 <span class="keywordflow">for</span> (i=0; i&lt;(<a class="code" href="a04558.html#a10">sint32</a>)(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetrievers().size()); ++i)
+00740 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(i).getIdentifier() == <span class="keywordtype">id</span>)
+00741 <span class="keywordflow">return</span> i;
+00742
+00743 <span class="keywordflow">return</span> -1;
+00744 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_1" doxytag="NLPACS::CGlobalRetriever::getInstance" ></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="a03333.html">CRetrieverInstance</a>&amp; NLPACS::CGlobalRetriever::getInstance </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>id</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>
+Gets the retriever instance referred by its id.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00208">208</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05666.html#l00130">NLPACS::CEdgeQuad::build()</a>, <a class="el" href="a05761.html#l02028">doMove()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05761.html#l02421">getMeanHeight()</a>, <a class="el" href="a05761.html#l01159">getSurfaceById()</a>, <a class="el" href="a05761.html#l01937">testBBoxMove()</a>, <a class="el" href="a05761.html#l02236">testBBoxRot()</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, <a class="el" href="a05761.html#l01864">testCylinderMove()</a>, and <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>.
+<p>
+<div class="fragment"><pre>00208 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>]; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_4" doxytag="NLPACS::CGlobalRetriever::getInstanceFullAccess" ></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="a03333.html">CRetrieverInstance</a>&amp; NLPACS::CGlobalRetriever::getInstanceFullAccess </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>id</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Gets the instance by its id, with full read/write access.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00363">363</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00363 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>]; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_2" doxytag="NLPACS::CGlobalRetriever::getInstances" ></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 std::vector&lt;<a class="el" href="a03333.html">CRetrieverInstance</a>&gt;&amp; NLPACS::CGlobalRetriever::getInstances </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> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Gets the vector of retriever instances that compose the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00205">205</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+<div class="fragment"><pre>00205 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverb0" doxytag="NLPACS::CGlobalRetriever::getInternalCST" ></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="a02387.html">CCollisionSurfaceTemp</a>&amp; NLPACS::CGlobalRetriever::getInternalCST </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> const<code> [inline, protected]</code></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="a05762.html#l00523">523</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>.
+<p>
+Referenced by <a class="el" href="a06337.html#l00139">NLPACS::CRetrieverInstance::initEdgeQuad()</a>.
+<p>
+<div class="fragment"><pre>00523 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_5" doxytag="NLPACS::CGlobalRetriever::getLocalRetrieverId" ></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#a10">sint32</a> NLPACS::CGlobalRetriever::getLocalRetrieverId </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>position</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the LocalRetrieverId of the global position.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera9">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00756">756</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
+<p>
+<div class="fragment"><pre>00757 {
+00758 <span class="keywordflow">if</span> (position.InstanceId == -1)
+00759 <span class="keywordflow">return</span> -1;
+00760
+00761 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[position.InstanceId].getRetrieverId();
+00762 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_3" doxytag="NLPACS::CGlobalRetriever::getMaterial" ></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#a11">uint32</a> NLPACS::CGlobalRetriever::getMaterial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the material at this position.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera10">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00224">224</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a06334.html#l00164">NLPACS::CRetrievableSurface::getMaterial()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00225 {
+00226 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00227 <span class="keywordflow">return</span> 0xFFFFFFFF;
+00228
+00229 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pos.InstanceId];
+00230 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId());
+00231
+00232 <span class="keywordflow">if</span> (!retriever.isLoaded() || pos.LocalPosition.Surface &lt; 0 || pos.LocalPosition.Surface &gt;= (<a class="code" href="a04558.html#a14">sint</a>)retriever.getSurfaces().size())
+00233 <span class="keywordflow">return</span> 0xFFFFFFFF;
+00234
+00235 <span class="keywordflow">return</span> retriever.getSurface(pos.LocalPosition.Surface).getMaterial();
+00236 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_1" doxytag="NLPACS::CGlobalRetriever::getMeanHeight" ></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 NLPACS::CGlobalRetriever::getMeanHeight </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+return the mean height of the surface under pos..
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera11">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l02421">2421</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05929.html#l01479">NLPACS::CLocalRetriever::getHeight()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06208.html#l00435">NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos()</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>, and <a class="el" href="a05762.html#l00461">updateHeight()</a>.
+<p>
+<div class="fragment"><pre>02422 {
+02423 <span class="comment">// for wrong positions, leave it unchanged</span>
+02424 <span class="keywordflow">if</span> ((pos.InstanceId==-1)||(pos.LocalPosition.Surface==-1))
+02425 <span class="keywordflow">return</span> pos.LocalPosition.Estimation.z;
+02426
+02427 <span class="comment">// get instance/localretriever.</span>
+02428 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(pos.InstanceId);
+02429 <span class="keyword">const</span> CLocalRetriever &amp;retriever= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+02430
+02431 <span class="keywordflow">if</span> (!retriever.isLoaded())
+02432 <span class="keywordflow">return</span> pos.LocalPosition.Estimation.z;
+02433
+02434 <span class="comment">// return height from local retriever</span>
+02435 <span class="keywordflow">return</span> retriever.getHeight(pos.LocalPosition);
+02436 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1249_0" doxytag="NLPACS::CGlobalRetriever::getNode" ></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="a03335.html">CRetrieverInstance::CAStarNodeInfo</a>&amp; NLPACS::CGlobalRetriever::getNode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03334.html">CRetrieverInstance::CAStarNodeAccess</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>access</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Gets the CAStarNodeInfo referred by its access.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00484">484</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a06338.html#l00086">NLPACS::CRetrieverInstance::CAStarNodeAccess::InstanceId</a>, and <a class="el" href="a06338.html#l00087">NLPACS::CRetrieverInstance::CAStarNodeAccess::NodeId</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00855">findAStarPath()</a>.
+<p>
+<div class="fragment"><pre>00485 {
+00486 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[access.InstanceId]._NodesInformation[access.NodeId];
+00487 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_4" doxytag="NLPACS::CGlobalRetriever::getRetriever" ></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="a02787.html">CLocalRetriever</a>&amp; NLPACS::CGlobalRetriever::getRetriever </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</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 local retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00220">220</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00153">check()</a>, <a class="el" href="a05761.html#l00252">distanceToBorder()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05761.html#l00275">getBorders()</a>, <a class="el" href="a05761.html#l00736">getIdentifier()</a>, <a class="el" href="a05762.html#l00224">getMaterial()</a>, <a class="el" href="a06337.html#l00139">NLPACS::CRetrieverInstance::initEdgeQuad()</a>, <a class="el" href="a05761.html#l00088">initRetrieveTable()</a>, <a class="el" href="a05762.html#l00295">insurePosition()</a>, <a class="el" href="a05762.html#l00248">isWaterPosition()</a>, <a class="el" href="a06337.html#l00152">NLPACS::CRetrieverInstance::linkEdgeQuad()</a>, <a class="el" href="a05761.html#l00430">makeInstance()</a>, <a class="el" href="a05761.html#l00367">makeLinks()</a>, and <a class="el" href="a05762.html#l00305">testPosition()</a>.
+<p>
+<div class="fragment"><pre>00220 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(<span class="keywordtype">id</span>); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_5" doxytag="NLPACS::CGlobalRetriever::getRetrieverBank" ></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="a03331.html">CRetrieverBank</a>* NLPACS::CGlobalRetriever::getRetrieverBank </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> 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 retriever bank associated to this global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00217">217</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>.
+<p>
+<div class="fragment"><pre>00217 { <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_2" doxytag="NLPACS::CGlobalRetriever::getSurfaceById" ></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="a03328.html">NLPACS::CRetrievableSurface</a> * NLPACS::CGlobalRetriever::getSurfaceById </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03462.html">CSurfaceIdent</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>surfId</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+retrieve a surface by its Id. NULL if not found or if -1.
+<p>
+Definition at line <a class="el" href="a05761.html#l01159">1159</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05578.html#l00069">NLPACS::CSurfaceIdent::RetrieverInstanceId</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05578.html#l00071">NLPACS::CSurfaceIdent::SurfaceId</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01623">verticalChain()</a>.
+<p>
+<div class="fragment"><pre>01160 {
+01161 <span class="keywordflow">if</span>(surfId.RetrieverInstanceId&gt;=0 &amp;&amp; surfId.SurfaceId&gt;=0)
+01162 {
+01163 <a class="code" href="a04558.html#a10">sint32</a> locRetId= this-&gt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(surfId.RetrieverInstanceId).getRetrieverId();
+01164 <span class="keyword">const</span> CLocalRetriever &amp;retr = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId);
+01165 <span class="keywordflow">if</span> (!retr.isLoaded() || surfId.SurfaceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)retr.getSurfaces().size())
+01166 <span class="keywordflow">return</span> NULL;
+01167 <span class="keyword">const</span> CRetrievableSurface &amp;surf= retr.getSurface(surfId.SurfaceId);
+01168 <span class="keywordflow">return</span> &amp;surf;
+01169 }
+01170 <span class="keywordflow">else</span>
+01171 <span class="keywordflow">return</span> NULL;
+01172 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1235_1" doxytag="NLPACS::CGlobalRetriever::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 NLPACS::CGlobalRetriever::init </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>
+Setup an empty global retriever.
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_5" doxytag="NLPACS::CGlobalRetriever::initAll" ></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 NLPACS::CGlobalRetriever::initAll </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>initInstances</em> = true </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>
+Inits all the instances inside the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00414">414</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a05761.html#l00078">initQuadGrid()</a>, <a class="el" href="a05761.html#l00088">initRetrieveTable()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02382">NLPACS::UGlobalRetriever::createGlobalRetriever()</a>, and <a class="el" href="a05761.html#l00136">serial()</a>.
+<p>
+<div class="fragment"><pre>00415 {
+00416 <span class="keywordflow">if</span> (initInstances)
+00417 {
+00418 <a class="code" href="a04558.html#a15">uint</a> n;
+00419 <span class="keywordflow">for</span> (n=0; n&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++n)
+00420 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[n].getInstanceId() != -1 &amp;&amp; <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[n].getRetrieverId() != -1)
+00421 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[n].init(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(_Instances[n].getRetrieverId()));
+00422 }
+00423
+00424 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_2">initQuadGrid</a>();
+00425 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1235_3">initRetrieveTable</a>();
+00426 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1235_2" doxytag="NLPACS::CGlobalRetriever::initQuadGrid" ></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 NLPACS::CGlobalRetriever::initQuadGrid </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>
+Fill the quadgrid with the instances.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00078">78</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00162">_InstanceGrid</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1268_0">NLPACS::CQuadGrid&lt; uint32 &gt;::clear()</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1266_1">NLPACS::CQuadGrid&lt; uint32 &gt;::create()</a>, <a class="el" href="a05762.html#l00201">getBBox()</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1268_2">NLPACS::CQuadGrid&lt; uint32 &gt;::insert()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00414">initAll()</a>.
+<p>
+<div class="fragment"><pre>00079 {
+00080 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.clear();
+00081 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.create(128, 160.0f);
+00082
+00083 <a class="code" href="a04558.html#a15">uint</a> i;
+00084 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++i)
+00085 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.insert(_Instances[i].<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_0">getBBox</a>().getMin(), _Instances[i].<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_0">getBBox</a>().getMax(), i);
+00086 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1235_3" doxytag="NLPACS::CGlobalRetriever::initRetrieveTable" ></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 NLPACS::CGlobalRetriever::initRetrieveTable </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>
+Init the retrieve table.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00088">88</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00151">_RetrieveTable</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00414">initAll()</a>.
+<p>
+<div class="fragment"><pre>00089 {
+00090 <a class="code" href="a04558.html#a15">uint</a> i;
+00091 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = 0;
+00092
+00093 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++i)
+00094 {
+00095 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i].getInstanceId() != -1 &amp;&amp; <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[i].getRetrieverId() != -1)
+00096 {
+00097 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[i].getRetrieverId());
+00098 <a class="code" href="a04223.html#a587">size</a> = std::max((<a class="code" href="a04558.html#a15">uint</a>)retriever.getSurfaces().size(), <a class="code" href="a04223.html#a587">size</a>);
+00099 }
+00100 }
+00101
+00102 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">_RetrieveTable</a>.resize(size);
+00103 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a04223.html#a587">size</a>; ++i)
+00104 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">_RetrieveTable</a>[i] = 0;
+00105 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_6" doxytag="NLPACS::CGlobalRetriever::insurePosition" ></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"> bool NLPACS::CGlobalRetriever::insurePosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Insure position inside surface.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera12">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00295">295</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05929.html#l00960">NLPACS::CLocalRetriever::insurePosition()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00296 {
+00297 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00298 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00299
+00300 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(_Instances[pos.InstanceId].getRetrieverId());
+00301 <span class="keywordflow">return</span> retriever.insurePosition(pos.LocalPosition);
+00302 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_6" doxytag="NLPACS::CGlobalRetriever::isInterior" ></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"> bool NLPACS::CGlobalRetriever::isInterior </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Test if the position is an interior.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera13">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00239">239</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00240 {
+00241 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00242 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00243
+00244 <span class="keywordflow">return</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pos.InstanceId].getType() == CLocalRetriever::Interior);
+00245 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_7" doxytag="NLPACS::CGlobalRetriever::isWaterPosition" ></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"> bool NLPACS::CGlobalRetriever::isWaterPosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>waterHeight</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Test if the position is in water.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera14">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00248">248</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a06334.html#l00172">NLPACS::CRetrievableSurface::getFlags()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a06334.html#l00173">NLPACS::CRetrievableSurface::getWaterHeight()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>.
+<p>
+<div class="fragment"><pre>00249 {
+00250 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00251 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00252
+00253 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pos.InstanceId];
+00254 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId());
+00255
+00256 <span class="keywordflow">if</span> (!retriever.isLoaded())
+00257 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00258
+00259 <span class="keyword">const</span> CRetrievableSurface &amp;surface = retriever.getSurface(pos.LocalPosition.Surface);
+00260
+00261 waterHeight = surface.getWaterHeight();
+00262
+00263 <span class="keywordflow">return</span> (surface.getFlags() &amp; (1 &lt;&lt; CRetrievableSurface::IsUnderWaterBit)) != 0;
+00264 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_6" doxytag="NLPACS::CGlobalRetriever::makeAllLinks" ></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 NLPACS::CGlobalRetriever::makeAllLinks </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>
+Links all the instances inside the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00405">405</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00367">makeLinks()</a>, <a class="el" href="a05761.html#l00397">resetAllLinks()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00406 {
+00407 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_9">resetAllLinks</a>();
+00408
+00409 <a class="code" href="a04558.html#a15">uint</a> n;
+00410 <span class="keywordflow">for</span> (n=0; n&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++n)
+00411 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_8">makeLinks</a>(n);
+00412 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_7" doxytag="NLPACS::CGlobalRetriever::makeInstance" ></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="a03333.html">NLPACS::CRetrieverInstance</a> &amp; NLPACS::CGlobalRetriever::makeInstance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>retriever</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>orientation</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>origin</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>
+Creates an instance of local retriever at the origine position with the given orientation.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00430">430</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00162">_InstanceGrid</a>, <a class="el" href="a05762.html#l00151">_RetrieveTable</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a06338.html#l00220">NLPACS::CRetrieverInstance::getBBox()</a>, <a class="el" href="a05385.html#l00091">NLMISC::CAABBox::getHalfSize()</a>, <a class="el" href="a06338.html#l00170">NLPACS::CRetrieverInstance::getInstanceId()</a>, <a class="el" href="a05385.html#l00087">NLMISC::CAABBox::getMax()</a>, <a class="el" href="a05385.html#l00086">NLMISC::CAABBox::getMin()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a05930.html#l00404">NLPACS::CLocalRetriever::getType()</a>, <a class="el" href="a06337.html#l00139">NLPACS::CRetrieverInstance::initEdgeQuad()</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1268_2">NLPACS::CQuadGrid&lt; uint32 &gt;::insert()</a>, <a class="el" href="a06337.html#l00109">NLPACS::CRetrieverInstance::make()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00766">buildInstance()</a>.
+<p>
+<div class="fragment"><pre>00431 {
+00432 <a class="code" href="a04558.html#a15">uint</a> <span class="keywordtype">id</span>;
+00433 <span class="keywordflow">for</span> (<span class="keywordtype">id</span>=0; <span class="keywordtype">id</span>&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size() &amp;&amp; <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>].getInstanceId()!=-1; ++<span class="keywordtype">id</span>)
+00434 ;
+00435
+00436 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00437 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.resize(<span class="keywordtype">id</span>+1);
+00438
+00439 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00440 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(retrieverId);
+00441
+00442 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">_RetrieveTable</a>.size() &lt; retriever.getSurfaces().size())
+00443 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">_RetrieveTable</a>.resize(retriever.getSurfaces().size(), 0);
+00444
+00445 instance.make(<span class="keywordtype">id</span>, retrieverId, retriever, orientation, origin);
+00446
+00447 CVector hsize = instance.getBBox().getHalfSize();
+00448 hsize.z = 0.0f;
+00449 <span class="keywordflow">if</span> (hsize != CVector::Null)
+00450 {
+00451 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_1">getHalfSize</a>() == CVector::Null)
+00452 {
+00453 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a> = instance.getBBox();
+00454 }
+00455 <span class="keywordflow">else</span>
+00456 {
+00457 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(instance.getBBox().getMin());
+00458 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(instance.getBBox().getMax());
+00459 }
+00460
+00461 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId()).getType() == CLocalRetriever::Interior)
+00462 instance.initEdgeQuad(*<span class="keyword">this</span>);
+00463
+00464 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.insert(instance.getBBox().getMin(), instance.getBBox().getMax(), instance.getInstanceId());
+00465 }
+00466
+00467 <span class="keywordflow">return</span> instance;
+00468 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_8" doxytag="NLPACS::CGlobalRetriever::makeLinks" ></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 NLPACS::CGlobalRetriever::makeLinks </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>n</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>
+Links the instance referred by its id to its neighbors.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00367">367</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a06338.html#l00220">NLPACS::CRetrieverInstance::getBBox()</a>, <a class="el" href="a06338.html#l00170">NLPACS::CRetrieverInstance::getInstanceId()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a06336.html#l00076">NLPACS::CRetrieverBank::getRetrievers()</a>, <a class="el" href="a05930.html#l00404">NLPACS::CLocalRetriever::getType()</a>, <a class="el" href="a06337.html#l00194">NLPACS::CRetrieverInstance::link()</a>, <a class="el" href="a06337.html#l00152">NLPACS::CRetrieverInstance::linkEdgeQuad()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00766">buildInstance()</a>, and <a class="el" href="a05761.html#l00405">makeAllLinks()</a>.
+<p>
+<div class="fragment"><pre>00368 {
+00369 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[n];
+00370
+00371 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(instance.getBBox(), <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>);
+00372
+00373 <a class="code" href="a04558.html#a15">uint</a> i;
+00374 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++i)
+00375 {
+00376 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;neighbor = _Instances[<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i]];
+00377
+00378 <span class="keywordflow">if</span> (neighbor.getInstanceId() == instance.getInstanceId())
+00379 <span class="keywordflow">continue</span>;
+00380
+00381 <span class="keywordflow">try</span>
+00382 {
+00383 instance.link(neighbor, <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetrievers());
+00384 neighbor.link(instance, <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetrievers());
+00385 }
+00386 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &amp;e)
+00387 {
+00388 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"in NLPACS::CGlobalRetriever::makeLinks()"</span>);
+00389 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"caught an exception during linkage of %d and %d: %s"</span>, instance.getInstanceId(), neighbor.getInstanceId(), e.what());
+00390 }
+00391 }
+00392
+00393 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId()).getType() == CLocalRetriever::Interior)
+00394 instance.linkEdgeQuad(*<span class="keyword">this</span>);
+00395 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1243_0" doxytag="NLPACS::CGlobalRetriever::refreshLrAround" ></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 NLPACS::CGlobalRetriever::refreshLrAround </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>position</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>radius</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Refresh loaded retrievers around a position (one retriever is loaded at a time)
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera15">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l02448">2448</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00144">_LrLoaderList</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06336.html#l00284">NLPACS::CRetrieverBank::allLoaded()</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a05762.html#l00119">NLPACS::CGlobalRetriever::CLrLoader::Finished</a>, <a class="el" href="a06336.html#l00278">NLPACS::CRetrieverBank::getNamePrefix()</a>, <a class="el" href="a05646.html#l01122">in</a>, <a class="el" href="a05762.html#l00125">NLPACS::CGlobalRetriever::CLrLoader::LoadFile</a>, <a class="el" href="a05762.html#l00123">NLPACS::CGlobalRetriever::CLrLoader::LrId</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a04338.html#a0">NLPACS_HAUTO_REFRESH_LR_AROUND</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>02449 {
+02450 <a class="code" href="a04338.html#a0">NLPACS_HAUTO_REFRESH_LR_AROUND</a>
+02451
+02452 <span class="comment">// check if retriever bank is all loaded, and if yes don't refresh it</span>
+02453 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;allLoaded())
+02454 <span class="keywordflow">return</span>;
+02455
+02456 std::list&lt;CLrLoader&gt;::iterator ite = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.begin();
+02457 <span class="keywordflow">while</span> (ite != <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.end())
+02458 {
+02459 <span class="comment">// Finished loaded a lr, stream it into rbank</span>
+02460 <span class="keywordflow">if</span> (ite-&gt;Finished &amp;&amp; ite-&gt;Successful)
+02461 {
+02462 <span class="keywordflow">if</span> (!ite-&gt;_Buffer.isReading())
+02463 ite-&gt;_Buffer.invert();
+02464
+02465 ite-&gt;_Buffer.resetBufPos();
+02466
+02467 <span class="comment">// NLMEMORY::CheckHeap (true);</span>
+02468
+02469 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;loadRetriever(ite-&gt;LrId, ite-&gt;_Buffer);
+02470
+02471 <span class="comment">// NLMEMORY::CheckHeap (true);</span>
+02472
+02473 ite-&gt;_Buffer.clear();
+02474
+02475 <span class="comment">// NLMEMORY::CheckHeap (true);</span>
+02476
+02477 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"Lr '%s' loading task complete"</span>, ite-&gt;LoadFile.c_str());
+02478
+02479 <span class="comment">// Remove this entry</span>
+02480 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.erase (ite);
+02481
+02482 <span class="keywordflow">break</span>;
+02483 }
+02484
+02485 <span class="comment">// Next lr</span>
+02486 ite++;
+02487 }
+02488
+02489 <a class="code" href="a02156.html">CAABBox</a> box;
+02490 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(position);
+02491 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector(radius, radius, 1000.0f));
+02492
+02493 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(box, _InternalCST);
+02494
+02495 set&lt;uint&gt; newlr, <a class="code" href="a04223.html#a647">in</a>, out;
+02496 map&lt;uint, CVector&gt; lrPosition;
+02497
+02498 <a class="code" href="a04558.html#a15">uint</a> i;
+02499 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++i)
+02500 {
+02501 <a class="code" href="a04558.html#a15">uint</a> lrId = (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i]].getRetrieverId());
+02502 newlr.insert(lrId);
+02503 lrPosition.insert (map&lt;uint, CVector&gt;::value_type(lrId, _Instances[<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i]].getBBox().getCenter()));
+02504 }
+02505
+02506 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;diff(newlr, in, out);
+02507
+02508 set&lt;uint&gt;::iterator it;
+02509
+02510 <span class="comment">// unload all possible retrievers</span>
+02511 <span class="keywordflow">for</span> (it=out.begin(); it!=out.end(); ++it)
+02512 {
+02513 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;unloadRetriever(*it);
+02514 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"Freed Lr '%s'"</span>, (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getNamePrefix() + <span class="stringliteral">"_"</span> + <a class="code" href="a05378.html#a244">toString</a>(*it) + <span class="stringliteral">".lr"</span>).c_str());
+02515 }
+02516
+02517 <span class="comment">// if load task idle and more lr to load, setup load task</span>
+02518 set&lt;uint&gt;::iterator iteIn = <a class="code" href="a04223.html#a647">in</a>.begin();
+02519 <span class="keywordflow">while</span> (iteIn != <a class="code" href="a04223.html#a647">in</a>.end())
+02520 {
+02521 <span class="comment">// Already exist ?</span>
+02522 ite = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.begin();
+02523 <span class="keywordflow">while</span> (ite != <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.end())
+02524 {
+02525 <span class="keywordflow">if</span> (ite-&gt;LrId == *iteIn)
+02526 <span class="keywordflow">break</span>;
+02527
+02528 ite++;
+02529 }
+02530
+02531 <span class="comment">// Not found ?</span>
+02532 <span class="keywordflow">if</span> (ite == <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.end())
+02533 {
+02534 <span class="comment">// Get the position fot this LR</span>
+02535 map&lt;uint, CVector&gt;::iterator iteLR = lrPosition.find(*iteIn);
+02536 <a class="code" href="a04199.html#a6">nlassert</a> (iteLR != lrPosition.end());
+02537
+02538 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.push_back (CLrLoader (iteLR-&gt;second));
+02539 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern0">CLrLoader</a> &amp;loader = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.back();
+02540 loader.Finished = <span class="keyword">false</span>;
+02541 loader.LrId = *iteIn;
+02542 loader.LoadFile = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getNamePrefix() + <span class="stringliteral">"_"</span> + <a class="code" href="a05378.html#a244">toString</a>(loader.LrId) + <span class="stringliteral">".lr"</span>;
+02543
+02544 CAsyncFileManager::getInstance().addLoadTask(&amp;loader);
+02545
+02546 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"Lr '%s' added to load"</span>, loader.LoadFile.c_str());
+02547 }
+02548
+02549 <span class="comment">// Next lr to load</span>
+02550 iteIn++;
+02551 }
+02552 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1243_1" doxytag="NLPACS::CGlobalRetriever::refreshLrAroundNow" ></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 NLPACS::CGlobalRetriever::refreshLrAroundNow </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>position</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>radius</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Refresh loaded retrievers around a position (all retrievers are updated at this time -- used at startup)
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera16">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l02554">2554</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00144">_LrLoaderList</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a06336.html#l00284">NLPACS::CRetrieverBank::allLoaded()</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a06336.html#l00278">NLPACS::CRetrieverBank::getNamePrefix()</a>, <a class="el" href="a05646.html#l01122">in</a>, <a class="el" href="a05586.html#l00073">NLMISC::nlSleep()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>02555 {
+02556 <span class="comment">// check if retriever bank is all loaded, and if yes don't refresh it</span>
+02557 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;allLoaded())
+02558 <span class="keywordflow">return</span>;
+02559
+02560 <span class="keywordflow">while</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.size ())
+02561 {
+02562 std::list&lt;CLrLoader&gt;::iterator ite = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.begin();
+02563 <span class="keywordflow">while</span> (ite != <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.end())
+02564 {
+02565 <span class="comment">// Finished loaded a lr, stream it into rbank</span>
+02566 <span class="keywordflow">if</span> (ite-&gt;Finished)
+02567 {
+02568 <span class="keywordflow">if</span> (!ite-&gt;_Buffer.isReading())
+02569 ite-&gt;_Buffer.invert();
+02570
+02571 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;loadRetriever(ite-&gt;LrId, ite-&gt;_Buffer);
+02572
+02573 ite-&gt;_Buffer.clear();
+02574
+02575 <span class="comment">// Remove this from the list</span>
+02576 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.erase(ite);
+02577
+02578 <span class="keywordflow">break</span>;
+02579 }
+02580
+02581 <span class="comment">// </span>
+02582 ite++;
+02583 }
+02584
+02585 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">_LrLoaderList</a>.size ())
+02586 <a class="code" href="a05378.html#a256">nlSleep</a>(0);
+02587 }
+02588
+02589 <a class="code" href="a02156.html">CAABBox</a> box;
+02590 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(position);
+02591 box.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector(radius, radius, 1000.0f));
+02592
+02593 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(box, _InternalCST);
+02594
+02595 set&lt;uint&gt; newlr, <a class="code" href="a04223.html#a647">in</a>, out;
+02596 <a class="code" href="a04558.html#a15">uint</a> i;
+02597 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++i)
+02598 newlr.insert((<a class="code" href="a04558.html#a15">uint</a>)(_Instances[<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i]].getRetrieverId()));
+02599
+02600 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;diff(newlr, in, out);
+02601
+02602 set&lt;uint&gt;::iterator it;
+02603
+02604 <span class="comment">// unload all possible retrievers</span>
+02605 <span class="keywordflow">for</span> (it=out.begin(); it!=out.end(); ++it)
+02606 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;unloadRetriever(*it);
+02607
+02608 <span class="comment">// unload all possible retrievers</span>
+02609 <span class="keywordflow">for</span> (it=<a class="code" href="a04223.html#a647">in</a>.begin(); it!=<a class="code" href="a04223.html#a647">in</a>.end(); ++it)
+02610 {
+02611 string fname = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getNamePrefix() + <span class="stringliteral">"_"</span> + <a class="code" href="a05378.html#a244">toString</a>(*it) + <span class="stringliteral">".lr"</span>;
+02612 <a class="code" href="a02653.html">CIFile</a> f;
+02613 <span class="keywordflow">if</span> (!f.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(CPath::lookup(fname, <span class="keyword">false</span>)))
+02614 {
+02615 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Couldn't find file '%s' to load, retriever loading aborted"</span>, fname.c_str());
+02616 <span class="keywordflow">continue</span>;
+02617 }
+02618
+02619 const_cast&lt;CRetrieverBank*&gt;(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>)-&gt;loadRetriever(*it, f);
+02620 }
+02621 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_7" doxytag="NLPACS::CGlobalRetriever::removeInstance" ></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 NLPACS::CGlobalRetriever::removeInstance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>instanceId</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Removes an instance of retriever (perform all unlinks necessary)
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera17">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00794">794</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a06337.html#l00281">NLPACS::CRetrieverInstance::unlink()</a>.
+<p>
+<div class="fragment"><pre>00795 {
+00796 <span class="keywordflow">if</span> (instanceId &lt; 0 || instanceId &gt;= (<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size() || <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[instanceId].getInstanceId() &lt; 0)
+00797 {
+00798 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"CGlobalRetriever::removeInstance(): Can't unlink instance %d, doesn't exist"</span>, instanceId);
+00799 <span class="keywordflow">return</span>;
+00800 }
+00801
+00802 <span class="comment">// get instance</span>
+00803 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[instanceId];
+00804
+00805 <span class="comment">// unlink it from others</span>
+00806 instance.unlink(_Instances);
+00807
+00808
+00809 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_9" doxytag="NLPACS::CGlobalRetriever::resetAllLinks" ></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 NLPACS::CGlobalRetriever::resetAllLinks </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>
+Resets all links within the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00397">397</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00405">makeAllLinks()</a>.
+<p>
+<div class="fragment"><pre>00398 {
+00399 <a class="code" href="a04558.html#a15">uint</a> n;
+00400 <span class="keywordflow">for</span> (n=0; n&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size(); ++n)
+00401 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[n].unlink(_Instances);
+00402 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_8" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>estimated</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>h</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>result</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>
+Retrieves the position of an estimated point in the global retriever (double instead.).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00621">621</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00168">_ForbiddenInstances</a>, <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a>, <a class="el" href="a06337.html#l00544">NLPACS::CRetrieverInstance::getLocalPosition()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05384.html#l00081">NLMISC::CAABBox::include()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a05929.html#l00960">NLPACS::CLocalRetriever::insurePosition()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw3">MissingLr</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a06337.html#l00294">NLPACS::CRetrieverInstance::retrievePosition()</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06337.html#l00507">NLPACS::CRetrieverInstance::snap()</a>, <a class="el" href="a05583.html#l00295">NLPACS::CCollisionSurfaceTemp::SortedSurfaces</a>, <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw4">Success</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>.
+<p>
+<div class="fragment"><pre>00622 {
+00623 <span class="comment">// the retrieved position</span>
+00624 CGlobalPosition result = CGlobalPosition(-1, CLocalRetriever::CLocalPosition(-1, estimated));
+00625
+00626 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1906_2">include</a>(CVector((<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>, (<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>, (<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>)))
+00627 {
+00628 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+00629 <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a>;
+00630 <span class="keywordflow">return</span> result;
+00631 }
+00632
+00633
+00634 <span class="comment">// get the best matching instances</span>
+00635 <a class="code" href="a02156.html">CAABBox</a> bbpos;
+00636 bbpos.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(estimated);
+00637 bbpos.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector(0.5f, 0.5f, 0.5f));
+00638 <span class="keywordtype">bool</span> canGet = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(bbpos, _InternalCST);
+00639
+00640 <span class="keywordflow">if</span> (!canGet)
+00641 {
+00642 <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw3">MissingLr</a>;
+00643 <span class="keywordflow">return</span> result;
+00644 }
+00645
+00646 <a class="code" href="a04558.html#a15">uint</a> i;
+00647
+00648 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.clear();
+00649
+00650 <span class="comment">// for each instance, try to retrieve the position</span>
+00651 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++i)
+00652 {
+00653 <a class="code" href="a04558.html#a11">uint32</a> <span class="keywordtype">id</span> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i];
+00654 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00655 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00656
+00657 <a class="code" href="a04558.html#a15">uint</a> j;
+00658 <span class="keywordflow">for</span> (j=0; j&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.size(); ++j)
+00659 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>[j] == (<a class="code" href="a04558.html#a10">sint32</a>)<span class="keywordtype">id</span>)
+00660 <span class="keywordflow">break</span>;
+00661
+00662 <span class="keywordflow">if</span> (j&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.size() || !retriever.isLoaded())
+00663 <span class="keywordflow">continue</span>;
+00664
+00665 instance.retrievePosition(estimated, retriever, _InternalCST, <span class="keyword">false</span>);
+00666 }
+00667
+00668 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+00669
+00670 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.empty())
+00671 {
+00672 <span class="comment">// if there are some selected surfaces, sort them</span>
+00673 std::sort(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.begin(), <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.end(), CCollisionSurfaceTemp::CDistanceSurface());
+00674
+00675 <span class="keywordflow">if</span> (h &gt;= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.size())
+00676 {
+00677 <span class="comment">// found less surfaces than expected, abort</span>
+00678 <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a>;
+00679 <span class="keywordflow">return</span> result;
+00680 }
+00681
+00682 <a class="code" href="a04558.html#a11">uint32</a> <span class="keywordtype">id</span> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[h].Instance;
+00683 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00684 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00685
+00686 <span class="comment">// get the UGlobalPosition of the estimation for this surface</span>
+00687 result.InstanceId = <span class="keywordtype">id</span>;
+00688 result.LocalPosition.Surface = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[h].Surface;
+00689 result.LocalPosition.Estimation = instance.getLocalPosition(estimated);
+00690
+00691 CRetrieverInstance::snapVector(result.LocalPosition.Estimation);
+00692
+00693 <span class="comment">// if there are more than 1 one possible (and best matching) surface, insure the position within the surface (by moving the point)</span>
+00694 <span class="comment">// if (_InternalCST.SortedSurfaces.size() &gt;= 2 &amp;&amp; </span>
+00695 <span class="comment">// _InternalCST.SortedSurfaces[1].Distance-_InternalCST.SortedSurfaces[0].Distance &lt; InsureSurfaceThreshold)</span>
+00696 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[h].FoundCloseEdge)
+00697 {
+00698 <span class="keywordtype">bool</span> moved;
+00699 <a class="code" href="a04558.html#a15">uint</a> numMove = 0;
+00700 <span class="keywordflow">do</span>
+00701 {
+00702 moved = retriever.insurePosition(result.LocalPosition);
+00703 ++numMove;
+00704 }
+00705 <span class="keywordflow">while</span> (moved &amp;&amp; numMove &lt; 100);
+00706 <span class="comment">// the algo won't loop infinitely</span>
+00707
+00708 <span class="keywordflow">if</span> (numMove &gt; 1)
+00709 {
+00710 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"PACS: insured position inside surface (%d,%d)-(%f,%f,%f), %d moves needed"</span>, result.InstanceId, result.LocalPosition.Surface, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>, numMove-1);
+00711 }
+00712
+00713 <span class="keywordflow">if</span> (moved)
+00714 {
+00715 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"PACS: couldn't insure position (%.f,%.f) within the surface (surf=%d,inst=%d) after 100 retries"</span>, result.LocalPosition.Estimation.x, result.LocalPosition.Estimation.y, result.LocalPosition.Surface, result.InstanceId);
+00716 }
+00717 }
+00718
+00719 <span class="comment">// and after selecting the best surface (and some replacement) snap the point to the surface</span>
+00720 instance.snap(result.LocalPosition, retriever);
+00721 }
+00722 <span class="keywordflow">else</span>
+00723 {
+00724 <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw2">Failed</a>;
+00725 <span class="comment">// nlwarning("PACS: unable to retrieve correct position (%f,%f,%f)", estimated.x, estimated.y, estimated.z);</span>
+00726 <span class="comment">// nlSleep(1);</span>
+00727 }
+00728
+00729 <a class="code" href="a04223.html#a643">res</a> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverw0NLPACS_1_1CGlobalRetrieverw4">Success</a>;
+00730 <span class="keywordflow">return</span> result;
+00731 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_9" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>estimated</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>double&nbsp;</td>
+ <td class="mdname" nowrap> <em>threshold</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>retrieveSpec</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>
+Retrieves the position of an estimated point in the global retriever (double instead.).
+<p>
+
+<p>
+Reimplemented from <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera22">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00493">493</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00168">_ForbiddenInstances</a>, <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a05930.html#l00419">NLPACS::CLocalRetriever::getIdentifier()</a>, <a class="el" href="a06337.html#l00544">NLPACS::CRetrieverInstance::getLocalPosition()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00404">NLPACS::CLocalRetriever::getType()</a>, <a class="el" href="a06338.html#l00178">NLPACS::CRetrieverInstance::getType()</a>, <a class="el" href="a05384.html#l00081">NLMISC::CAABBox::include()</a>, <a class="el" href="a05929.html#l00960">NLPACS::CLocalRetriever::insurePosition()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a04338.html#a1">NLPACS_HAUTO_RETRIEVE_POSITION</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05761.html#l00054">PacsRetrieveVerbose</a>, <a class="el" href="a06337.html#l00294">NLPACS::CRetrieverInstance::retrievePosition()</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06337.html#l00507">NLPACS::CRetrieverInstance::snap()</a>, <a class="el" href="a05583.html#l00295">NLPACS::CCollisionSurfaceTemp::SortedSurfaces</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::x</a>, <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::y</a>, and <a class="el" href="a06684.html#l00047">NLMISC::CVectorD::z</a>.
+<p>
+<div class="fragment"><pre>00494 {
+00495 <a class="code" href="a04338.html#a1">NLPACS_HAUTO_RETRIEVE_POSITION</a>
+00496
+00497 <span class="comment">// the retrieved position</span>
+00498 CGlobalPosition result = CGlobalPosition(-1, CLocalRetriever::CLocalPosition(-1, estimated));
+00499
+00500 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">_BBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1906_2">include</a>(CVector((<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>, (<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>, (<span class="keywordtype">float</span>)estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>)))
+00501 {
+00502 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+00503 <span class="keywordflow">return</span> result;
+00504 }
+00505
+00506
+00507 <span class="comment">// get the best matching instances</span>
+00508 <a class="code" href="a02156.html">CAABBox</a> bbpos;
+00509 bbpos.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(estimated);
+00510 bbpos.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector(0.5f, 0.5f, 0.5f));
+00511 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_8">selectInstances</a>(bbpos, _InternalCST, retrieveSpec))
+00512 <span class="keywordflow">return</span> result;
+00513
+00514 <a class="code" href="a04558.html#a15">uint</a> i;
+00515
+00516 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.clear();
+00517
+00518 <span class="comment">// for each instance, try to retrieve the position</span>
+00519 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances.size(); ++i)
+00520 {
+00521 <a class="code" href="a04558.html#a11">uint32</a> <span class="keywordtype">id</span> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.CollisionInstances[i];
+00522 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00523 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00524
+00525 <a class="code" href="a04558.html#a15">uint</a> j;
+00526 <span class="keywordflow">for</span> (j=0; j&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.size(); ++j)
+00527 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>[j] == (<a class="code" href="a04558.html#a10">sint32</a>)<span class="keywordtype">id</span>)
+00528 <span class="keywordflow">break</span>;
+00529
+00530 <span class="keywordflow">if</span> (j&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.size() || !retriever.isLoaded())
+00531 <span class="keywordflow">continue</span>;
+00532
+00533 instance.retrievePosition(estimated, retriever, _InternalCST);
+00534 }
+00535
+00536 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+00537
+00538 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.empty())
+00539 {
+00540 <span class="comment">// if there are some selected surfaces, sort them</span>
+00541 std::sort(<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.begin(), <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.end(), CCollisionSurfaceTemp::CDistanceSurface());
+00542
+00543 <a class="code" href="a04558.html#a15">uint</a> selInstance;
+00544 <span class="keywordtype">float</span> bestDist = 1.0e10f;
+00545 <span class="keywordflow">for</span> (selInstance=0; selInstance&lt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.size(); ++selInstance)
+00546 {
+00547 <a class="code" href="a04558.html#a11">uint32</a> <span class="keywordtype">id</span> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[selInstance].Instance;
+00548 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00549
+00550 <span class="keywordflow">if</span> (instance.getType() == CLocalRetriever::Interior &amp;&amp; <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[selInstance].Distance &lt; bestDist+6.0f)
+00551 <span class="keywordflow">break</span>;
+00552
+00553 <span class="keywordflow">if</span> (selInstance == 0)
+00554 bestDist = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[0].Distance;
+00555 }
+00556
+00557 <span class="keywordflow">if</span> (selInstance &gt;= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces.size())
+00558 selInstance = 0;
+00559
+00560 <a class="code" href="a04558.html#a11">uint32</a> <span class="keywordtype">id</span> = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[selInstance].Instance;
+00561 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[<span class="keywordtype">id</span>];
+00562 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(instance.getRetrieverId());
+00563
+00564 <span class="comment">// get the UGlobalPosition of the estimation for this surface</span>
+00565 result.InstanceId = <span class="keywordtype">id</span>;
+00566 result.LocalPosition.Surface = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[selInstance].Surface;
+00567 result.LocalPosition.Estimation = instance.getLocalPosition(estimated);
+00568
+00569 CRetrieverInstance::snapVector(result.LocalPosition.Estimation);
+00570
+00571 <span class="comment">// if there are more than 1 one possible (and best matching) surface, insure the position within the surface (by moving the point)</span>
+00572 <span class="comment">// if (_InternalCST.SortedSurfaces.size() &gt;= 2 &amp;&amp; </span>
+00573 <span class="comment">// _InternalCST.SortedSurfaces[1].Distance-_InternalCST.SortedSurfaces[0].Distance &lt; InsureSurfaceThreshold)</span>
+00574 <span class="keywordflow">if</span> (<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">_InternalCST</a>.SortedSurfaces[selInstance].FoundCloseEdge)
+00575 {
+00576 <span class="keywordtype">bool</span> moved;
+00577 <a class="code" href="a04558.html#a15">uint</a> numMove = 0;
+00578 <span class="keywordflow">do</span>
+00579 {
+00580 moved = retriever.insurePosition(result.LocalPosition);
+00581 ++numMove;
+00582 }
+00583 <span class="keywordflow">while</span> (moved &amp;&amp; numMove &lt; 100);
+00584 <span class="comment">// the algo won't loop infinitely</span>
+00585
+00586 <span class="keywordflow">if</span> (numMove &gt; 1)
+00587 {
+00588 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"PACS: insured position inside surface (%d,%d)-(%f,%f,%f), %d moves needed"</span>, result.InstanceId, result.LocalPosition.Surface, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>, numMove-1);
+00589 }
+00590
+00591 <span class="keywordflow">if</span> (moved)
+00592 {
+00593 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"PACS: couldn't insure position (%.f,%.f) within the surface (surf=%d,inst=%d) after 100 retries"</span>, result.LocalPosition.Estimation.x, result.LocalPosition.Estimation.y, result.LocalPosition.Surface, result.InstanceId);
+00594 }
+00595 }
+00596
+00597 <span class="comment">// and after selecting the best surface (and some replacement) snap the point to the surface</span>
+00598 instance.snap(result.LocalPosition, retriever);
+00599
+00600
+00601 <span class="keywordflow">if</span> (<a class="code" href="a04338.html#a10">PacsRetrieveVerbose</a>)
+00602 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"DebugBen: retrievePosition(%f,%f,%f) -&gt; %d/%d/(%f,%f,%f) - %s/%s"</span>,
+00603 estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo0">x</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo1">y</a>, estimated.<a class="code" href="a03664.html#NLMISC_1_1CVectorDo2">z</a>,
+00604 result.InstanceId, result.LocalPosition.Surface,
+00605 result.LocalPosition.Estimation.x, result.LocalPosition.Estimation.y, result.LocalPosition.Estimation.z,
+00606 retriever.getIdentifier().c_str(),
+00607 retriever.getType() == CLocalRetriever::Interior ? <span class="stringliteral">"Interior"</span> : <span class="stringliteral">"Landscape"</span>);
+00608 }
+00609 <span class="keywordflow">else</span>
+00610 {
+00611 <span class="comment">// nlwarning("PACS: unable to retrieve correct position (%f,%f,%f)", estimated.x, estimated.y, estimated.z);</span>
+00612 <span class="comment">// nlSleep(1);</span>
+00613 }
+00614
+00615 <span class="keywordflow">return</span> result;
+00616 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_10" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>estimated</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>double&nbsp;</td>
+ <td class="mdname" nowrap> <em>threshold</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Retrieves the position of an estimated point in the global retriever (double instead.).
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera18">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00477">477</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00482">retrievePosition()</a>.
+<p>
+<div class="fragment"><pre>00478 {
+00479 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(estimated, threshold, UGlobalPosition::Unspecified);
+00480 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_11" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </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>estimated</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>threshold</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Retrieves the position of an estimated point in the global retriever.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera19">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00472">472</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00482">retrievePosition()</a>.
+<p>
+<div class="fragment"><pre>00473 {
+00474 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(<a class="code" href="a03664.html">CVectorD</a>(estimated), (<span class="keywordtype">double</span>)threshold, UGlobalPosition::Unspecified);
+00475 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_12" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>estimated</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Retrieves the position of an estimated point in the global retriever (double instead.).
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera20">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00487">487</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00482">retrievePosition()</a>.
+<p>
+<div class="fragment"><pre>00488 {
+00489 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(estimated, 1.0e10, UGlobalPosition::Unspecified);
+00490 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_13" doxytag="NLPACS::CGlobalRetriever::retrievePosition" ></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="a02591.html">NLPACS::UGlobalPosition</a> NLPACS::CGlobalRetriever::retrievePosition </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>estimated</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Retrieves the position of an estimated point in the global retriever.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera21">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l00482">482</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05666.html#l00130">NLPACS::CEdgeQuad::build()</a>, <a class="el" href="a05761.html#l00472">retrievePosition()</a>, <a class="el" href="a06207.html#l01429">NLPACS::CPrimitiveWorldImage::setGlobalPosition()</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, and <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>.
+<p>
+<div class="fragment"><pre>00483 {
+00484 <span class="keywordflow">return</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(estimated, 1.0e10f, UGlobalPosition::Unspecified);
+00485 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1237_8" doxytag="NLPACS::CGlobalRetriever::selectInstances" ></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"> bool NLPACS::CGlobalRetriever::selectInstances </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02156.html">NLMISC::CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02591.html#NLPACS_1_1UGlobalPositionw2">UGlobalPosition::TType</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>type</em> = UGlobalPosition::Unspecified</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>
+Select the instances that are in contact with the given bbox. The selected instances are stored in <a class="el" href="a02387.html#NLPACS_1_1CCollisionSurfaceTempo2">CCollisionSurfaceTemp.CollisionInstances</a>
+<p>
+Definition at line <a class="el" href="a05761.html#l00109">109</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00162">_InstanceGrid</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1270_0">NLPACS::CQuadGrid&lt; uint32 &gt;::begin()</a>, <a class="el" href="a05583.html#l00315">NLPACS::CCollisionSurfaceTemp::CollisionInstances</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1270_2">NLPACS::CQuadGrid&lt; uint32 &gt;::end()</a>, <a class="el" href="a05385.html#l00087">NLMISC::CAABBox::getMax()</a>, <a class="el" href="a05385.html#l00086">NLMISC::CAABBox::getMin()</a>, <a class="el" href="a06336.html#l00287">NLPACS::CRetrieverBank::isLoaded()</a>, <a class="el" href="a03272.html#NLPACS_1_1CQuadGridz1270_3">NLPACS::CQuadGrid&lt; uint32 &gt;::select()</a>, and <a class="el" href="a05646.html#l00244">type</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05761.html#l00275">getBorders()</a>, <a class="el" href="a05761.html#l00367">makeLinks()</a>, <a class="el" href="a05761.html#l02448">refreshLrAround()</a>, <a class="el" href="a05761.html#l02554">refreshLrAroundNow()</a>, and <a class="el" href="a05761.html#l00493">retrievePosition()</a>.
+<p>
+<div class="fragment"><pre>00110 {
+00111 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.select(bbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_5">getMin</a>(), bbox.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_3">getMax</a>());
+00112 cst.CollisionInstances.clear();
+00113
+00114 <span class="keywordtype">bool</span> allLoaded = <span class="keyword">true</span>;
+00115
+00116 <a class="code" href="a03272.html">NLPACS::CQuadGrid&lt;uint32&gt;</a>::CIterator it;
+00117 <span class="keywordflow">for</span> (it=<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.begin(); it!=<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">_InstanceGrid</a>.end(); ++it)
+00118 {
+00119 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a> == UGlobalPosition::Landscape &amp;&amp; <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[*it].getType() == CLocalRetriever::Interior ||
+00120 <a class="code" href="a04223.html#a581">type</a> == UGlobalPosition::Interior &amp;&amp; _Instances[*it].getType() == CLocalRetriever::Landscape)
+00121 <span class="keywordflow">continue</span>;
+00122
+00123 <span class="keywordflow">if</span> (_Instances[*it].getBBox().intersect(bbox))
+00124 {
+00125 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;isLoaded(_Instances[*it].getRetrieverId()))
+00126 allLoaded = <span class="keyword">false</span>;
+00127 cst.CollisionInstances.push_back(*it);
+00128 }
+00129 }
+00130
+00131 <span class="keywordflow">return</span> allLoaded;
+00132 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_10" doxytag="NLPACS::CGlobalRetriever::serial" ></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 NLPACS::CGlobalRetriever::serial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>f</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>
+Serialises the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l00136">136</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l00414">initAll()</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, and <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>.
+<p>
+<div class="fragment"><pre>00137 {
+00138 <span class="comment">/*</span>
+00139 <span class="comment"> Version 0:</span>
+00140 <span class="comment"> - base version.</span>
+00141 <span class="comment"> */</span>
+00142 (<span class="keywordtype">void</span>)f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(0);
+00143
+00144 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_Instances);
+00145 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_BBox);
+00146
+00147 <span class="keywordflow">if</span> (f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
+00148 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1241_5">initAll</a>(<span class="keyword">false</span>);
+00149 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1241_11" doxytag="NLPACS::CGlobalRetriever::setRetrieverBank" ></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 NLPACS::CGlobalRetriever::setRetrieverBank </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03331.html">CRetrieverBank</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>bank</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sets the retriever bank.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00366">366</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00156">_RetrieverBank</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02382">NLPACS::UGlobalRetriever::createGlobalRetriever()</a>.
+<p>
+<div class="fragment"><pre>00366 { <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a> = bank; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_3" doxytag="NLPACS::CGlobalRetriever::testBBoxMove" ></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="a05380.html#a0">NLPACS::TCollisionSurfaceDescVector</a> * NLPACS::CGlobalRetriever::testBBoxMove </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>start</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>delta</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>locI</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>locJ</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</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>
+Test a movement of a bbox against surface world. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>start</em>&nbsp;</td><td>is the start position of the movement. </td></tr>
+ <tr><td valign=top><em>delta</em>&nbsp;</td><td>is the requested movement. </td></tr>
+ <tr><td valign=top><em>locI</em>&nbsp;</td><td>is the oriented I vector of the BBox. I.norm()== Width/2. </td></tr>
+ <tr><td valign=top><em>locJ</em>&nbsp;</td><td>is the oriented J vector of the BBox. J.norm()== Height/2. </td></tr>
+ <tr><td valign=top><em>cst</em>&nbsp;</td><td>is the <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> object used as temp copmputing (one per thread). </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>list of collision against surface, ordered by increasing time. this is a synonym for cst.CollisionDescs. NB: this array may be modified by <a class="el" href="a02588.html">CGlobalRetriever</a> on any collision call.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l01937">1937</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06682.html#l00148">NLMISC::CVector::isNull()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05583.html#l00321">NLPACS::CCollisionSurfaceTemp::PrecDeltaPos</a>, <a class="el" href="a05583.html#l00320">NLPACS::CCollisionSurfaceTemp::PrecStartPos</a>, <a class="el" href="a05583.html#l00319">NLPACS::CCollisionSurfaceTemp::PrecStartSurface</a>, <a class="el" href="a05583.html#l00322">NLPACS::CCollisionSurfaceTemp::PrecValid</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
+<p>
+Referenced by <a class="el" href="a06207.html#l00166">NLPACS::CPrimitiveWorldImage::evalCollision()</a>.
+<p>
+<div class="fragment"><pre>01939 {
+01940 <span class="comment">// H_AUTO(PACS_GR_testBBoxMove);</span>
+01941
+01942 CSurfaceIdent startSurface(startPos.InstanceId, startPos.LocalPosition.Surface);
+01943
+01944 <span class="comment">// 0. reset.</span>
+01945 <span class="comment">//===========</span>
+01946 <span class="comment">// reset result.</span>
+01947 cst.CollisionDescs.clear();
+01948
+01949 <span class="comment">// In a surface ?</span>
+01950 <span class="keywordflow">if</span> (startPos.InstanceId==-1)
+01951 {
+01952 <span class="comment">// Warning this primitive is not on a surface</span>
+01953 <span class="comment">//nlassertonce (0);</span>
+01954
+01955 <span class="comment">// Return NULL when lost</span>
+01956 <span class="keywordflow">return</span> NULL;
+01957 }
+01958
+01959 <span class="comment">// store this request in cst.</span>
+01960 cst.PrecStartSurface= startSurface;
+01961 cst.PrecStartPos= startPos.LocalPosition.Estimation;
+01962 cst.PrecDeltaPos= delta;
+01963 cst.PrecValid= <span class="keyword">true</span>;
+01964
+01965 <span class="comment">// 0.bis</span>
+01966 <span class="comment">//===========</span>
+01967 <span class="comment">// Abort if deltamove is 0,0,0.</span>
+01968 <span class="keywordflow">if</span> (delta.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_1">isNull</a>())
+01969 <span class="keywordflow">return</span> &amp;cst.CollisionDescs;
+01970
+01971 <span class="comment">// 1. Choose a local basis.</span>
+01972 <span class="comment">//===========</span>
+01973 <span class="comment">// Take the retrieverInstance of startPos as a local basis.</span>
+01974 CVector origin;
+01975 origin= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startPos.InstanceId).getOrigin();
+01976
+01977
+01978 <span class="comment">// 2. compute OBB.</span>
+01979 <span class="comment">//===========</span>
+01980 CVector2f obbStart[4];
+01981 <span class="comment">// compute start, relative to the retriever instance.</span>
+01982 CVector start= startPos.LocalPosition.Estimation;
+01983 CVector2f obbCenter(start.x, start.y);
+01984 CVector2f locI2d(locI.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, locI.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+01985 CVector2f locJ2d(locJ.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, locJ.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+01986
+01987 <span class="comment">// build points in CCW.</span>
+01988 obbStart[0]= obbCenter - locI2d - locJ2d;
+01989 obbStart[1]= obbCenter + locI2d - locJ2d;
+01990 obbStart[2]= obbCenter + locI2d + locJ2d;
+01991 obbStart[3]= obbCenter - locI2d + locJ2d;
+01992
+01993 <span class="comment">// 3. compute bboxmove.</span>
+01994 <span class="comment">//===========</span>
+01995 <a class="code" href="a02156.html">CAABBox</a> bboxMove;
+01996 <span class="comment">// extend the bbox.</span>
+01997 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(CVector(obbStart[0].<a class="code" href="a04223.html#a572">x</a>, obbStart[0].<a class="code" href="a04223.html#a573">y</a>, 0));
+01998 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[1].<a class="code" href="a04223.html#a572">x</a>, obbStart[1].<a class="code" href="a04223.html#a573">y</a>, 0));
+01999 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[2].<a class="code" href="a04223.html#a572">x</a>, obbStart[2].<a class="code" href="a04223.html#a573">y</a>, 0));
+02000 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[3].<a class="code" href="a04223.html#a572">x</a>, obbStart[3].<a class="code" href="a04223.html#a573">y</a>, 0));
+02001 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[0].<a class="code" href="a04223.html#a572">x</a>, obbStart[0].<a class="code" href="a04223.html#a573">y</a>, 0) + delta);
+02002 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[1].<a class="code" href="a04223.html#a572">x</a>, obbStart[1].<a class="code" href="a04223.html#a573">y</a>, 0) + delta);
+02003 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[2].<a class="code" href="a04223.html#a572">x</a>, obbStart[2].<a class="code" href="a04223.html#a573">y</a>, 0) + delta);
+02004 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[3].<a class="code" href="a04223.html#a572">x</a>, obbStart[3].<a class="code" href="a04223.html#a573">y</a>, 0) + delta);
+02005
+02006
+02007
+02008 <span class="comment">// 4. find possible collisions in bboxMove+origin. fill cst.CollisionChains.</span>
+02009 <span class="comment">//===========</span>
+02010 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_1">findCollisionChains</a>(cst, bboxMove, origin);
+02011
+02012
+02013
+02014 <span class="comment">// 5. test collisions with CollisionChains.</span>
+02015 <span class="comment">//===========</span>
+02016 CVector2f startCol(start.x, start.y);
+02017 CVector2f deltaCol(delta.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, delta.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+02018 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_2">testCollisionWithCollisionChains</a>(cst, startCol, deltaCol, startSurface, 0, obbStart, CGlobalRetriever::BBox);
+02019
+02020 <span class="comment">// result.</span>
+02021 <span class="keywordflow">return</span> &amp;cst.CollisionDescs;
+02022 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_4" doxytag="NLPACS::CGlobalRetriever::testBBoxRot" ></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="a05380.html#a0">NLPACS::TCollisionSurfaceDescVector</a> &amp; NLPACS::CGlobalRetriever::testBBoxRot </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02590.html">CGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>start</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>locI</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>locJ</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</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>
+Test a rotation of a BBox against the surfaces. NB: this function is not perfect because a ContactSurface may appears 2+ times in the returned array. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>start</em>&nbsp;</td><td>is the center of the bbox. </td></tr>
+ <tr><td valign=top><em>locI</em>&nbsp;</td><td>is the new oriented I vector of the BBox. I.norm()== Width/2. </td></tr>
+ <tr><td valign=top><em>locJ</em>&nbsp;</td><td>is the new oriented J vector of the BBox. J.norm()== Height/2. NB : must have locI^locJ== aK (a&gt;0) </td></tr>
+ <tr><td valign=top><em>cst</em>&nbsp;</td><td>is the <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> object used as temp copmputing (one per thread). </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>list of collision against surface (ContactTime and ContactNormal has no means). this is a synonym for cst.CollisionDescs. NB: this array may be modified by <a class="el" href="a02588.html">CGlobalRetriever</a> on any collision call.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l02236">2236</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05583.html#l00322">NLPACS::CCollisionSurfaceTemp::PrecValid</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05578.html#l00110">NLPACS::TCollisionSurfaceDescVector</a>, <a class="el" href="a05761.html#l02303">testRotCollisionWithCollisionChains()</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
+<p>
+<div class="fragment"><pre>02238 {
+02239 <span class="comment">// H_AUTO(PACS_GR_testBBoxRot);</span>
+02240
+02241 CSurfaceIdent startSurface(startPos.InstanceId, startPos.LocalPosition.Surface);
+02242
+02243 <span class="comment">// 0. reset.</span>
+02244 <span class="comment">//===========</span>
+02245 <span class="comment">// reset result.</span>
+02246 cst.CollisionDescs.clear();
+02247
+02248 <span class="comment">// should not doMove() after a testBBoxRot.</span>
+02249 cst.PrecValid= <span class="keyword">false</span>;
+02250
+02251
+02252 <span class="comment">// 1. Choose a local basis.</span>
+02253 <span class="comment">//===========</span>
+02254 <span class="comment">// Take the retrieverInstance of startPos as a local basis.</span>
+02255 CVector origin;
+02256 origin= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startPos.InstanceId).getOrigin();
+02257
+02258
+02259 <span class="comment">// 2. compute OBB.</span>
+02260 <span class="comment">//===========</span>
+02261 CVector2f obbStart[4];
+02262 <span class="comment">// compute start, relative to the retriever instance.</span>
+02263 CVector start= startPos.LocalPosition.Estimation;
+02264 CVector2f obbCenter(start.x, start.y);
+02265 CVector2f locI2d(locI.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, locI.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+02266 CVector2f locJ2d(locJ.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, locJ.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+02267
+02268 <span class="comment">// build points in CCW.</span>
+02269 obbStart[0]= obbCenter - locI2d - locJ2d;
+02270 obbStart[1]= obbCenter + locI2d - locJ2d;
+02271 obbStart[2]= obbCenter + locI2d + locJ2d;
+02272 obbStart[3]= obbCenter - locI2d + locJ2d;
+02273
+02274 <span class="comment">// 3. compute bboxmove.</span>
+02275 <span class="comment">//===========</span>
+02276 <a class="code" href="a02156.html">CAABBox</a> bboxMove;
+02277 <span class="comment">// extend the bbox.</span>
+02278 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(CVector(obbStart[0].<a class="code" href="a04223.html#a572">x</a>, obbStart[0].<a class="code" href="a04223.html#a573">y</a>, 0));
+02279 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[1].<a class="code" href="a04223.html#a572">x</a>, obbStart[1].<a class="code" href="a04223.html#a573">y</a>, 0));
+02280 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[2].<a class="code" href="a04223.html#a572">x</a>, obbStart[2].<a class="code" href="a04223.html#a573">y</a>, 0));
+02281 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(CVector(obbStart[3].<a class="code" href="a04223.html#a572">x</a>, obbStart[3].<a class="code" href="a04223.html#a573">y</a>, 0));
+02282
+02283
+02284
+02285 <span class="comment">// 4. find possible collisions in bboxMove+origin. fill cst.CollisionChains.</span>
+02286 <span class="comment">//===========</span>
+02287 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_1">findCollisionChains</a>(cst, bboxMove, origin);
+02288
+02289
+02290
+02291 <span class="comment">// 5. test Rotcollisions with CollisionChains.</span>
+02292 <span class="comment">//===========</span>
+02293 CVector2f startCol(start.x, start.y);
+02294 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_4">testRotCollisionWithCollisionChains</a>(cst, startCol, startSurface, obbStart);
+02295
+02296
+02297 <span class="comment">// result.</span>
+02298 <span class="keywordflow">return</span> cst.CollisionDescs;
+02299 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_2" doxytag="NLPACS::CGlobalRetriever::testCollisionWithCollisionChains" ></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 NLPACS::CGlobalRetriever::testCollisionWithCollisionChains </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>startCol</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>deltaCol</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03462.html">CSurfaceIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>startSurface</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>radius</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>[4], </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_0">TCollisionType</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>colType</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset and fill cst.CollisionDescs with effective collisions against current cst.CollisionChains. result: new collisionDescs in cst.
+<p>
+Definition at line <a class="el" href="a05761.html#l01392">1392</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00168">_ForbiddenInstances</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00074">NLPACS::CCollisionChain::ChainId</a>, <a class="el" href="a05583.html#l00299">NLPACS::CCollisionSurfaceTemp::CollisionChains</a>, <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a05578.html#l00102">NLPACS::CCollisionSurfaceDesc::ContactNormal</a>, <a class="el" href="a05578.html#l00106">NLPACS::CCollisionSurfaceDesc::ContactSurface</a>, <a class="el" href="a05578.html#l00103">NLPACS::CCollisionSurfaceDesc::ContactTime</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05583.html#l00078">NLPACS::CCollisionChain::ExteriorEdge</a>, <a class="el" href="a05583.html#l00070">NLPACS::CCollisionChain::FirstEdgeCollide</a>, <a class="el" href="a05582.html#l00075">NLPACS::CCollisionSurfaceTemp::getEdgeCollideNode()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a05761.html#l02421">getMeanHeight()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a05583.html#l00103">NLPACS::CCollisionChain::getOtherSurface()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a05930.html#l00399">NLPACS::CLocalRetriever::getSurfaces()</a>, <a class="el" href="a05583.html#l00097">NLPACS::CCollisionChain::hasSurface()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06334.html#l00168">NLPACS::CRetrievableSurface::isCeiling()</a>, <a class="el" href="a06334.html#l00167">NLPACS::CRetrievableSurface::isFloor()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::LeftSurface</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05583.html#l00049">NLPACS::CEdgeCollideNode::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05761.html#l00482">retrievePosition()</a>, <a class="el" href="a05578.html#l00069">NLPACS::CSurfaceIdent::RetrieverInstanceId</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::RightSurface</a>, <a class="el" href="a06685.html#l00136">NLMISC::CVectorD::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05578.html#l00071">NLPACS::CSurfaceIdent::SurfaceId</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05664.html#l00559">NLPACS::CEdgeCollide::testBBoxMove()</a>, <a class="el" href="a05664.html#l00265">NLPACS::CEdgeCollide::testCircleMove()</a>, <a class="el" href="a05583.html#l00076">NLPACS::CCollisionChain::Tested</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01937">testBBoxMove()</a>, and <a class="el" href="a05761.html#l01864">testCylinderMove()</a>.
+<p>
+<div class="fragment"><pre>01394 {
+01395 <span class="comment">// H_AUTO(PACS_GR_testCollisionWithCollisionChains);</span>
+01396
+01397 <span class="comment">// start currentSurface with surface start.</span>
+01398 CSurfaceIdent currentSurface= startSurface;
+01399 <a class="code" href="a04558.html#a15">uint</a> nextCollisionSurfaceTested=0;
+01400 <a class="code" href="a04558.html#a14">sint</a> i;
+01401
+01402 <span class="comment">// reset result.</span>
+01403 cst.CollisionDescs.clear();
+01404 <span class="comment">// reset all collisionChain to not tested.</span>
+01405 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionChains.size(); i++)
+01406 {
+01407 CCollisionChain &amp;colChain= cst.CollisionChains[i];
+01408 colChain.Tested= <span class="keyword">false</span>;
+01409 }
+01410
+01411 vector&lt;pair&lt;sint32, bool&gt; &gt; checkedExtEdges;
+01412
+01413
+01414 <span class="comment">/*</span>
+01415 <span class="comment"> To manage recovery, we must use such an algorithm, so we are sure to trace the way across all surfaces really </span>
+01416 <span class="comment"> collided, and discard any other (such as other floor or ceiling).</span>
+01417 <span class="comment"> */</span>
+01418 <span class="keywordflow">while</span>(<span class="keyword">true</span>)
+01419 {
+01420 <span class="comment">// run all collisionChain.</span>
+01421 <span class="comment">//========================</span>
+01422 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionChains.size(); i++)
+01423 {
+01424 CCollisionChain &amp;colChain= cst.CollisionChains[i];
+01425
+01427 <a class="code" href="a04199.html#a6">nlassert</a>(colChain.LeftSurface.RetrieverInstanceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size());
+01428 <a class="code" href="a04199.html#a6">nlassert</a>(colChain.RightSurface.RetrieverInstanceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size());
+01429
+01430 <span class="comment">// test only currentSurface/X. And don't test chains already tested before.</span>
+01431 <span class="keywordflow">if</span>(colChain.hasSurface(currentSurface) &amp;&amp; !colChain.Tested)
+01432 {
+01433 <span class="comment">// we are testing this chain.</span>
+01434 colChain.Tested= <span class="keyword">true</span>;
+01435
+01436 <span class="comment">// avoid checking twice a door</span>
+01437 <span class="keywordflow">if</span> (colChain.ExteriorEdge &amp;&amp; colChain.LeftSurface.RetrieverInstanceId != -1)
+01438 {
+01439 <span class="keywordtype">bool</span> enterInterior = (currentSurface.RetrieverInstanceId == colChain.RightSurface.RetrieverInstanceId);
+01440
+01441 <a class="code" href="a04558.html#a15">uint</a> j;
+01442 <a class="code" href="a04558.html#a10">sint32</a> cmp = (colChain.LeftSurface.RetrieverInstanceId&lt;&lt;16) + colChain.ChainId;
+01443 <span class="keywordflow">for</span> (j=0; j&lt;checkedExtEdges.size() &amp;&amp; (checkedExtEdges[j].first != cmp); ++j)
+01444 ;
+01445 <span class="comment">// if already crossed this edge, abort</span>
+01446 <span class="comment">// this a door that is crossing a surface frontier</span>
+01447 <span class="keywordflow">if</span> (j &lt; checkedExtEdges.size())
+01448 {
+01449 <span class="keywordflow">if</span> (checkedExtEdges[j].second != enterInterior)
+01450 <span class="keywordflow">continue</span>;
+01451 }
+01452 <span class="keywordflow">else</span>
+01453 checkedExtEdges.push_back(make_pair(cmp, enterInterior));
+01454 }
+01455
+01456 <span class="comment">// test all edges of this chain, and get tmin</span>
+01457 <span class="comment">//========================</span>
+01458
+01459 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a627">t</a>=0.0, tMin=1;
+01460 CVector2f normal, normalMin;
+01461 <span class="comment">// run list of edge.</span>
+01462 <a class="code" href="a04558.html#a10">sint32</a> curEdge= colChain.FirstEdgeCollide;
+01463 <span class="keywordflow">while</span>(curEdge!=(<a class="code" href="a04558.html#a10">sint32</a>)0xFFFFFFFF)
+01464 {
+01465 <span class="comment">// get the edge.</span>
+01466 CEdgeCollideNode &amp;colEdge= cst.getEdgeCollideNode(curEdge);
+01467
+01468 <span class="comment">// test collision with this edge.</span>
+01469 <span class="keywordflow">if</span>(colType==CGlobalRetriever::Circle)
+01470 <a class="code" href="a04223.html#a627">t</a>= colEdge.testCircleMove(startCol, deltaCol, radius, normal);
+01471 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(colType==CGlobalRetriever::BBox)
+01472 <a class="code" href="a04223.html#a627">t</a>= colEdge.testBBoxMove(startCol, deltaCol, bboxStart, normal);
+01473
+01474 <span class="comment">// earlier collision??</span>
+01475 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&lt;tMin)
+01476 {
+01477 tMin= <a class="code" href="a04223.html#a627">t</a>;
+01478 normalMin= normal;
+01479 }
+01480
+01481 <span class="comment">// next edge.</span>
+01482 curEdge= colEdge.Next;
+01483 }
+01484
+01485
+01486 <span class="comment">// If collision with this chain, must insert it in the array of collision.</span>
+01487 <span class="comment">//========================</span>
+01488 <span class="keywordflow">if</span>(tMin&lt;1)
+01489 {
+01490 CSurfaceIdent collidedSurface= colChain.getOtherSurface(currentSurface);
+01491
+01492 <span class="comment">// if flag as an interior/landscape interface and leave interior surf, retrieve correct surface</span>
+01493 <span class="keywordflow">if</span> (colChain.ExteriorEdge &amp;&amp; currentSurface == colChain.LeftSurface)
+01494 {
+01495 CVector2f p = startCol + deltaCol*tMin;
+01496 CVector ori = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startSurface.RetrieverInstanceId).getOrigin();
+01497 ori.z = 0.0f;
+01498 UGlobalPosition rp;
+01499 rp.InstanceId = currentSurface.RetrieverInstanceId;
+01500 rp.LocalPosition.Surface = currentSurface.SurfaceId;
+01501 rp.LocalPosition.Estimation = p;
+01502 rp.LocalPosition.Estimation.z = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_1">getMeanHeight</a>(rp);
+01503 <a class="code" href="a03664.html">CVectorD</a> zp = <a class="code" href="a03664.html">CVectorD</a>(p.x, p.y, rp.LocalPosition.Estimation.z) + CVectorD(ori);
+01504 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+01505 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.push_back(currentSurface.RetrieverInstanceId);
+01506 UGlobalPosition gp = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(zp);
+01507
+01508 collidedSurface.RetrieverInstanceId = gp.InstanceId;
+01509 collidedSurface.SurfaceId = gp.LocalPosition.Surface;
+01510 }
+01511
+01513 <a class="code" href="a04199.html#a6">nlassert</a>(collidedSurface.RetrieverInstanceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size());
+01514
+01515 <span class="comment">// insert or replace this collision in collisionDescs.</span>
+01516 <span class="comment">// NB: yes this looks like a N algorithm (so N²). But not so many collisions may arise, so don't bother.</span>
+01517 <a class="code" href="a04558.html#a14">sint</a> indexInsert= cst.CollisionDescs.size();
+01518 <a class="code" href="a04558.html#a14">sint</a> colFound= -1;
+01519
+01520 <span class="comment">// start to search with nextCollisionSurfaceTested, because can't insert before.</span>
+01521 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> j= nextCollisionSurfaceTested; j&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionDescs.size(); j++)
+01522 {
+01523 <span class="comment">// we must keep time order.</span>
+01524 <span class="keywordflow">if</span>(tMin &lt; cst.CollisionDescs[j].ContactTime)
+01525 {
+01526 indexInsert= <a class="code" href="a04061.html#a0">min</a>(j, indexInsert);
+01527 }
+01528 <span class="comment">// Does the collision with this surface already exist??</span>
+01529 <span class="keywordflow">if</span>(cst.CollisionDescs[j].ContactSurface==collidedSurface)
+01530 {
+01531 colFound= j;
+01532 <span class="comment">// if we have found our old collision, stop, there is no need to search more.</span>
+01533 <span class="keywordflow">break</span>;
+01534 }
+01535 }
+01536
+01537 <span class="comment">// Insert only if the surface was not already collided, or that new collision arise before old.</span>
+01538 <span class="keywordflow">if</span>(colFound==-1 || indexInsert&lt;=colFound)
+01539 {
+01540 CCollisionSurfaceDesc newCol;
+01541 newCol.ContactSurface= collidedSurface;
+01542 newCol.ContactTime= tMin;
+01543 newCol.ContactNormal.set(normalMin.x, normalMin.y, 0);
+01544
+01545 <span class="comment">// if, by chance, indexInsert==colFound, just replace old collision descriptor.</span>
+01546 <span class="keywordflow">if</span>(colFound==indexInsert)
+01547 {
+01548 cst.CollisionDescs[indexInsert]= newCol;
+01549 }
+01550 <span class="keywordflow">else</span>
+01551 {
+01552 <span class="comment">// if any, erase old collision against this surface. NB: here, colFound&gt;indexInsert.</span>
+01553 <span class="keywordflow">if</span>(colFound!=-1)
+01554 cst.CollisionDescs.erase(cst.CollisionDescs.begin() + colFound);
+01555
+01556 <span class="comment">// must insert the collision.</span>
+01557 cst.CollisionDescs.insert(cst.CollisionDescs.begin() + indexInsert, newCol);
+01558 }
+01559 }
+01560 }
+01561 }
+01562 }
+01563
+01564 <span class="comment">// Find next surface to test.</span>
+01565 <span class="comment">//========================</span>
+01566 <span class="comment">// No more?? so this is the end.</span>
+01567 <span class="keywordflow">if</span>(nextCollisionSurfaceTested&gt;=cst.CollisionDescs.size())
+01568 <span class="keywordflow">break</span>;
+01569 <span class="comment">// else next one.</span>
+01570 <span class="keywordflow">else</span>
+01571 {
+01572 <span class="comment">// NB: with this algorithm, we are sure that no more collisions will arise before currentCollisionSurfaceTested.</span>
+01573 <span class="comment">// so just continue with following surface.</span>
+01574 currentSurface= cst.CollisionDescs[nextCollisionSurfaceTested].ContactSurface;
+01575
+01576 <span class="comment">// Do we touch a wall??</span>
+01577 <span class="keywordtype">bool</span> isWall;
+01578 <span class="keywordflow">if</span>(currentSurface.SurfaceId&lt;0)
+01579 isWall= <span class="keyword">true</span>;
+01580 <span class="keywordflow">else</span>
+01581 {
+01582 <span class="comment">// test if it is a walkable wall.</span>
+01583 <a class="code" href="a04558.html#a10">sint32</a> locRetId= this-&gt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(currentSurface.RetrieverInstanceId).getRetrieverId();
+01584
+01585 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId).isLoaded())
+01586 {
+01587 nextCollisionSurfaceTested++;
+01588 <span class="keywordflow">continue</span>;
+01589 }
+01590
+01591 <span class="keyword">const</span> CLocalRetriever &amp;retr = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId);
+01592 <span class="keywordflow">if</span> (currentSurface.SurfaceId &lt; (<a class="code" href="a04558.html#a14">sint</a>)retr.getSurfaces().size())
+01593 {
+01594 <span class="keyword">const</span> CRetrievableSurface &amp;surf= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId).getSurface(currentSurface.SurfaceId);
+01595 isWall= !(surf.isFloor() || surf.isCeiling());
+01596 }
+01597 <span class="keywordflow">else</span>
+01598 {
+01599 isWall = <span class="keyword">true</span>;
+01600 }
+01601 }
+01602
+01603 <span class="comment">// If we touch a wall, this is the end of search.</span>
+01604 <span class="keywordflow">if</span>(isWall)
+01605 {
+01606 <span class="comment">// There can be no more collision after this one.</span>
+01607 cst.CollisionDescs.resize(nextCollisionSurfaceTested+1);
+01608 <span class="keywordflow">break</span>;
+01609 }
+01610 <span class="keywordflow">else</span>
+01611 {
+01612 <span class="comment">// Next time, we will test the following (NB: the array may grow during next pass, or reorder, </span>
+01613 <span class="comment">// but only after nextCollisionSurfaceTested).</span>
+01614 nextCollisionSurfaceTested++;
+01615 }
+01616 }
+01617 }
+01618
+01619 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_5" doxytag="NLPACS::CGlobalRetriever::testCylinderMove" ></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="a05380.html#a0">NLPACS::TCollisionSurfaceDescVector</a> * NLPACS::CGlobalRetriever::testCylinderMove </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>start</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>delta</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>radius</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</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>
+Test a movement of a cylinder against surface world. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>start</em>&nbsp;</td><td>is the start position of the movement. </td></tr>
+ <tr><td valign=top><em>delta</em>&nbsp;</td><td>is the requested movement. </td></tr>
+ <tr><td valign=top><em>radius</em>&nbsp;</td><td>is the radius of the vertical cylinder. </td></tr>
+ <tr><td valign=top><em>cst</em>&nbsp;</td><td>is the <a class="el" href="a02387.html">CCollisionSurfaceTemp</a> object used as temp copmputing (one per thread). </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>list of collision against surface, ordered by increasing time. this is a synonym for cst.CollisionDescs. NB: this array may be modified by <a class="el" href="a02588.html">CGlobalRetriever</a> on any collision call.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l01864">1864</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06682.html#l00148">NLMISC::CVector::isNull()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05583.html#l00321">NLPACS::CCollisionSurfaceTemp::PrecDeltaPos</a>, <a class="el" href="a05583.html#l00320">NLPACS::CCollisionSurfaceTemp::PrecStartPos</a>, <a class="el" href="a05583.html#l00319">NLPACS::CCollisionSurfaceTemp::PrecStartSurface</a>, <a class="el" href="a05583.html#l00322">NLPACS::CCollisionSurfaceTemp::PrecValid</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</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="a05666.html#l00130">NLPACS::CEdgeQuad::build()</a>, and <a class="el" href="a06207.html#l00166">NLPACS::CPrimitiveWorldImage::evalCollision()</a>.
+<p>
+<div class="fragment"><pre>01865 {
+01866 <span class="comment">// H_AUTO(PACS_GR_testCylinderMove);</span>
+01867
+01868 CSurfaceIdent startSurface(startPos.InstanceId, startPos.LocalPosition.Surface);
+01869
+01870 <span class="comment">// 0. reset.</span>
+01871 <span class="comment">//===========</span>
+01872 <span class="comment">// reset result.</span>
+01873 cst.CollisionDescs.clear();
+01874
+01875 <span class="comment">// In a surface ?</span>
+01876 <span class="keywordflow">if</span> (startPos.InstanceId==-1)
+01877 {
+01878 <span class="comment">// Warning this primitive is not on a surface</span>
+01879 <span class="comment">//nlassertonce (0);</span>
+01880
+01881 <span class="comment">// Return NULL when lost</span>
+01882 <span class="keywordflow">return</span> NULL;
+01883 }
+01884 <span class="comment">// store this request in cst.</span>
+01885 cst.PrecStartSurface= startSurface;
+01886 cst.PrecStartPos= startPos.LocalPosition.Estimation;
+01887 cst.PrecDeltaPos= delta;
+01888 cst.PrecValid= <span class="keyword">true</span>;
+01889
+01890 <span class="comment">// 0.bis</span>
+01891 <span class="comment">//===========</span>
+01892 <span class="comment">// Abort if deltamove is 0,0,0.</span>
+01893 <span class="keywordflow">if</span> (delta.<a class="code" href="a03128.html#NLMISC_1_1CVectorz2051_1">isNull</a>())
+01894 <span class="keywordflow">return</span> &amp;cst.CollisionDescs;
+01895
+01896 <span class="comment">// 1. Choose a local basis.</span>
+01897 <span class="comment">//===========</span>
+01898 <span class="comment">// Take the retrieverInstance of startPos as a local basis.</span>
+01899 CVector origin;
+01900 origin= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startPos.InstanceId).getOrigin();
+01901
+01902
+01903 <span class="comment">// 2. compute bboxmove.</span>
+01904 <span class="comment">//===========</span>
+01905 <a class="code" href="a02156.html">CAABBox</a> bboxMove;
+01906 <span class="comment">// bounds the movement in a bbox.</span>
+01907 <span class="comment">// compute start and end, relative to the retriever instance.</span>
+01908 CVector start= startPos.LocalPosition.Estimation;
+01909 CVector end= start+delta;
+01910 <span class="comment">// extend the bbox.</span>
+01911 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(start-CVector(radius, radius, 0));
+01912 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(start+CVector(radius, radius, 0));
+01913 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(end-CVector(radius, radius, 0));
+01914 bboxMove.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(end+CVector(radius, radius, 0));
+01915
+01916
+01917 <span class="comment">// 3. find possible collisions in bboxMove+origin. fill cst.CollisionChains.</span>
+01918 <span class="comment">//===========</span>
+01919 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_1">findCollisionChains</a>(cst, bboxMove, origin);
+01920
+01921
+01922
+01923 <span class="comment">// 4. test collisions with CollisionChains.</span>
+01924 <span class="comment">//===========</span>
+01925 CVector2f startCol(start.x, start.y);
+01926 CVector2f deltaCol(delta.<a class="code" href="a03128.html#NLMISC_1_1CVectoro0">x</a>, delta.<a class="code" href="a03128.html#NLMISC_1_1CVectoro1">y</a>);
+01927 CVector2f obbDummy[4]; <span class="comment">// dummy OBB (not obb here so don't bother)</span>
+01928 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1251_2">testCollisionWithCollisionChains</a>(cst, startCol, deltaCol, startSurface, radius, obbDummy, CGlobalRetriever::Circle);
+01929
+01930 <span class="comment">// result.</span>
+01931 <span class="keywordflow">return</span> &amp;cst.CollisionDescs;
+01932 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_3" doxytag="NLPACS::CGlobalRetriever::testMovementWithCollisionChains" ></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="a03462.html">NLPACS::CSurfaceIdent</a> NLPACS::CGlobalRetriever::testMovementWithCollisionChains </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>startCol</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>deltaCol</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03462.html">CSurfaceIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>startSurface</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>restart</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset and fill cst.MoveDescs with effective collisions of a point movement against current cst.CollisionChains. result: the surfaceIdent where we stop. -1 if we traverse a Wall, which should not happen because of collision test. NB: for precision pb, startCol and deltaCol should be snapped on a grid of 1/1024 meters, using snapVector(). NB: for precision pb (stop on edge etc....), return a "Precision problem ident", ie (-2,-2). NB: when leaving an interior, return a surface (-3, -3) and restart is set to the real restart position
+<p>
+Definition at line <a class="el" href="a05761.html#l01649">1649</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05762.html#l00168">_ForbiddenInstances</a>, <a class="el" href="a05762.html#l00156">_RetrieverBank</a>, <a class="el" href="a05583.html#l00178">NLPACS::CMoveSurfaceDesc::ChainId</a>, <a class="el" href="a05583.html#l00074">NLPACS::CCollisionChain::ChainId</a>, <a class="el" href="a05583.html#l00299">NLPACS::CCollisionSurfaceTemp::CollisionChains</a>, <a class="el" href="a05583.html#l00166">NLPACS::CMoveSurfaceDesc::ContactTime</a>, <a class="el" href="a05665.html#l00129">NLPACS::CRational64::Denominator</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05583.html#l00172">NLPACS::CMoveSurfaceDesc::ExteriorEdge</a>, <a class="el" href="a05583.html#l00078">NLPACS::CCollisionChain::ExteriorEdge</a>, <a class="el" href="a05583.html#l00070">NLPACS::CCollisionChain::FirstEdgeCollide</a>, <a class="el" href="a05582.html#l00075">NLPACS::CCollisionSurfaceTemp::getEdgeCollideNode()</a>, <a class="el" href="a05762.html#l00208">getInstance()</a>, <a class="el" href="a05761.html#l02421">getMeanHeight()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a05583.html#l00195">NLPACS::CMoveSurfaceDesc::getOtherSurface()</a>, <a class="el" href="a06336.html#l00082">NLPACS::CRetrieverBank::getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05930.html#l00401">NLPACS::CLocalRetriever::getSurface()</a>, <a class="el" href="a05583.html#l00189">NLPACS::CMoveSurfaceDesc::hasSurface()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06334.html#l00168">NLPACS::CRetrievableSurface::isCeiling()</a>, <a class="el" href="a06334.html#l00167">NLPACS::CRetrievableSurface::isFloor()</a>, <a class="el" href="a05930.html#l00422">NLPACS::CLocalRetriever::isLoaded()</a>, <a class="el" href="a05583.html#l00169">NLPACS::CMoveSurfaceDesc::LeftSurface</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::LeftSurface</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05583.html#l00303">NLPACS::CCollisionSurfaceTemp::MoveDescs</a>, <a class="el" href="a05583.html#l00175">NLPACS::CMoveSurfaceDesc::MovementSens</a>, <a class="el" href="a05583.html#l00049">NLPACS::CEdgeCollideNode::Next</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a05665.html#l00189">NLPACS::CEdgeCollide::Norm</a>, <a class="el" href="a05665.html#l00127">NLPACS::CRational64::Numerator</a>, <a class="el" href="a05761.html#l00482">retrievePosition()</a>, <a class="el" href="a05578.html#l00069">NLPACS::CSurfaceIdent::RetrieverInstanceId</a>, <a class="el" href="a05583.html#l00169">NLPACS::CMoveSurfaceDesc::RightSurface</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::RightSurface</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06605.html#l00048">NLPACS::ULocalPosition::Surface</a>, <a class="el" href="a05578.html#l00071">NLPACS::CSurfaceIdent::SurfaceId</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05664.html#l00060">NLPACS::CEdgeCollide::testPointMove()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02028">doMove()</a>.
+<p>
+<div class="fragment"><pre>01651 {
+01652 <span class="comment">// H_AUTO(PACS_GR_testMovementWithCollisionChains);</span>
+01653
+01654 <span class="comment">// start currentSurface with surface start.</span>
+01655 CSurfaceIdent currentSurface= startSurface;
+01656 <a class="code" href="a04558.html#a14">sint</a> i;
+01657
+01658 <span class="comment">// reset result.</span>
+01659 cst.MoveDescs.clear();
+01660
+01661
+01662 <span class="keyword">static</span> vector&lt;pair&lt;sint32, bool&gt; &gt; checkedExtEdges;
+01663
+01664 <span class="comment">/*</span>
+01665 <span class="comment"> To manage recovery, we must use such an algorithm, so we are sure to trace the way across all surfaces really </span>
+01666 <span class="comment"> collided, and discard any other (such as other floor or ceiling).</span>
+01667 <span class="comment"></span>
+01668 <span class="comment"> This function is quite different from testCollisionWithCollisionChains() because she must detect all collisions</span>
+01669 <span class="comment"> with all edges of any chains (and not the minimum collision with a chain).</span>
+01670 <span class="comment"> This is done in 3 parts:</span>
+01671 <span class="comment"> - detect collisions with all edges.</span>
+01672 <span class="comment"> - sort.</span>
+01673 <span class="comment"> - leave only real collisions.</span>
+01674 <span class="comment"> */</span>
+01675 <span class="comment">// run all collisionChain.</span>
+01676 <span class="comment">//========================</span>
+01677 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionChains.size(); i++)
+01678 {
+01679 CCollisionChain &amp;colChain= cst.CollisionChains[i];
+01680
+01681 <span class="keywordflow">if</span> (colChain.ExteriorEdge)
+01682 {
+01683 <a class="code" href="a04558.html#a10">sint32</a> cmp = (colChain.LeftSurface.RetrieverInstanceId&lt;&lt;16) + colChain.ChainId;
+01684
+01685 <a class="code" href="a04558.html#a15">uint</a> j;
+01686 <span class="keywordflow">for</span> (j=0; j&lt;checkedExtEdges.size() &amp;&amp; (checkedExtEdges[j].first != cmp); ++j)
+01687 ;
+01688 <span class="comment">// if already crossed this edge, abort</span>
+01689 <span class="comment">// this a door that is crossing a surface frontier</span>
+01690 <span class="keywordflow">if</span> (j &lt; checkedExtEdges.size())
+01691 <span class="keywordflow">continue</span>;
+01692 }
+01693
+01694 <span class="comment">// test all edges of this chain, and insert if necessary.</span>
+01695 <span class="comment">//========================</span>
+01696 CRational64 <a class="code" href="a04223.html#a627">t</a>;
+01697 <span class="comment">// run list of edge.</span>
+01698 <a class="code" href="a04558.html#a10">sint32</a> curEdge= colChain.FirstEdgeCollide;
+01699 <span class="keywordflow">while</span>(curEdge!=(<a class="code" href="a04558.html#a10">sint32</a>)0xFFFFFFFF)
+01700 {
+01701 <span class="comment">// get the edge.</span>
+01702 CEdgeCollideNode &amp;colEdge= cst.getEdgeCollideNode(curEdge);
+01703
+01704 <span class="comment">// test collision with this edge.</span>
+01705 CEdgeCollide::TPointMoveProblem pmpb;
+01706 <a class="code" href="a04223.html#a627">t</a>= colEdge.testPointMove(startCol, endCol, pmpb);
+01707 <span class="comment">// manage multiple problems of precision.</span>
+01708 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>== -1)
+01709 {
+01710 <span class="keyword">static</span> <span class="keyword">const</span> string errs[CEdgeCollide::PointMoveProblemCount]= {
+01711 <span class="stringliteral">"ParallelEdges"</span>, <span class="stringliteral">"StartOnEdge"</span>, <span class="stringliteral">"StopOnEdge"</span>, <span class="stringliteral">"TraverseEndPoint"</span>, <span class="stringliteral">"EdgeNull"</span>};
+01712 <span class="comment">// return a "Precision Problem" ident. movement is invalid. </span>
+01713 <span class="comment">// BUT if startOnEdge, which should never arrive.</span>
+01714 <span class="keywordflow">if</span>(pmpb==CEdgeCollide::StartOnEdge)
+01715 {
+01716 <a class="code" href="a04199.html#a1">nlinfo</a>(<span class="stringliteral">"COL: Precision Problem: %s"</span>, errs[pmpb].c_str());
+01717 checkedExtEdges.clear();
+01718 <span class="keywordflow">return</span> CSurfaceIdent(-1, -1); <span class="comment">// so in this case, block....</span>
+01719 }
+01720 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(pmpb==CEdgeCollide::EdgeNull)
+01721 {
+01722 <span class="comment">/*</span>
+01723 <span class="comment"> // verify if it is an edge which separate 2 walls. in this case, ignore it. else, error.</span>
+01724 <span class="comment"> if(verticalChain(colChain))</span>
+01725 <span class="comment"> {</span>
+01726 <span class="comment"> t=1; // no collision with this edge.</span>
+01727 <span class="comment"> }</span>
+01728 <span class="comment"> else</span>
+01729 <span class="comment"> {</span>
+01730 <span class="comment"> nlinfo("COL: Precision Problem: %s", errs[pmpb]);</span>
+01731 <span class="comment"> nlstop; // this should not append.</span>
+01732 <span class="comment"> return CSurfaceIdent(-1, -1);</span>
+01733 <span class="comment"> }*/</span>
+01734 <span class="comment">/* Actually, this is never a problem: we never get through this edge.</span>
+01735 <span class="comment"> Instead, we'll get through the neighbors edge.</span>
+01736 <span class="comment"> So just disable this edge.</span>
+01737 <span class="comment"> */</span>
+01738 <a class="code" href="a04223.html#a627">t</a>= 1;
+01739 }
+01740 <span class="keywordflow">else</span>
+01741 <span class="keywordflow">return</span> CSurfaceIdent(-2, -2);
+01742 }
+01743
+01744 <span class="comment">// collision??</span>
+01745 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&lt;1)
+01746 {
+01747 <span class="comment">// insert in list.</span>
+01748 cst.MoveDescs.push_back(CMoveSurfaceDesc(t, colChain.LeftSurface, colChain.RightSurface));
+01749 cst.MoveDescs.back().ExteriorEdge = colChain.ExteriorEdge;
+01750 cst.MoveDescs.back().ChainId = (<a class="code" href="a04558.html#a9">uint16</a>)colChain.ChainId;
+01751 cst.MoveDescs.back().MovementSens= colEdge.Norm*(endCol-startCol)&gt;=0;
+01752 }
+01753
+01754 <span class="comment">// next edge.</span>
+01755 curEdge= colEdge.Next;
+01756 }
+01757 }
+01758
+01759
+01760 <span class="comment">// sort.</span>
+01761 <span class="comment">//================</span>
+01762 <span class="comment">// sort the collisions in ascending time order.</span>
+01763 sort(cst.MoveDescs.begin(), cst.MoveDescs.end());
+01764
+01765
+01766 <span class="comment">// Traverse the array of collisions.</span>
+01767 <span class="comment">//========================</span>
+01768 <span class="keywordflow">for</span>(i=0;i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.MoveDescs.size();i++)
+01769 {
+01770 CMoveSurfaceDesc &amp;msd = cst.MoveDescs[i];
+01771
+01772 <span class="comment">// Do we collide with this chain??</span>
+01773 <span class="keywordflow">if</span>(msd.hasSurface(currentSurface))
+01774 {
+01775 <span class="comment">// if flag as an interior/landscape interface and leave interior surf, retrieve correct surface</span>
+01776 <span class="keywordflow">if</span> (msd.ExteriorEdge &amp;&amp; msd.LeftSurface.RetrieverInstanceId != -1)
+01777 {
+01778 <span class="keywordtype">bool</span> enterInterior = (currentSurface.RetrieverInstanceId == msd.RightSurface.RetrieverInstanceId);
+01779
+01780 <span class="comment">// msd.MovementSens is true if we "geometrically" leave the interior.</span>
+01781 <span class="comment">// If logic and geometric disagree, discard</span>
+01782 <span class="keywordflow">if</span>(enterInterior == msd.MovementSens)
+01783 <span class="keywordflow">continue</span>;
+01784
+01785 <a class="code" href="a04558.html#a15">uint</a> j;
+01786 <a class="code" href="a04558.html#a10">sint32</a> cmp = (msd.LeftSurface.RetrieverInstanceId&lt;&lt;16) + msd.ChainId;
+01787 <span class="keywordflow">for</span> (j=0; j&lt;checkedExtEdges.size() &amp;&amp; (checkedExtEdges[j].first != cmp); ++j)
+01788 ;
+01789 <span class="comment">// if already crossed this edge, abort</span>
+01790 <span class="comment">// this a door that is crossing a surface frontier</span>
+01791 <span class="keywordflow">if</span> (j &lt; checkedExtEdges.size())
+01792 {
+01793 <span class="keywordflow">if</span> (checkedExtEdges[j].second != enterInterior)
+01794 <span class="keywordflow">continue</span>;
+01795 }
+01796 <span class="keywordflow">else</span>
+01797 checkedExtEdges.push_back(make_pair(cmp, enterInterior));
+01798
+01799 <span class="comment">// if leave interior, retrieve good position</span>
+01800 <span class="keywordflow">if</span> (!enterInterior)
+01801 {
+01802 <span class="keywordtype">float</span> ctime = (<span class="keywordtype">float</span>)((<span class="keywordtype">double</span>)(msd.ContactTime.Numerator)/(<span class="keywordtype">double</span>)(msd.ContactTime.Denominator));
+01803 CVector2f p = startCol*(1.0f-ctime) + endCol*ctime;
+01804 CVector ori = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(startSurface.RetrieverInstanceId).getOrigin();
+01805 ori.z = 0.0f;
+01806 UGlobalPosition rp;
+01807 rp.InstanceId = currentSurface.RetrieverInstanceId;
+01808 rp.LocalPosition.Surface = currentSurface.SurfaceId;
+01809 rp.LocalPosition.Estimation = p;
+01810 rp.LocalPosition.Estimation.z = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_1">getMeanHeight</a>(rp);
+01811 <a class="code" href="a03664.html">CVectorD</a> zp = <a class="code" href="a03664.html">CVectorD</a>(p.x, p.y, rp.LocalPosition.Estimation.z) + CVectorD(ori);
+01812 <span class="comment">//CVectorD zp = CVectorD(p.x, p.y, getMeanHeight()) + CVectorD(ori);</span>
+01813 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.clear();
+01814 <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">_ForbiddenInstances</a>.push_back(currentSurface.RetrieverInstanceId);
+01815
+01816 restart = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1239_13">retrievePosition</a>(zp);
+01817
+01818 <span class="keywordflow">return</span> CSurfaceIdent(-3, -3);
+01819 }
+01820 <span class="keywordflow">else</span>
+01821 {
+01822 currentSurface= msd.getOtherSurface(currentSurface);
+01823 }
+01824 }
+01825 <span class="keywordflow">else</span>
+01826 {
+01827 currentSurface= msd.getOtherSurface(currentSurface);
+01828 }
+01829
+01830 <span class="comment">// Do we touch a wall?? should not happens, but important for security.</span>
+01831 <span class="keywordtype">bool</span> isWall;
+01832 <span class="keywordflow">if</span>(currentSurface.SurfaceId&lt;0)
+01833 isWall= <span class="keyword">true</span>;
+01834 <span class="keywordflow">else</span>
+01835 {
+01836 <span class="comment">// test if it is a walkable wall.</span>
+01837 <a class="code" href="a04558.html#a10">sint32</a> locRetId= this-&gt;<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_1">getInstance</a>(currentSurface.RetrieverInstanceId).getRetrieverId();
+01838
+01839 <span class="keywordflow">if</span> (!<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId).isLoaded())
+01840 <span class="keywordflow">continue</span>;
+01841
+01842 <span class="keyword">const</span> CRetrievableSurface &amp;surf= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">_RetrieverBank</a>-&gt;getRetriever(locRetId).getSurface(currentSurface.SurfaceId);
+01843 isWall= !(surf.isFloor() || surf.isCeiling());
+01844 }
+01845
+01846 <span class="comment">// If we touch a wall, this is the end of search.</span>
+01847 <span class="keywordflow">if</span>(isWall)
+01848 {
+01849 <span class="comment">// return a Wall ident. movement is invalid.</span>
+01850 checkedExtEdges.clear();
+01851 <span class="keywordflow">return</span> CSurfaceIdent(-1, -1);
+01852 }
+01853 }
+01854 }
+01855
+01856 checkedExtEdges.clear();
+01857 <span class="keywordflow">return</span> currentSurface;
+01858 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_14" doxytag="NLPACS::CGlobalRetriever::testPosition" ></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"> bool NLPACS::CGlobalRetriever::testPosition </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Builds a instance of retriever, and link it on the ground (or wherever) <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>id</em>&nbsp;</td><td>a valid retriever id to be instanciated </td></tr>
+ <tr><td valign=top><em>a</em>&nbsp;</td><td>valid position where the retriever should be instanciated </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>false if failed</dd></dl>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera23">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05762.html#l00305">305</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a05762.html#l00148">_InternalCST</a>, <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a06338.html#l00220">NLPACS::CRetrieverInstance::getBBox()</a>, <a class="el" href="a06338.html#l00176">NLPACS::CRetrieverInstance::getOrigin()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a06338.html#l00172">NLPACS::CRetrieverInstance::getRetrieverId()</a>, <a class="el" href="a05384.html#l00081">NLMISC::CAABBox::include()</a>, <a class="el" href="a06605.html#l00083">NLPACS::UGlobalPosition::InstanceId</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05929.html#l01038">NLPACS::CLocalRetriever::testPosition()</a>.
+<p>
+<div class="fragment"><pre>00306 {
+00307 <span class="keywordflow">if</span> (pos.InstanceId &lt; 0 || pos.InstanceId &gt;= (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>.size())
+00308 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00309
+00310 <span class="keyword">const</span> <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrievern1">CRetrieverInstance</a> &amp;instance = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">_Instances</a>[pos.InstanceId];
+00311
+00312 <span class="keywordflow">if</span> (!instance.getBBox().include(pos.LocalPosition.Estimation + instance.getOrigin()))
+00313 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00314
+00315 <span class="keyword">const</span> CLocalRetriever &amp;retriever = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1237_4">getRetriever</a>(instance.getRetrieverId());
+00316 <span class="keywordflow">return</span> retriever.testPosition(pos.LocalPosition, _InternalCST);
+00317 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1239_15" doxytag="NLPACS::CGlobalRetriever::testRaytrace" ></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"> bool NLPACS::CGlobalRetriever::testRaytrace </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>v0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03664.html">NLMISC::CVectorD</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>v1</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Make a raytrace test. For the time, always return false.
+<p>
+
+<p>
+Implements <a class="el" href="a02589.html#NLPACS_1_1UGlobalRetrievera24">NLPACS::UGlobalRetriever</a>.
+<p>
+Definition at line <a class="el" href="a05761.html#l02440">2440</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+<div class="fragment"><pre>02441 {
+02442 <span class="comment">// TODO: implement raytrace</span>
+02443 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+02444 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_4" doxytag="NLPACS::CGlobalRetriever::testRotCollisionWithCollisionChains" ></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 NLPACS::CGlobalRetriever::testRotCollisionWithCollisionChains </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02387.html">CCollisionSurfaceTemp</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>cst</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>startCol</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03462.html">CSurfaceIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>startSurface</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">CVector2f</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>[4]</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset and fill cst.CollisionDescs with effective collisions against current cst.CollisionChains. result: new collisionDescs in cst.
+<p>
+Definition at line <a class="el" href="a05761.html#l02303">2303</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05583.html#l00299">NLPACS::CCollisionSurfaceTemp::CollisionChains</a>, <a class="el" href="a05583.html#l00311">NLPACS::CCollisionSurfaceTemp::CollisionDescs</a>, <a class="el" href="a05578.html#l00102">NLPACS::CCollisionSurfaceDesc::ContactNormal</a>, <a class="el" href="a05578.html#l00106">NLPACS::CCollisionSurfaceDesc::ContactSurface</a>, <a class="el" href="a05578.html#l00103">NLPACS::CCollisionSurfaceDesc::ContactTime</a>, <a class="el" href="a05583.html#l00070">NLPACS::CCollisionChain::FirstEdgeCollide</a>, <a class="el" href="a05582.html#l00075">NLPACS::CCollisionSurfaceTemp::getEdgeCollideNode()</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::LeftSurface</a>, <a class="el" href="a05583.html#l00049">NLPACS::CEdgeCollideNode::Next</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::RightSurface</a>, <a class="el" href="a05583.html#l00307">NLPACS::CCollisionSurfaceTemp::RotDescs</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05664.html#l00657">NLPACS::CEdgeCollide::testBBoxCollide()</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02236">testBBoxRot()</a>.
+<p>
+<div class="fragment"><pre>02304 {
+02305 <span class="comment">// H_AUTO(PACS_GR_testRotCollisionWithCollisionChains);</span>
+02306
+02307 <span class="comment">// start currentSurface with surface start.</span>
+02308 CSurfaceIdent currentSurface= startSurface;
+02309 <a class="code" href="a04558.html#a14">sint</a> i;
+02310
+02311 <span class="comment">// reset result.</span>
+02312 cst.RotDescs.clear();
+02313 cst.CollisionDescs.clear();
+02314
+02315
+02316 <span class="comment">/*</span>
+02317 <span class="comment"> Test collisions with all collision chains. Then, to manage recovery, test the graph of surfaces.</span>
+02318 <span class="comment"> */</span>
+02319 <span class="comment">// run all collisionChain.</span>
+02320 <span class="comment">//========================</span>
+02321 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionChains.size(); i++)
+02322 {
+02323 CCollisionChain &amp;colChain= cst.CollisionChains[i];
+02324
+02325
+02326 <span class="comment">// test all edges of this chain, and insert if necessary.</span>
+02327 <span class="comment">//========================</span>
+02328 <span class="comment">// run list of edge.</span>
+02329 <a class="code" href="a04558.html#a10">sint32</a> curEdge= colChain.FirstEdgeCollide;
+02330 <span class="keywordflow">while</span>(curEdge!=(<a class="code" href="a04558.html#a10">sint32</a>)0xFFFFFFFF)
+02331 {
+02332 <span class="comment">// get the edge.</span>
+02333 CEdgeCollideNode &amp;colEdge= cst.getEdgeCollideNode(curEdge);
+02334
+02335 <span class="comment">// test collision with this edge.</span>
+02336 <span class="keywordflow">if</span>(colEdge.testBBoxCollide(bbox))
+02337 {
+02338 <span class="comment">// yes we have a 2D collision with this chain.</span>
+02339 cst.RotDescs.push_back(CRotSurfaceDesc(colChain.LeftSurface, colChain.RightSurface));
+02340 <span class="keywordflow">break</span>;
+02341 }
+02342
+02343 <span class="comment">// next edge.</span>
+02344 curEdge= colEdge.Next;
+02345 }
+02346 }
+02347
+02348
+02349 <span class="comment">// Traverse the array of collisions.</span>
+02350 <span class="comment">//========================</span>
+02351 <a class="code" href="a04558.html#a14">sint</a> indexCD=0;
+02352 <span class="keywordflow">while</span>(<span class="keyword">true</span>)
+02353 {
+02354 <span class="comment">// What surfaces collided do we reach from this currentSurface??</span>
+02355 <span class="keywordflow">for</span>(i=0;i&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.RotDescs.size();i++)
+02356 {
+02357 <span class="comment">// Do we collide with this chain?? chain not tested??</span>
+02358 <span class="keywordflow">if</span>(cst.RotDescs[i].hasSurface(currentSurface) &amp;&amp; !cst.RotDescs[i].Tested)
+02359 {
+02360 cst.RotDescs[i].Tested= <span class="keyword">true</span>;
+02361
+02362 <span class="comment">// insert the collision with the other surface.</span>
+02363 CCollisionSurfaceDesc col;
+02364 col.ContactTime= 0;
+02365 col.ContactNormal= CVector::Null;
+02366 col.ContactSurface= cst.RotDescs[i].getOtherSurface(currentSurface);
+02367 cst.CollisionDescs.push_back(col);
+02368 }
+02369 }
+02370
+02371 <span class="comment">// get the next currentSurface from surface collided (traverse the graph of collisions).</span>
+02372 <span class="keywordflow">if</span>(indexCD&lt;(<a class="code" href="a04558.html#a14">sint</a>)cst.CollisionDescs.size())
+02373 currentSurface= cst.CollisionDescs[indexCD++].ContactSurface;
+02374 <span class="keywordflow">else</span>
+02375 <span class="keywordflow">break</span>;
+02376 }
+02377
+02378 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1245_6" doxytag="NLPACS::CGlobalRetriever::updateHeight" ></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 NLPACS::CGlobalRetriever::updateHeight </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02591.html">UGlobalPosition</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pos</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>
+Upadates the height of the given global position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00461">461</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+References <a class="el" href="a06605.html#l00051">NLPACS::ULocalPosition::Estimation</a>, <a class="el" href="a05761.html#l02421">getMeanHeight()</a>, <a class="el" href="a06605.html#l00086">NLPACS::UGlobalPosition::LocalPosition</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a05666.html#l00130">NLPACS::CEdgeQuad::build()</a>.
+<p>
+<div class="fragment"><pre>00461 { pos.LocalPosition.Estimation.z = <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_1">getMeanHeight</a>(pos); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverz1251_5" doxytag="NLPACS::CGlobalRetriever::verticalChain" ></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"> bool NLPACS::CGlobalRetriever::verticalChain </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02375.html">CCollisionChain</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>colChain</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+test if a collisionChain separate 2 walls.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05761.html#l01623">1623</a> of file <a class="el" href="a05761.html">global_retriever.cpp</a>.
+<p>
+References <a class="el" href="a05761.html#l01159">getSurfaceById()</a>, <a class="el" href="a06334.html#l00168">NLPACS::CRetrievableSurface::isCeiling()</a>, <a class="el" href="a06334.html#l00167">NLPACS::CRetrievableSurface::isFloor()</a>, <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::LeftSurface</a>, and <a class="el" href="a05583.html#l00072">NLPACS::CCollisionChain::RightSurface</a>.
+<p>
+<div class="fragment"><pre>01624 {
+01625 <span class="comment">// retrieve surfaces.</span>
+01626 <span class="keyword">const</span> CRetrievableSurface *left= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_2">getSurfaceById</a>(colChain.LeftSurface);
+01627 <span class="keyword">const</span> CRetrievableSurface *right= <a class="code" href="a02588.html#NLPACS_1_1CGlobalRetrieverz1245_2">getSurfaceById</a>(colChain.RightSurface);
+01628
+01629 <span class="comment">// test if left surface is a wall.</span>
+01630 <span class="keywordtype">bool</span> leftWall;
+01631 <span class="keywordflow">if</span>(!left)
+01632 leftWall= <span class="keyword">true</span>;
+01633 <span class="keywordflow">else</span>
+01634 leftWall= !(left-&gt;isFloor() || left-&gt;isCeiling());
+01635
+01636 <span class="comment">// test if right surface is a wall.</span>
+01637 <span class="keywordtype">bool</span> rightWall;
+01638 <span class="keywordflow">if</span>(!right)
+01639 rightWall= <span class="keyword">true</span>;
+01640 <span class="keywordflow">else</span>
+01641 rightWall= !(right-&gt;isFloor() || right-&gt;isCeiling());
+01642
+01643 <span class="comment">// true if both are a wall.</span>
+01644 <span class="keywordflow">return</span> leftWall &amp;&amp; rightWall;
+01645 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrievern0" doxytag="NLPACS::CGlobalRetriever::CLrLoader" ></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"> friend class <a class="el" href="a02593.html">CLrLoader</a><code> [friend]</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="a05762.html#l00112">112</a> of file <a class="el" href="a05762.html">global_retriever.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrievern1" doxytag="NLPACS::CGlobalRetriever::CRetrieverInstance" ></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"> friend class <a class="el" href="a03333.html">CRetrieverInstance</a><code> [friend]</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="a05762.html#l00521">521</a> of file <a class="el" href="a05762.html">global_retriever.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp0" doxytag="NLPACS::CGlobalRetriever::_BBox" ></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="a02156.html">NLMISC::CAABBox</a> <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp0">NLPACS::CGlobalRetriever::_BBox</a><code> [protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The axis aligned bounding box of the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00165">165</a> of file <a class="el" href="a05762.html">global_retriever.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp1" doxytag="NLPACS::CGlobalRetriever::_ForbiddenInstances" ></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="a04558.html#a10">sint32</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp1">NLPACS::CGlobalRetriever::_ForbiddenInstances</a><code> [mutable, protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Forbidden instance for retrieve position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00168">168</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00493">retrievePosition()</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, and <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp2" doxytag="NLPACS::CGlobalRetriever::_InstanceGrid" ></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="a03272.html">CQuadGrid</a>&lt;<a class="el" href="a04558.html#a11">uint32</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp2">NLPACS::CGlobalRetriever::_InstanceGrid</a><code> [mutable, protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The grid of instances.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00162">162</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00078">initQuadGrid()</a>, <a class="el" href="a05761.html#l00430">makeInstance()</a>, and <a class="el" href="a05761.html#l00109">selectInstances()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp3" doxytag="NLPACS::CGlobalRetriever::_Instances" ></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="a03333.html">CRetrieverInstance</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp3">NLPACS::CGlobalRetriever::_Instances</a><code> [mutable, protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The instances of the global retriever.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00159">159</a> of file <a class="el" href="a05762.html">global_retriever.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverr0" doxytag="NLPACS::CGlobalRetriever::_InternalCST" ></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="a02387.html">CCollisionSurfaceTemp</a> <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverr0">NLPACS::CGlobalRetriever::_InternalCST</a><code> [mutable, 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="a05762.html#l00148">148</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l01062">findPath()</a>, <a class="el" href="a05761.html#l00275">getBorders()</a>, <a class="el" href="a05762.html#l00523">getInternalCST()</a>, <a class="el" href="a05761.html#l00367">makeLinks()</a>, <a class="el" href="a05761.html#l02448">refreshLrAround()</a>, <a class="el" href="a05761.html#l02554">refreshLrAroundNow()</a>, <a class="el" href="a05761.html#l00493">retrievePosition()</a>, and <a class="el" href="a05762.html#l00305">testPosition()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp4" doxytag="NLPACS::CGlobalRetriever::_LrLoaderList" ></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::list&lt;<a class="el" href="a02593.html">CLrLoader</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp4">NLPACS::CGlobalRetriever::_LrLoaderList</a><code> [protected]</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="a05762.html#l00144">144</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l02448">refreshLrAround()</a>, and <a class="el" href="a05761.html#l02554">refreshLrAroundNow()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverp5" doxytag="NLPACS::CGlobalRetriever::_RetrieverBank" ></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="a03331.html">CRetrieverBank</a>* <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverp5">NLPACS::CGlobalRetriever::_RetrieverBank</a><code> [protected]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The <a class="el" href="a03331.html">CRetrieverBank</a> where the commmon retrievers are stored.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00156">156</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05762.html#l00178">CGlobalRetriever()</a>, <a class="el" href="a05761.html#l00153">check()</a>, <a class="el" href="a05761.html#l00855">findAStarPath()</a>, <a class="el" href="a05761.html#l01177">findCollisionChains()</a>, <a class="el" href="a05761.html#l01062">findPath()</a>, <a class="el" href="a05761.html#l00736">getIdentifier()</a>, <a class="el" href="a05761.html#l02421">getMeanHeight()</a>, <a class="el" href="a05762.html#l00220">getRetriever()</a>, <a class="el" href="a05762.html#l00217">getRetrieverBank()</a>, <a class="el" href="a05761.html#l01159">getSurfaceById()</a>, <a class="el" href="a05761.html#l00414">initAll()</a>, <a class="el" href="a05761.html#l00367">makeLinks()</a>, <a class="el" href="a05761.html#l02448">refreshLrAround()</a>, <a class="el" href="a05761.html#l02554">refreshLrAroundNow()</a>, <a class="el" href="a05761.html#l00493">retrievePosition()</a>, <a class="el" href="a05761.html#l00109">selectInstances()</a>, <a class="el" href="a05762.html#l00366">setRetrieverBank()</a>, <a class="el" href="a05761.html#l01392">testCollisionWithCollisionChains()</a>, and <a class="el" href="a05761.html#l01649">testMovementWithCollisionChains()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLPACS_1_1CGlobalRetrieverr1" doxytag="NLPACS::CGlobalRetriever::_RetrieveTable" ></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="a04558.html#a7">uint8</a>&gt; <a class="el" href="a02588.html#NLPACS_1_1CGlobalRetrieverr1">NLPACS::CGlobalRetriever::_RetrieveTable</a><code> [mutable, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Used to retrieve the surface. Internal use only, to avoid large amount of new/delete.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05762.html#l00151">151</a> of file <a class="el" href="a05762.html">global_retriever.h</a>.
+<p>
+Referenced by <a class="el" href="a05761.html#l00088">initRetrieveTable()</a>, and <a class="el" href="a05761.html#l00430">makeInstance()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05762.html">global_retriever.h</a><li><a class="el" href="a05761.html">global_retriever.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:14:21 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>