aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03705.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a03705.html2007
1 files changed, 2007 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03705.html b/docs/doxygen/nel/a03705.html
new file mode 100644
index 00000000..f17f1a7c
--- /dev/null
+++ b/docs/doxygen/nel/a03705.html
@@ -0,0 +1,2007 @@
+<!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::CVisualCollisionEntity 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::CVisualCollisionEntity Class Reference</h1><code>#include &lt;<a class="el" href="a06726.html">visual_collision_entity.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+An entity created by <a class="el" href="a03707.html">CVisualCollisionManager</a>. <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="a06726.html#l00050">50</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Landscape part.</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_0">doComputeLandscape</a> (const <a class="el" href="a03128.html">CVector</a> &amp;pos)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03620.html">CTrianglePatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs</a> (const <a class="el" href="a03128.html">CVector</a> &amp;pos, <a class="el" href="a03128.html">CVector</a> &amp;<a class="el" href="a04223.html#a643">res</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_2">snapToLandscapeCurrentTesselation</a> (<a class="el" href="a03128.html">CVector</a> &amp;pos, const <a class="el" href="a03620.html">CTrianglePatch</a> &amp;tri)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">snap to current rendered tesselation. <a href="#NL3D_1_1CVisualCollisionEntityz1174_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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_3">testComputeLandscape</a> (const <a class="el" href="a03128.html">CVector</a> &amp;pos)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">test if the new position is outside the preceding setuped bbox, and then compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_3"></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_4">triangleIntersect</a> (<a class="el" href="a03616.html">CTriangle</a> &amp;tri, const <a class="el" href="a03128.html">CVector</a> &amp;pos0, const <a class="el" href="a03128.html">CVector</a> &amp;pos1, <a class="el" href="a03128.html">CVector</a> &amp;hit)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fast "2D" test of a triangle against ray P0 P1. <a href="#NL3D_1_1CVisualCollisionEntityz1174_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02156.html">CAABBox</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The current BBox where we don't need to recompute the patchQuadBlocks if the entity is in. <a href="#NL3D_1_1CVisualCollisionEntityz1174_5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02708.html">CLandscapeCollisionGrid</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">_LandscapeQuadGrid</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A quadgrid of chainlist of tileId (<a class="el" href="a03713.html">CVisualTileDescNode</a>), which are around the entity. <a href="#NL3D_1_1CVisualCollisionEntityz1174_6"></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_7">_LastGPTPosInput</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_7"></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_8">_LastGPTPosOutput</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03620.html">CTrianglePatch</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_9">_LastGPTTrianglePatch</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_9"></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cache for <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs()</a>. <a href="#NL3D_1_1CVisualCollisionEntityz1174_10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03068.html">CPatchQuadBlock</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_12">computeUvForPos</a> (const <a class="el" href="a03620.html">CTrianglePatch</a> &amp;tri, const <a class="el" href="a03128.html">CVector</a> &amp;pos, <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">given a <a class="el" href="a03620.html">CTrianglePatch</a>, compute Patch uv according to position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_12"></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_13">triangleIntersect2DCeil</a> (<a class="el" href="a03616.html">CTriangle</a> &amp;tri, const <a class="el" href="a03128.html">CVector</a> &amp;pos0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compute tiles infos around the position. <a href="#NL3D_1_1CVisualCollisionEntityz1174_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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_14">triangleIntersect2DGround</a> (<a class="el" href="a03616.html">CTriangle</a> &amp;tri, const <a class="el" href="a03128.html">CVector</a> &amp;pos0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fast "2D" test of a triangle against ray P0 P1. <a href="#NL3D_1_1CVisualCollisionEntityz1174_14"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_15">_StartPatchQuadBlockSize</a> = 64</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default capacity of _PatchQuadBlocks. <a href="#NL3D_1_1CVisualCollisionEntityz1174_15"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">_TmpBlockIds</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the temp array of BlockIds filled by landscape search. <a href="#NL3D_1_1CVisualCollisionEntityz1174_16"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03068.html">CPatchQuadBlock</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the temp array of PatchBlocks ptr. <a href="#NL3D_1_1CVisualCollisionEntityz1174_17"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya0">CVisualCollisionEntity</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_1CVisualCollisionEntitya0"></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="a03705.html#NL3D_1_1CVisualCollisionEntitya1">getCeilMode</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya2">getGroundMode</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya3">getSnapToRenderedTesselation</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya4">getSurfaceInfo</a> (const <a class="el" href="a03128.html">CVector</a> &amp;pos, <a class="el" href="a03463.html">CSurfaceInfo</a> &amp;info)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya5">setCeilMode</a> (bool ceilMode)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya6">setGroundMode</a> (bool groundMode)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya7">setSnapToRenderedTesselation</a> (bool snapMode)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya8">snapToGround</a> (<a class="el" href="a03128.html">CVector</a> &amp;pos, <a class="el" href="a03128.html">CVector</a> &amp;normal)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya9">snapToGround</a> (<a class="el" href="a03128.html">CVector</a> &amp;pos)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya10">~CVisualCollisionEntity</a> ()</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Debug display</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1172_0">displayDebugGrid</a> (<a class="el" href="a02434.html">IDriver</a> &amp;drv) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw lines for the landscape quadgrid collision faces under us. <a href="#NL3D_1_1CVisualCollisionEntityz1172_0"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Static Lighting</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1170_0">getStaticLightSetup</a> (const <a class="el" href="a03128.html">CVector</a> &amp;pos, std::vector&lt; <a class="el" href="a03092.html">CPointLightInfluence</a> &gt; &amp;pointLightList, <a class="el" href="a04558.html#a7">uint8</a> &amp;sunContribution, <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;localAmbient)</td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Parameters.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1168_0">BBoxRadius</a> = 10</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the radius of the bbox around the entity where we have correct collisions: 10m. <a href="#NL3D_1_1CVisualCollisionEntityz1168_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1168_1">BBoxRadiusZ</a> = 20</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="a03705.html#NL3D_1_1CVisualCollisionEntityr0">_CeilMode</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityr1">_GroundMode</a></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="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityr3">_SnapToRenderedTesselation</a></td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya0" doxytag="NL3D::CVisualCollisionEntity::CVisualCollisionEntity" ></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::CVisualCollisionEntity::CVisualCollisionEntity </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="a06725.html#l00056">56</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00149">_CeilMode</a>, <a class="el" href="a06726.html#l00171">_CurrentBBoxValidity</a>, <a class="el" href="a06726.html#l00150">_GroundMode</a>, <a class="el" href="a06726.html#l00173">_LastGPTValid</a>, <a class="el" href="a06726.html#l00167">_PatchQuadBlocks</a>, <a class="el" href="a06726.html#l00151">_SnapToRenderedTesselation</a>, <a class="el" href="a06725.html#l00050">_StartPatchQuadBlockSize</a>, and <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>.
+<p>
+<div class="fragment"><pre>00056 : <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">_LandscapeQuadGrid</a>(owner)
+00057 {
+00058 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>= owner;
+00059 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>.reserve(_StartPatchQuadBlockSize);
+00060
+00061 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a>.setHalfSize(CVector::Null);
+00062
+00063 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr1">_GroundMode</a>= <span class="keyword">true</span>;
+00064 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr0">_CeilMode</a>= <span class="keyword">false</span>;
+00065 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr3">_SnapToRenderedTesselation</a>= <span class="keyword">true</span>;
+00066
+00067 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a>= <span class="keyword">false</span>;
+00068 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya10" doxytag="NL3D::CVisualCollisionEntity::~CVisualCollisionEntity" ></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::CVisualCollisionEntity::~<a class="el" href="a03705.html">CVisualCollisionEntity</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="a06725.html#l00072">72</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00169">_LandscapeQuadGrid</a>, <a class="el" href="a06726.html#l00167">_PatchQuadBlocks</a>, <a class="el" href="a05864.html#l00059">NL3D::CLandscapeCollisionGrid::clear()</a>, <a class="el" href="a06729.html#l00114">NL3D::CVisualCollisionManager::deletePatchQuadBlock()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00073 {
+00074 <span class="comment">// delete the _PatchQuadBlocks.</span>
+00075 <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>)<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>.size(); i++)
+00076 {
+00077 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;deletePatchQuadBlock(_PatchQuadBlocks[i]);
+00078 }
+00079 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>.clear();
+00080
+00081 <span class="comment">// delete the quadgrid.</span>
+00082 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">_LandscapeQuadGrid</a>.clear();
+00083 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_12" doxytag="NL3D::CVisualCollisionEntity::computeUvForPos" ></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::CVisualCollisionEntity::computeUvForPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03620.html">CTrianglePatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tri</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>pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+given a <a class="el" href="a03620.html">CTrianglePatch</a>, compute Patch uv according to position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00247">247</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06584.html#l00067">NLMISC::CTriangle::computeGradient()</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv0</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv1</a>, <a class="el" href="a05760.html#l00170">NLMISC::CTriangleUV::Uv2</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, and <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00527">getStaticLightSetup()</a>, <a class="el" href="a06725.html#l00565">getSurfaceInfo()</a>, and <a class="el" href="a06725.html#l00261">snapToLandscapeCurrentTesselation()</a>.
+<p>
+<div class="fragment"><pre>00248 {
+00249 <span class="comment">// compute UV gradients.</span>
+00250 CVector Gu;
+00251 CVector Gv;
+00252 tri.computeGradient(tri.Uv0.U, tri.Uv1.U, tri.Uv2.U, Gu);
+00253 tri.computeGradient(tri.Uv0.V, tri.Uv1.V, tri.Uv2.V, Gv);
+00254 <span class="comment">// interpolate</span>
+00255 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= tri.Uv0.U + Gu*(pos-tri.V0);
+00256 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= tri.Uv0.V + Gv*(pos-tri.V0);
+00257 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1172_0" doxytag="NL3D::CVisualCollisionEntity::displayDebugGrid" ></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::CVisualCollisionEntity::displayDebugGrid </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>drv</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>
+Draw lines for the landscape quadgrid collision faces under us.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00612">612</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00167">_PatchQuadBlocks</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</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="a05646.html#l00977">s</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="a05646.html#l00985">t</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="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00258">NL3D::CPatchQuadBlock::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00118">NL3D::CVisualCollisionEntityUser::displayDebugGrid()</a>.
+<p>
+<div class="fragment"><pre>00613 {
+00614 <span class="comment">// static to not reallocate each frame</span>
+00615 <span class="keyword">static</span> CMaterial mat;
+00616 <span class="keyword">static</span> <span class="keywordtype">bool</span> inited= <span class="keyword">false</span>;
+00617 <span class="keywordflow">if</span>(!inited)
+00618 {
+00619 inited= <span class="keyword">true</span>;
+00620 mat.initUnlit();
+00621 }
+00622 <span class="keyword">static</span> vector&lt;CLine&gt; lineList;
+00623 lineList.clear();
+00624
+00625 <span class="comment">// Build lines for all patch quad blocks.</span>
+00626 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>.size();i++)
+00627 {
+00628 CPatchQuadBlock &amp;pqb= *<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>[i];
+00629 <span class="comment">// Parse all quads of this patch block.</span>
+00630 CPatchBlockIdent &amp;pbid= pqb.PatchBlockId;
+00631 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a627">t</a>= pbid.T0; <a class="code" href="a04223.html#a627">t</a>&lt;pbid.T1; <a class="code" href="a04223.html#a627">t</a>++)
+00632 {
+00633 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a626">s</a>= pbid.S0; <a class="code" href="a04223.html#a626">s</a>&lt;pbid.S1; <a class="code" href="a04223.html#a626">s</a>++)
+00634 {
+00635 <span class="comment">// compute quad coordinate in pqb.</span>
+00636 <a class="code" href="a04558.html#a15">uint</a> sd0= (<a class="code" href="a04223.html#a626">s</a>-pbid.S0);
+00637 <a class="code" href="a04558.html#a15">uint</a> td0= (<a class="code" href="a04223.html#a627">t</a>-pbid.T0);
+00638 <a class="code" href="a04558.html#a15">uint</a> sd1= sd0+1;
+00639 <a class="code" href="a04558.html#a15">uint</a> td1= td0+1;
+00640 <span class="comment">// get 4 vertex coord of quad</span>
+00641 <span class="keyword">const</span> CVector &amp;p0= pqb.Vertices[sd0 + td0*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
+00642 <span class="keyword">const</span> CVector &amp;p1= pqb.Vertices[sd0 + td1*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
+00643 <span class="keyword">const</span> CVector &amp;p2= pqb.Vertices[sd1 + td1*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
+00644 <span class="keyword">const</span> CVector &amp;p3= pqb.Vertices[sd1 + td0*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>];
+00645
+00646 <span class="comment">// build the 5 lines</span>
+00647 lineList.push_back(<a class="code" href="a02759.html">CLine</a>(p0, p1));
+00648 lineList.push_back(<a class="code" href="a02759.html">CLine</a>(p1, p2));
+00649 lineList.push_back(<a class="code" href="a02759.html">CLine</a>(p2, p3));
+00650 lineList.push_back(<a class="code" href="a02759.html">CLine</a>(p3, p0));
+00651 lineList.push_back(<a class="code" href="a02759.html">CLine</a>(p0, p2));
+00652 }
+00653 }
+00654 }
+00655
+00656 <span class="comment">// Display the lines.</span>
+00657 CDRU::drawLinesUnlit(lineList, mat, drv);
+00658 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_0" doxytag="NL3D::CVisualCollisionEntity::doComputeLandscape" ></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::CVisualCollisionEntity::doComputeLandscape </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">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><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00414">414</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00171">_CurrentBBoxValidity</a>, <a class="el" href="a06730.html#l00130">NL3D::CVisualCollisionManager::_Landscape</a>, <a class="el" href="a06726.html#l00169">_LandscapeQuadGrid</a>, <a class="el" href="a06726.html#l00167">_PatchQuadBlocks</a>, <a class="el" href="a06725.html#l00051">_TmpBlockIds</a>, <a class="el" href="a06725.html#l00052">_TmpPatchQuadBlocks</a>, <a class="el" href="a06725.html#l00048">BBoxRadius</a>, <a class="el" href="a06725.html#l00049">BBoxRadiusZ</a>, <a class="el" href="a05864.html#l00147">NL3D::CLandscapeCollisionGrid::build()</a>, <a class="el" href="a06729.html#l00114">NL3D::CVisualCollisionManager::deletePatchQuadBlock()</a>, <a class="el" href="a06729.html#l00108">NL3D::CVisualCollisionManager::newPatchQuadBlock()</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#l00105">uint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</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="a06725.html#l00403">testComputeLandscape()</a>.
+<p>
+<div class="fragment"><pre>00415 {
+00416 <a class="code" href="a04558.html#a14">sint</a> i;
+00417
+00418 <span class="comment">// setup new bbox.</span>
+00419 <span class="comment">//==================</span>
+00420 <span class="comment">// compute the bbox which must includes the patchQuadBlocks</span>
+00421 CAABBox bboxToIncludePatchs;
+00422 bboxToIncludePatchs.setCenter(pos);
+00423 bboxToIncludePatchs.setHalfSize(CVector(BBoxRadius, BBoxRadius, BBoxRadiusZ));
+00424 <span class="comment">// setup the _CurrentBBoxValidity with same values, but BBoxRadiusZ/2</span>
+00425 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a>.setCenter(pos);
+00426 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a>.setHalfSize(CVector(BBoxRadius, BBoxRadius, BBoxRadiusZ/2));
+00427
+00428
+00429 <span class="comment">// Search landscape blocks which are in the bbox.</span>
+00430 <span class="comment">//==================</span>
+00431 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;buildPatchBlocksInBBox(bboxToIncludePatchs, _TmpBlockIds);
+00432
+00433
+00434
+00435 <span class="comment">// Recompute PatchQuadBlockcs.</span>
+00436 <span class="comment">//==================</span>
+00437 <span class="comment">// This parts try to keeps old patch blocks so they are not recomputed if they already here.</span>
+00438
+00439 <span class="comment">// sort PatchBlockIdent.</span>
+00440 sort(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">_TmpBlockIds</a>.begin(), <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">_TmpBlockIds</a>.end());
+00441
+00442 <span class="comment">// Copy old array of ptr (ptr copy only).</span>
+00443 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a>= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>;
+00444
+00445 <span class="comment">// allocate dest array.</span>
+00446 _PatchQuadBlocks.resize(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">_TmpBlockIds</a>.size());
+00447
+00448 <span class="comment">// Traverse all current patchBlocks, deleting old ones no longer needed, and creating new ones.</span>
+00449 <span class="comment">// this algorithm suppose both array are sorted.</span>
+00450 <a class="code" href="a04558.html#a15">uint</a> iOld=0;
+00451 <span class="comment">// parse until dest is filled.</span>
+00452 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)_PatchQuadBlocks.size();)
+00453 {
+00454 <span class="comment">// get requested new BlockIdent.</span>
+00455 CPatchBlockIdent newBi= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">_TmpBlockIds</a>[i];
+00456
+00457 <span class="comment">// get requested old BlockIdent in the array.</span>
+00458 <span class="keywordtype">bool</span> oldEnd= <span class="keyword">false</span>;
+00459 CPatchBlockIdent oldBi;
+00460 <span class="keywordflow">if</span>(iOld==<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a>.size())
+00461 oldEnd= <span class="keyword">true</span>;
+00462 <span class="keywordflow">else</span>
+00463 oldBi= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a>[iOld]-&gt;PatchBlockId;
+00464
+00465 <span class="comment">// if no more old blocks, or if new Block is &lt; than current, we must create a new block, and insert it.</span>
+00466 <span class="keywordflow">if</span>(oldEnd || newBi &lt; oldBi)
+00467 {
+00468 <span class="comment">// allocate the patch block.</span>
+00469 _PatchQuadBlocks[i]= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;newPatchQuadBlock();
+00470 <span class="comment">// fill the patch block.</span>
+00471 _PatchQuadBlocks[i]-&gt;PatchBlockId= _TmpBlockIds[i];
+00472 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;fillPatchQuadBlock(*_PatchQuadBlocks[i]);
+00473
+00474 <span class="comment">// next new patch block.</span>
+00475 i++;
+00476 }
+00477 <span class="comment">// else if current new Block is same than old block, just copy ptr.</span>
+00478 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(newBi==oldBi)
+00479 {
+00480 <span class="comment">// just copy ptr with the old one.</span>
+00481 _PatchQuadBlocks[i]= _TmpPatchQuadBlocks[iOld];
+00482
+00483 <span class="comment">// next new and old patch block.</span>
+00484 i++;
+00485 iOld++;
+00486 }
+00487 <span class="comment">// else, this old block is no longer used, delete it.</span>
+00488 <span class="keywordflow">else</span>
+00489 {
+00490 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;deletePatchQuadBlock(_TmpPatchQuadBlocks[iOld]);
+00491 <span class="comment">// next old patch block.</span>
+00492 iOld++;
+00493 }
+00494 }
+00495 <span class="comment">// Here, must delete old blocks not yet processed.</span>
+00496 <span class="keywordflow">for</span>(;iOld&lt;<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a>.size(); iOld++)
+00497 {
+00498 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;deletePatchQuadBlock(_TmpPatchQuadBlocks[iOld]);
+00499 }
+00500 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">_TmpPatchQuadBlocks</a>.clear();
+00501
+00502
+00503 <span class="comment">// Compute the quadGrid.</span>
+00504 <span class="comment">//==================</span>
+00505
+00506 <span class="comment">// Compute a delta so elt position for CLandscapeCollisionGrid are positive, and so fastFloor() used will work.</span>
+00507 CVector delta;
+00508 <span class="comment">// center the position on 0.</span>
+00509 <span class="comment">// floor may be important for precision when the delta is applied.</span>
+00510 delta.x= (<span class="keywordtype">float</span>)floor(-pos.x);
+00511 delta.y= (<span class="keywordtype">float</span>)floor(-pos.y);
+00512 delta.z= 0;
+00513 <span class="comment">// We must always have positive values for patchBlocks vertices.</span>
+00514 <span class="keywordtype">float</span> val= (<span class="keywordtype">float</span>)ceil(BBoxRadius + 256);
+00515 <span class="comment">// NB: 256 is a security. Because of size of patchs, a value of 32 at max should be sufficient (64 for bigger patch (gfx))</span>
+00516 <span class="comment">// we are large because doesn't matter, the CLandscapeCollisionGrid tiles.</span>
+00517 delta.x+= val;
+00518 delta.y+= val;
+00519
+00520 <span class="comment">// rebuild the quadGrid.</span>
+00521 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">_LandscapeQuadGrid</a>.build(_PatchQuadBlocks, delta);
+00522
+00523 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya1" doxytag="NL3D::CVisualCollisionEntity::getCeilMode" ></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 NL3D::CVisualCollisionEntity::getCeilMode </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>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00090">90</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00149">_CeilMode</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00084">NL3D::CVisualCollisionEntityUser::getCeilMode()</a>.
+<p>
+<div class="fragment"><pre>00090 {<span class="keywordflow">return</span> <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr0">_CeilMode</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya2" doxytag="NL3D::CVisualCollisionEntity::getGroundMode" ></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 NL3D::CVisualCollisionEntity::getGroundMode </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>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00089">89</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00150">_GroundMode</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00077">NL3D::CVisualCollisionEntityUser::getGroundMode()</a>.
+<p>
+<div class="fragment"><pre>00089 {<span class="keywordflow">return</span> <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr1">_GroundMode</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_1" doxytag="NL3D::CVisualCollisionEntity::getPatchTriangleUnderUs" ></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="a03620.html">CTrianglePatch</a> * NL3D::CVisualCollisionEntity::getPatchTriangleUnderUs </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</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><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>res</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>
+return the best trianglePatch under what we are. NULL if not found. Ptr is valid until next call to <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs()</a> Actually return NULL or
+<p>
+Definition at line <a class="el" href="a06725.html#l00096">96</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06730.html#l00130">NL3D::CVisualCollisionManager::_Landscape</a>, <a class="el" href="a06726.html#l00169">_LandscapeQuadGrid</a>, <a class="el" href="a06726.html#l00174">_LastGPTPosInput</a>, <a class="el" href="a06726.html#l00175">_LastGPTPosOutput</a>, <a class="el" href="a06726.html#l00176">_LastGPTTrianglePatch</a>, <a class="el" href="a06726.html#l00173">_LastGPTValid</a>, <a class="el" href="a06726.html#l00167">_PatchQuadBlocks</a>, <a class="el" href="a06155.html#l00410">NL3D::CPatchQuadBlock::buildTileTriangles()</a>, <a class="el" href="a06730.html#l00059">NL3D::CVisualTileDescNode::Next</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="a05646.html#l01119">res</a>, <a class="el" href="a05864.html#l00273">NL3D::CLandscapeCollisionGrid::select()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a06725.html#l00403">testComputeLandscape()</a>, <a class="el" href="a06725.html#l00366">triangleIntersect()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00527">getStaticLightSetup()</a>, <a class="el" href="a06725.html#l00565">getSurfaceInfo()</a>, and <a class="el" href="a06725.html#l00211">snapToGround()</a>.
+<p>
+<div class="fragment"><pre>00097 {
+00098 <span class="comment">// verify if landscape (refptr) is here.</span>
+00099 <span class="keywordflow">if</span>(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape==NULL)
+00100 {
+00101 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a>= <span class="keyword">false</span>;
+00102 <span class="keywordflow">return</span> NULL;
+00103 }
+00104
+00105
+00106 <span class="comment">// Test GPT cache.</span>
+00107 <span class="comment">//==================</span>
+00108 <span class="comment">// If last call was valid, and if same pos (input or output), return cached information</span>
+00109 <span class="keywordflow">if</span>(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a> &amp;&amp; (pos==<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_7">_LastGPTPosInput</a> || pos==<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_8">_LastGPTPosOutput</a>) )
+00110 {
+00111 <span class="comment">// copy from cache.</span>
+00112 <a class="code" href="a04223.html#a643">res</a>= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_8">_LastGPTPosOutput</a>;
+00113 <span class="comment">/* don't modify _LastGPTPosInput cache, for best cache behavior in all cases.</span>
+00114 <span class="comment"> 1/ this is not necessary (here, if pos!=_LastGPTPosInput, THEN pos==_LastGPTPosOutput, no other possibilities)</span>
+00115 <span class="comment"> 2/ it causes problems when getPatchTriangleUnderUs() is called randomly with the unsnapped or snapped position:</span>
+00116 <span class="comment"> 1st Time: zin:9.0 =&gt; zout:9.5 cache fail (ok, 1st time...)</span>
+00117 <span class="comment"> 2nd Time: zin:9.0 =&gt; zout:9.5 cache OK (_LastGPTPosInput.z==zin)</span>
+00118 <span class="comment"> 3rd Time: zin:9.5 =&gt; zout:9.5 cache OK (_LastGPTPosOutput.z==zin)</span>
+00119 <span class="comment"> 4th Time: zin:9.0 =&gt; zout:9.5 cache FAILS (_LastGPTPosInput.z= 9.5 =&gt; !=zin)</span>
+00120 <span class="comment"> */</span>
+00121 <span class="comment">// and return ptr on cache.</span>
+00122 <span class="keywordflow">return</span> &amp;<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_9">_LastGPTTrianglePatch</a>;
+00123 }
+00124
+00125
+00126 <span class="comment">// update the cache of tile info near this position.</span>
+00127 <span class="comment">// =================</span>
+00128 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_3">testComputeLandscape</a>(pos);
+00129
+00130
+00131 <span class="comment">// find possible faces under the entity.</span>
+00132 <span class="comment">// =================</span>
+00133 CVisualTileDescNode *ptr= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">_LandscapeQuadGrid</a>.select(pos);
+00134
+00135
+00136 <span class="comment">// find the better face under the entity.</span>
+00137 <span class="comment">// =================</span>
+00138 <span class="keywordtype">float</span> sqrBestDist= <a class="code" href="a05378.html#a373">sqr</a>(1000.f);
+00139 CVector hit;
+00140 <span class="comment">// build the vertical ray.</span>
+00141 CVector segP0= pos - CVector(0,0,100);
+00142 CVector segP1= pos + CVector(0,0,100);
+00143
+00144
+00145 <span class="comment">// triangles builded from this list.</span>
+00146 <span class="keyword">static</span> vector&lt;CTrianglePatch&gt; testTriangles;
+00147 <span class="comment">// NB: not so many reallocation here, because static.</span>
+00148 testTriangles.clear();
+00149 <a class="code" href="a04558.html#a14">sint</a> bestTriangle= 0;
+00150
+00151
+00152 <span class="comment">// For all the faces in this quadgrid node.</span>
+00153 <span class="keywordflow">while</span>(ptr)
+00154 {
+00155 <span class="comment">// what is the quad block of this tile Id.</span>
+00156 <a class="code" href="a04558.html#a14">sint</a> qbId= ptr-&gt;PatchQuadBlocId;
+00157 <a class="code" href="a04199.html#a6">nlassert</a>(qbId&gt;=0 &amp;&amp; qbId&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>.size());
+00158 CPatchQuadBlock &amp;qb= *<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">_PatchQuadBlocks</a>[qbId];
+00159
+00160 <span class="comment">// Build the 2 triangles of this tile Id.</span>
+00161 <a class="code" href="a04558.html#a14">sint</a> idStart= testTriangles.size();
+00162 testTriangles.resize(idStart+2);
+00163 qb.buildTileTriangles((<a class="code" href="a04558.html#a7">uint8</a>)ptr-&gt;QuadId, &amp;testTriangles[idStart]);
+00164
+00165 <span class="comment">// Test the 2 triangles.</span>
+00166 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;2; i++)
+00167 {
+00168 CTrianglePatch &amp;tri= testTriangles[idStart+i];
+00169 <span class="comment">// test if the ray intersect.</span>
+00170 <span class="comment">// NB: triangleIntersect() is faster than CTriangle::intersect().</span>
+00171 <span class="keywordflow">if</span>(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_4">triangleIntersect</a>(tri, segP0, segP1, hit))
+00172 {
+00173 <span class="comment">// find the nearest triangle.</span>
+00174 <span class="keywordtype">float</span> sqrdist= (hit-pos).sqrnorm();
+00175 <span class="keywordflow">if</span>(sqrdist&lt;sqrBestDist)
+00176 {
+00177 bestTriangle= idStart+i;
+00178 <a class="code" href="a04223.html#a643">res</a>= hit;
+00179 sqrBestDist= sqrdist;
+00180 }
+00181 }
+00182 }
+00183
+00184
+00185 <span class="comment">// Next in the list.</span>
+00186 ptr= ptr-&gt;Next;
+00187 }
+00188
+00189
+00190 <span class="comment">// found ??</span>
+00191 <span class="keywordflow">if</span>(sqrBestDist&lt;<a class="code" href="a05378.html#a373">sqr</a>(1000))
+00192 {
+00193 <span class="comment">// copy into cache</span>
+00194 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a>= <span class="keyword">true</span>;
+00195 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_9">_LastGPTTrianglePatch</a>= testTriangles[bestTriangle];
+00196 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_7">_LastGPTPosInput</a>= pos;
+00197 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_8">_LastGPTPosOutput</a>= <a class="code" href="a04223.html#a643">res</a>;
+00198 <span class="comment">// and return ptr on cache.</span>
+00199 <span class="keywordflow">return</span> &amp;<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_9">_LastGPTTrianglePatch</a>;
+00200 }
+00201 <span class="keywordflow">else</span>
+00202 {
+00203 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">_LastGPTValid</a>= <span class="keyword">false</span>;
+00204 <span class="keywordflow">return</span> NULL;
+00205 }
+00206
+00207 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya3" doxytag="NL3D::CVisualCollisionEntity::getSnapToRenderedTesselation" ></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 NL3D::CVisualCollisionEntity::getSnapToRenderedTesselation </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>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00098">98</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00151">_SnapToRenderedTesselation</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00100">NL3D::CVisualCollisionEntityUser::getSnapToRenderedTesselation()</a>.
+<p>
+<div class="fragment"><pre>00098 {<span class="keywordflow">return</span> <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr3">_SnapToRenderedTesselation</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1170_0" doxytag="NL3D::CVisualCollisionEntity::getStaticLightSetup" ></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 NL3D::CVisualCollisionEntity::getStaticLightSetup </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</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; <a class="el" href="a03092.html">CPointLightInfluence</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pointLightList</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> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>sunContribution</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>localAmbient</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the static Light Setup, using landscape under us. append lights to pointLightList. NB: if find no landscape faces, don't modify pointLightList, set sunContribution=255, and return false Else, use <a class="el" href="a03057.html#NL3D_1_1CPatcho4">CPatch::TileLightInfluences</a> to get lights, and use CPatch::Lumels to get sunContribution. NB: because CPatch::Lumels encode the gouraud shading on the surface, returning lumelValue will darken the object too much. To avoid this, the sunContribution is raised to a power (0..1). See <a class="el" href="a03707.html#NL3D_1_1CVisualCollisionManagera7">CVisualCollisionManager::setSunContributionPower()</a>. Default is 0.5
+<p>
+Definition at line <a class="el" href="a06725.html#l00527">527</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06730.html#l00130">NL3D::CVisualCollisionManager::_Landscape</a>, <a class="el" href="a06730.html#l00222">NL3D::CVisualCollisionManager::_SunContributionLUT</a>, <a class="el" href="a06725.html#l00247">computeUvForPos()</a>, <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>, <a class="el" href="a06156.html#l00181">NL3D::CTrianglePatch::PatchId</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a06339.html#l00066">NLMISC::CRGBA::set()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a05824.html#l00633">NL3D::CInstanceLighter::computeSunContribution()</a>, and <a class="el" href="a06727.html#l00109">NL3D::CVisualCollisionEntityUser::getStaticLightSetup()</a>.
+<p>
+<div class="fragment"><pre>00529 {
+00530 <span class="comment">// Get Patch Triangle Under Us</span>
+00531 CVector <a class="code" href="a04223.html#a643">res</a>;
+00532 CTrianglePatch *tri= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs</a>(pos, res);
+00533
+00534 <span class="comment">// For now, no localAmbient support on landscape.</span>
+00535 localAmbient.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(0,0,0,0);
+00536
+00537 <span class="comment">// result. NB: if not found, dot not modify.</span>
+00538 <span class="keywordflow">if</span>( tri )
+00539 {
+00540 <span class="comment">// compute UV for position.</span>
+00541 <a class="code" href="a03640.html">CUV</a> uv;
+00542 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_12">computeUvForPos</a>(*tri, pos, uv);
+00543
+00544 <span class="comment">// get the sunContribution</span>
+00545 sunContribution= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;getLumel(tri-&gt;PatchId, uv);
+00546 <span class="comment">// see getStaticLightSetup.</span>
+00547 sunContribution= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_SunContributionLUT[sunContribution];
+00548
+00549 <span class="comment">// append any lights of interest.</span>
+00550 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;appendTileLightInfluences(tri-&gt;PatchId, uv, pointLightList);
+00551
+00552 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00553 }
+00554 <span class="keywordflow">else</span>
+00555 {
+00556 <span class="comment">// Suppose full Sun Contribution, and don't add any pointLight</span>
+00557 sunContribution= 255;
+00558
+00559 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00560 }
+00561 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya4" doxytag="NL3D::CVisualCollisionEntity::getSurfaceInfo" ></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 NL3D::CVisualCollisionEntity::getSurfaceInfo </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</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><a class="el" href="a03463.html">CSurfaceInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>info</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get surface informations. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>info</em>&nbsp;</td><td>will be filled with surface informations if the method returns true. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>true if the surface has been found and informations has been filled.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00565">565</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06730.html#l00130">NL3D::CVisualCollisionManager::_Landscape</a>, <a class="el" href="a06725.html#l00247">computeUvForPos()</a>, <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>, <a class="el" href="a06537.html#l00520">NL3D::CTileBank::getTileSet()</a>, <a class="el" href="a06537.html#l00560">NL3D::CTileBank::getTileXRef()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a06541.html#l00053">NL_TILE_ELM_LAYER_EMPTY</a>, <a class="el" href="a06156.html#l00181">NL3D::CTrianglePatch::PatchId</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a06537.html#l00442">NL3D::CTileSet::SurfaceData</a>, <a class="el" href="a06541.html#l00077">NL3D::CTileElement::Tile</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00098">uint16</a>, and <a class="el" href="a06637.html#l00053">NL3D::CSurfaceInfo::UserSurfaceData</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00125">NL3D::CVisualCollisionEntityUser::getSurfaceInfo()</a>.
+<p>
+<div class="fragment"><pre>00566 {
+00567 <a class="code" href="a04365.html#a4">H_AUTO</a>( NL3D_CVisualCollisionEntity_getSurfaceInfo )
+00568 <span class="comment">// Get Patch Triangle Under Us</span>
+00569 CVector <a class="code" href="a04223.html#a643">res</a>;
+00570 CTrianglePatch *tri= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs</a>(pos, res);
+00571
+00572 <span class="comment">// result. NB: if not found, dot not modify.</span>
+00573 <span class="keywordflow">if</span>( tri )
+00574 {
+00575 <span class="comment">// compute UV for position.</span>
+00576 <a class="code" href="a03640.html">CUV</a> uv;
+00577 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_12">computeUvForPos</a>(*tri, pos, uv);
+00578
+00579 <span class="comment">// get the tileelement</span>
+00580 CTileElement *tileElm = <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;getTileElement(tri-&gt;PatchId, uv);
+00581 <span class="keywordflow">if</span> (tileElm)
+00582 {
+00583 <span class="comment">// Valid tile ?</span>
+00584 <a class="code" href="a04558.html#a9">uint16</a> tileId = tileElm-&gt;Tile[0];
+00585 <span class="keywordflow">if</span> (tileId != <a class="code" href="a05118.html#a12">NL_TILE_ELM_LAYER_EMPTY</a>)
+00586 {
+00587 <span class="comment">// The tilebank</span>
+00588 CTileBank &amp;tileBank = <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;TileBank;
+00589
+00590 <span class="comment">// Get xref info for this tile</span>
+00591 <span class="keywordtype">int</span> tileSet;
+00592 <span class="keywordtype">int</span> number;
+00593 CTileBank::TTileType <a class="code" href="a04223.html#a581">type</a>;
+00594 tileBank.getTileXRef ((<span class="keywordtype">int</span>)tileId, tileSet, number, type);
+00595
+00596 <span class="comment">// Get the tileset from layer 0</span>
+00597 <span class="keyword">const</span> CTileSet* tileSetPtr = tileBank.getTileSet (tileSet);
+00598
+00599 <span class="comment">// Fill the surface</span>
+00600 surfaceInfo.UserSurfaceData = tileSetPtr-&gt;SurfaceData;
+00601
+00602 <span class="comment">// Ok</span>
+00603 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00604 }
+00605 }
+00606 }
+00607 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00608 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya5" doxytag="NL3D::CVisualCollisionEntity::setCeilMode" ></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::CVisualCollisionEntity::setCeilMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>ceilMode</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>
+If ceilMode is true, the entity is snapped on faces with <a class="el" href="a04223.html#a574">normal.z</a> &lt; 0. Default is false. NB: if both groundMode and ceilMode are false, snapToGround is a no-op.
+<p>
+Definition at line <a class="el" href="a06726.html#l00086">86</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00149">_CeilMode</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00070">NL3D::CVisualCollisionEntityUser::setCeilMode()</a>.
+<p>
+<div class="fragment"><pre>00086 {<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr0">_CeilMode</a>= ceilMode;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya6" doxytag="NL3D::CVisualCollisionEntity::setGroundMode" ></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::CVisualCollisionEntity::setGroundMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>groundMode</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>
+If groundMode is true, the entity is snapped on faces with <a class="el" href="a04223.html#a574">normal.z</a> &gt; 0. Default is true. NB: if both groundMode and ceilMode are false, snapToGround is a no-op.
+<p>
+Definition at line <a class="el" href="a06726.html#l00080">80</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00150">_GroundMode</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00063">NL3D::CVisualCollisionEntityUser::setGroundMode()</a>.
+<p>
+<div class="fragment"><pre>00080 {<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr1">_GroundMode</a>= groundMode;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya7" doxytag="NL3D::CVisualCollisionEntity::setSnapToRenderedTesselation" ></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::CVisualCollisionEntity::setSnapToRenderedTesselation </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>snapMode</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>
+By default, the visual collision entity is snapped on rendered/geomorphed tesselation (true). Use this method to change this behavior. if false, the entity is snapped to the tile level tesselation according to noise etc...
+<p>
+Definition at line <a class="el" href="a06726.html#l00097">97</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+References <a class="el" href="a06726.html#l00151">_SnapToRenderedTesselation</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00093">NL3D::CVisualCollisionEntityUser::setSnapToRenderedTesselation()</a>.
+<p>
+<div class="fragment"><pre>00097 {<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr3">_SnapToRenderedTesselation</a>= snapMode;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya8" doxytag="NL3D::CVisualCollisionEntity::snapToGround" ></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 NL3D::CVisualCollisionEntity::snapToGround </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">CVector</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><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>normal</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>
+Snap the entity onto the ground. <a class="el" href="a04223.html#a574">pos.z</a> is modified so that it lies on the ground, according to rendered landscapes and meshes. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>normal</em>&nbsp;</td><td>the ret normal of where it is snapped. NB: if return false, not modified. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>true if <a class="el" href="a04223.html#a574">pos.z</a> has been modified (sometimes it may not find a solution).</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00211">211</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00151">_SnapToRenderedTesselation</a>, <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a05646.html#l01119">res</a>, <a class="el" href="a06725.html#l00261">snapToLandscapeCurrentTesselation()</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, and <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</a>.
+<p>
+<div class="fragment"><pre>00212 {
+00213 <span class="comment">// Get Patch Triangle Under Us</span>
+00214 CVector <a class="code" href="a04223.html#a643">res</a>;
+00215 CTrianglePatch *tri= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs</a>(pos, res);
+00216
+00217 <span class="comment">// result. NB: if not found, dot not modify.</span>
+00218 <span class="keywordflow">if</span>( tri )
+00219 {
+00220 <span class="keywordflow">if</span>(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr3">_SnapToRenderedTesselation</a>)
+00221 {
+00222 <span class="comment">// snap the position to the nearest tesselation.</span>
+00223 pos= <a class="code" href="a04223.html#a643">res</a>;
+00224
+00225 <span class="comment">// snap the position to the current rendered tesselation.</span>
+00226 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_2">snapToLandscapeCurrentTesselation</a>(pos, *tri);
+00227 }
+00228 <span class="keywordflow">else</span>
+00229 {
+00230 <span class="comment">// just snap to the accurate tile tesselation.</span>
+00231 pos= <a class="code" href="a04223.html#a643">res</a>;
+00232 }
+00233
+00234
+00235 <span class="comment">// compute the normal.</span>
+00236 normal= (tri-&gt;V1-tri-&gt;V0)^(tri-&gt;V2-tri-&gt;V0);
+00237 normal.normalize();
+00238
+00239 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00240 }
+00241 <span class="keywordflow">else</span>
+00242 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00243 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntitya9" doxytag="NL3D::CVisualCollisionEntity::snapToGround" ></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 NL3D::CVisualCollisionEntity::snapToGround </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">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>
+Snap the entity onto the ground. <a class="el" href="a04223.html#a574">pos.z</a> is modified so that it lies on the ground, according to rendered landscapes and meshes. see <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya7">setSnapToRenderedTesselation()</a> option. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude. <dl compact><dt><b>Returns:</b></dt><dd>true if <a class="el" href="a04223.html#a574">pos.z</a> has been modified (sometimes it may not find a solution).</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00087">87</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06727.html#l00053">NL3D::CVisualCollisionEntityUser::snapToGround()</a>.
+<p>
+<div class="fragment"><pre>00088 {
+00089 CVector normal;
+00090 <span class="comment">// Not optimized, but doesn't matter (one cross product is negligible).</span>
+00091 <span class="keywordflow">return</span> <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntitya9">snapToGround</a>(pos, normal);
+00092 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_2" doxytag="NL3D::CVisualCollisionEntity::snapToLandscapeCurrentTesselation" ></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::CVisualCollisionEntity::snapToLandscapeCurrentTesselation </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">CVector</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>const <a class="el" href="a03620.html">CTrianglePatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tri</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>
+snap to current rendered tesselation.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00261">261</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06730.html#l00130">NL3D::CVisualCollisionManager::_Landscape</a>, <a class="el" href="a06725.html#l00247">computeUvForPos()</a>, <a class="el" href="a06156.html#l00181">NL3D::CTrianglePatch::PatchId</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00211">snapToGround()</a>.
+<p>
+<div class="fragment"><pre>00262 {
+00263 <span class="comment">// compute UV for position.</span>
+00264 <a class="code" href="a03640.html">CUV</a> uv;
+00265 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_12">computeUvForPos</a>(tri, pos, uv);
+00266
+00267 <span class="comment">// Ask pos to landscape.</span>
+00268 CVector posLand;
+00269 posLand= <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr2">_Owner</a>-&gt;_Landscape-&gt;getTesselatedPos(tri.PatchId, uv);
+00270
+00271 <span class="comment">// just keep Z.</span>
+00272 pos.z= posLand.z;
+00273 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_3" doxytag="NL3D::CVisualCollisionEntity::testComputeLandscape" ></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::CVisualCollisionEntity::testComputeLandscape </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">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><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+test if the new position is outside the preceding setuped bbox, and then compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00403">403</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00171">_CurrentBBoxValidity</a>, <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>, <a class="el" href="a05385.html#l00091">NLMISC::CAABBox::getHalfSize()</a>, and <a class="el" href="a05384.html#l00081">NLMISC::CAABBox::include()</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>.
+<p>
+<div class="fragment"><pre>00404 {
+00405 <span class="comment">// if new position is out of the bbox surounding the entity.</span>
+00406 <span class="keywordflow">if</span>(<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a>.getHalfSize()==CVector::Null || !<a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">_CurrentBBoxValidity</a>.include(pos))
+00407 {
+00408 <span class="comment">// must recompute the data around the entity.</span>
+00409 <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_0">doComputeLandscape</a>(pos);
+00410 }
+00411 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_4" doxytag="NL3D::CVisualCollisionEntity::triangleIntersect" ></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 NL3D::CVisualCollisionEntity::triangleIntersect </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03616.html">CTriangle</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tri</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>pos0</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>pos1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>hit</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>
+Fast "2D" test of a triangle against ray P0 P1.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00366">366</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06726.html#l00149">_CeilMode</a>, <a class="el" href="a06726.html#l00150">_GroundMode</a>, <a class="el" href="a06172.html#l00051">NLMISC::CPlane::intersect()</a>, <a class="el" href="a06170.html#l00036">NLMISC::CPlane::make()</a>, <a class="el" href="a06725.html#l00336">triangleIntersect2DCeil()</a>, <a class="el" href="a06725.html#l00299">triangleIntersect2DGround()</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</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="a06725.html#l00096">getPatchTriangleUnderUs()</a>.
+<p>
+<div class="fragment"><pre>00367 {
+00368 CVector &amp;p0= tri.V0;
+00369 CVector &amp;p1= tri.V1;
+00370 CVector &amp;p2= tri.V2;
+00371
+00372 <span class="keywordtype">bool</span> ok= <span class="keyword">false</span>;
+00373 <span class="keywordflow">if</span>( <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr1">_GroundMode</a> &amp;&amp; <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_14">triangleIntersect2DGround</a>(tri, pos0) )
+00374 ok= <span class="keyword">true</span>;
+00375 <span class="keywordflow">if</span>(!ok &amp;&amp; <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityr0">_CeilMode</a> &amp;&amp; <a class="code" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_13">triangleIntersect2DCeil</a>(tri, pos0) )
+00376 ok= <span class="keyword">true</span>;
+00377 <span class="keywordflow">if</span>(!ok)
+00378 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00379
+00380
+00381 <span class="comment">// Compute the possible height.</span>
+00382 CVector tmp;
+00383 <span class="comment">// build the plane</span>
+00384 CPlane plane;
+00385 plane.make (p0, p1, p2);
+00386 <span class="comment">// intersect the vertical line with the plane.</span>
+00387 tmp= plane.intersect(pos0, pos1);
+00388
+00389 <span class="keywordtype">float</span> h= tmp.z;
+00390 <span class="comment">// Test if it would fit in the wanted field.</span>
+00391 <span class="keywordflow">if</span>(h&gt;pos1.z) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00392 <span class="keywordflow">if</span>(h&lt;pos0.z) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00393
+00394 <span class="comment">// OK!!</span>
+00395 <span class="comment">// For cache completness, ensure that X and Y don't move, take same XY than pos0</span>
+00396 hit.x= pos0.x;
+00397 hit.y= pos0.y;
+00398 hit.z= h;
+00399 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00400 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_13" doxytag="NL3D::CVisualCollisionEntity::triangleIntersect2DCeil" ></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 NL3D::CVisualCollisionEntity::triangleIntersect2DCeil </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03616.html">CTriangle</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tri</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>pos0</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00336">336</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</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="a06725.html#l00366">triangleIntersect()</a>.
+<p>
+<div class="fragment"><pre>00337 {
+00338 CVector &amp;p0= tri.V0;
+00339 CVector &amp;p1= tri.V1;
+00340 CVector &amp;p2= tri.V2;
+00341
+00342 <span class="comment">// Test if the face enclose the pos in X/Y plane.</span>
+00343 <span class="comment">// NB: compute and using a BBox to do a rapid test is not a very good idea, since it will </span>
+00344 <span class="comment">// add an overhead which is NOT negligeable compared to the following test.</span>
+00345 <span class="keywordtype">float</span> a,b,c; <span class="comment">// 2D cartesian coefficients of line in plane X/Y.</span>
+00346 <span class="comment">// Line p0-p1.</span>
+00347 a= -(p1.y-p0.y);
+00348 b= (p1.x-p0.x);
+00349 c= -(p0.x*a + p0.y*b);
+00350 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &gt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00351 <span class="comment">// Line p1-p2.</span>
+00352 a= -(p2.y-p1.y);
+00353 b= (p2.x-p1.x);
+00354 c= -(p1.x*a + p1.y*b);
+00355 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &gt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00356 <span class="comment">// Line p2-p0.</span>
+00357 a= -(p0.y-p2.y);
+00358 b= (p0.x-p2.x);
+00359 c= -(p2.x*a + p2.y*b);
+00360 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &gt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00361
+00362 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00363 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_14" doxytag="NL3D::CVisualCollisionEntity::triangleIntersect2DGround" ></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 NL3D::CVisualCollisionEntity::triangleIntersect2DGround </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03616.html">CTriangle</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tri</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>pos0</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Fast "2D" test of a triangle against ray P0 P1.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00299">299</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+References <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</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="a06725.html#l00366">triangleIntersect()</a>.
+<p>
+<div class="fragment"><pre>00300 {
+00301 CVector &amp;p0= tri.V0;
+00302 CVector &amp;p1= tri.V1;
+00303 CVector &amp;p2= tri.V2;
+00304
+00305 <span class="comment">// TestYoyo. Test for precision problems.</span>
+00306 <span class="comment">/*if( testLine(p1, p0, pos0) &amp;&amp; testLine(p2, p1, pos0) &amp;&amp; testLine(p0, p2, pos0) )</span>
+00307 <span class="comment"> {</span>
+00308 <span class="comment"> nlinfo("Found Tri For Pos: %.07f, %.07f\n P0: %.07f, %.07f\n P1: %.07f, %.07f\n P2: %.07f, %.07f",</span>
+00309 <span class="comment"> pos0.x, pos0.y, p0.x, p0.y, p1.x, p1.y, p2.x, p2.y);</span>
+00310 <span class="comment"> }*/</span>
+00311
+00312 <span class="comment">// Test if the face enclose the pos in X/Y plane.</span>
+00313 <span class="comment">// NB: compute and using a BBox to do a rapid test is not a very good idea, since it will </span>
+00314 <span class="comment">// add an overhead which is NOT negligeable compared to the following test.</span>
+00315 <span class="keywordtype">float</span> a,b,c; <span class="comment">// 2D cartesian coefficients of line in plane X/Y.</span>
+00316 <span class="comment">// Line p0-p1.</span>
+00317 a= -(p1.y-p0.y);
+00318 b= (p1.x-p0.x);
+00319 c= -(p0.x*a + p0.y*b);
+00320 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &lt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00321 <span class="comment">// Line p1-p2.</span>
+00322 a= -(p2.y-p1.y);
+00323 b= (p2.x-p1.x);
+00324 c= -(p1.x*a + p1.y*b);
+00325 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &lt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00326 <span class="comment">// Line p2-p0.</span>
+00327 a= -(p0.y-p2.y);
+00328 b= (p0.x-p2.x);
+00329 c= -(p2.x*a + p2.y*b);
+00330 <span class="keywordflow">if</span>( (a*pos0.x + b*pos0.y + c) &lt; 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00331
+00332 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00333 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityr0" doxytag="NL3D::CVisualCollisionEntity::_CeilMode" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityr0">NL3D::CVisualCollisionEntity::_CeilMode</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="a06726.html#l00149">149</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, <a class="el" href="a06726.html#l00090">getCeilMode()</a>, <a class="el" href="a06726.html#l00086">setCeilMode()</a>, and <a class="el" href="a06725.html#l00366">triangleIntersect()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_5" doxytag="NL3D::CVisualCollisionEntity::_CurrentBBoxValidity" ></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">CAABBox</a> <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_5">NL3D::CVisualCollisionEntity::_CurrentBBoxValidity</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The current BBox where we don't need to recompute the patchQuadBlocks if the entity is in.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00171">171</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>, and <a class="el" href="a06725.html#l00403">testComputeLandscape()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityr1" doxytag="NL3D::CVisualCollisionEntity::_GroundMode" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityr1">NL3D::CVisualCollisionEntity::_GroundMode</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="a06726.html#l00150">150</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, <a class="el" href="a06726.html#l00089">getGroundMode()</a>, <a class="el" href="a06726.html#l00080">setGroundMode()</a>, and <a class="el" href="a06725.html#l00366">triangleIntersect()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_6" doxytag="NL3D::CVisualCollisionEntity::_LandscapeQuadGrid" ></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="a02708.html">CLandscapeCollisionGrid</a> <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_6">NL3D::CVisualCollisionEntity::_LandscapeQuadGrid</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+A quadgrid of chainlist of tileId (<a class="el" href="a03713.html">CVisualTileDescNode</a>), which are around the entity.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00169">169</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>, <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>, and <a class="el" href="a06725.html#l00072">~CVisualCollisionEntity()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_7" doxytag="NL3D::CVisualCollisionEntity::_LastGPTPosInput" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_7">NL3D::CVisualCollisionEntity::_LastGPTPosInput</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00174">174</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_8" doxytag="NL3D::CVisualCollisionEntity::_LastGPTPosOutput" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_8">NL3D::CVisualCollisionEntity::_LastGPTPosOutput</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00175">175</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_9" doxytag="NL3D::CVisualCollisionEntity::_LastGPTTrianglePatch" ></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="a03620.html">CTrianglePatch</a> <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_9">NL3D::CVisualCollisionEntity::_LastGPTTrianglePatch</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute tiles infos around the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00176">176</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_10" doxytag="NL3D::CVisualCollisionEntity::_LastGPTValid" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_10">NL3D::CVisualCollisionEntity::_LastGPTValid</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Cache for <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_1">getPatchTriangleUnderUs()</a>.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06726.html#l00173">173</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, and <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityr2" doxytag="NL3D::CVisualCollisionEntity::_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="a03705.html#NL3D_1_1CVisualCollisionEntityr2">NL3D::CVisualCollisionEntity::_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="a06726.html#l00147">147</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_11" doxytag="NL3D::CVisualCollisionEntity::_PatchQuadBlocks" ></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="a03068.html">CPatchQuadBlock</a>*&gt; <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_11">NL3D::CVisualCollisionEntity::_PatchQuadBlocks</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Array of quadBlock which are around the entity. NB: plain vector, because not so big (ptrs). NB: reserve to a big size (64), so reallocation rarely occurs. NB: this array is sorted in ascending order (comparison of <a class="el" href="a03059.html">CPatchBlockIdent</a>).
+<p>
+Definition at line <a class="el" href="a06726.html#l00167">167</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, <a class="el" href="a06725.html#l00612">displayDebugGrid()</a>, <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>, <a class="el" href="a06725.html#l00096">getPatchTriangleUnderUs()</a>, and <a class="el" href="a06725.html#l00072">~CVisualCollisionEntity()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityr3" doxytag="NL3D::CVisualCollisionEntity::_SnapToRenderedTesselation" ></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="a03705.html#NL3D_1_1CVisualCollisionEntityr3">NL3D::CVisualCollisionEntity::_SnapToRenderedTesselation</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="a06726.html#l00151">151</a> of file <a class="el" href="a06726.html">visual_collision_entity.h</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>, <a class="el" href="a06726.html#l00098">getSnapToRenderedTesselation()</a>, <a class="el" href="a06726.html#l00097">setSnapToRenderedTesselation()</a>, and <a class="el" href="a06725.html#l00211">snapToGround()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_15" doxytag="NL3D::CVisualCollisionEntity::_StartPatchQuadBlockSize" ></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="a04558.html#a11">uint32</a> <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_15">NL3D::CVisualCollisionEntity::_StartPatchQuadBlockSize</a> = 64<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Default capacity of _PatchQuadBlocks.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00050">50</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00056">CVisualCollisionEntity()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_16" doxytag="NL3D::CVisualCollisionEntity::_TmpBlockIds" ></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"> vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_16">NL3D::CVisualCollisionEntity::_TmpBlockIds</a><code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+This is the temp array of BlockIds filled by landscape search.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00051">51</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1174_17" doxytag="NL3D::CVisualCollisionEntity::_TmpPatchQuadBlocks" ></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"> vector&lt; <a class="el" href="a03068.html">CPatchQuadBlock</a> * &gt; <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1174_17">NL3D::CVisualCollisionEntity::_TmpPatchQuadBlocks</a><code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+This is the temp array of PatchBlocks ptr.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00052">52</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1168_0" doxytag="NL3D::CVisualCollisionEntity::BBoxRadius" ></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 float <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1168_0">NL3D::CVisualCollisionEntity::BBoxRadius</a> = 10<code> [static]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+This is the radius of the bbox around the entity where we have correct collisions: 10m.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06725.html#l00048">48</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVisualCollisionEntityz1168_1" doxytag="NL3D::CVisualCollisionEntity::BBoxRadiusZ" ></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 float <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntityz1168_1">NL3D::CVisualCollisionEntity::BBoxRadiusZ</a> = 20<code> [static]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Same as BBoxRadius, but for z value. This later should be greater because of <a class="el" href="a05380.html">NLPACS</a> surface quadtree imprecision. 20m NB: Because of caching, if the <a class="el" href="a04223.html#a574">pos.z</a> passed to <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya9">snapToGround()</a> is outside of the currentBBox with BBoxRadiuZ/2 (=&gt; 10m), then the bbox is recomputed. Hence, this actually means that a pos is checked with patchs that are at least at +- 10m in altitude.
+<p>
+Definition at line <a class="el" href="a06725.html#l00049">49</a> of file <a class="el" href="a06725.html">visual_collision_entity.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06725.html#l00414">doComputeLandscape()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06726.html">visual_collision_entity.h</a><li><a class="el" href="a06725.html">visual_collision_entity.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:26:34 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>