aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02708.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02708.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a02708.html')
-rw-r--r--docs/doxygen/nel/a02708.html628
1 files changed, 628 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02708.html b/docs/doxygen/nel/a02708.html
new file mode 100644
index 00000000..07fef19f
--- /dev/null
+++ b/docs/doxygen/nel/a02708.html
@@ -0,0 +1,628 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NL3D::CLandscapeCollisionGrid class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NL3D::CLandscapeCollisionGrid Class Reference</h1><code>#include &lt;<a class="el" href="a05865.html">landscape_collision_grid.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A grid of Tiles Id. Each <a class="el" href="a03705.html">CVisualCollisionEntity</a> has such a grid. This looks like <a class="el" href="a03273.html">CQuadGrid</a>, but with special features. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00055">55</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida0">build</a> (const std::vector&lt; <a class="el" href="a03068.html">CPatchQuadBlock</a> * &gt; &amp;quadBlocks, const <a class="el" href="a03128.html">CVector</a> &amp;delta)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida1">CLandscapeCollisionGrid</a> (<a class="el" href="a03707.html">CVisualCollisionManager</a> *owner)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CLandscapeCollisionGrida1"></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="a02708.html#NL3D_1_1CLandscapeCollisionGrida2">clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">clear the chainlist in the quadgrid. <a href="#NL3D_1_1CLandscapeCollisionGrida2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03713.html">CVisualTileDescNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida3">select</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;pos)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">select one entry in the chainQuad. pos is a position in World. <a href="#NL3D_1_1CLandscapeCollisionGrida3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida4">~CLandscapeCollisionGrid</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridd0">addQuadToGrid</a> (<a class="el" href="a04558.html#a9">uint16</a> paBlockId, <a class="el" href="a04558.html#a9">uint16</a> quadId, <a class="el" href="a04558.html#a14">sint</a> minx, <a class="el" href="a04558.html#a14">sint</a> maxx, <a class="el" href="a04558.html#a14">sint</a> miny, <a class="el" href="a04558.html#a14">sint</a> maxy)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">_Cleared</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of list of <a class="el" href="a03713.html">CVisualTileDescNode</a>. <a href="#NL3D_1_1CLandscapeCollisionGridr0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr1">_Delta</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03713.html">CVisualTileDescNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">_Grid</a> [32 *32]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03707.html">CVisualCollisionManager</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr3">_Owner</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr4">_SizePower</a></td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGrida1" doxytag="NL3D::CLandscapeCollisionGrid::CLandscapeCollisionGrid" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NL3D::CLandscapeCollisionGrid::CLandscapeCollisionGrid </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03707.html">CVisualCollisionManager</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>owner</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>
+Constructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05864.html#l00040">40</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05865.html#l00082">_Cleared</a>, <a class="el" href="a05865.html#l00083">_Grid</a>, <a class="el" href="a05865.html#l00084">_SizePower</a>, <a class="el" href="a05586.html#l00358">NLMISC::getPowerOf2()</a>, <a class="el" href="a05586.html#l00371">NLMISC::isPowerOf2()</a>, <a class="el" href="a05865.html#l00043">NL_COLGRID_SIZE</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+<div class="fragment"><pre>00041 {
+00042 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr3">_Owner</a>= owner;
+00043 <span class="comment">// reset list to NULL.</span>
+00044 memset(_Grid, 0, NL_COLGRID_SIZE*NL_COLGRID_SIZE * <span class="keyword">sizeof</span>(CVisualTileDescNode*));
+00045 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">_Cleared</a>= <span class="keyword">true</span>;
+00046
+00047 <span class="comment">// sizepower.</span>
+00048 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a05378.html#a264">isPowerOf2</a>(NL_COLGRID_SIZE));
+00049 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr4">_SizePower</a>= <a class="code" href="a05378.html#a263">getPowerOf2</a>(NL_COLGRID_SIZE);
+00050 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGrida4" doxytag="NL3D::CLandscapeCollisionGrid::~CLandscapeCollisionGrid" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NL3D::CLandscapeCollisionGrid::~<a class="el" href="a02708.html">CLandscapeCollisionGrid</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05864.html#l00053">53</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05864.html#l00059">clear()</a>.
+<p>
+<div class="fragment"><pre>00054 {
+00055 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida2">clear</a>();
+00056 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridd0" doxytag="NL3D::CLandscapeCollisionGrid::addQuadToGrid" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CLandscapeCollisionGrid::addQuadToGrid </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paBlockId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>quadId</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>minx</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxx</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>miny</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxy</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</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="a05864.html#l00213">213</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05865.html#l00083">_Grid</a>, <a class="el" href="a05865.html#l00084">_SizePower</a>, <a class="el" href="a06729.html#l00096">NL3D::CVisualCollisionManager::newVisualTileDescNode()</a>, <a class="el" href="a06730.html#l00059">NL3D::CVisualTileDescNode::Next</a>, <a class="el" href="a05865.html#l00043">NL_COLGRID_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06730.html#l00055">NL3D::CVisualTileDescNode::PatchQuadBlocId</a>, <a class="el" href="a06730.html#l00057">NL3D::CVisualTileDescNode::QuadId</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00147">build()</a>.
+<p>
+<div class="fragment"><pre>00214 {
+00215 <span class="comment">// coordinate should be positive.</span>
+00216 <a class="code" href="a04199.html#a6">nlassert</a>(x0&gt;=0 &amp;&amp; x1&gt;=x0);
+00217 <a class="code" href="a04199.html#a6">nlassert</a>(y0&gt;=0 &amp;&amp; y1&gt;=y0);
+00218
+00219 <span class="comment">// first, transform coordinate (in meters) in quadgrid eltSize (ie 2 meters).</span>
+00220 x0= (x0&gt;&gt;1); <span class="comment">// floor().</span>
+00221 x1= (x1&gt;&gt;1) + 1; <span class="comment">// equivalent of ceil().</span>
+00222 y0= (y0&gt;&gt;1); <span class="comment">// floor().</span>
+00223 y1= (y1&gt;&gt;1) + 1; <span class="comment">// equivalent of ceil().</span>
+00224
+00225 <span class="comment">// setup bounds in quadgrid coordinate.</span>
+00226 <span class="keywordflow">if</span>(x1-x0&gt;=<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>)
+00227 x0=0, x1= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>;
+00228 <span class="keywordflow">else</span>
+00229 {
+00230 x0&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00231 x1&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00232 <span class="keywordflow">if</span>(x1&lt;=x0)
+00233 x1+=<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>;
+00234 }
+00235 <span class="keywordflow">if</span>(y1-y0&gt;=<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>)
+00236 y0=0, y1= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>;
+00237 <span class="keywordflow">else</span>
+00238 {
+00239 y0&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00240 y1&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00241 <span class="keywordflow">if</span>(y1&lt;=y0)
+00242 y1+=<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>;
+00243 }
+00244
+00245 <span class="comment">// fill all cases with element.</span>
+00246 <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>;
+00247 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>= y0;<a class="code" href="a04223.html#a573">y</a>&lt;y1;<a class="code" href="a04223.html#a573">y</a>++)
+00248 {
+00249 <a class="code" href="a04558.html#a14">sint</a> xe,ye;
+00250 ye= <a class="code" href="a04223.html#a573">y</a> &amp;(<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1);
+00251 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>= x0;<a class="code" href="a04223.html#a572">x</a>&lt;x1;<a class="code" href="a04223.html#a572">x</a>++)
+00252 {
+00253 xe= <a class="code" href="a04223.html#a572">x</a> &amp;(<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1);
+00254 <span class="comment">// which case we add the element.</span>
+00255 <a class="code" href="a04558.html#a14">sint</a> gridId= (ye&lt;&lt;<a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr4">_SizePower</a>)+xe;
+00256
+00257 <span class="comment">// allocate element.</span>
+00258 CVisualTileDescNode *elt= <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr3">_Owner</a>-&gt;newVisualTileDescNode();
+00259
+00260 <span class="comment">// fill elt.</span>
+00261 elt-&gt;PatchQuadBlocId= paBlockId;
+00262 elt-&gt;QuadId= quadId;
+00263
+00264 <span class="comment">// bind elt to the list.</span>
+00265 elt-&gt;Next= <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">_Grid</a>[gridId];
+00266 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">_Grid</a>[gridId]= elt;
+00267 }
+00268 }
+00269 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGrida0" doxytag="NL3D::CLandscapeCollisionGrid::build" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CLandscapeCollisionGrid::build </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; <a class="el" href="a03068.html">CPatchQuadBlock</a> * &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>quadBlocks</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>delta</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>
+Build the quadgrid with a array of patchblock. delta is the vector to apply to tiles coordinate, before insertion in the quadgrid (for precision consideration).
+<p>
+Definition at line <a class="el" href="a05864.html#l00147">147</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05865.html#l00082">_Cleared</a>, <a class="el" href="a05865.html#l00085">_Delta</a>, <a class="el" href="a05864.html#l00213">addQuadToGrid()</a>, <a class="el" href="a05864.html#l00059">clear()</a>, <a class="el" href="a05864.html#l00138">NL3D::fastFloor()</a>, <a class="el" href="a05864.html#l00136">NL3D::fastFloorBegin()</a>, <a class="el" href="a05864.html#l00137">NL3D::fastFloorEnd()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06156.html#l00064">NL_PATCH_BLOCK_MAX_QUAD</a>, <a class="el" href="a06156.html#l00065">NL_PATCH_BLOCK_MAX_VERTEX</a>, <a class="el" href="a06156.html#l00255">NL3D::CPatchQuadBlock::PatchBlockId</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::S1</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T1</a>, <a class="el" href="a06156.html#l00258">NL3D::CPatchQuadBlock::Vertices</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05864.html#l00091">NL3D::CVector2i::x</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a05864.html#l00091">NL3D::CVector2i::y</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">NL3D::CVisualCollisionEntity::doComputeLandscape()</a>.
+<p>
+<div class="fragment"><pre>00148 {
+00149 <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>;
+00150 <span class="keyword">static</span> CVector2i floorVals[<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
+00151
+00152 <span class="comment">// first clear</span>
+00153 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGrida2">clear</a>();
+00154
+00155 <span class="comment">// init for fast floor.</span>
+00156 <a class="code" href="a05363.html#a426">fastFloorBegin</a>();
+00157
+00158 <span class="comment">// then fill.</span>
+00159 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">_Cleared</a>= <span class="keyword">false</span>;
+00160 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr1">_Delta</a>= delta;
+00161 <span class="comment">// parse all quad blocks.</span>
+00162 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)quadBlocks.size();i++)
+00163 {
+00164 CPatchQuadBlock &amp;qb= *quadBlocks[i];
+00165 <a class="code" href="a04558.html#a14">sint</a> lenS= qb.PatchBlockId.S1 - qb.PatchBlockId.S0;
+00166 <a class="code" href="a04558.html#a14">sint</a> lenT= qb.PatchBlockId.T1 - qb.PatchBlockId.T0;
+00167
+00168 <span class="comment">// First, floor all vertices of interest.</span>
+00169 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;lenT+1; <a class="code" href="a04223.html#a573">y</a>++)
+00170 {
+00171 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;lenS+1; <a class="code" href="a04223.html#a572">x</a>++)
+00172 {
+00173 <a class="code" href="a04558.html#a14">sint</a> <span class="keywordtype">id</span>= <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a> + <a class="code" href="a04223.html#a572">x</a>;
+00174 <span class="comment">// Add delta, and floor to sint.</span>
+00175 floorVals[<span class="keywordtype">id</span>].x= <a class="code" href="a05363.html#a428">fastFloor</a>(qb.Vertices[<span class="keywordtype">id</span>].x + delta.x);
+00176 floorVals[<span class="keywordtype">id</span>].y= <a class="code" href="a05363.html#a428">fastFloor</a>(qb.Vertices[<span class="keywordtype">id</span>].y + delta.y);
+00177 }
+00178 }
+00179
+00180 <span class="comment">// Then compute min max for all quads, and insert quad id in the quadGrid.</span>
+00181 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;lenT; <a class="code" href="a04223.html#a573">y</a>++)
+00182 {
+00183 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;lenS; <a class="code" href="a04223.html#a572">x</a>++)
+00184 {
+00185 <a class="code" href="a04558.html#a14">sint</a> minx, maxx, miny, maxy;
+00186 <a class="code" href="a04558.html#a14">sint</a> <span class="keywordtype">id</span>= <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a> + <a class="code" href="a04223.html#a572">x</a>;
+00187 <span class="comment">// Compute min max of the 4 vertices.</span>
+00188 minx= floorVals[<span class="keywordtype">id</span>].x; maxx= floorVals[<span class="keywordtype">id</span>].x;
+00189 miny= floorVals[<span class="keywordtype">id</span>].y; maxy= floorVals[<span class="keywordtype">id</span>].y;
+00190 <span class="keywordtype">id</span>++;
+00191 minx= <a class="code" href="a04061.html#a0">min</a>(minx, floorVals[<span class="keywordtype">id</span>].x); maxx= max(maxx, floorVals[<span class="keywordtype">id</span>].x);
+00192 miny= <a class="code" href="a04061.html#a0">min</a>(miny, floorVals[<span class="keywordtype">id</span>].y); maxy= max(maxy, floorVals[<span class="keywordtype">id</span>].y);
+00193 <span class="keywordtype">id</span>+= <a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>;
+00194 minx= <a class="code" href="a04061.html#a0">min</a>(minx, floorVals[<span class="keywordtype">id</span>].x); maxx= max(maxx, floorVals[<span class="keywordtype">id</span>].x);
+00195 miny= <a class="code" href="a04061.html#a0">min</a>(miny, floorVals[<span class="keywordtype">id</span>].y); maxy= max(maxy, floorVals[<span class="keywordtype">id</span>].y);
+00196 <span class="keywordtype">id</span>--;
+00197 minx= <a class="code" href="a04061.html#a0">min</a>(minx, floorVals[<span class="keywordtype">id</span>].x); maxx= max(maxx, floorVals[<span class="keywordtype">id</span>].x);
+00198 miny= <a class="code" href="a04061.html#a0">min</a>(miny, floorVals[<span class="keywordtype">id</span>].y); maxy= max(maxy, floorVals[<span class="keywordtype">id</span>].y);
+00199
+00200 <span class="comment">// store minmax in the quad.</span>
+00201 <a class="code" href="a04558.html#a14">sint</a> quadId= <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04733.html#a9">NL_PATCH_BLOCK_MAX_QUAD</a> + <a class="code" href="a04223.html#a572">x</a>;
+00202 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridd0">addQuadToGrid</a>(i, quadId, minx, maxx, miny, maxy);
+00203 }
+00204 }
+00205 }
+00206
+00207 <span class="comment">// init for fast floor.</span>
+00208 <a class="code" href="a05363.html#a427">fastFloorEnd</a>();
+00209 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGrida2" doxytag="NL3D::CLandscapeCollisionGrid::clear" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CLandscapeCollisionGrid::clear </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+clear the chainlist in the quadgrid.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05864.html#l00059">59</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05865.html#l00082">_Cleared</a>, <a class="el" href="a05865.html#l00083">_Grid</a>, <a class="el" href="a06729.html#l00102">NL3D::CVisualCollisionManager::deleteVisualTileDescNode()</a>, <a class="el" href="a06730.html#l00059">NL3D::CVisualTileDescNode::Next</a>, <a class="el" href="a05865.html#l00043">NL_COLGRID_SIZE</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00147">build()</a>, <a class="el" href="a05864.html#l00053">~CLandscapeCollisionGrid()</a>, and <a class="el" href="a06725.html#l00072">NL3D::CVisualCollisionEntity::~CVisualCollisionEntity()</a>.
+<p>
+<div class="fragment"><pre>00060 {
+00061 <span class="comment">// already cleared? do nothing.</span>
+00062 <span class="keywordflow">if</span>(<a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">_Cleared</a>)
+00063 <span class="keywordflow">return</span>;
+00064
+00065 <span class="comment">// Parse all quads.</span>
+00066 <a class="code" href="a04558.html#a14">sint</a> i;
+00067 <span class="keywordflow">for</span>(i=0;i&lt;<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>*<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>;i++)
+00068 {
+00069 CVisualTileDescNode *ptr, *next;
+00070 ptr= <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">_Grid</a>[i];
+00071
+00072 <span class="comment">// delete list of node.</span>
+00073 <span class="keywordflow">while</span>(ptr)
+00074 {
+00075 next= ptr-&gt;Next;
+00076 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr3">_Owner</a>-&gt;deleteVisualTileDescNode(ptr);
+00077 ptr= next;
+00078 }
+00079
+00080 <span class="comment">// reset root.</span>
+00081 _Grid[i]= NULL;
+00082 }
+00083
+00084 <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">_Cleared</a>= <span class="keyword">true</span>;
+00085 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGrida3" doxytag="NL3D::CLandscapeCollisionGrid::select" ></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="a03713.html">CVisualTileDescNode</a> * NL3D::CLandscapeCollisionGrid::select </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>pos</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>
+select one entry in the chainQuad. pos is a position in World.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05864.html#l00273">273</a> of file <a class="el" href="a05864.html">landscape_collision_grid.cpp</a>.
+<p>
+References <a class="el" href="a05865.html#l00085">_Delta</a>, <a class="el" href="a05865.html#l00083">_Grid</a>, <a class="el" href="a05865.html#l00043">NL_COLGRID_SIZE</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00096">NL3D::CVisualCollisionEntity::getPatchTriangleUnderUs()</a>.
+<p>
+<div class="fragment"><pre>00274 {
+00275 <span class="comment">// compute pos in the quadgrid.</span>
+00276 CVector localPos;
+00277 localPos= pos + <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr1">_Delta</a>;
+00278 <span class="comment">// cases are 2x2 meters.</span>
+00279 localPos/=2;
+00280
+00281 <span class="comment">// floor, bound in quadgrid coordinate.</span>
+00282 <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>;
+00283 <a class="code" href="a04223.html#a572">x</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(localPos.x);
+00284 <a class="code" href="a04223.html#a573">y</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(localPos.y);
+00285 <a class="code" href="a04223.html#a572">x</a>&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00286 <a class="code" href="a04223.html#a573">y</a>&amp;= <a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>-1;
+00287
+00288 <span class="keywordflow">return</span> <a class="code" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">_Grid</a>[<a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04442.html#a0">NL_COLGRID_SIZE</a>+<a class="code" href="a04223.html#a572">x</a>];
+00289 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridr0" doxytag="NL3D::CLandscapeCollisionGrid::_Cleared" ></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 <a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr0">NL3D::CLandscapeCollisionGrid::_Cleared</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Array of list of <a class="el" href="a03713.html">CVisualTileDescNode</a>.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00082">82</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00147">build()</a>, <a class="el" href="a05864.html#l00040">CLandscapeCollisionGrid()</a>, and <a class="el" href="a05864.html#l00059">clear()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridr1" doxytag="NL3D::CLandscapeCollisionGrid::_Delta" ></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> <a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr1">NL3D::CLandscapeCollisionGrid::_Delta</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00085">85</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00147">build()</a>, and <a class="el" href="a05864.html#l00273">select()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridr2" doxytag="NL3D::CLandscapeCollisionGrid::_Grid" ></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="a03713.html">CVisualTileDescNode</a>* <a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr2">NL3D::CLandscapeCollisionGrid::_Grid</a>[ 32 * 32 ]<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00083">83</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00213">addQuadToGrid()</a>, <a class="el" href="a05864.html#l00040">CLandscapeCollisionGrid()</a>, <a class="el" href="a05864.html#l00059">clear()</a>, and <a class="el" href="a05864.html#l00273">select()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridr3" doxytag="NL3D::CLandscapeCollisionGrid::_Owner" ></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="a03707.html">CVisualCollisionManager</a>* <a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr3">NL3D::CLandscapeCollisionGrid::_Owner</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00078">78</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CLandscapeCollisionGridr4" doxytag="NL3D::CLandscapeCollisionGrid::_SizePower" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02708.html#NL3D_1_1CLandscapeCollisionGridr4">NL3D::CLandscapeCollisionGrid::_SizePower</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05865.html#l00084">84</a> of file <a class="el" href="a05865.html">landscape_collision_grid.h</a>.
+<p>
+Referenced by <a class="el" href="a05864.html#l00213">addQuadToGrid()</a>, and <a class="el" href="a05864.html#l00040">CLandscapeCollisionGrid()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05865.html">landscape_collision_grid.h</a><li><a class="el" href="a05864.html">landscape_collision_grid.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:48:38 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>