aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03057.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a03057.html')
-rw-r--r--docs/doxygen/nel/a03057.html16077
1 files changed, 16077 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03057.html b/docs/doxygen/nel/a03057.html
new file mode 100644
index 00000000..5ec5a37e
--- /dev/null
+++ b/docs/doxygen/nel/a03057.html
@@ -0,0 +1,16077 @@
+<!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::CPatch 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::CPatch Class Reference</h1><code>#include &lt;<a class="el" href="a06156.html">patch.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A landscape patch. QuadPatch layout (same notations as 3ds Max SDK).<p>
+A---&gt; ad ---- da &lt;---D | | | | v v ab ia id dc<p>
+| | | |<p>
+ba ib ic cd ^ ^ | | | | B---&gt; bc ---- cb &lt;---C<p>
+NB: Patch 1x1 or 1xX are illegal: lot of problem: rectangular geomoprh, Son0 and Son1 must be setup as tile at beginning ...<p>
+NB: Edges number are:<ul>
+<li>0: AB.</li><li>1: BC.</li><li>2: CD.</li><li>3: DA.</li></ul>
+<p>
+<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00302">302</a> of file <a class="el" href="a06156.html">patch.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Lumels methods</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_0">copyTileFlagsFromPatch</a> (const <a class="el" href="a03057.html">CPatch</a> *<a class="el" href="a04223.html#a652">src</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap</a> (const <a class="el" href="a04558.html#a7">uint8</a> *pLumel)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_2">resetCompressedLumels</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_3">setupColorsFromTileFlags</a> (const <a class="el" href="a03337.html">NLMISC::CRGBA</a> colors[4])</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debug coloring <a href="#NL3D_1_1CPatchz640_3"></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="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap</a> (<a class="el" href="a04558.html#a7">uint8</a> *pShadow)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (const <a class="el" href="a04558.html#a7">uint8</a> *original, const <a class="el" href="a04558.html#a7">uint8</a> *unCompressed, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a632">width</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a633">height</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (<a class="el" href="a04558.html#a7">uint8</a> *dest, const <a class="el" href="a04558.html#a7">uint8</a> *source, <a class="el" href="a04558.html#a7">uint8</a> alpha0, <a class="el" href="a04558.html#a7">uint8</a> alpha1)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (<a class="el" href="a04558.html#a7">uint8</a> *dest, const <a class="el" href="a04558.html#a7">uint8</a> *<a class="el" href="a04223.html#a652">src</a>)</td></tr>
+
+<tr><td colspan=2><br><h2>[NOHEADER]</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> corner) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_1">setCornerSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> corner, bool smooth)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap. <a href="#NL3D_1_1CPatchz637_2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Put here for packing with NoiseRotation. <a href="#NL3D_1_1CPatchz637_3"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>RenderList mgt.</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> { <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> = 0,
+<a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>,
+<a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_3">appendFaceToTileRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *fv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_5">appendNearVertexToRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tileMat, <a class="el" href="a03481.html">CTessNearVertex</a> *nv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_6">appendTileMaterialToRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tm)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a> (<a class="el" href="a03475.html">CTessBlock</a> &amp;block)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_10">extendTessBlockWithEndPos</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_11">getNumTessBlock</a> (<a class="el" href="a03040.html">CParamCoord</a> pc, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> &amp;<a class="el" href="a04223.html#a581">type</a>, <a class="el" href="a04558.html#a15">uint</a> &amp;numtb)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_13">removeFaceFromRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_14">removeFaceFromTileRenderList</a> (<a class="el" href="a03476.html">CTessFace</a> *face)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_15">removeFarVertexFromRenderList</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *fv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_16">removeNearVertexFromRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tileMat, <a class="el" href="a03481.html">CTessNearVertex</a> *nv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_17">removeTileMaterialFromRenderList</a> (<a class="el" href="a03530.html">CTileMaterial</a> *tm)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz663_18">resetMasterBlock</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Dynamic Lighting Management</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a ref count to the DLMContext, creating it if necessary. <a href="#NL3D_1_1CPatchz675_0"></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="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a577">count</a>=1)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dec a ref count to the DLMContext, deleting it if refCount== 0. <a href="#NL3D_1_1CPatchz675_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03060.html">CPatchDLMContext</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a></td></tr>
+
+<tr><td colspan=2><br><h2>[NOHEADER]</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz669_0">linkTessFaceWithEdge</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv0, const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv1, <a class="el" href="a03476.html">CTessFace</a> *linkTo)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a> [4]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The 4 neighbors zone of this patch (setuped at <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a> time). NB: NULL if zone not loaded, or if no patch near us. <a href="#NL3D_1_1CPatchz669_1"></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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha0">averageTesselationVertices</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind</a> (<a class="el" href="a03058.html">CBindInfo</a> Edges[4], bool rebind)</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="a03057.html#NL3D_1_1CPatcha2">buildBBox</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build the bbox of the patch, according to ctrl points, and displacement map max value. <a href="#NL3D_1_1CPatcha2"></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="a03057.html#NL3D_1_1CPatcha3">compile</a> (<a class="el" href="a03730.html">CZone</a> *<a class="el" href="a04223.html#a574">z</a>, <a class="el" href="a04558.html#a15">uint</a> patchId, <a class="el" href="a04558.html#a7">uint8</a> orderS, <a class="el" href="a04558.html#a7">uint8</a> orderT, <a class="el" href="a03482.html">CTessVertex</a> *baseVertices[4], float errorSize=0)</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="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </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="a03057.html#NL3D_1_1CPatcha5">computeVertex</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CPatcha6"></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="a03057.html#NL3D_1_1CPatcha7">deleteTileUvs</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha8">forceMergeAtTileLevel</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For changing TileMaxSubdivision. force tesselation to be under tile. <a href="#NL3D_1_1CPatcha8"></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="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a> (<a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03058.html">CBindInfo</a> &amp;neighborEdge) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return neighborhood information. <a href="#NL3D_1_1CPatcha9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha10">getCornerVertex</a> (<a class="el" href="a04558.html#a15">uint</a> corner)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha11">getErrorSize</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha12">getFar0</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha13">getFar1</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02702.html">CLandscape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the landscape in which is placed this patch. <a href="#NL3D_1_1CPatcha14"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha15">getOrderForEdge</a> (<a class="el" href="a04558.html#a6">sint8</a> edge) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha18">getPatchId</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha19">getTileMaterialRefCount</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of TileMaterial created in this Patch. <a href="#NL3D_1_1CPatcha19"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha20">getZone</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="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha22">recreateTileUvs</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha23">refineAll</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Refine this patch. Even if clipped. Refine all nodes. <a href="#NL3D_1_1CPatcha23"></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="a03057.html#NL3D_1_1CPatcha24">refreshTesselationGeometry</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha25">release</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op. <a href="#NL3D_1_1CPatcha25"></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="a03057.html#NL3D_1_1CPatcha26">resetRenderFar</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha27">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;f)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha28">unbind</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha29">unpack</a> (<a class="el" href="a02258.html">CBezierPatch</a> &amp;p) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02258.html">CBezierPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcha31">~CPatch</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dtor <a href="#NL3D_1_1CPatcha31"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Subdivision / ForCollision.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_0">addPatchBlocksInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;paBlockIds) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_1">addTrianglesInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tileTessLevel) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_2">appendTessellationLeaves</a> (std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;leaves) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz643_3">fillPatchQuadBlock</a> (<a class="el" href="a03068.html">CPatchQuadBlock</a> &amp;quadBlock) const </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="a03057.html#NL3D_1_1CPatchz643_4">getTesselatedPos</a> (<a class="el" href="a03640.html">CUV</a> uv) const </td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">VB Allocator mgt.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_1">allocateVBAndFaceVectorFar1Only</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_2">debugAllocationMarkIndices</a> (<a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_4">deleteVBAndFaceVectorFar1Only</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_8">fillVBFar0Only</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_9">fillVBFar1Only</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_10">fillVBFarsDLMUvOnly</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_11">fillVBIfVisible</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz649_12">recreateTessBlockFaceVector</a> (<a class="el" href="a03475.html">CTessBlock</a> &amp;block)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Lightmap get interface.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_0">appendTileLightInfluences</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv, std::vector&lt; <a class="el" href="a03092.html">CPointLightInfluence</a> &gt; &amp;pointLightList) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_1">computeCurrentTLILightmapDiv2</a> (<a class="el" href="a03337.html">NLMISC::CRGBA</a> *array) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz645_2">getLumel</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lumel under the position. <a href="#NL3D_1_1CPatchz645_2"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Dynamic Lighting Management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz657_0">beginDLMLighting</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz657_1">endDLMLighting</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz657_2">processDLMLight</a> (<a class="el" href="a03065.html">CPatchDLMPointLight</a> &amp;pl)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Render</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_0">computeSoftwareGeomorphAndAlpha</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_1">getNextFar0ToRdr</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_2">getNextFar1ToRdr</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_3">preRender</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">preRender this patch. Build Max faces / pass etc... <a href="#NL3D_1_1CPatchz639_3"></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="a03057.html#NL3D_1_1CPatchz639_4">renderFar0</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Render this patch, if not clipped. Call PatchCurrentDriver-&gt;renderSimpleTriangles(). <a href="#NL3D_1_1CPatchz639_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_5">renderFar1</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_6">updateClipPatchVB</a> (bool renderClipped)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz639_7">updateTextureFarOnly</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">MicroVegetation</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz651_0">deleteAllVegetableIgs</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete any vegetable Ig still existing in this patch. <a href="#NL3D_1_1CPatchz651_0"></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="a03057.html#NL3D_1_1CPatchz651_1">recreateAllVegetableIgs</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recreate any vegetable block (as possible) in this patch. (usefull for edition). <a href="#NL3D_1_1CPatchz651_1"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">UpdateLighting Management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_0">getNextNearUL</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, get Next (CiruclarList). If ==this, then list is empty. <a href="#NL3D_1_1CPatchz655_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_1">getNumNearTessBlocks</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the number of Near TessBlocks. Actually OrderS/2*OrderT/2. <a href="#NL3D_1_1CPatchz655_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_2">linkBeforeNearUL</a> (<a class="el" href="a03057.html">CPatch</a> *patchNext)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL. <a href="#NL3D_1_1CPatchz655_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="a03057.html#NL3D_1_1CPatchz655_3">unlinkNearUL</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For lighting update, unlink (CiruclarList). <a href="#NL3D_1_1CPatchz655_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz655_4">updateTessBlockLighting</a> (<a class="el" href="a04558.html#a15">uint</a> numTb)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Smooth flags methods</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> edge) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz641_1">setSmoothFlag</a> (<a class="el" href="a04558.html#a15">uint</a> edge, bool flag)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Tiles get interface.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03522.html">CTileElement</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz647_0">getTileElement</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lumel under the position. <a href="#NL3D_1_1CPatchz647_0"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">TileLightInfluences</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz653_0">resetTileLightInfluences</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho1">Interiors</a> [4]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho2">Tangents</a> [8]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03520.html">CTileColor</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03527.html">CTileLightInfluence</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03522.html">CTileElement</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03663.html">CVector3s</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatcho6">Vertices</a> [4]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The patch coordinates (see <a class="el" href="a02258.html">CBezierPatch</a>). <a href="#NL3D_1_1CPatcho6"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
+<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a> (<a class="el" href="a04558.html#a14">sint</a> edge, <a class="el" href="a03476.html">CTessFace</a> *to)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd1">checkCreateVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd2">checkCreateVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd3">checkDeleteVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd4">checkDeleteVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd6">checkFillVertexVBNear</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd7">computeDefaultErrorSize</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd10">computeGeomorphTileVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a> (const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;patchSphere, <a class="el" href="a04558.html#a14">sint</a> &amp;newFar0, <a class="el" href="a04558.html#a14">sint</a> &amp;newFar1)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a> (<a class="el" href="a04558.html#a15">uint</a> &amp;numtb, <a class="el" href="a04558.html#a15">uint</a> &amp;numtm, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd14">createFaceVectorFar0OrTile</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd15">createFaceVectorFar1</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, <a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd17">debugAllocationMarkIndicesNearList</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList, <a class="el" href="a04558.html#a15">uint</a> marker)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd18">deleteFaceVectorFar0OrTile</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd19">deleteFaceVectorFar1</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a> (<a class="el" href="a03480.html">CTessFarVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a> (<a class="el" href="a03481.html">CTessNearVertex</a> *pVert)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a> (<a class="el" href="a04558.html#a14">sint</a> edge) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd27">getRootVertexForEdge</a> (<a class="el" href="a04558.html#a14">sint</a> edge) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd28">makeRoots</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a> (<a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;vertList, bool alloc)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a> (bool alloc)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Subdivision private.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;paBlockIds, const <a class="el" href="a02258.html">CBezierPatch</a> &amp;pa, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> s1, <a class="el" href="a04558.html#a7">uint8</a> t0, <a class="el" href="a04558.html#a7">uint8</a> t1) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_1">addTileTrianglesInBBox</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tessLevel, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> t0) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a> (<a class="el" href="a02706.html">CPatchIdent</a> paId, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbox, std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;triangles, <a class="el" href="a04558.html#a7">uint8</a> tessLevel, const <a class="el" href="a02258.html">CBezierPatch</a> &amp;pa, <a class="el" href="a04558.html#a7">uint8</a> s0, <a class="el" href="a04558.html#a7">uint8</a> s1, <a class="el" href="a04558.html#a7">uint8</a> t0, <a class="el" href="a04558.html#a7">uint8</a> t1) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a> (const <a class="el" href="a02258.html">CBezierPatch</a> &amp;p, <a class="el" href="a02156.html">CAABBox</a> &amp;ret) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">build a bbox from the convex hull of a bezier patch, enlarged with noise. <a href="#NL3D_1_1CPatchz668_3"></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="a03057.html#NL3D_1_1CPatchz668_4">computeVertexButCorner</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, bool &amp;onCorner) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex()</a>. <a href="#NL3D_1_1CPatchz668_4"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_0">addTileLightmapEdgeWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_1">addTileLightmapPixelWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_2">addTileLightmapWithTLI</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *lightText)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_5">computeTileLightmapAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_7">computeTileLightmapEdgeAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_8">computeTileLightmapEdgePrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_10">computeTileLightmapPixelAroundCorner</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;stIn, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, bool lookAround)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_12">computeTileLightmapPixelPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_13">computeTileLightmapPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_14">CPatch::getCurrentTLIColor</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a573">y</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> corners[4])</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_16">getTileLightMap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03069.html">CPatchRdrPass</a> *&amp;rdrpass)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_17">getTileLightMapUvInfo</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03128.html">CVector</a> &amp;uvScaleBias)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> corners[4])</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_19">modulateTileLightmapEdgeWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> edge, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>, bool inverse)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_20">modulateTileLightmapPixelWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_21">modulateTileLightmapWithTileColors</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a03337.html">NLMISC::CRGBA</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz666_22">releaseTileLightMap</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_1">computeDisplaceEdgeSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a14">sint</a> &amp;ts, <a class="el" href="a04558.html#a14">sint</a> &amp;tt, <a class="el" href="a04558.html#a14">sint</a> &amp;ms, <a class="el" href="a04558.html#a14">sint</a> &amp;mt) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a> (<a class="el" href="a04558.html#a14">sint</a> ts, <a class="el" href="a04558.html#a14">sint</a> tt, <a class="el" href="a04558.html#a14">sint</a> ms, <a class="el" href="a04558.html#a14">sint</a> mt) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_6">computeDisplaceRawOnNeighbor</a> (float sTile, float tTile, float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz670_7">computeNoise</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a03128.html">CVector</a> &amp;displace) const </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="a03057.html#NL3D_1_1CPatchz670_8">computeNormalCornerSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </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="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderX, <a class="el" href="a04558.html#a6">sint8</a> smoothBorderY) const </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="a03057.html#NL3D_1_1CPatchz670_10">computeNormalOnNeighbor</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a15">uint</a> edgeExclude) const </td></tr>
+
+<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a> (<a class="el" href="a04558.html#a15">uint</a> numTb, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. <a href="#NL3D_1_1CPatchz671_0"></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="a03057.html#NL3D_1_1CPatchz671_1">generateTileVegetable</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *vegetIg, <a class="el" href="a04558.html#a15">uint</a> distType, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a02719.html">CLandscapeVegetableBlockCreateContext</a> &amp;vbCreateCtx)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. <a href="#NL3D_1_1CPatchz671_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz671_2">getTileLumelmapPixelPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a627">t</a>, <a class="el" href="a04558.html#a7">uint8</a> &amp;dest) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz671_3">getTileLumelmapPrecomputed</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, <a class="el" href="a04558.html#a7">uint8</a> *dest, <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a582">stride</a>)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. <a href="#NL3D_1_1CPatchz671_3"></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="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a> (<a class="el" href="a04558.html#a15">uint</a> numTb)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist <a href="#NL3D_1_1CPatchz671_4"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Texture mgt.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz665_0">getTileRenderPass</a> (<a class="el" href="a04558.html#a14">sint</a> tileId, <a class="el" href="a04558.html#a14">sint</a> pass)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz665_1">getTileUvInfo</a> (<a class="el" href="a04558.html#a14">sint</a> tileId, <a class="el" href="a04558.html#a14">sint</a> pass, bool <a class="el" href="a04223.html#a663">alpha</a>, <a class="el" href="a04558.html#a7">uint8</a> &amp;orient, <a class="el" href="a03128.html">CVector</a> &amp;uvScaleBias, bool &amp;is256x256, <a class="el" href="a04558.html#a7">uint8</a> &amp;uvOff)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03069.html">CPatchRdrPass</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03480.html">CTessFarVertex</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr4">BaseFarVertices</a> [4]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a> [4]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr7">ExcludeFromRefineAll</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr8">Far0</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr13">Far1</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr18">Flags</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr23">Son0</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr24">Son1</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr25">SquareLimitLevel</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03730.html">CZone</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchr29">Zone</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">UpdateLighting Management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Block renders.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03475.html">CTessBlock</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03000.html">NLMISC::CObjectVector</a>&lt; <a class="el" href="a03475.html">CTessBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Vegetables.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">list of vegetable clipBlocks, created/destroyed at same time as TessBlocks. <a href="#NL3D_1_1CPatchz661_0"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv0">_Version</a> = 7</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02258.html">CBezierPatch</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv1">CachePatch</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a> = NULL</td></tr>
+
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03057.html#NL3D_1_1CPatchn3">CZone</a></td></tr>
+
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchz663_0" doxytag="NL3D::CPatch::TFarVertType" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> enum <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">NL3D::CPatch::TFarVertType</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0" doxytag="FVMasterBlock" ></a>FVMasterBlock</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1" doxytag="FVTessBlock" ></a>FVTessBlock</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2" doxytag="FVTessBlockEdge" ></a>FVTessBlockEdge</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00931">931</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, and <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00931 {<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>=0, <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>, <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>};
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatcha6" doxytag="NL3D::CPatch::CPatch" ></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::CPatch::CPatch </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00061">61</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06156.html#l00872">_NextRdrFar0</a>, <a class="el" href="a06156.html#l00874">_NextRdrFar1</a>, <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06156.html#l00807">ExcludeFromRefineAll</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06491.html#l00130">NL3D::CTessBlock::resetClip()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>.
+<p>
+<div class="fragment"><pre>00062 {
+00063 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= NULL;
+00064 <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>=0;
+00065 <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>=0;
+00066 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>=NULL;
+00067 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>=NULL;
+00068 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>=0;
+00069 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>= 0;
+00070
+00071 <span class="comment">// for Pacs process. By default, false.</span>
+00072 <a class="code" href="a03057.html#NL3D_1_1CPatchr7">ExcludeFromRefineAll</a>= <span class="keyword">false</span>;
+00073
+00074 <span class="comment">// Init Passes.</span>
+00075 <span class="comment">// DO NOT FILL Patch here, because of operator= problem. do it in compile().</span>
+00076 <span class="comment">// By default, RdrPasses are NULL.</span>
+00077
+00078 <span class="comment">// To force computation of texture info on next preRender().</span>
+00079 <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= -1;
+00080 <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= -1;
+00081
+00082 <span class="comment">// Default: not binded.</span>
+00083 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[0]= NULL;
+00084 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[1]= NULL;
+00085 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[2]= NULL;
+00086 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[3]= NULL;
+00087 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a>= 0;
+00088 <span class="comment">// No smooth by default.</span>
+00089 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>= 0;
+00090
+00091 <span class="comment">// MasterBlock never clipped.</span>
+00092 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.resetClip();
+00093
+00094 <span class="comment">// Init UL circular list to NULL (not compiled)</span>
+00095 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= NULL;
+00096 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= NULL;
+00097
+00098 <span class="comment">// Dynamic LightMap</span>
+00099 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
+00100 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>= 0;
+00101
+00102 <span class="comment">// Render Passes</span>
+00103 <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>= NULL;
+00104 <a class="code" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a>= NULL;
+00105 <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>= NULL;
+00106 <a class="code" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a>= NULL;
+00107 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha31" doxytag="NL3D::CPatch::~CPatch" ></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::CPatch::~<a class="el" href="a03057.html">CPatch</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>
+dtor
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00109">109</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00115">release()</a>.
+<p>
+<div class="fragment"><pre>00110 {
+00111 <a class="code" href="a03057.html#NL3D_1_1CPatcha25">release</a>();
+00112 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchz643_0" doxytag="NL3D::CPatch::addPatchBlocksInBBox" ></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::CPatch::addPatchBlocksInBBox </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>paBlockIds</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Add <a class="el" href="a03059.html">CPatchBlockIdent</a> to <a class="el" href="a03059.html">CPatchBlockIdent</a> array which intersect the bbox. NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>patchId</em>&nbsp;</td><td>the id of this patch, used to fill PatchBlockIdent. </td></tr>
+ <tr><td valign=top><em>bbox</em>&nbsp;</td><td>the bbox to test against. </td></tr>
+ <tr><td valign=top><em>paBlockIds</em>&nbsp;</td><td>array to be filled (no clear performed, elements added).</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00504">504</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00514">addPatchBlocksInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l02327">NL3D::CLandscape::addPatchBlocksInBBox()</a>.
+<p>
+<div class="fragment"><pre>00505 {
+00506 CBezierPatch &amp;bpatch= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00507
+00508 <span class="comment">// call with the whole root patch.</span>
+00509 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, bpatch, 0, OrderS, 0, OrderT);
+00510 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz668_0" doxytag="NL3D::CPatch::addPatchBlocksInBBoxRecurs" ></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::CPatch::addPatchBlocksInBBoxRecurs </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03059.html">CPatchBlockIdent</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>paBlockIds</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pa</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t1</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+recurse method of addPatchBlocksInBBox.
+<p>
+Definition at line <a class="el" href="a06155.html#l00514">514</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a06156.html#l00064">NL_PATCH_BLOCK_MAX_QUAD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderS</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderT</a>, <a class="el" href="a06156.html#l00197">NL3D::CPatchBlockIdent::PatchId</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="a05478.html#l00391">NL3D::CBezierPatch::subdivideS()</a>, <a class="el" href="a05478.html#l00422">NL3D::CBezierPatch::subdivideT()</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="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00504">addPatchBlocksInBBox()</a>.
+<p>
+<div class="fragment"><pre>00516 {
+00517 <a class="code" href="a04558.html#a7">uint8</a> lenS=s1-s0, lenT=t1-t0;
+00518 <a class="code" href="a04199.html#a6">nlassert</a>(lenS&gt;0);
+00519 <a class="code" href="a04199.html#a6">nlassert</a>(lenT&gt;0);
+00520
+00521 <span class="comment">// compute and compare bbox of the subdivision patch against request bbox.</span>
+00522 <span class="comment">//========================</span>
+00523 <span class="comment">// NB: this compute includes possible noise.</span>
+00524 CAABBox paBBox;
+00525 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(pa, paBBox);
+00526 <span class="comment">// if do not intersect, stop here.</span>
+00527 <span class="keywordflow">if</span>( !paBBox.intersect(bbox) )
+00528 <span class="keywordflow">return</span>;
+00529 <span class="comment">// else if at CPatchQuadBlock tile level, then just add this Id.</span>
+00530 <span class="comment">//========================</span>
+00531 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( lenS&lt;=<a class="code" href="a04733.html#a9">NL_PATCH_BLOCK_MAX_QUAD</a> &amp;&amp; lenT&lt;=<a class="code" href="a04733.html#a9">NL_PATCH_BLOCK_MAX_QUAD</a> )
+00532 {
+00533 <span class="comment">// Add this PatchBlock desctiptor to the list.</span>
+00534 CPatchBlockIdent pbId;
+00535 <span class="comment">// Fill struct from this and result of recursion.</span>
+00536 pbId.PatchId= paId;
+00537 pbId.OrderS= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00538 pbId.OrderT= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00539 pbId.S0= s0;
+00540 pbId.S1= s1;
+00541 pbId.T0= t0;
+00542 pbId.T1= t1;
+00543 <span class="comment">// Add to list.</span>
+00544 paBlockIds.push_back(pbId);
+00545 }
+00546 <span class="comment">// else subdiv and reccurs.</span>
+00547 <span class="comment">//========================</span>
+00548 <span class="keywordflow">else</span>
+00549 {
+00550 <span class="comment">// Subdivide along the bigger side.</span>
+00551 <span class="keywordflow">if</span>(lenS&gt;lenT)
+00552 {
+00553 <span class="comment">// subdivide.</span>
+00554 CBezierPatch left, right;
+00555 pa.subdivideS(left, right);
+00556 <a class="code" href="a04558.html#a7">uint8</a> sMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)s0+(<a class="code" href="a04558.html#a15">uint</a>)s1) /2 );
+00557 <span class="comment">// recurs left.</span>
+00558 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, left, s0, sMiddle, t0, t1);
+00559 <span class="comment">// recurs right.</span>
+00560 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, right, sMiddle, s1, t0, t1);
+00561 }
+00562 <span class="keywordflow">else</span>
+00563 {
+00564 <span class="comment">// subdivide.</span>
+00565 CBezierPatch top, bottom;
+00566 pa.subdivideT(top, bottom);
+00567 <a class="code" href="a04558.html#a7">uint8</a> tMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)t0+(<a class="code" href="a04558.html#a15">uint</a>)t1) /2 );
+00568 <span class="comment">// recurs top.</span>
+00569 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, top, s0, s1, t0, tMiddle);
+00570 <span class="comment">// recurs bottom.</span>
+00571 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_0">addPatchBlocksInBBoxRecurs</a>(paId, bbox, paBlockIds, bottom, s0, s1, tMiddle, t1);
+00572 }
+00573 }
+00574
+00575 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz675_0" doxytag="NL3D::CPatch::addRefDLMContext" ></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::CPatch::addRefDLMContext </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Add a ref count to the DLMContext, creating it if necessary.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01950">1950</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, and <a class="el" href="a06157.html#l02021">processDLMLight()</a>.
+<p>
+<div class="fragment"><pre>01951 {
+01952 <span class="comment">// the patch must be compiled.</span>
+01953 <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
+01954
+01955 <span class="comment">// if 0, create the context.</span>
+01956 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>==0)
+01957 {
+01958 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext==NULL);
+01959 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= <span class="keyword">new</span> CPatchDLMContext;
+01960 <span class="comment">// init now the context.</span>
+01961 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;generate(<span class="keyword">this</span>, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTextureDLM(), <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getPatchDLMContextList());
+01962
+01963 <span class="comment">// If the patch is visible, it may have Far Vertices created, </span>
+01964 <span class="comment">// hence, we must refill them with good DLM Uvs.</span>
+01965 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+01966 {
+01967 <span class="comment">// setup DLM Uv with new _DLMContext</span>
+01968 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_10">fillVBFarsDLMUvOnly</a>();
+01969 }
+01970 }
+01971
+01972 <span class="comment">// incRef.</span>
+01973 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>++;
+01974 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_1" doxytag="NL3D::CPatch::addRefTessBlocks" ></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::CPatch::addRefTessBlocks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00611">611</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06698.html#l00607">NL3D::CVegetableManager::createClipBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03394">NL3D::CLandscape::linkPatchToNearUL()</a>, <a class="el" href="a06156.html#l00098">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>, <a class="el" href="a06156.html#l00097">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CTessBlock &gt;::resize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, and <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>.
+<p>
+<div class="fragment"><pre>00612 {
+00613 <a class="code" href="a04558.html#a15">uint</a> i;
+00614
+00615 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>++;
+00616 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()==0)
+00617 {
+00618 <span class="comment">// Allocate the tessblocks.</span>
+00619 <span class="comment">//==========</span>
+00620
+00621 <a class="code" href="a04199.html#a6">nlassert</a>(NL3D_TESSBLOCK_TILESIZE==4);
+00622 <span class="comment">// A tessblock is 2*2 tiles.</span>
+00623 <a class="code" href="a04558.html#a14">sint</a> os= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
+00624 <a class="code" href="a04558.html#a14">sint</a> ot= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1;
+00625 <a class="code" href="a04199.html#a6">nlassert</a>(os&gt;0);
+00626 <a class="code" href="a04199.html#a6">nlassert</a>(ot&gt;0);
+00627 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(os*ot);
+00628 <span class="comment">// init all tessBlocks with the Patch ptr.</span>
+00629 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00630 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].init(<span class="keyword">this</span>);
+00631
+00632
+00633 <span class="comment">// Vegetable management</span>
+00634 <span class="comment">//==========</span>
+00635 CVegetableManager *vegetableManager= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager;
+00636
+00637 <span class="comment">// Create ClipBlocks.</span>
+00638 <a class="code" href="a04558.html#a15">uint</a> nTbPerCb= <a class="code" href="a04733.html#a13">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>;
+00639 <a class="code" href="a04558.html#a15">uint</a> wCB= (os + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
+00640 <a class="code" href="a04558.html#a15">uint</a> hCB= (ot + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
+00641 <a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.resize(wCB * hCB);
+00642 <span class="comment">// allocate ClipBlocks</span>
+00643 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.size(); i++)
+00644 {
+00645 <a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>[i]= vegetableManager-&gt;createClipBlock();
+00646 }
+00647
+00648
+00649 <span class="comment">// updateLighting management.</span>
+00650 <span class="comment">//==========</span>
+00651 <span class="comment">// append patch for Near updateLighting, since TessBlock lightmap may/will exist.</span>
+00652 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;linkPatchToNearUL(<span class="keyword">this</span>);
+00653
+00654 }
+00655 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_0" doxytag="NL3D::CPatch::addTileLightmapEdgeWithTLI" ></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::CPatch::addTileLightmapEdgeWithTLI </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>inverse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01758">1758</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
+<p>
+<div class="fragment"><pre>01759 {
+01760 <span class="comment">// compute colors ar corners of the tile.</span>
+01761 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+01762 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
+01763
+01764 <span class="comment">// get coordinate according to edge.</span>
+01765 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
+01766 <span class="keywordflow">switch</span>(edge)
+01767 {
+01768 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
+01769 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+01770 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+01771 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
+01772 };
+01773
+01774 <span class="comment">// For all lumel of the edge, bilinear.</span>
+01775 <a class="code" href="a04558.html#a15">uint</a> i;
+01776 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
+01777 {
+01778 <span class="comment">// if vertical edge</span>
+01779 <span class="keywordflow">if</span>( (edge&amp;1)==0 ) <a class="code" href="a04223.html#a573">y</a>= i;
+01780 <span class="comment">// else horizontal edge</span>
+01781 <span class="keywordflow">else</span> <a class="code" href="a04223.html#a572">x</a>= i;
+01782
+01783 <span class="comment">// manage inverse.</span>
+01784 <a class="code" href="a04558.html#a15">uint</a> where;
+01785 <span class="keywordflow">if</span>(inverse) where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
+01786 <span class="keywordflow">else</span> where= i;
+01787 <span class="comment">// compute this pixel, and modulate</span>
+01788 <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, x, y, dest[where*stride]);
+01789 }
+01790 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_1" doxytag="NL3D::CPatch::addTileLightmapPixelWithTLI" ></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::CPatch::addTileLightmapPixelWithTLI </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01793">1793</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
+<p>
+<div class="fragment"><pre>01794 {
+01795 <span class="comment">// compute colors ar corners of the tile.</span>
+01796 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+01797 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
+01798
+01799 <span class="comment">// compute this pixel, and modulate</span>
+01800 <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, s, t, *dest);
+01801 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_2" doxytag="NL3D::CPatch::addTileLightmapWithTLI" ></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::CPatch::addTileLightmapWithTLI </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01739">1739</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00442">NL3D::bilinearColorDiv2AndAdd()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
+<p>
+<div class="fragment"><pre>01740 {
+01741 <span class="comment">// compute colors ar corners of the tile.</span>
+01742 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+01743 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_15">getCurrentTileTLIColors</a>(ts, tt, corners);
+01744
+01745 <span class="comment">// Bilinear accross the tile, and add to dest.</span>
+01746 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+01747 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
+01748 {
+01749 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
+01750 {
+01751 <span class="comment">// compute this pixel, and add</span>
+01752 <a class="code" href="a05363.html#a445">bilinearColorDiv2AndAdd</a>(corners, x, y, dest[y*stride + x]);
+01753 }
+01754 }
+01755 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz668_1" doxytag="NL3D::CPatch::addTileTrianglesInBBox" ></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::CPatch::addTileTrianglesInBBox </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>triangles</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tessLevel</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t0</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+called by <a class="el" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs()</a>. effective fill the array of triangles from 1 tile at tile coordinates s0,t0. depending of tessLevel (0,1,2), 2, 8 or 32 triangles are added. (2*2m, 1*1*m or 0.5*0.5m). NB: only triangles of quad included in the bbox are added.
+<p>
+Definition at line <a class="el" href="a06155.html#l00335">335</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00181">NL3D::CTrianglePatch::PatchId</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</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>, <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>
+Referenced by <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>.
+<p>
+<div class="fragment"><pre>00336 {
+00337 <a class="code" href="a04199.html#a6">nlassert</a>(s0&lt;OrderS);
+00338 <a class="code" href="a04199.html#a6">nlassert</a>(t0&lt;OrderT);
+00339 <a class="code" href="a04199.html#a6">nlassert</a>(tessLevel&lt;=2);
+00340 <a class="code" href="a04558.html#a15">uint</a> tessLen= 1&lt;&lt;tessLevel;
+00341
+00342 <span class="comment">// some preca.</span>
+00343 <span class="keywordtype">float</span> startS0= (<span class="keywordtype">float</span>)s0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
+00344 <span class="keywordtype">float</span> startT0= (<span class="keywordtype">float</span>)t0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
+00345 <span class="keywordtype">float</span> ds= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*tessLen);
+00346 <span class="keywordtype">float</span> dt= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*tessLen);
+00347
+00348 <span class="comment">// Parse all quads.</span>
+00349 <a class="code" href="a04558.html#a15">uint</a> sl,tl;
+00350 <span class="keywordflow">for</span>(tl=0; tl&lt;tessLen; tl++)
+00351 {
+00352 <span class="keywordtype">float</span> fs0, fs1, ft0, ft1;
+00353 <span class="comment">// compute t patch coordinates.</span>
+00354 ft0= startT0 + (<span class="keywordtype">float</span>)tl * dt ;
+00355 ft1= ft0 + dt;
+00356 <span class="keywordflow">for</span>(sl=0; sl&lt;tessLen; sl++)
+00357 {
+00358 <span class="comment">// compute s patch coordinates.</span>
+00359 fs0= startS0 + (<span class="keywordtype">float</span>)sl * ds ;
+00360 fs1= fs0 + ds;
+00361
+00362 <span class="comment">// Compute Quad vectors (in CCW).</span>
+00363 CVector p0, p1, p2, p3;
+00364 CUV uv0, uv1, uv2, uv3;
+00365 uv0.U= fs0; uv0.V= ft0;
+00366 uv1.U= fs0; uv1.V= ft1;
+00367 uv2.U= fs1; uv2.V= ft1;
+00368 uv3.U= fs1; uv3.V= ft0;
+00369 <span class="comment">// evaluate patch (with noise). (NB: because of cache, patch decompression cost nothing).</span>
+00370 p0= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv0.U, uv0.V);
+00371 p1= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv1.U, uv1.V);
+00372 p2= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv2.U, uv2.V);
+00373 p3= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(uv3.U, uv3.V);
+00374
+00375 <span class="comment">// build the bbox of this quad, and test with request bbox.</span>
+00376 CAABBox quadBBox;
+00377 quadBBox.setCenter(p0);
+00378 quadBBox.extend(p1);
+00379 quadBBox.extend(p2);
+00380 quadBBox.extend(p3);
+00381
+00382 <span class="comment">// insert only if intersect with the bbox.</span>
+00383 <span class="keywordflow">if</span>(quadBBox.intersect(bbox))
+00384 {
+00385 <span class="comment">// build triangles (in CCW).</span>
+00386 CTrianglePatch tri;
+00387 tri.PatchId= paId;
+00388
+00389 <span class="comment">// first tri.</span>
+00390 tri.V0= p0; tri.V1= p1; tri.V2= p2;
+00391 tri.Uv0= uv0; tri.Uv1= uv1; tri.Uv2= uv2;
+00392 triangles.push_back(tri);
+00393
+00394 <span class="comment">// second tri.</span>
+00395 tri.V0= p2; tri.V1= p3; tri.V2= p0;
+00396 tri.Uv0= uv2; tri.Uv1= uv3; tri.Uv2= uv0;
+00397 triangles.push_back(tri);
+00398
+00399 <span class="comment">// NB: this is not the same tesselation than in tesselation.cpp.</span>
+00400 <span class="comment">// But this looks like Ben's NLPACS::CLocalRetriever tesselation.</span>
+00401 }
+00402 }
+00403 }
+00404
+00405 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz643_1" doxytag="NL3D::CPatch::addTrianglesInBBox" ></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::CPatch::addTrianglesInBBox </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>triangles</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tileTessLevel</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Add triangles to triangles array which intersect the bbox. NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>patchId</em>&nbsp;</td><td>the id of this patch, used to fill triangles. </td></tr>
+ <tr><td valign=top><em>bbox</em>&nbsp;</td><td>the bbox to test against. </td></tr>
+ <tr><td valign=top><em>triangles</em>&nbsp;</td><td>array to be filled (no clear performed, elements added). </td></tr>
+ <tr><td valign=top><em>tileTessLevel</em>&nbsp;</td><td>0,1 or 2 size of the triangles (2*2m, 1*1m or 0.5*0.5m). Level of subdivision of a tile.</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00270">270</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l02294">NL3D::CLandscape::addTrianglesInBBox()</a>.
+<p>
+<div class="fragment"><pre>00271 {
+00272 CBezierPatch &amp;bpatch= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00273
+00274 <span class="comment">// call with the whole root patch.</span>
+00275 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tileTessLevel, bpatch, 0, OrderS, 0, OrderT);
+00276 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz668_2" doxytag="NL3D::CPatch::addTrianglesInBBoxRecurs" ></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::CPatch::addTrianglesInBBoxRecurs </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02706.html">CPatchIdent</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>paId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bbox</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a03620.html">CTrianglePatch</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>triangles</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tessLevel</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pa</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t1</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+recurse subdivide of the bezierPatch. 3 1st parameters are the parameter of <a class="el" href="a03057.html#NL3D_1_1CPatchz643_1">addTrianglesInBBox()</a>. <br>
+ pa is the bezier patch for this subdivision of this patch. <br>
+ s0, s1, t0, t1 represent the part of the bezier patch subdivided. At start, s0=0, s1=OrderS, t0=0, t1=OrderT.
+<p>
+Definition at line <a class="el" href="a06155.html#l00280">280</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00335">addTileTrianglesInBBox()</a>, <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, <a class="el" href="a05384.html#l00107">NLMISC::CAABBox::intersect()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05478.html#l00391">NL3D::CBezierPatch::subdivideS()</a>, <a class="el" href="a05478.html#l00422">NL3D::CBezierPatch::subdivideT()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00270">addTrianglesInBBox()</a>.
+<p>
+<div class="fragment"><pre>00282 {
+00283 <a class="code" href="a04558.html#a7">uint8</a> lenS=s1-s0, lenT=t1-t0;
+00284 <a class="code" href="a04199.html#a6">nlassert</a>(lenS&gt;0);
+00285 <a class="code" href="a04199.html#a6">nlassert</a>(lenT&gt;0);
+00286
+00287 <span class="comment">// compute and compare bbox of the subdivision patch against request bbox.</span>
+00288 <span class="comment">//========================</span>
+00289 <span class="comment">// NB: this compute includes possible noise.</span>
+00290 CAABBox paBBox;
+00291 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(pa, paBBox);
+00292 <span class="comment">// if do not intersect, stop here.</span>
+00293 <span class="keywordflow">if</span>( !paBBox.intersect(bbox) )
+00294 <span class="keywordflow">return</span>;
+00295 <span class="comment">// else if at tile level, then just computeTriangles.</span>
+00296 <span class="comment">//========================</span>
+00297 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( lenS==1 &amp;&amp; lenT==1 )
+00298 {
+00299 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_1">addTileTrianglesInBBox</a>(paId, bbox, triangles, tessLevel, s0, t0);
+00300 }
+00301 <span class="comment">// else subdiv and reccurs.</span>
+00302 <span class="comment">//========================</span>
+00303 <span class="keywordflow">else</span>
+00304 {
+00305 <span class="comment">// Subdivide along the bigger side.</span>
+00306 <span class="keywordflow">if</span>(lenS&gt;lenT)
+00307 {
+00308 <span class="comment">// subdivide.</span>
+00309 CBezierPatch left, right;
+00310 pa.subdivideS(left, right);
+00311 <a class="code" href="a04558.html#a7">uint8</a> sMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)s0+(<a class="code" href="a04558.html#a15">uint</a>)s1) /2 );
+00312 <span class="comment">// recurs left.</span>
+00313 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, left, s0, sMiddle, t0, t1);
+00314 <span class="comment">// recurs right.</span>
+00315 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, right, sMiddle, s1, t0, t1);
+00316 }
+00317 <span class="keywordflow">else</span>
+00318 {
+00319 <span class="comment">// subdivide.</span>
+00320 CBezierPatch top, bottom;
+00321 pa.subdivideT(top, bottom);
+00322 <a class="code" href="a04558.html#a7">uint8</a> tMiddle= (<a class="code" href="a04558.html#a7">uint8</a>)( ((<a class="code" href="a04558.html#a15">uint</a>)t0+(<a class="code" href="a04558.html#a15">uint</a>)t1) /2 );
+00323 <span class="comment">// recurs top.</span>
+00324 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, top, s0, s1, t0, tMiddle);
+00325 <span class="comment">// recurs bottom.</span>
+00326 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_2">addTrianglesInBBoxRecurs</a>(paId, bbox, triangles, tessLevel, bottom, s0, s1, tMiddle, t1);
+00327 }
+00328 }
+00329
+00330
+00331 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_0" doxytag="NL3D::CPatch::allocateVBAndFaceVector" ></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::CPatch::allocateVBAndFaceVector </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="a06161.html#l00845">845</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
+<p>
+<div class="fragment"><pre>00846 {
+00847 <a class="code" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a>(<span class="keyword">true</span>);
+00848 <a class="code" href="a03057.html#NL3D_1_1CPatchd15">createFaceVectorFar1</a>();
+00849 <a class="code" href="a03057.html#NL3D_1_1CPatchd14">createFaceVectorFar0OrTile</a>();
+00850 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_1" doxytag="NL3D::CPatch::allocateVBAndFaceVectorFar1Only" ></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::CPatch::allocateVBAndFaceVectorFar1Only </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="a06161.html#l00873">873</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>00874 {
+00875 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00876 {
+00877 <span class="comment">// alloc VB.</span>
+00878 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, <span class="keyword">true</span>);
+00879 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00880 {
+00881 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00882 <span class="comment">// need update VB only if tessBlock is visible.</span>
+00883 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+00884 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
+00885 }
+00886 }
+00887
+00888 <a class="code" href="a03057.html#NL3D_1_1CPatchd15">createFaceVectorFar1</a>();
+00889 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_2" doxytag="NL3D::CPatch::appendFaceToRenderList" ></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::CPatch::appendFaceToRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00800">800</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTessFace &gt;::append()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>00801 {
+00802 <span class="comment">// Update the number of renderable Faces</span>
+00803 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>++;
+00804
+00805 <span class="comment">// Update Gnal render.</span>
+00806 <span class="comment">//====================</span>
+00807 <span class="keywordflow">if</span>(face-&gt;Level&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
+00808 {
+00809 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.append(face);
+00810 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FaceTileMaterialRefCount++;
+00811
+00812 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00813 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(MasterBlock);
+00814 }
+00815 <span class="keywordflow">else</span>
+00816 {
+00817 <span class="comment">// Alloc if necessary the TessBlocks.</span>
+00818 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
+00819
+00820 <span class="comment">// link the face to the good tessblock.</span>
+00821 <a class="code" href="a04558.html#a15">uint</a> numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
+00822 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarFaceList.append(face);
+00823 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount++;
+00824
+00825 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00826 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
+00827
+00828 <span class="comment">// Must enlarge the BSphere of the tesblock!!</span>
+00829 <span class="comment">// We must do it on a per-face approach, because of tessblocks 's corners which are outside of tessblocks.</span>
+00830 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereFirst(face-&gt;VBase-&gt;EndPos);
+00831 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;EndPos);
+00832 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;EndPos);
+00833 <span class="comment">// I think this should be done too on StartPos, for geomorph (rare??...) problems.</span>
+00834 <span class="comment">// \todo yoyo: is this necessary???</span>
+00835 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VBase-&gt;StartPos);
+00836 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;StartPos);
+00837 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;StartPos);
+00838 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereCompile();
+00839
+00840
+00841 <span class="comment">// Update Tile render (no need to do it if face not at least at tessblock level).</span>
+00842 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_3">appendFaceToTileRenderList</a>(face);
+00843 }
+00844 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_3" doxytag="NL3D::CPatch::appendFaceToTileRenderList" ></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::CPatch::appendFaceToTileRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00884">884</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTileFace &gt;::append()</a>, <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>, <a class="el" href="a06498.html#l00261">NL3D::CTessFace::TileFaces</a>, <a class="el" href="a06498.html#l00259">NL3D::CTessFace::TileMaterial</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, and <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>.
+<p>
+<div class="fragment"><pre>00885 {
+00886 <span class="keywordflow">if</span>(face-&gt;TileMaterial)
+00887 {
+00888 <span class="comment">// For all valid faces, update their links.</span>
+00889 <span class="comment">// Do not do this for lightmap, since it use same face from RGB0 pass.</span>
+00890 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00891 {
+00892 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a> *tilePass= face-&gt;TileMaterial-&gt;Pass[i].PatchRdrPass;
+00893 <span class="comment">// If tile i enabled.</span>
+00894 <span class="keywordflow">if</span>(tilePass)
+00895 {
+00896 <span class="comment">// a face should have created for this pass.</span>
+00897 <a class="code" href="a04199.html#a6">nlassert</a>(face-&gt;TileFaces[i]);
+00898 face-&gt;TileMaterial-&gt;TileFaceList[i].append(face-&gt;TileFaces[i]);
+00899 }
+00900 }
+00901
+00902 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00903 <a class="code" href="a04558.html#a15">uint</a> numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
+00904 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
+00905
+00906 <span class="comment">// Shadow: append it to the Shadow Triangles.</span>
+00907 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;appendToShadowPolyReceiver(face);
+00908 }
+00909 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_4" doxytag="NL3D::CPatch::appendFarVertexToRenderList" ></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::CPatch::appendFarVertexToRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>fv</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01040">1040</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CTessFarVertex &gt;::append()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06156.html#l00931">TFarVertType</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>01041 {
+01042 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> <a class="code" href="a04223.html#a581">type</a>;
+01043 <a class="code" href="a04558.html#a15">uint</a> numtb;
+01044 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(fv-&gt;PCoord, type, numtb);
+01045
+01046
+01047 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> || <a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>)
+01048 {
+01049 fv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>;
+01050 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.append(fv);
+01051 }
+01052 <span class="keywordflow">else</span>
+01053 {
+01054 <span class="comment">// Alloc if necessary the TessBlocks.</span>
+01055 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
+01056
+01057 fv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
+01058 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarVertexList.append(fv);
+01059 }
+01060 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_5" doxytag="NL3D::CPatch::appendNearVertexToRenderList" ></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::CPatch::appendNearVertexToRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>tileMat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>nv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01086">1086</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00372">NL3D::CTessFace::allocTileUv()</a>.
+<p>
+<div class="fragment"><pre>01087 {
+01088 <a class="code" href="a04199.html#a6">nlassert</a>(tileMat);
+01089
+01090 <span class="comment">// Alloc if necessary the TessBlocks.</span>
+01091 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
+01092
+01093 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01094 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tileMat-&gt;TileS, tileMat-&gt;TileT);
+01095 nv-&gt;OwnerBlock= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
+01096 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].NearVertexList.append(nv);
+01097 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz643_2" doxytag="NL3D::CPatch::appendTessellationLeaves" ></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::CPatch::appendTessellationLeaves </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>leaves</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>
+From the current tesselation of this patch, append to the list of leaves faces.
+<p>
+Definition at line <a class="el" href="a06155.html#l02176">2176</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l03194">NL3D::CTessFace::appendTessellationLeaves()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l02899">NL3D::CLandscape::getTessellationLeaves()</a>.
+<p>
+<div class="fragment"><pre>02177 {
+02178 <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
+02179 <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
+02180 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;appendTessellationLeaves(leaves);
+02181 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;appendTessellationLeaves(leaves);
+02182 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz645_0" doxytag="NL3D::CPatch::appendTileLightInfluences" ></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::CPatch::appendTileLightInfluences </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</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></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Append lights under the position to pointLightList. Notice that the PointLight are ensured to be actually <a class="el" href="a03094.html">CPointLightNamed</a>.
+<p>
+Definition at line <a class="el" href="a06157.html#l01543">1543</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06760.html#l00586">NL3D::CZone::_PointLightArray</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05896.html#l00071">NL3D::CLightInfluenceInterpolator::Corners</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a05895.html#l00038">NL3D::CLightInfluenceInterpolator::interpolate()</a>, <a class="el" href="a06545.html#l00060">NL3D::CTileLightInfluence::Light</a>, <a class="el" href="a05896.html#l00060">NL3D::CLightInfluenceInterpolator::CCorner::Lights</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03273">NL3D::CLandscape::appendTileLightInfluences()</a>, and <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>.
+<p>
+<div class="fragment"><pre>01545 {
+01546 <span class="comment">/*</span>
+01547 <span class="comment"> WARNING !! only CPointLightNamed must be added here (used for convenience by CPatch::generateTileVegetable() )</span>
+01548 <span class="comment"> */</span>
+01549
+01550 <span class="comment">// Compute TLI coord for BiLinear.</span>
+01551 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>;
+01552 <span class="comment">// There is (OrderS/2+1) * (OrderT/2+1) tileLightInfluences (TLI).</span>
+01553 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a575">w</a>= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1);
+01554 <a class="code" href="a04558.html#a14">sint</a> h= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1);
+01555 <a class="code" href="a04558.html#a14">sint</a> wTLI= <a class="code" href="a04223.html#a575">w</a>+1;
+01556 <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
+01557 <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U * (w&lt;&lt;8));
+01558 <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V * (h&lt;&lt;8));
+01559 <a class="code" href="a05378.html#a374">clamp</a>(x, 0, w&lt;&lt;8);
+01560 <a class="code" href="a05378.html#a374">clamp</a>(y, 0, h&lt;&lt;8);
+01561 <span class="comment">// compute the TLI coord, and the subCoord for bilinear.</span>
+01562 <a class="code" href="a04558.html#a14">sint</a> xTLI,yTLI, xSub, ySub;
+01563 xTLI= <a class="code" href="a04223.html#a572">x</a>&gt;&gt;8; <a class="code" href="a05378.html#a374">clamp</a>(xTLI, 0, w-1);
+01564 yTLI= <a class="code" href="a04223.html#a573">y</a>&gt;&gt;8; <a class="code" href="a05378.html#a374">clamp</a>(yTLI, 0, h-1);
+01565 <span class="comment">// Hence, xSub and ySub range is [0, 256].</span>
+01566 xSub= <a class="code" href="a04223.html#a572">x</a> - (xTLI&lt;&lt;8);
+01567 ySub= <a class="code" href="a04223.html#a573">y</a> - (yTLI&lt;&lt;8);
+01568
+01569
+01570 <span class="comment">// Use a CLightInfluenceInterpolator to biLinear light influence</span>
+01571 CLightInfluenceInterpolator interp;
+01572 <span class="comment">// Must support only 2 light per TLI.</span>
+01573 <a class="code" href="a04199.html#a6">nlassert</a>(CTileLightInfluence::NumLightPerCorner==2);
+01574 <a class="code" href="a04199.html#a6">nlassert</a>(CLightInfluenceInterpolator::NumLightPerCorner==2);
+01575 <span class="comment">// Get ref on array of PointLightNamed.</span>
+01576 CPointLightNamed *zonePointLights= NULL;
+01577 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights().size() &gt;0 )
+01578 {
+01579 <span class="comment">// const_cast, because will only change _IdInfluence, and </span>
+01580 <span class="comment">// also because CLightingManager will call appendLightedModel()</span>
+01581 zonePointLights= const_cast&lt;CPointLightNamed*&gt;(&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights()[0]));
+01582 }
+01583 <span class="comment">// For 4 corners.</span>
+01584 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;2;<a class="code" href="a04223.html#a573">y</a>++)
+01585 {
+01586 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;2;<a class="code" href="a04223.html#a572">x</a>++)
+01587 {
+01588 <span class="comment">// get ref on TLI, and on corner.</span>
+01589 <span class="keyword">const</span> CTileLightInfluence &amp;tli= <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>[ (yTLI+<a class="code" href="a04223.html#a573">y</a>)*wTLI + xTLI+<a class="code" href="a04223.html#a572">x</a> ];
+01590 CLightInfluenceInterpolator::CCorner &amp;corner= interp.Corners[<a class="code" href="a04223.html#a573">y</a>*2 + <a class="code" href="a04223.html#a572">x</a>];
+01591 <span class="comment">// For all lights</span>
+01592 <a class="code" href="a04558.html#a15">uint</a> lid;
+01593 <span class="keywordflow">for</span>(lid= 0; lid&lt;CTileLightInfluence::NumLightPerCorner; lid++)
+01594 {
+01595 <span class="comment">// get the id of the light in the zone</span>
+01596 <a class="code" href="a04558.html#a15">uint</a> tliLightId= tli.Light[lid];
+01597 <span class="comment">// If empty id, stop</span>
+01598 <span class="keywordflow">if</span>(tliLightId==0xFF)
+01599 <span class="keywordflow">break</span>;
+01600 <span class="keywordflow">else</span>
+01601 {
+01602 <span class="comment">// Set pointer of the light in the corner</span>
+01603 corner.Lights[lid]= zonePointLights + tliLightId;
+01604 }
+01605 }
+01606 <span class="comment">// Reset Empty slots.</span>
+01607 <span class="keywordflow">for</span>(; lid&lt;CTileLightInfluence::NumLightPerCorner; lid++)
+01608 {
+01609 <span class="comment">// set to NULL</span>
+01610 corner.Lights[lid]= NULL;
+01611 }
+01612 }
+01613 }
+01614 <span class="comment">// interpolate.</span>
+01615 interp.interpolate(pointLightList, xSub/256.f, ySub/256.f);
+01616 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_6" doxytag="NL3D::CPatch::appendTileMaterialToRenderList" ></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::CPatch::appendTileMaterialToRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>tm</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00955">955</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06610.html#l00051">NL3D::CTileAddedInfo::Center</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06610.html#l00050">NL3D::CTileAddedInfo::Corners</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00622">NL3D::CLandscape::getTileCallback()</a>, <a class="el" href="a05862.html#l03168">NL3D::CLandscape::isVegetableActive()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06610.html#l00052">NL3D::CTileAddedInfo::Normal</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a03932.html#NL3D_1_1ULandscapeTileCallbacka0">NL3D::ULandscapeTileCallback::tileAdded()</a>, <a class="el" href="a06610.html#l00049">NL3D::CTileAddedInfo::TileID</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00102">uint64</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+<div class="fragment"><pre>00956 {
+00957 <a class="code" href="a04199.html#a6">nlassert</a>(tm);
+00958
+00959 <span class="comment">// Alloc if necessary the TessBlocks.</span>
+00960 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_1">addRefTessBlocks</a>();
+00961
+00962 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+00963 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tm-&gt;TileS, tm-&gt;TileT);
+00964 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].RdrTileRoot[numtm]= tm;
+00965 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount++;
+00966 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount++;
+00967 <span class="comment">// The master block contains the whole patch TileMaterialRefCount</span>
+00968 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount++;
+00969
+00970 <span class="comment">// DynamicLighting. When in near, must compute the context, to have good UVs.</span>
+00971 <span class="comment">//==========</span>
+00972 <span class="comment">// inc ref to the context, creating it if needed.</span>
+00973 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a>();
+00974 <span class="comment">// NB: do it before creating the vegetableBlock, because vegetables use DLM Uvs.</span>
+00975
+00976 <span class="comment">// if was no tiles before in this tessBlock, create a Vegetable block.</span>
+00977 <span class="comment">//==========</span>
+00978 <span class="comment">// one Tile &lt;=&gt; was 0 before</span>
+00979 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount == 1 &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;isVegetableActive() )
+00980 {
+00981 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a>(numtb, tm-&gt;TileS, tm-&gt;TileT);
+00982 }
+00983 ULandscapeTileCallback *tileCallback = <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileCallback();
+00984 <span class="keywordflow">if</span> (tileCallback)
+00985 {
+00986 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00987 CTileAddedInfo tai;
+00988 <span class="comment">// </span>
+00989 tai.Corners[0] = bpatch-&gt;eval((<span class="keywordtype">float</span>) tm-&gt;TileS / OrderS, (<span class="keywordtype">float</span>) tm-&gt;TileT / OrderT);
+00990 tai.Corners[1] = bpatch-&gt;eval((tm-&gt; TileS + 1.f) / OrderS, (<span class="keywordtype">float</span>) tm-&gt;TileT / OrderT);
+00991 tai.Corners[2] = bpatch-&gt;eval( (tm-&gt; TileS + 1.f) / OrderS, (tm-&gt;TileT + 1.f) / OrderT);
+00992 tai.Corners[3] = bpatch-&gt;eval( (<span class="keywordtype">float</span>) tm-&gt; TileS / OrderS, (tm-&gt;TileT + 1.f) / OrderT);
+00993 tai.Center = bpatch-&gt;eval( (tm-&gt; TileS + 0.5f) / OrderS, (tm-&gt;TileT + 0.5f) / OrderT);
+00994 <span class="comment">//</span>
+00995 tai.Normal = bpatch-&gt;evalNormal( (tm-&gt; TileS + 0.5f) / OrderS, (tm-&gt;TileT + 0.5f) / OrderT);
+00996 tai.TileID = (<a class="code" href="a04558.html#a13">uint64</a>) tm; <span class="comment">// pointer to tile material serves as a unique identifier</span>
+00997 <span class="comment">//</span>
+00998 tileCallback-&gt;tileAdded(tai);
+00999 }
+01000 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha0" doxytag="NL3D::CPatch::averageTesselationVertices" ></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::CPatch::averageTesselationVertices </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>
+This is especially for Pacs. see <a class="el" href="a02702.html">CLandscape</a> desc.
+<p>
+Definition at line <a class="el" href="a06155.html#l01505">1505</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l02468">NL3D::CTessFace::averageTesselationVertices()</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01157">NL3D::CZone::averageTesselationVertices()</a>.
+<p>
+<div class="fragment"><pre>01506 {
+01507 <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
+01508 <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
+01509
+01510 <span class="comment">// Recompute the BaseVertices. This is usefull for Pacs.</span>
+01511 <span class="comment">// Because CLandscape::averageTesselationVertices() is made on a strict order for patchs (map of zones, then </span>
+01512 <span class="comment">// array of patchs), we are sure to overwrite BaseVertices in this order.</span>
+01513 CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
+01514 CTessVertex *b= BaseVertices[1];
+01515 CTessVertex *c= BaseVertices[2];
+01516 CTessVertex *d= BaseVertices[3];
+01517 <span class="comment">// Set positions.</span>
+01518 a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
+01519 b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
+01520 c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
+01521 d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
+01522
+01523
+01524 <span class="comment">// Average the tesselation of sons.</span>
+01525 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;averageTesselationVertices();
+01526 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;averageTesselationVertices();
+01527 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz657_0" doxytag="NL3D::CPatch::beginDLMLighting" ></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::CPatch::beginDLMLighting </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>
+begin Dynamic light Process. reset texture To Black (if needed) Called by <a class="el" href="a02702.html">CLandscape</a>. _DLMContext must exist
+<p>
+Definition at line <a class="el" href="a06157.html#l02005">2005</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06163.html#l00592">NL3D::CPatchDLMContext::clearLighting()</a>, <a class="el" href="a06164.html#l00128">NL3D::CPatchDLMContext::CurPointLightCount</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06164.html#l00127">NL3D::CPatchDLMContext::OldPointLightCount</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>.
+<p>
+<div class="fragment"><pre>02006 {
+02007 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
+02008
+02009 <span class="comment">// Must bkup prec pointLightCount in OldPointLightCount, and reset CurPointLightCount</span>
+02010 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;OldPointLightCount= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount;
+02011 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount= 0;
+02012
+02013 <span class="comment">// clear lighting, only if patch is visible</span>
+02014 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+02015 <span class="comment">// NB: no-op if src is already full black.</span>
+02016 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;clearLighting();
+02017
+02018 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha1" doxytag="NL3D::CPatch::bind" ></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::CPatch::bind </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03058.html">CBindInfo</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>Edges</em>[4], </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>rebind</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>
+bind the patch to 4 neighbors, given in this patch edge order (0,1,2,3). Tesselation is reseted (patch unbound first). NB: this patch and his neighborood must be compiled... NB: neighbor patchs must not be NULL (but according to NPatchs).
+<p>
+Definition at line <a class="el" href="a06155.html#l01847">1847</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, <a class="el" href="a06497.html#l00345">NL3D::CTessFace::computeSplitPoint()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FBase</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVBase</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVLeft</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVRight</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00321">NL3D::CPatch::CBindInfo::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a06156.html#l00804">OrderS</a>, <a class="el" href="a06156.html#l00804">OrderT</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00243">NL3D::CTessFace::SonLeft</a>, <a class="el" href="a06498.html#l00243">NL3D::CTessFace::SonRight</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06497.html#l02860">NL3D::CTessFace::updateBind()</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, and <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>.
+<p>
+<div class="fragment"><pre>01848 {
+01849 <span class="comment">// The multiple Patch Face.</span>
+01850 <span class="comment">// By default, Patch==NULL, FLeft, FRight and FBase==NULL so ok!</span>
+01851 <span class="keyword">static</span> <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a> bind1_2[4];
+01852 <span class="keyword">static</span> <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a> bind1_4[8];
+01853
+01854
+01855 <span class="comment">// THIS PATCH MUST BE UNBOUND FIRST!!!!!</span>
+01856 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
+01857 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
+01858 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
+01859 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
+01860 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
+01861 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
+01862
+01863
+01864 <span class="comment">// bind the Realtime bind info here (before any computeVertex, and before bind too).</span>
+01865 <a class="code" href="a04558.html#a14">sint</a> i;
+01866 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+01867 {
+01868 <span class="comment">// just Copy zone (if not NULL).</span>
+01869 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[i]= Edges[i].Zone;
+01870 }
+01871
+01872
+01873 <span class="keywordflow">if</span>(!rebind)
+01874 {
+01875 <span class="comment">// Just recompute base vertices.</span>
+01876 CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
+01877 CTessVertex *b= BaseVertices[1];
+01878 CTessVertex *c= BaseVertices[2];
+01879 CTessVertex *d= BaseVertices[3];
+01880 <span class="comment">// Set positions.</span>
+01881 a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
+01882 b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
+01883 c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
+01884 d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
+01885 <span class="comment">// NB: no propagation problem, since the patch has root only (since has to be unbound!!!)</span>
+01886 <span class="comment">// Recompute centers.</span>
+01887 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;computeSplitPoint();
+01888 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;computeSplitPoint();
+01889 }
+01890 <span class="keywordflow">else</span>
+01891 {
+01892 <span class="comment">// Keep old Vertices as computed from neighbors, but reFill the 4 FarVertices.</span>
+01893 <span class="comment">// NB: don't do it on NearVertices because suppose that Near is Off when a bind occurs (often far away).</span>
+01894 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase);
+01895 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft);
+01896 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight);
+01897 <a class="code" href="a03057.html#NL3D_1_1CPatchd5">checkFillVertexVBFar</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase);
+01898 }
+01899
+01900
+01901 <span class="comment">// Bind the roots.</span>
+01902 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+01903 {
+01904 CBindInfo &amp;<a class="code" href="a03057.html#NL3D_1_1CPatcha1">bind</a>= Edges[i];
+01905
+01906 <a class="code" href="a04199.html#a6">nlassert</a>(bind.NPatchs==0 || bind.NPatchs==1 || bind.NPatchs==2 || bind.NPatchs==4 || bind.NPatchs==5);
+01907 <span class="keywordflow">if</span>(bind.NPatchs==1)
+01908 {
+01909 <span class="comment">// Bind me on Next.</span>
+01910 this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]));
+01911 <span class="comment">// Bind Next on me.</span>
+01912 bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], this-&gt;getRootFaceForEdge(i));
+01913 }
+01914 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==2)
+01915 {
+01916 <span class="comment">// Setup multiple bind.</span>
+01917 this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind1_2+i);
+01918 bind1_2[i].FBase= this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a>(i);
+01919 <span class="comment">// Setup the multiple face.</span>
+01920 <span class="comment">// Follow the conventions! Make a draw for understand. Small Patchs are numbered in CCW.</span>
+01921 bind1_2[i].SonRight= bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]);
+01922 bind1_2[i].SonLeft= bind.Next[1]-&gt;getRootFaceForEdge(bind.Edge[1]);
+01923 bind1_2[i].VBase= bind.Next[0]-&gt;getRootVertexForEdge(bind.Edge[0]);
+01924 <span class="comment">// Set a "flag" to neighbors, so they know what edge is to be bind on me.</span>
+01925 bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], &amp;CTessFace::MultipleBindFace);
+01926 bind.Next[1]-&gt;changeEdgeNeighbor(bind.Edge[1], &amp;CTessFace::MultipleBindFace);
+01927 }
+01928 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==4)
+01929 {
+01930 <span class="comment">// Setup multiple bind level 0.</span>
+01931 this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, bind1_2+i);
+01932 bind1_2[i].FBase= this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd26">getRootFaceForEdge</a>(i);
+01933
+01934 <span class="comment">// Setup multiple bind level 1.</span>
+01935 <span class="comment">// Follow the conventions! Make a draw for understand. Small Patchs are numbered in CCW.</span>
+01936 bind1_2[i].SonRight= bind1_4 + 2*i+0;
+01937 bind1_2[i].SonLeft= bind1_4 + 2*i+1;
+01938 bind1_2[i].VBase= bind.Next[1]-&gt;getRootVertexForEdge(bind.Edge[1]);
+01939 <span class="comment">// Make first multiple face bind level1.</span>
+01940 bind1_4[2*i+0].FBase= &amp;CTessFace::MultipleBindFace; <span class="comment">// to link correctly when the root face will be splitted.</span>
+01941 bind1_4[2*i+0].SonRight= bind.Next[0]-&gt;getRootFaceForEdge(bind.Edge[0]);
+01942 bind1_4[2*i+0].SonLeft= bind.Next[1]-&gt;getRootFaceForEdge(bind.Edge[1]);
+01943 bind1_4[2*i+0].VBase= bind.Next[0]-&gt;getRootVertexForEdge(bind.Edge[0]);
+01944 <span class="comment">// Make second multiple face bind level1.</span>
+01945 bind1_4[2*i+1].FBase= &amp;CTessFace::MultipleBindFace; <span class="comment">// to link correctly when the root face will be splitted.</span>
+01946 bind1_4[2*i+1].SonRight= bind.Next[2]-&gt;getRootFaceForEdge(bind.Edge[2]);
+01947 bind1_4[2*i+1].SonLeft= bind.Next[3]-&gt;getRootFaceForEdge(bind.Edge[3]);
+01948 bind1_4[2*i+1].VBase= bind.Next[2]-&gt;getRootVertexForEdge(bind.Edge[2]);
+01949
+01950 <span class="comment">// Set a "flag" to neighbors, so they know what edge is to be bind on me.</span>
+01951 bind.Next[0]-&gt;changeEdgeNeighbor(bind.Edge[0], &amp;CTessFace::MultipleBindFace);
+01952 bind.Next[1]-&gt;changeEdgeNeighbor(bind.Edge[1], &amp;CTessFace::MultipleBindFace);
+01953 bind.Next[2]-&gt;changeEdgeNeighbor(bind.Edge[2], &amp;CTessFace::MultipleBindFace);
+01954 bind.Next[3]-&gt;changeEdgeNeighbor(bind.Edge[3], &amp;CTessFace::MultipleBindFace);
+01955 }
+01956 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bind.NPatchs==5)
+01957 {
+01958 <span class="comment">/* I am binded to a bigger patch and this one has already done the binding on me =&gt; </span>
+01959 <span class="comment"> It must be correclty tesselated. Note also that bind 1/X are only possible on interior of zone.</span>
+01960 <span class="comment"> */</span>
+01961
+01962 <span class="comment">// First, make the link with the face to which I must connect.</span>
+01963 <span class="comment">// -----------------</span>
+01964
+01965 <span class="comment">// Get the coordinate of the current edge of this patch</span>
+01966 <a class="code" href="a03660.html">CVector2f</a> uvi0, uvi1;
+01967 <span class="keywordflow">switch</span>(i)
+01968 {
+01969 <span class="keywordflow">case</span> 0: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,0); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,1); <span class="keywordflow">break</span>;
+01970 <span class="keywordflow">case</span> 1: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,1); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,1); <span class="keywordflow">break</span>;
+01971 <span class="keywordflow">case</span> 2: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,1); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,0); <span class="keywordflow">break</span>;
+01972 <span class="keywordflow">case</span> 3: uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(1,0); uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0,0); <span class="keywordflow">break</span>;
+01973 };
+01974 <span class="comment">// mul by OrderS/OrderT for CPatchUVLocator</span>
+01975 uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+01976 uvi0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+01977 uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+01978 uvi1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+01979 <span class="comment">// build a CPatchUVLocator to transpose coorindate ot this edge in coordinate on the bigger Neighbor patch.</span>
+01980 CBindInfo bindInfo;
+01981 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(i, bindInfo);
+01982 <a class="code" href="a04199.html#a6">nlassert</a>(bindInfo.Zone!=NULL &amp;&amp; bindInfo.NPatchs==1);
+01983 CPatchUVLocator puvloc;
+01984 puvloc.build(<span class="keyword">this</span>, i, bindInfo);
+01985
+01986 <span class="comment">// transpose from this patch coord in neighbor patch coord.</span>
+01987 <a class="code" href="a03660.html">CVector2f</a> uvo0, uvo1;
+01988 <a class="code" href="a04558.html#a15">uint</a> pid;
+01989 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchNeighbor;
+01990 <span class="comment">// Do it for uvi0</span>
+01991 pid= puvloc.selectPatch(uvi0);
+01992 puvloc.locateUV(uvi0, pid, patchNeighbor, uvo0);
+01993 <a class="code" href="a04199.html#a6">nlassert</a>(patchNeighbor == bindInfo.Next[0]);
+01994 <span class="comment">// Do it for uvi1</span>
+01995 pid= puvloc.selectPatch(uvi1);
+01996 puvloc.locateUV(uvi1, pid, patchNeighbor, uvo1);
+01997 <a class="code" href="a04199.html#a6">nlassert</a>(patchNeighbor == bindInfo.Next[0]);
+01998 <span class="comment">// Rescale to have uv in 0,1 basis.</span>
+01999 uvo0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= patchNeighbor-&gt;OrderS;
+02000 uvo0.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= patchNeighbor-&gt;OrderT;
+02001 uvo1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= patchNeighbor-&gt;OrderS;
+02002 uvo1.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= patchNeighbor-&gt;OrderT;
+02003
+02004 <span class="comment">// Now, traverse the tesselation and find the first CTessFace which use this edge.</span>
+02005 <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a> *faceNeighbor;
+02006 faceNeighbor= patchNeighbor-&gt;linkTessFaceWithEdge(uvo0, uvo1, this-&gt;getRootFaceForEdge(i));
+02007 <a class="code" href="a04199.html#a6">nlassert</a>(faceNeighbor);
+02008 <span class="comment">// Bind me on Next.</span>
+02009 this-&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchd0">changeEdgeNeighbor</a>(i, faceNeighbor);
+02010 }
+02011
+02012 }
+02013
+02014 <span class="comment">// Propagate the binds to sons.</span>
+02015 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;updateBind();
+02016 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;updateBind();
+02017
+02018 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha2" doxytag="NL3D::CPatch::buildBBox" ></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> NL3D::CPatch::buildBBox </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Build the bbox of the patch, according to ctrl points, and displacement map max value.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00257">257</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00221">buildBBoxFromBezierPatch()</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00385">NL3D::CLandscape::addZone()</a>, and <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>.
+<p>
+<div class="fragment"><pre>00258 {
+00259 CBezierPatch &amp;p= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00260
+00261 <span class="comment">// Compute Bounding Box. (easiest way...)</span>
+00262 CAABBox ret;
+00263 <a class="code" href="a03057.html#NL3D_1_1CPatchz668_3">buildBBoxFromBezierPatch</a>(p, ret);
+00264
+00265 <span class="keywordflow">return</span> ret;
+00266 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz668_3" doxytag="NL3D::CPatch::buildBBoxFromBezierPatch" ></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::CPatch::buildBBoxFromBezierPatch </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ret</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+build a bbox from the convex hull of a bezier patch, enlarged with noise.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00221">221</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a06682.html#l00192">NLMISC::CVector::maxof()</a>, <a class="el" href="a06682.html#l00186">NLMISC::CVector::minof()</a>, <a class="el" href="a06156.html#l00089">NL3D_NOISE_MAX</a>, <a class="el" href="a05385.html#l00071">NLMISC::CAABBox::setMinMax()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00514">addPatchBlocksInBBoxRecurs()</a>, <a class="el" href="a06155.html#l00280">addTrianglesInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00257">buildBBox()</a>.
+<p>
+<div class="fragment"><pre>00222 {
+00223 <span class="comment">// Because of the structure of CAABBox, extend() is not fast enough for us. first compute bmin, bmax,</span>
+00224 <span class="comment">// then compute the bbox.</span>
+00225 CVector bmin= p.Vertices[0];
+00226 CVector bmax= bmin;
+00227
+00228 <a class="code" href="a04558.html#a14">sint</a> i;
+00229 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00230 {
+00231 bmin.minof(bmin, p.Vertices[i]);
+00232 bmax.maxof(bmax, p.Vertices[i]);
+00233 }
+00234 <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
+00235 {
+00236 bmin.minof(bmin, p.Tangents[i]);
+00237 bmax.maxof(bmax, p.Tangents[i]);
+00238 }
+00239 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00240 {
+00241 bmin.minof(bmin, p.Interiors[i]);
+00242 bmax.maxof(bmax, p.Interiors[i]);
+00243 }
+00244
+00245 <span class="comment">// Modulate with the maximum displacement map (usefull for patch clipping).</span>
+00246 <span class="keyword">static</span> CVector vectorNoiseMax(NL3D_NOISE_MAX, NL3D_NOISE_MAX, NL3D_NOISE_MAX);
+00247 bmin-= vectorNoiseMax;
+00248 bmax+= vectorNoiseMax;
+00249 <span class="comment">// NB: this is not very optimal, since the BBox may be very too big. eg: patch 16mx16m =&gt; bbox 18mx18m.</span>
+00250 <span class="comment">// But remind that tessblocks do not use this BBox, and are computed with the real geometry.</span>
+00251
+00252 ret.setMinMax(bmin, bmax);
+00253 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd0" doxytag="NL3D::CPatch::changeEdgeNeighbor" ></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::CPatch::changeEdgeNeighbor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>to</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01805">1805</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
+<p>
+<div class="fragment"><pre>01806 {
+01807 <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
+01808
+01809 <span class="comment">// See tessellation rules.</span>
+01810 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
+01811 {
+01812 <span class="keywordflow">switch</span>(edge)
+01813 {
+01814 <span class="keywordflow">case</span> 0: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
+01815 <span class="keywordflow">case</span> 1: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
+01816 <span class="keywordflow">case</span> 2: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
+01817 <span class="keywordflow">case</span> 3: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
+01818 }
+01819 }
+01820 <span class="keywordflow">else</span>
+01821 {
+01822 <span class="keywordflow">switch</span>(edge)
+01823 {
+01824 <span class="keywordflow">case</span> 0: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
+01825 <span class="keywordflow">case</span> 1: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
+01826 <span class="keywordflow">case</span> 2: <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= to; <span class="keywordflow">break</span>;
+01827 <span class="keywordflow">case</span> 3: <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= to; <span class="keywordflow">break</span>;
+01828 }
+01829 }
+01830 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd1" doxytag="NL3D::CPatch::checkCreateVertexVBFar" ></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::CPatch::checkCreateVertexVBFar </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01502">1502</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>01503 {
+01504 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01505 <span class="comment">// If visible, and Far0 in !Tile Mode, allocate.</span>
+01506 <span class="comment">// NB: must test Far0&gt;0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
+01507 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0() )
+01508 {
+01509 pVert-&gt;Index0= CLandscapeGlobals::CurrentFar0VBAllocator-&gt;allocateVertex();
+01510 }
+01511
+01512 <span class="comment">// Idem for Far1</span>
+01513 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1())
+01514 {
+01515 pVert-&gt;Index1= CLandscapeGlobals::CurrentFar1VBAllocator-&gt;allocateVertex();
+01516 }
+01517
+01518 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd2" doxytag="NL3D::CPatch::checkCreateVertexVBNear" ></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::CPatch::checkCreateVertexVBNear </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01543">1543</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00403">NL3D::CTessFace::checkCreateFillTileVB()</a>.
+<p>
+<div class="fragment"><pre>01544 {
+01545 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01546 <span class="comment">// If visible, and Far0 in Tile Mode, allocate.</span>
+01547 <span class="comment">// NB: must test Far0==0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
+01548 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile())
+01549 {
+01550 pVert-&gt;Index= CLandscapeGlobals::CurrentTileVBAllocator-&gt;allocateVertex();
+01551 }
+01552 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd3" doxytag="NL3D::CPatch::checkDeleteVertexVBFar" ></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::CPatch::checkDeleteVertexVBFar </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01571">1571</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>.
+<p>
+<div class="fragment"><pre>01572 {
+01573 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01574 <span class="comment">// If visible, and Far0 in !Tile Mode, ok, the vertex exist in VB, so delete.</span>
+01575 <span class="comment">// NB: must test Far0&gt;0 because vertices are deleted in preRender() if a change of Far occurs.</span>
+01576 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0() )
+01577 {
+01578 CLandscapeGlobals::CurrentFar0VBAllocator-&gt;deleteVertex(pVert-&gt;Index0);
+01579 }
+01580
+01581 <span class="comment">// Idem for Far1</span>
+01582 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1() )
+01583 {
+01584 CLandscapeGlobals::CurrentFar1VBAllocator-&gt;deleteVertex(pVert-&gt;Index1);
+01585 }
+01586 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd4" doxytag="NL3D::CPatch::checkDeleteVertexVBNear" ></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::CPatch::checkDeleteVertexVBNear </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01589">1589</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>.
+<p>
+<div class="fragment"><pre>01590 {
+01591 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01592 <span class="comment">// If visible, and Far0 in Tile Mode, ok, the vertex exist in VB, so delete.</span>
+01593 <span class="comment">// NB: must test Far0==0 because vertices are deleted in preRender() if a change of Far occurs.</span>
+01594 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile() )
+01595 {
+01596 CLandscapeGlobals::CurrentTileVBAllocator-&gt;deleteVertex(pVert-&gt;Index);
+01597 }
+01598 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd5" doxytag="NL3D::CPatch::checkFillVertexVBFar" ></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::CPatch::checkFillVertexVBFar </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01522">1522</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">NL3D::CTessFace::updateNearFarVertices()</a>.
+<p>
+<div class="fragment"><pre>01523 {
+01524 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01525 <span class="comment">// If visible, and Far0 in !Tile Mode, try to fill.</span>
+01526 <span class="comment">// NB: must test Far0&gt;0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
+01527 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar0())
+01528 {
+01529 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
+01530 <a class="code" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a>(pVert);
+01531 }
+01532
+01533 <span class="comment">// Idem for Far1</span>
+01534 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleFar1())
+01535 {
+01536 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
+01537 <a class="code" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a>(pVert);
+01538 }
+01539 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd6" doxytag="NL3D::CPatch::checkFillVertexVBNear" ></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::CPatch::checkFillVertexVBNear </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01556">1556</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01109">fillTileVertexVB()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00403">NL3D::CTessFace::checkCreateFillTileVB()</a>, <a class="el" href="a06497.html#l00424">NL3D::CTessFace::checkFillTileVB()</a>, and <a class="el" href="a06497.html#l00873">NL3D::CTessFace::updateNearFarVertices()</a>.
+<p>
+<div class="fragment"><pre>01557 {
+01558 <a class="code" href="a04199.html#a6">nlassert</a>(pVert);
+01559 <span class="comment">// If visible, and Far0 in Tile Mode, try to fill.</span>
+01560 <span class="comment">// NB: must test Far0==0 because vertices are reallocated in preRender() if a change of Far occurs.</span>
+01561 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()&amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; pVert-&gt;OwnerBlock-&gt;visibleTile() )
+01562 {
+01563 <span class="comment">// try to fill.</span>
+01564 <span class="keywordflow">if</span>( !CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs() )
+01565 <a class="code" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a>(pVert);
+01566 }
+01567 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_7" doxytag="NL3D::CPatch::clearTessBlocks" ></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::CPatch::clearTessBlocks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00669">669</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, <a class="el" href="a06698.html#l00620">NL3D::CVegetableManager::deleteClipBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.
+<p>
+<div class="fragment"><pre>00670 {
+00671 <a class="code" href="a04558.html#a15">uint</a> i;
+00672
+00673 <span class="comment">// Vegetable management</span>
+00674 <span class="comment">//==========</span>
+00675 <span class="comment">// if compiled.</span>
+00676 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
+00677 {
+00678 CVegetableManager *vegetableManager= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager;
+00679
+00680 <span class="comment">// delete still existing vegetable Igs.</span>
+00681 <a class="code" href="a03057.html#NL3D_1_1CPatchz651_0">deleteAllVegetableIgs</a>();
+00682
+00683 <span class="comment">// delete ClipBlocks.</span>
+00684 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz661_0">VegetableClipBlocks</a>.size(); i++)
+00685 {
+00686 vegetableManager-&gt;deleteClipBlock(VegetableClipBlocks[i]);
+00687 }
+00688 <a class="code" href="a05378.html#a381">contReset</a>(VegetableClipBlocks);
+00689 }
+00690
+00691
+00692 <span class="comment">// updateLighting management.</span>
+00693 <span class="comment">//==========</span>
+00694 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
+00695 {
+00696 <span class="comment">// remove patch from Near updateLighting, since no more TessBlock lightmap can exist.</span>
+00697 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;unlinkPatchFromNearUL(<span class="keyword">this</span>);
+00698 }
+00699
+00700
+00701 <span class="comment">// Delete TessBlocks</span>
+00702 <span class="comment">//==========</span>
+00703 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>=0;
+00704 <a class="code" href="a05378.html#a381">contReset</a>(TessBlocks);
+00705 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha3" doxytag="NL3D::CPatch::compile" ></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::CPatch::compile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03730.html">CZone</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>z</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>patchId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>orderS</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>orderT</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>baseVertices</em>[4], </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>errorSize</em> = 0</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>
+compile a valid patch. (init) Call this method before any other. Zone and Control points must be valid before calling <a class="el" href="a03057.html#NL3D_1_1CPatcha3">compile()</a>. <br>
+ This is an <b>ERROR</b> to call <a class="el" href="a03057.html#NL3D_1_1CPatcha3">compile()</a> two times. <br>
+ <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>z</em>&nbsp;</td><td>zone where the patch must be binded. </td></tr>
+ <tr><td valign=top><em>orderS</em>&nbsp;</td><td>the Tile order in S direction: 2,4,8,16. </td></tr>
+ <tr><td valign=top><em>orderT</em>&nbsp;</td><td>the Tile order in T direction: 2,4,8,16. </td></tr>
+ <tr><td valign=top><em>errorSize</em>&nbsp;</td><td>if 0, setup() compute himself the errormetric of the patch. May be setup to surface of patch, modulated by tangents and displacement map.</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01283">1283</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a05586.html#l00358">NLMISC::getPowerOf2()</a>, <a class="el" href="a06491.html#l00089">NL3D::CTessBlock::init()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00814">SquareLimitLevel</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00812">TileLimitLevel</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l00236">z</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>.
+<p>
+<div class="fragment"><pre>01284 {
+01285 <a class="code" href="a04199.html#a6">nlassert</a>(z);
+01286 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= <a class="code" href="a04223.html#a574">z</a>;
+01287
+01288 <span class="comment">// For updateLighting, get the correct pointer now.</span>
+01289 <span class="comment">// Init UL circular list to me</span>
+01290 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= <span class="keyword">this</span>;
+01291 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= <span class="keyword">this</span>;
+01292
+01293
+01294 <span class="comment">// Once the patch is inserted and compiled in a zone, it is ready to be rendered.</span>
+01295 <span class="comment">// init the MasterBlock.</span>
+01296 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.init(<span class="keyword">this</span>);
+01297
+01298 <span class="comment">// only 65536 patch per zone allowed.</span>
+01299 <a class="code" href="a04199.html#a6">nlassert</a>(patchId&lt;0x10000);
+01300 <a class="code" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a>= (<a class="code" href="a04558.html#a9">uint16</a>)patchId;
+01301
+01302 <span class="keywordflow">if</span>(errorSize==0)
+01303 <a class="code" href="a03057.html#NL3D_1_1CPatchd7">computeDefaultErrorSize</a>();
+01304 <span class="keywordflow">else</span>
+01305 <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>= errorSize;
+01306
+01307 <a class="code" href="a04199.html#a6">nlassert</a>(orderS==2 || orderS==4 || orderS==8 || orderS==16);
+01308 <a class="code" href="a04199.html#a6">nlassert</a>(orderT==2 || orderT==4 || orderT==8 || orderT==16);
+01309 <a class="code" href="a04199.html#a6">nlassert</a> (OrderS==orderS);
+01310 <a class="code" href="a04199.html#a6">nlassert</a> (OrderT==orderT);
+01311
+01312 <span class="comment">// Compile additional infos.</span>
+01313 <a class="code" href="a04558.html#a14">sint</a> ps= <a class="code" href="a05378.html#a263">getPowerOf2</a>(orderS) , pt= <a class="code" href="a05378.html#a263">getPowerOf2</a>(orderT);
+01314 <a class="code" href="a04558.html#a14">sint</a> pmin= <a class="code" href="a04061.html#a0">min</a>(ps,pt);
+01315 <a class="code" href="a04558.html#a14">sint</a> pmax= max(ps,pt);
+01316 <span class="comment">// Rectangular patch OK.</span>
+01317 <span class="comment">// Work, since patch 1xX are illegal. =&gt; The TileLimitLevel is at least 2 level distant from the time where</span>
+01318 <span class="comment">// the rectangular patch is said "un-rectangular-ed" (tesselation looks like square). Hence, there is no problem</span>
+01319 <span class="comment">// with rectangular UV geomorph (well don't bother me, make a draw :) ).</span>
+01320 <a class="code" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a>= pmin*2 + pmax-pmin;
+01321 <span class="comment">// A TessBlock is a 2*2 tile. This simple formula works because patch 1xX are illegal.</span>
+01322 <a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchr27">TileLimitLevel</a>-2;
+01323 <span class="comment">// This tell us when the tess face is "un-rectangular-ed" (to say a square). Before, it is a "rectangular" face, </span>
+01324 <span class="comment">// which has a strange fxxxxxg split.</span>
+01325 <span class="comment">// If patch is square, then SquareLimitLevel=0 (ok!!).</span>
+01326 <a class="code" href="a03057.html#NL3D_1_1CPatchr25">SquareLimitLevel</a>= pmax-pmin;
+01327
+01328 <span class="comment">// Bind vertices, to zone base vertices.</span>
+01329 <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]= baseVertices[0];
+01330 <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]= baseVertices[1];
+01331 <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]= baseVertices[2];
+01332 <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]= baseVertices[3];
+01333
+01334 <span class="comment">// build Sons.</span>
+01335 <a class="code" href="a03057.html#NL3D_1_1CPatchd28">makeRoots</a>();
+01336 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha4" doxytag="NL3D::CPatch::computeContinousVertex" ></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> NL3D::CPatch::computeContinousVertex </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Same as computeVertex, but special accurate version for <a class="el" href="a03705.html">CVisualCollisionEntity</a>. If on a corner of the patch (0,0), (0,1) ...., take directly the BaseVertices[] result if on a border of a patch (ie s==0, s==1, t==0 or t==1), also compute the vertex of the neighbor patch (if any), and then average the result. This ensure that tesselation generated is perfectly continous, even across patchs of same or different zones. This feature is very important for <a class="el" href="a03705.html#NL3D_1_1CVisualCollisionEntitya9">CVisualCollisionEntity::snapToGround()</a>
+<p>
+Definition at line <a class="el" href="a06155.html#l01363">1363</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+<div class="fragment"><pre>01364 {
+01365 <span class="comment">// must be compiled</span>
+01366 <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
+01367
+01368 <span class="comment">// Test is on a edge/corner of the patch</span>
+01369 <a class="code" href="a04558.html#a14">sint</a> edgeIdS= -1;
+01370 <a class="code" href="a04558.html#a14">sint</a> edgeIdT= -1;
+01371 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==0) edgeIdS= 0;
+01372 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==1) edgeIdS= 2;
+01373 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==0) edgeIdT= 3;
+01374 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==1) edgeIdT= 1;
+01375
+01376 <span class="comment">// test if on a corner</span>
+01377 <span class="keywordflow">if</span>(edgeIdS&gt;=0 &amp;&amp; edgeIdT&gt;=0)
+01378 {
+01379 <span class="comment">// return the baseVertex according to edge falgs</span>
+01380 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==3) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]-&gt;EndPos;
+01381 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==1) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]-&gt;EndPos;
+01382 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==1) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]-&gt;EndPos;
+01383 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==3) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]-&gt;EndPos;
+01384 <a class="code" href="a04199.html#a12">nlstop</a>;
+01385 <span class="comment">// Error, but Avoid warning</span>
+01386 <span class="keywordflow">return</span> CVector::Null;
+01387 }
+01388 <span class="comment">// test if on an edge</span>
+01389 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(edgeIdS&gt;=0 || edgeIdT&gt;=0)
+01390 {
+01391 <span class="comment">// Yes, must compute myslef</span>
+01392 CVector vertexOnMe= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s,t);
+01393
+01394 <span class="comment">// Then, must compute my neighbor.</span>
+01395 <a class="code" href="a04558.html#a14">sint</a> edgeId;
+01396 <span class="keywordflow">if</span>(edgeIdS&gt;=0)
+01397 edgeId= edgeIdS;
+01398 <span class="keywordflow">else</span>
+01399 edgeId= edgeIdT;
+01400
+01401 <span class="comment">// Get my neighbor, if any.</span>
+01402 CBindInfo bindInfo;
+01403 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeId, bindInfo);
+01404 <span class="comment">// Fast reject: if no neighbor on the edge, just return my pos.</span>
+01405 <span class="keywordflow">if</span>(!bindInfo.Zone)
+01406 {
+01407 <span class="keywordflow">return</span> vertexOnMe;
+01408 }
+01409 <span class="comment">// else must get vertex pos of my neighbor, and average.</span>
+01410 <span class="keywordflow">else</span>
+01411 {
+01412 <span class="comment">// use a CPatchUVLocator to get UV in neighbor patch</span>
+01413 CPatchUVLocator uvLocator;
+01414 uvLocator.build(<span class="keyword">this</span>, edgeId, bindInfo);
+01415
+01416 <span class="comment">// UVlocator use OrderS/OrderT coordinate system.</span>
+01417 <a class="code" href="a03660.html">CVector2f</a> stTileIn, stTileOut;
+01418 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>= <a class="code" href="a04223.html#a626">s</a> * <a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>();
+01419 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>= <a class="code" href="a04223.html#a627">t</a> * <a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>();
+01420
+01421 <span class="comment">// transform coordinate to get into the neigbhor patch</span>
+01422 <a class="code" href="a04558.html#a15">uint</a> pid= uvLocator.selectPatch(stTileIn);
+01423 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *nebPatch;
+01424 uvLocator.locateUV(stTileIn, pid, nebPatch, stTileOut);
+01425
+01426 <span class="comment">// transform neigbhor coord in 0..1 coordinate space.</span>
+01427 stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/= nebPatch-&gt;getOrderS();
+01428 stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/= nebPatch-&gt;getOrderT();
+01429
+01430 <span class="comment">// and compute vertex. NB: if binded on 2 or 4 patch, it is then possible that stTileOut is on a</span>
+01431 <span class="comment">// a corner ( (0,0), (0,1) ...).</span>
+01432 <span class="comment">// In this case, we must use the precomputed Vertex pos, for completeness.</span>
+01433 <span class="keywordtype">bool</span> onCorner;
+01434 CVector vertexOnNeb= nebPatch-&gt;computeVertexButCorner(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, onCorner);
+01435
+01436 <span class="comment">// If the neighbor is on a corner, then use its corner value.</span>
+01437 <span class="keywordflow">if</span>(onCorner)
+01438 <span class="keywordflow">return</span> vertexOnNeb;
+01439 <span class="keywordflow">else</span>
+01440 {
+01441 <span class="comment">// Average the 2 and return this result.</span>
+01442 vertexOnMe+= vertexOnNeb;
+01443 vertexOnMe/= 2;
+01444 <span class="keywordflow">return</span> vertexOnMe;
+01445 }
+01446 }
+01447
+01448 }
+01449 <span class="comment">// else, std case</span>
+01450 <span class="keywordflow">else</span>
+01451 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s, t);
+01452 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz645_1" doxytag="NL3D::CPatch::computeCurrentTLILightmapDiv2" ></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::CPatch::computeCurrentTLILightmapDiv2 </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03337.html">NLMISC::CRGBA</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>array</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>
+For <a class="el" href="a03498.html">CTextureFar</a>, compute current TLI Lightmap at tile level. array should be allocated of at least sqr(NL_MAX_TILES_BY_PATCH_EDGE+1).
+<p>
+Definition at line <a class="el" href="a06157.html#l01805">1805</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>.
+<p>
+<div class="fragment"><pre>01806 {
+01807 <span class="comment">// Size of TileLightInfluences</span>
+01808 <a class="code" href="a04558.html#a15">uint</a> wTLI= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1)+1;
+01809 <a class="code" href="a04558.html#a15">uint</a> hTLI= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1)+1;
+01810 <span class="comment">// colros at corners of tiles size.</span>
+01811 <a class="code" href="a04558.html#a15">uint</a> wTC= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>+1;
+01812 <a class="code" href="a04558.html#a15">uint</a> wTCx2= wTC*2;
+01813 <a class="code" href="a04558.html#a15">uint</a> hTC= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>+1;
+01814 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+01815
+01816 <span class="comment">// Compute TLI colors at each corner of each TessBlocks.</span>
+01817 <span class="comment">//=============</span>
+01818 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTLI;<a class="code" href="a04223.html#a573">y</a>++)
+01819 {
+01820 <span class="comment">// store every 2 tiles corners.</span>
+01821 <a class="code" href="a03337.html">CRGBA</a> *dst= array + <a class="code" href="a04223.html#a573">y</a>*2*wTC;
+01822 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTLI;<a class="code" href="a04223.html#a572">x</a>++)
+01823 {
+01824 *dst= getCurrentTLIColor(x, y);
+01825 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> &gt;&gt;= 1;
+01826 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> &gt;&gt;= 1;
+01827 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> &gt;&gt;= 1;
+01828 <span class="comment">// skip 2 tiles corners.</span>
+01829 dst++;
+01830 dst++;
+01831 }
+01832 }
+01833
+01834 <span class="comment">// Compute TLI colors at each corner of each Tiles.</span>
+01835 <span class="comment">//=============</span>
+01836
+01837 <span class="comment">// Compute corner at middle of vertical TessBlock edges.</span>
+01838 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTC-1;<a class="code" href="a04223.html#a573">y</a>+=2)
+01839 {
+01840 <a class="code" href="a03337.html">CRGBA</a> *dst= array + <a class="code" href="a04223.html#a573">y</a>*wTC;
+01841 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTC;<a class="code" href="a04223.html#a572">x</a>+=2)
+01842 {
+01843 <span class="comment">// Average midlle with cur and next.</span>
+01844 (dst+wTC)-&gt;avg2RGBOnly(*dst, *(dst + wTCx2) );
+01845
+01846 <span class="comment">// skip 2 tiles corners.</span>
+01847 dst++;
+01848 dst++;
+01849 }
+01850 }
+01851
+01852 <span class="comment">// Compute corner at middle of horizontal TessBlock edges, and at middle of TessBlock.</span>
+01853 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;hTC;<a class="code" href="a04223.html#a573">y</a>++)
+01854 {
+01855 <a class="code" href="a03337.html">CRGBA</a> *dst= array + <a class="code" href="a04223.html#a573">y</a>*wTC;
+01856 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;wTC-1;<a class="code" href="a04223.html#a572">x</a>+=2)
+01857 {
+01858 <span class="comment">// Average midlle with cur and next.</span>
+01859 (dst+1)-&gt;avg2RGBOnly(*dst, *(dst+2));
+01860
+01861 <span class="comment">// skip 2 tiles corners.</span>
+01862 dst++;
+01863 dst++;
+01864 }
+01865 }
+01866
+01867
+01868 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd7" doxytag="NL3D::CPatch::computeDefaultErrorSize" ></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::CPatch::computeDefaultErrorSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00206">206</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>.
+<p>
+<div class="fragment"><pre>00207 {
+00208 CBezierPatch &amp;p= *<a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00209 CVector &amp;v0= p.Vertices[0];
+00210 CVector &amp;v1= p.Vertices[1];
+00211 CVector &amp;v2= p.Vertices[2];
+00212
+00213 <span class="comment">// \todo yoyo: TODO_NOISE: modulate this value with tangents (roundiness of patch), and with the displacement map.</span>
+00214 <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>= ((v1 - v0)^(v2 - v0)).norm();
+00215
+00216 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_0" doxytag="NL3D::CPatch::computeDisplaceCornerSmooth" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceCornerSmooth </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderY</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
+<p>
+Definition at line <a class="el" href="a06158.html#l00471">471</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
+<p>
+<div class="fragment"><pre>00472 {
+00473 <span class="comment">// compute the value across the corner (enjoy!!)</span>
+00474 <span class="comment">// NB: Only corners with Edges==4 and corners on a bind are correclty supported.</span>
+00475 <span class="comment">// ignore problems with corner which nbEdges!=4, because Blend of normals blend to 0 on corner (see computenoise()).</span>
+00476
+00477 <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
+00478 <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
+00479 CBindInfo bindInfoX;
+00480 CBindInfo bindInfoY;
+00481 <a class="code" href="a04558.html#a15">uint</a> edgeX=0;
+00482 <a class="code" href="a04558.html#a15">uint</a> edgeY=0;
+00483
+00484 <span class="comment">// both must be not null</span>
+00485 <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX!=0) &amp;&amp; (smoothBorderY!=0) );
+00486
+00487
+00488 <span class="comment">// Get the edge against we must share displace.</span>
+00489 <span class="keywordflow">if</span>(smoothBorderX==-1) edgeX=0;
+00490 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) edgeX=2;
+00491 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00492 <span class="keywordflow">if</span>(smoothBorderY==1) edgeY=1;
+00493 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) edgeY=3;
+00494 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00495
+00496 <span class="comment">// Build the bindInfo against those 2 edge.</span>
+00497 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeX, bindInfoX);
+00498 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeY, bindInfoY);
+00499
+00500 <span class="comment">// Fast reject: if no neighbor on one of the edge, just do a simple computeDisplaceInteriorSmooth.</span>
+00501 <span class="keywordflow">if</span>(!bindInfoX.Zone || !bindInfoY.Zone)
+00502 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(s, t);
+00503 <span class="keywordflow">else</span>
+00504 {
+00505 <span class="keywordtype">float</span> ret;
+00506
+00507
+00508 <span class="comment">// compute bi-linear weight factors.</span>
+00509 <span class="keywordtype">float</span> sInc, tInc, sa, ta, sa1, ta1;
+00510 <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
+00511 <span class="comment">// Manage limit case: if bilinear has not chosen the good direction (because of floor and orientation).</span>
+00512 <span class="comment">// eg on Right edge: This case arise if sDecimal==0, so if sa==sa1==0.5f. result is that</span>
+00513 <span class="comment">// smoothBorderX is != than sInc on right border. same reasoning with downBorder (smoothBorderY=1).</span>
+00514
+00515 <span class="comment">// NO NEED TO DO HERE, because sInc or tInc are not used at all.</span>
+00516
+00517
+00518
+00519 <span class="comment">// compute Neighboring info.</span>
+00520 CPatchUVLocator uvLocatorX;
+00521 CPatchUVLocator uvLocatorY;
+00522 uvLocatorX.build(<span class="keyword">this</span>, edgeX, bindInfoX);
+00523 uvLocatorY.build(<span class="keyword">this</span>, edgeY, bindInfoY);
+00524
+00525
+00526 <span class="comment">/* NB: see floor problems note in computeDisplaceEdgeSmooth();</span>
+00527 <span class="comment"> */</span>
+00528 sTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile) + 0.5f;
+00529 tTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile) + 0.5f;
+00530 <span class="comment">// If we were exactly on the superior edge, prec compute is false... so correct this here.</span>
+00531 <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) sTile--;
+00532 <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) tTile--;
+00533
+00534
+00535 <span class="comment">// Bilinear across a corner.</span>
+00536 <a class="code" href="a03660.html">CVector2f</a> stTileIn, stIn;
+00537 <a class="code" href="a03660.html">CVector2f</a> stTileOut, stOut;
+00538 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00539 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00540
+00541
+00542 <span class="comment">// compute contribution of our patch.</span>
+00543 ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile, s,t) * sa * ta;
+00544
+00545 <span class="comment">// compute contribution of the patch on the left/right side. same reasoning as in computeDisplaceEdgeSmooth();</span>
+00546 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00547 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile);
+00548 patchId= uvLocatorX.selectPatch(stTileIn);
+00549 uvLocatorX.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00550 uvLocatorX.locateUV(stIn, patchId, patchOut, stOut);
+00551 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta;
+00552
+00553
+00554 <span class="comment">// compute contribution of the patch on the up/down side. same reasoning as in computeDisplaceEdgeSmooth();</span>
+00555 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00556 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile+smoothBorderY);
+00557 patchId= uvLocatorY.selectPatch(stTileIn);
+00558 uvLocatorY.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00559 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
+00560 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa * ta1;
+00561
+00562
+00563 <span class="comment">/* compute contribution of the patch adjacent to me.</span>
+00564 <span class="comment"> There is multiple case to consider here. Take example with corner=0 (ie smBdX=smBdY=-1):</span>
+00565 <span class="comment"> - if we are a normal corner with 4 edges, take the result from the left patch of our top patch.</span>
+00566 <span class="comment"> - if the corner is on a bind Edge, the top patch may be the bigger patch, so don't take the result</span>
+00567 <span class="comment"> from his neighbor (of course).</span>
+00568 <span class="comment"> - if we are a normal corner with N!=4 edges, just do same thing than if N==4. this is false but don't bother.</span>
+00569 <span class="comment"></span>
+00570 <span class="comment"> To solve smoothly cases 1 and 2, use computeDisplaceRawOnNeighbor().</span>
+00571 <span class="comment"> This method, if nessecary, look on his neighbor to compute the value.</span>
+00572 <span class="comment"> */</span>
+00573 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00574 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile+smoothBorderY);
+00575 <span class="comment">// look on our "top" patch (this is arbitrary).</span>
+00576 patchId= uvLocatorY.selectPatch(stTileIn);
+00577 uvLocatorY.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00578 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
+00579 ret+= patchOut-&gt;computeDisplaceRawOnNeighbor(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
+00580
+00581
+00582 <span class="keywordflow">return</span> ret;
+00583 }
+00584
+00585 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_1" doxytag="NL3D::CPatch::computeDisplaceEdgeSmooth" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceEdgeSmooth </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderY</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on edge.
+<p>
+Definition at line <a class="el" href="a06158.html#l00288">288</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
+<p>
+<div class="fragment"><pre>00289 {
+00290 <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
+00291 <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
+00292 CBindInfo bindInfo;
+00293 <a class="code" href="a04558.html#a15">uint</a> edge=0;
+00294
+00295 <span class="comment">// only one must be not null</span>
+00296 <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX==0) != (smoothBorderY==0) );
+00297
+00298
+00299 <span class="comment">// Get the edge against we must share displace.</span>
+00300 <span class="keywordflow">if</span>(smoothBorderX==-1) edge=0;
+00301 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1) edge=1;
+00302 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) edge=2;
+00303 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) edge=3;
+00304 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00305
+00306 <span class="comment">// Build the bindInfo against this edge.</span>
+00307 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00308
+00309 <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
+00310 <span class="keywordflow">if</span>(!bindInfo.Zone)
+00311 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(s, t);
+00312 <span class="comment">// else, look for result in neighborhood.</span>
+00313 <span class="keywordflow">else</span>
+00314 {
+00315 <span class="keywordtype">float</span> ret;
+00316
+00317
+00318 <span class="comment">// compute bi-linear weight factors.</span>
+00319 <span class="keywordtype">float</span> sInc, tInc, sa, ta, sa1, ta1;
+00320 <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
+00321 <span class="comment">// Manage limit case: if bilinear has not chosen the good direction (because of floor and orientation).</span>
+00322 <span class="comment">// eg on Right edge: This case arise if sDecimal==0, so if sa==sa1==0.5f. result is that</span>
+00323 <span class="comment">// smoothBorderX is != than sInc on right border. same reasoning with downBorder (smoothBorderY=1).</span>
+00324
+00325 <span class="comment">// NO NEED TO DO HERE, because sInc or tInc is not used if it is bad (smoothBorder? used instead).</span>
+00326 <span class="comment">// and no need to correct sa, sa1, because in this case they are both equal to 0.5.</span>
+00327
+00328
+00329 <span class="comment">// compute Neighboring info.</span>
+00330 CPatchUVLocator uvLocator;
+00331 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00332
+00333 <span class="comment">/* NB: there is floor problems with neighbors:</span>
+00334 <span class="comment"> - difference of orientation =&gt; uv.v=1. This point to the 1th tile. But this is not the same, if</span>
+00335 <span class="comment"> v goes to up, or goes to down.</span>
+00336 <span class="comment"> - if multiple bind, problem at limit (eg a bind 1/2 on edge 0 with OrdertT=8, when uv.v= 4).</span>
+00337 <span class="comment"> because, selection of the patch is dependent of orientation too.</span>
+00338 <span class="comment"> To avoid them, just take center of (sTile, tTile) to remove ambiguity.</span>
+00339 <span class="comment"> This works because computeDisplaceRaw() use sTile, tTile to get the noiseMap, so the decimal part is not </span>
+00340 <span class="comment"> used.</span>
+00341 <span class="comment"></span>
+00342 <span class="comment"> Notice that we do this AFTER computeDisplaceBilinear() of course.</span>
+00343 <span class="comment"> */</span>
+00344 sTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile) + 0.5f;
+00345 tTile= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile) + 0.5f;
+00346 <span class="comment">// If we were exactly on the superior edge, prec compute is false... so correct this here.</span>
+00347 <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) sTile--;
+00348 <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) tTile--;
+00349
+00350
+00351 <span class="comment">// Bilinear across an edge (enjoy!!).</span>
+00352 <a class="code" href="a03660.html">CVector2f</a> stTileIn, stIn;
+00353 <a class="code" href="a03660.html">CVector2f</a> stTileOut, stOut;
+00354 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00355 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00356
+00357
+00358 <span class="comment">// if vertical edge.</span>
+00359 <span class="keywordflow">if</span>(smoothBorderX!=0)
+00360 {
+00361 <span class="comment">// compute contribution of our patch.</span>
+00362 ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile, s,t) * sa * ta;
+00363 ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile,tTile+tInc, s,t) * sa * ta1;
+00364
+00365 <span class="comment">// compute contribution of next(s) patchs.</span>
+00366
+00367 <span class="comment">// contribution of next at tTile.</span>
+00368 <span class="comment">// Keep the same coordinate.</span>
+00369 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00370 <span class="comment">// But look for the neighbor noise tile.</span>
+00371 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile);
+00372 <span class="comment">// change basis: find the s,t on the neighbor patch.</span>
+00373 patchId= uvLocator.selectPatch(stTileIn);
+00374 uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00375 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00376 <span class="comment">// Compute displace, and bi-linear on the neighbor patch.</span>
+00377 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta;
+00378
+00379 <span class="comment">// contribution of next at tTile+tInc (same reasoning).</span>
+00380 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00381 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+smoothBorderX, tTile+tInc);
+00382 patchId= uvLocator.selectPatch(stTileIn);
+00383 uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00384 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00385 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
+00386
+00387 }
+00388 <span class="comment">// else if horizontal edge.</span>
+00389 <span class="keywordflow">else</span>
+00390 {
+00391 <span class="comment">// same reasoning as above.</span>
+00392
+00393 <span class="comment">// compute contribution of our patch.</span>
+00394 ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s,t) * sa * ta;
+00395 ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile+sInc,tTile, s,t) * sa1 * ta;
+00396
+00397 <span class="comment">// compute contribution of next(s) patchs.</span>
+00398 <span class="comment">// contribution of next at tTile.</span>
+00399 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00400 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile+smoothBorderY);
+00401 patchId= uvLocator.selectPatch(stTileIn);
+00402 uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00403 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00404 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa * ta1;
+00405
+00406 <span class="comment">// contribution of next at tTile+tInc (same reasoning).</span>
+00407 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00408 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile+sInc, tTile+smoothBorderY);
+00409 patchId= uvLocator.selectPatch(stTileIn);
+00410 uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00411 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00412 ret+= patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) * sa1 * ta1;
+00413 }
+00414
+00415 <span class="keywordflow">return</span> ret;
+00416 }
+00417
+00418 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_2" doxytag="NL3D::CPatch::computeDisplaceInteriorSmooth" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceInteriorSmooth </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).
+<p>
+Definition at line <a class="el" href="a06158.html#l00258">258</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06158.html#l00228">NL3D::computeDisplaceBilinear()</a>, <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, and <a class="el" href="a06158.html#l00874">computeNoise()</a>.
+<p>
+<div class="fragment"><pre>00259 {
+00260 <span class="keywordtype">float</span> sTile= <a class="code" href="a04223.html#a626">s</a>;
+00261 <span class="keywordtype">float</span> tTile= <a class="code" href="a04223.html#a627">t</a>;
+00262 <span class="keywordtype">float</span> ret;
+00263
+00264 <span class="comment">// compute bi-linear weight factors.</span>
+00265 <span class="keywordtype">float</span> sInc, tInc, sa, ta, sa1, ta1;
+00266 <a class="code" href="a05363.html#a452">computeDisplaceBilinear</a>(sTile, tTile, sInc, tInc, sa, ta, sa1, ta1);
+00267
+00268
+00269 <span class="comment">// NB: to have smooth transition, must keep the same (s,t), so we do a transition with the noise tile of </span>
+00270 <span class="comment">// our neigbhor, but under us.</span>
+00271
+00272 <span class="comment">// speed up, using just one computeDisplaceRawCoordinates(), and multiple computeDisplaceRawInteger().</span>
+00273 <a class="code" href="a04558.html#a14">sint</a> ts,tt,ms,mt;
+00274 <a class="code" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a>(sTile, tTile, s, t, ts, tt, ms, mt);
+00275
+00276 <a class="code" href="a04558.html#a14">sint</a> sIncInt= (<a class="code" href="a04558.html#a14">sint</a>) sInc;
+00277 <a class="code" href="a04558.html#a14">sint</a> tIncInt= (<a class="code" href="a04558.html#a14">sint</a>) tInc;
+00278 ret = <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt, ms,mt) * sa * ta;
+00279 ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts+sIncInt, tt, ms,mt) * sa1 * ta;
+00280 ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt+tIncInt, ms,mt) * sa * ta1;
+00281 ret+= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts+sIncInt, tt+tIncInt, ms,mt) * sa1 * ta1;
+00282
+00283 <span class="keywordflow">return</span> ret;
+00284 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_3" doxytag="NL3D::CPatch::computeDisplaceRaw" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceRaw </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>sTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>tTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the displacement for s,t ([0;OrderS], [0;OrderT]) (sTile, tTile) choose what NoiseMap to use, and (s,t) choose the coordinate in the patch to compute this NoiseMap. Any rotation of the NoiseMap is included in this method. NB: s,t does not have to be clamped to ([0;OrderS], [0;OrderT]).
+<p>
+Definition at line <a class="el" href="a06158.html#l00219">219</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, and <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>.
+<p>
+<div class="fragment"><pre>00220 {
+00221 <a class="code" href="a04558.html#a14">sint</a> ts,tt,ms,mt;
+00222 <a class="code" href="a03057.html#NL3D_1_1CPatchz670_4">computeDisplaceRawCoordinates</a>(sTile, tTile, s, t, ts, tt, ms, mt);
+00223 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_5">computeDisplaceRawInteger</a>(ts, tt, ms, mt);
+00224
+00225 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_4" doxytag="NL3D::CPatch::computeDisplaceRawCoordinates" ></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::CPatch::computeDisplaceRawCoordinates </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>sTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>tTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ms</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mt</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
+<p>
+Definition at line <a class="el" href="a06158.html#l00168">168</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06549.html#l00040">NL3D_TILE_NOISE_MAP_SIZE</a>, <a class="el" href="a06549.html#l00038">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>, <a class="el" href="a06158.html#l00122">NL3D::noiseFloor()</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, and <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>.
+<p>
+<div class="fragment"><pre>00170 {
+00171 <span class="comment">// Choose the noiseMap.</span>
+00172 <span class="comment">// ===============================</span>
+00173 <span class="comment">// Compute coordinate in the patch.</span>
+00174 ts= <a class="code" href="a05363.html#a450">noiseFloor</a>(sTile);
+00175 tt= <a class="code" href="a05363.html#a450">noiseFloor</a>(tTile);
+00176
+00177
+00178 <span class="comment">// Sample the noiseMap with (s,t).</span>
+00179 <span class="comment">// ===============================</span>
+00180
+00181 <span class="comment">// scale the map.</span>
+00182 <span class="keywordtype">float</span> u= <a class="code" href="a04223.html#a626">s</a> * <a class="code" href="a05126.html#a0">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>;
+00183 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a576">v</a>= <a class="code" href="a04223.html#a627">t</a> * <a class="code" href="a05126.html#a0">NL3D_TILE_NOISE_MAP_TILE_FACTOR</a>;
+00184
+00185 <span class="comment">// Speed rotation.</span>
+00186 CUV uv;
+00187 <span class="keywordflow">switch</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a> &amp; 3)
+00188 {
+00189 <span class="keywordflow">case</span> 0:
+00190 uv.U= u;
+00191 uv.V= <a class="code" href="a04223.html#a576">v</a>;
+00192 <span class="keywordflow">break</span>;
+00193 <span class="keywordflow">case</span> 1:
+00194 uv.U= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-<a class="code" href="a04223.html#a576">v</a>;
+00195 uv.V= u;
+00196 <span class="keywordflow">break</span>;
+00197 <span class="keywordflow">case</span> 2:
+00198 uv.U= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-u;
+00199 uv.V= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-<a class="code" href="a04223.html#a576">v</a>;
+00200 <span class="keywordflow">break</span>;
+00201 <span class="keywordflow">case</span> 3:
+00202 uv.U= <a class="code" href="a04223.html#a576">v</a>;
+00203 uv.V= <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-u;
+00204 <span class="keywordflow">break</span>;
+00205 }
+00206
+00207 <span class="comment">// direct map (no bilinear, no round, the case where s,t &lt; 1/4 of a tile is very rare).</span>
+00208 ms= <a class="code" href="a05363.html#a450">noiseFloor</a>(uv.U);
+00209 mt= <a class="code" href="a05363.html#a450">noiseFloor</a>(uv.V);
+00210
+00211 <span class="comment">// Manage Tiling (add NL3D_TILE_NOISE_MAP_SIZE*1 should be sufficient, but take margin).</span>
+00212 ms= (ms + (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*256)) &amp; (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-1);
+00213 mt= (mt + (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*256)) &amp; (<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>-1);
+00214 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_5" doxytag="NL3D::CPatch::computeDisplaceRawInteger" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceRawInteger </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ms</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>mt</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
+<p>
+Definition at line <a class="el" href="a06158.html#l00136">136</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06760.html#l00461">NL3D::CZone::getLandscape()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a06156.html#l00089">NL3D_NOISE_MAX</a>, <a class="el" href="a06549.html#l00040">NL3D_TILE_NOISE_MAP_SIZE</a>, <a class="el" href="a06549.html#l00055">NL3D::CTileNoiseMap::Pixels</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05863.html#l00145">NL3D::CLandscape::TileBank</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, and <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>.
+<p>
+<div class="fragment"><pre>00137 {
+00138 <span class="comment">// Choose the noiseMap.</span>
+00139 <span class="comment">// ===============================</span>
+00140 <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, OrderS-1);
+00141 <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, OrderT-1);
+00142
+00143 <a class="code" href="a04558.html#a15">uint</a> tileId= tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts;
+00144 <span class="comment">// Get the tile for pass0. This is the principal tile, and this one tells what noise to take.</span>
+00145 <a class="code" href="a04558.html#a14">sint</a> tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[0];
+00146 <span class="comment">// Get the subNoise from tileElement.</span>
+00147 <a class="code" href="a04558.html#a15">uint</a> tileSubNoise= Tiles[tileId].getTileSubNoise();
+00148
+00149 <span class="comment">// retrieve the wanted noiseMap.</span>
+00150 CTileNoiseMap *noiseMap;
+00151 noiseMap = <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;getLandscape()-&gt;TileBank.getTileNoiseMap (tileNumber, tileSubNoise);
+00152
+00153 <span class="keywordflow">if</span> (noiseMap == NULL)
+00154 <span class="keywordflow">return</span> 0.0f;
+00155
+00156 <span class="comment">// Sample the noiseMap with (s,t).</span>
+00157 <span class="comment">// ===============================</span>
+00158
+00159 <span class="comment">// sample from map.</span>
+00160 <a class="code" href="a04558.html#a6">sint8</a> pix= noiseMap-&gt;Pixels[mt*<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a> + ms];
+00161
+00162 <span class="comment">// normalize.</span>
+00163 <span class="keywordflow">return</span> (<span class="keywordtype">float</span>)pix * (<a class="code" href="a04733.html#a11">NL3D_NOISE_MAX</a> / 127.f);
+00164 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_6" doxytag="NL3D::CPatch::computeDisplaceRawOnNeighbor" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::computeDisplaceRawOnNeighbor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>sTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>tTile</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+usefull only for <a class="el" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth()</a>. This method, if nessecary (ie sTile or tTile &lt;0 or &gt;Order), look on his neighbor to compute the value.
+<p>
+Definition at line <a class="el" href="a06158.html#l00422">422</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00219">computeDisplaceRaw()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>.
+<p>
+<div class="fragment"><pre>00423 {
+00424 <a class="code" href="a04558.html#a14">sint</a> edge= -1;
+00425
+00426 <span class="comment">// look on what neighbor patch we must find the value (if any).</span>
+00427 <span class="keywordflow">if</span>(sTile&lt;0) edge=0;
+00428 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(tTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) edge=1;
+00429 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(sTile&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) edge=2;
+00430 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(tTile&lt;0) edge=3;
+00431
+00432 <span class="comment">// If the location is In the patch, just return normal value.</span>
+00433 <span class="keywordflow">if</span>(edge==-1)
+00434 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s, t);
+00435 <span class="comment">// else must find on neighbor.</span>
+00436 <span class="keywordflow">else</span>
+00437 {
+00438 CBindInfo bindInfo;
+00439 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00440
+00441 <span class="comment">// Fast reject: if no neighbor on the edge, just do a simple computeDisplaceRaw()</span>
+00442 <span class="keywordflow">if</span>(!bindInfo.Zone)
+00443 {
+00444 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz670_3">computeDisplaceRaw</a>(sTile, tTile, s, t);
+00445 }
+00446 <span class="comment">// else must find on neighbor.</span>
+00447 <span class="keywordflow">else</span>
+00448 {
+00449 CPatchUVLocator uvLocator;
+00450 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00451
+00452 <a class="code" href="a03660.html">CVector2f</a> stTileIn, stIn;
+00453 <a class="code" href="a03660.html">CVector2f</a> stTileOut, stOut;
+00454 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00455 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00456
+00457 <span class="comment">// look on neighbor. same reasoning as in computeDisplaceEdgeSmooth();</span>
+00458 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00459 stTileIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(sTile, tTile);
+00460 patchId= uvLocator.selectPatch(stTileIn);
+00461 uvLocator.locateUV(stTileIn, patchId, patchOut, stTileOut);
+00462 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00463 <span class="keywordflow">return</span> patchOut-&gt;computeDisplaceRaw(stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stTileOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>);
+00464 }
+00465
+00466 }
+00467 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd8" doxytag="NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB" ></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::CPatch::computeGeomorphAlphaFar1VertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01329">1329</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
+<p>
+<div class="fragment"><pre>01330 {
+01331 <span class="comment">// Traverse the vertList.</span>
+01332 CTessFarVertex *pVert;
+01333 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01334 {
+01335 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01336 <span class="comment">// Compute/build the new vertex.</span>
+01337 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
+01338 CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
+01339
+01340 <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
+01341
+01342 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
+01343 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+01344
+01345 <span class="comment">// Set Alpha color.</span>
+01346 <span class="keyword">static</span> <a class="code" href="a03337.html">CRGBA</a> col(255,255,255,255);
+01347 <span class="comment">// For Far1, use alpha fro transition.</span>
+01348 <span class="comment">// Prefer Use Pos, because of caching. So little difference between Soft and VertexProgram mode.</span>
+01349 <span class="keywordtype">float</span> f= (pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::RefineCenter).sqrnorm();
+01350 f= (f-<a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>) * <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>;
+01351 <a class="code" href="a05378.html#a374">clamp</a>(f,0,1);
+01352 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= (<a class="code" href="a04558.html#a7">uint8</a>)(f*255);
+01353 *(<a class="code" href="a03337.html">CRGBA</a>*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.ColorOff)= col;
+01354 }
+01355 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd9" doxytag="NL3D::CPatch::computeGeomorphFar0VertexListVB" ></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::CPatch::computeGeomorphFar0VertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01311">1311</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
+<p>
+<div class="fragment"><pre>01312 {
+01313 <span class="comment">// Traverse the vertList.</span>
+01314 CTessFarVertex *pVert;
+01315 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01316 {
+01317 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01318 <span class="comment">// Compute/build the new vertex.</span>
+01319 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
+01320 CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
+01321
+01322 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
+01323 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+01324 }
+01325 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd10" doxytag="NL3D::CPatch::computeGeomorphTileVertexListVB" ></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::CPatch::computeGeomorphTileVertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01359">1359</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
+<p>
+<div class="fragment"><pre>01360 {
+01361 <span class="comment">// Traverse the vertList.</span>
+01362 CTessNearVertex *pVert;
+01363 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
+01364 {
+01365 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01366 <span class="comment">// Compute/build the new vertex.</span>
+01367 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentTileVBInfo.VertexCoordPointer;
+01368 CurVBPtr+= pVert-&gt;Index * CLandscapeGlobals::CurrentTileVBInfo.VertexSize;
+01369
+01370 <span class="comment">// Set Geomorphed Position. Set it local to the current center of landscape</span>
+01371 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+01372 }
+01373 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd11" doxytag="NL3D::CPatch::computeGeomorphVertexList" ></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::CPatch::computeGeomorphVertexList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01298">1298</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06497.html#l00113">NL3D::CTessVertex::computeGeomPos()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>.
+<p>
+<div class="fragment"><pre>01299 {
+01300 <span class="comment">// Traverse the vertList.</span>
+01301 CTessFarVertex *pVert;
+01302 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01303 {
+01304 <span class="comment">// compute geomorph.</span>
+01305 pVert-&gt;Src-&gt;computeGeomPos();
+01306 }
+01307 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_3" doxytag="NL3D::CPatch::computeNearBlockLightmap" ></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::CPatch::computeNearBlockLightmap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>lightText</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00864">864</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>, <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06156.html#l00579">getSmoothFlag()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06166.html#l00066">NL3D::CPatchUVLocator::sameEdgeOrder()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, and <a class="el" href="a06157.html#l01909">updateTessBlockLighting()</a>.
+<p>
+<div class="fragment"><pre>00865 {
+00866 <a class="code" href="a04558.html#a14">sint</a> ts= uts;
+00867 <a class="code" href="a04558.html#a14">sint</a> tt= utt;
+00868
+00869 <span class="comment">// hardcoded for 10x10.</span>
+00870 <a class="code" href="a04199.html#a6">nlassert</a>(NL_TILE_LIGHTMAP_SIZE==10);
+00871 <a class="code" href="a03337.html">CRGBA</a> *dest;
+00872 <a class="code" href="a04558.html#a15">uint</a> edge;
+00873 <a class="code" href="a04558.html#a15">uint</a> corner;
+00874
+00875 <span class="comment">// Compute center of the TessBlock: the 2x2 tiles.</span>
+00876 <span class="comment">//=================</span>
+00877 <span class="comment">// compute tile 0,0 of the tessBlock. must decal of 1 pixel.</span>
+00878 dest= lightText+<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1;
+00879 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts, tt, dest, NL_TILE_LIGHTMAP_SIZE);
+00880 <span class="comment">// compute tile 1,0 of the tessBlock. must decal of 1 pixel.</span>
+00881 dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
+00882 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts+1, tt, dest, NL_TILE_LIGHTMAP_SIZE);
+00883 <span class="comment">// compute tile 0,1 of the tessBlock. must decal of 1 pixel.</span>
+00884 dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
+00885 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts, tt+1, dest, NL_TILE_LIGHTMAP_SIZE);
+00886 <span class="comment">// compute tile 1,1 of the tessBlock. must decal of 1 pixel.</span>
+00887 dest= lightText + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>+1 ;
+00888 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_4">computeTileLightmap</a>(ts+1, tt+1, dest, NL_TILE_LIGHTMAP_SIZE);
+00889
+00890
+00891 <span class="comment">// Compute edges of the TessBlock.</span>
+00892 <span class="comment">//=================</span>
+00893 <span class="keywordtype">bool</span> edgeBorder[4];
+00894 <span class="comment">// where are we on a border of a patch??</span>
+00895 edgeBorder[0]= ( ts==0 );
+00896 edgeBorder[1]= ( tt == <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>-2 );
+00897 edgeBorder[2]= ( ts == <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>-2 );
+00898 edgeBorder[3]= ( tt==0 );
+00899
+00900 <span class="comment">// For all edges.</span>
+00901 <span class="keywordflow">for</span>(edge=0; edge&lt;4; edge++)
+00902 {
+00903 <span class="comment">// compute dest info.</span>
+00904 <span class="comment">//==============</span>
+00905 <span class="comment">// Are we on a vertical edge or horizontal edge??</span>
+00906 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a582">stride</a>= (edge&amp;1)==0? <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a> : 1;
+00907
+00908 <span class="comment">// must compute on which tile we must find info.</span>
+00909 <a class="code" href="a04558.html#a14">sint</a> decalS=0;
+00910 <a class="code" href="a04558.html#a14">sint</a> decalT=0;
+00911 <span class="comment">// and must compute ptr, where we store the result of the edge.</span>
+00912 <span class="keywordflow">switch</span>(edge)
+00913 {
+00914 <span class="keywordflow">case</span> 0: decalS=-1; dest= lightText + 0 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+00915 <span class="keywordflow">case</span> 1: decalT= 2; dest= lightText + 1 + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+00916 <span class="keywordflow">case</span> 2: decalS= 2; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+00917 <span class="keywordflow">case</span> 3: decalT=-1; dest= lightText + 1; <span class="keywordflow">break</span>;
+00918 };
+00919
+00920 <span class="comment">// compute the second tile dest info.</span>
+00921 <a class="code" href="a03337.html">CRGBA</a> *dest2;
+00922 <a class="code" href="a04558.html#a14">sint</a> decalS2;
+00923 <a class="code" href="a04558.html#a14">sint</a> decalT2;
+00924 <span class="comment">// if vertical edge.</span>
+00925 <span class="keywordflow">if</span>((edge&amp;1)==0)
+00926 {
+00927 <span class="comment">// Next Y tile.</span>
+00928 dest2= dest + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>;
+00929 decalS2= decalS;
+00930 decalT2= decalT+1;
+00931 }
+00932 <span class="keywordflow">else</span>
+00933 {
+00934 <span class="comment">// Next X tile.</span>
+00935 dest2= dest + <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+00936 decalS2= decalS+1;
+00937 decalT2= decalT;
+00938 }
+00939
+00940
+00941 <span class="comment">// If we are not on a border of a patch, just compute on the interior of the patch.</span>
+00942 <span class="comment">//==============</span>
+00943 <span class="keywordflow">if</span>(!edgeBorder[edge])
+00944 {
+00945 <span class="comment">// find the result on the mirrored border of us. First tile.</span>
+00946 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a>(ts+decalS, tt+decalT, (edge+2)&amp;3, dest, stride, <span class="keyword">false</span>);
+00947
+00948 <span class="comment">// find the result on the mirrored border of us. Second Tile.</span>
+00949 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_6">computeTileLightmapEdge</a>(ts+decalS2, tt+decalT2, (edge+2)&amp;3, dest2, stride, <span class="keyword">false</span>);
+00950
+00951 }
+00952 <span class="comment">// else, slightly complicated, must find the result on neighbor patch(s).</span>
+00953 <span class="comment">//==============</span>
+00954 <span class="keywordflow">else</span>
+00955 {
+00956 CPatchUVLocator uvLocator;
+00957 CBindInfo bindInfo;
+00958 bindInfo.Zone= NULL;
+00959
+00960 <span class="comment">// if smoothed edge, search the neighbor.</span>
+00961 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
+00962 {
+00963 <span class="comment">// Build the bindInfo against this edge.</span>
+00964 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00965
+00966 <span class="comment">// if ok, build the uv info against this edge.</span>
+00967 <span class="keywordflow">if</span>(bindInfo.Zone)
+00968 {
+00969 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00970 <span class="comment">// if there is not same tile order across the edge, invalidate the smooth.</span>
+00971 <span class="comment">// This is rare, so don't bother.</span>
+00972 <span class="keywordflow">if</span>(!uvLocator.sameEdgeOrder())
+00973 bindInfo.Zone= NULL;
+00974 }
+00975 }
+00976
+00977
+00978 <span class="comment">// Fast reject: if no neighbor, or if not smoothed, or if edge order pb, just copy from my interior.</span>
+00979 <span class="keywordflow">if</span>(!bindInfo.Zone)
+00980 {
+00981 <a class="code" href="a03337.html">CRGBA</a> *<a class="code" href="a04223.html#a652">src</a>=0;
+00982 <span class="keywordflow">switch</span>(edge)
+00983 {
+00984 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a652">src</a>= dest + 1; <span class="keywordflow">break</span>;
+00985 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a652">src</a>= dest - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+00986 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a652">src</a>= dest - 1; <span class="keywordflow">break</span>;
+00987 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a652">src</a>= dest + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+00988 };
+00989
+00990 <span class="comment">// fill the NL_LUMEL_BY_TILE*2 (8) pixels.</span>
+00991 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> n=<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*2; n&gt;0; n--, <a class="code" href="a04223.html#a652">src</a>+=<a class="code" href="a04223.html#a582">stride</a>, dest+=<a class="code" href="a04223.html#a582">stride</a>)
+00992 *dest= *<a class="code" href="a04223.html#a652">src</a>;
+00993 }
+00994 <span class="comment">// else, ok, get from neighbor.</span>
+00995 <span class="keywordflow">else</span>
+00996 {
+00997 <a class="code" href="a03660.html">CVector2f</a> stIn, stOut;
+00998 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00999 <a class="code" href="a04558.html#a15">uint</a> patchId;
+01000 <a class="code" href="a04558.html#a15">uint</a> edgeOut;
+01001 <span class="keywordtype">bool</span> inverse;
+01002
+01003 <span class="comment">// First Tile.</span>
+01004 <span class="comment">//=========</span>
+01005 <span class="comment">// to remove floor pbs, take the center of the wanted tile.</span>
+01006 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(ts+decalS + 0.5f, tt+decalT + 0.5f);
+01007 patchId= uvLocator.selectPatch(stIn);
+01008 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+01009 <span class="comment">// must find what edge on neighbor to compute, and if we must inverse (swap) result.</span>
+01010 <span class="comment">// easy: the edge of the tile is the edge of the patch where we are binded.</span>
+01011 edgeOut= bindInfo.Edge[patchId];
+01012 <span class="comment">// edge0 is oriented in T increasing order. edge1 is oriented in S increasing order.</span>
+01013 <span class="comment">// edge2 is oriented in T decreasing order. edge3 is oriented in S decreasing order.</span>
+01014 <span class="comment">// inverse is true if same sens on both edges (because of mirroring, sens should be different).</span>
+01015 inverse= (edge&gt;&gt;1)==(edgeOut&gt;&gt;1);
+01016 <span class="comment">// compute the lightmap on the edge of the neighbor.</span>
+01017 patchOut-&gt;computeTileLightmapEdge((<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>), (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>), edgeOut, dest, stride, inverse);
+01018
+01019 <span class="comment">// Second Tile.</span>
+01020 <span class="comment">//=========</span>
+01021 <span class="comment">// same reasoning.</span>
+01022 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(ts+decalS2 + 0.5f, tt+decalT2 + 0.5f);
+01023 patchId= uvLocator.selectPatch(stIn);
+01024 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+01025 edgeOut= bindInfo.Edge[patchId];
+01026 inverse= (edge&gt;&gt;1)==(edgeOut&gt;&gt;1);
+01027 patchOut-&gt;computeTileLightmapEdge((<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>), (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>), edgeOut, dest2, stride, inverse);
+01028 }
+01029
+01030 }
+01031 }
+01032
+01033
+01034 <span class="comment">// Compute corners of the TessBlock.</span>
+01035 <span class="comment">//=================</span>
+01036 <span class="keywordtype">bool</span> cornerOnPatchEdge[4];
+01037 <span class="keywordtype">bool</span> cornerOnPatchCorner[4];
+01038 <span class="comment">// where are we on a edge border of a patch??</span>
+01039 cornerOnPatchEdge[0]= edgeBorder[3] != edgeBorder[0];
+01040 cornerOnPatchEdge[1]= edgeBorder[0] != edgeBorder[1];
+01041 cornerOnPatchEdge[2]= edgeBorder[1] != edgeBorder[2];
+01042 cornerOnPatchEdge[3]= edgeBorder[2] != edgeBorder[3];
+01043 <span class="comment">// where are we on a corner border of a patch??</span>
+01044 cornerOnPatchCorner[0]= edgeBorder[3] &amp;&amp; edgeBorder[0];
+01045 cornerOnPatchCorner[1]= edgeBorder[0] &amp;&amp; edgeBorder[1];
+01046 cornerOnPatchCorner[2]= edgeBorder[1] &amp;&amp; edgeBorder[2];
+01047 cornerOnPatchCorner[3]= edgeBorder[2] &amp;&amp; edgeBorder[3];
+01048
+01049 <span class="comment">// For all corners.</span>
+01050 <span class="keywordflow">for</span>(corner=0; corner&lt;4; corner++)
+01051 {
+01052 <span class="comment">// compute dest info.</span>
+01053 <span class="comment">//==============</span>
+01054 <span class="comment">// must compute on which tile we must find info.</span>
+01055 <a class="code" href="a04558.html#a14">sint</a> decalS=0;
+01056 <a class="code" href="a04558.html#a14">sint</a> decalT=0;
+01057 <span class="comment">// and must compute ptr, where we store the result of the corner.</span>
+01058 <span class="keywordflow">switch</span>(corner)
+01059 {
+01060 <span class="keywordflow">case</span> 0: decalS=-1; decalT=-1; dest= lightText + 0 + 0; <span class="keywordflow">break</span>;
+01061 <span class="keywordflow">case</span> 1: decalS=-1; decalT= 2; dest= lightText + 0 + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01062 <span class="keywordflow">case</span> 2: decalS= 2; decalT= 2; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1)*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01063 <span class="keywordflow">case</span> 3: decalS= 2; decalT=-1; dest= lightText + (<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>-1) + 0; <span class="keywordflow">break</span>;
+01064 };
+01065
+01066
+01067 <span class="comment">// If we are not on a border of a patch, just compute on the interior of the patch.</span>
+01068 <span class="comment">//==============</span>
+01069 <span class="comment">// if the corner is IN the patch.</span>
+01070 <span class="keywordflow">if</span>(!cornerOnPatchCorner[corner] &amp;&amp; !cornerOnPatchEdge[corner])
+01071 {
+01072 <span class="comment">// what pixel to read.</span>
+01073 <a class="code" href="a04558.html#a15">uint</a> subS, subT;
+01074 <span class="keywordflow">if</span>(decalS==-1) subS= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1;
+01075 <span class="keywordflow">else</span> subS= 0;
+01076 <span class="keywordflow">if</span>(decalT==-1) subT= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1;
+01077 <span class="keywordflow">else</span> subT= 0;
+01078
+01079 <span class="comment">// find the result on the corner of the neighbor tile.</span>
+01080 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(ts+decalS, tt+decalT, subS, subT, dest);
+01081 }
+01082 <span class="keywordflow">else</span>
+01083 {
+01084 <span class="comment">// By default, fill the corner with our interior corner. Because other methods may fail.</span>
+01085 <a class="code" href="a03337.html">CRGBA</a> *<a class="code" href="a04223.html#a652">src</a>=0;
+01086 <span class="keywordflow">switch</span>(corner)
+01087 {
+01088 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a652">src</a>= dest + 1 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01089 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a652">src</a>= dest + 1 - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01090 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a652">src</a>= dest - 1 - <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01091 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a652">src</a>= dest - 1 + <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>; <span class="keywordflow">break</span>;
+01092 };
+01093
+01094 <span class="comment">// fill the pixel.</span>
+01095 *dest= *<a class="code" href="a04223.html#a652">src</a>;
+01096
+01097 <span class="comment">// get the coordinate of the corner, in our [0,Order] basis. get it at the center of the pixel.</span>
+01098 CBindInfo bindInfo;
+01099 CPatchUVLocator uvLocator;
+01100 <a class="code" href="a03660.html">CVector2f</a> stIn, stOut;
+01101 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+01102 <a class="code" href="a04558.html#a15">uint</a> patchId;
+01103 <span class="keywordtype">float</span> decX, decY;
+01104 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> lumelSize= 1.f/<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+01105 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> semiLumelSize= 0.5f*lumelSize;
+01106
+01107 <span class="keywordflow">if</span>(decalS==-1) decX= - semiLumelSize;
+01108 <span class="keywordflow">else</span> decX= 2+ semiLumelSize;
+01109 <span class="keywordflow">if</span>(decalT==-1) decY= - semiLumelSize;
+01110 <span class="keywordflow">else</span> decY= 2+ semiLumelSize;
+01111 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>( ts+decX, tt+decY);
+01112
+01113
+01114 <span class="comment">// if the corner is on One edge only of the patch.</span>
+01115 <span class="keywordflow">if</span>(cornerOnPatchEdge[corner])
+01116 {
+01117 <span class="comment">// find the edge where to read this corner: hard edge after or before this corner.</span>
+01118 <span class="keywordflow">if</span>(edgeBorder[corner]) edge= corner;
+01119 <span class="keywordflow">else</span> edge= (corner+4-1) &amp; 3;
+01120
+01121 <span class="comment">// if this edge is smoothed, find on neighbor.</span>
+01122 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
+01123 {
+01124 <span class="comment">// retrieve neigbhor info.</span>
+01125 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+01126
+01127 <span class="comment">// if neighbor present.</span>
+01128 <span class="keywordflow">if</span>(bindInfo.Zone)
+01129 {
+01130 <span class="comment">// Ok, search uv on this patch.</span>
+01131 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+01132 patchId= uvLocator.selectPatch(stIn);
+01133 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+01134
+01135 <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis), and get from neighbor patch</span>
+01136 <a class="code" href="a04558.html#a14">sint</a> u, <a class="code" href="a04223.html#a576">v</a>;
+01137 u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
+01138 <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
+01139 patchOut-&gt;computeTileLightmapPixel(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
+01140 }
+01141 }
+01142 <span class="comment">// else we must still smooth with our lumel on this patch, so get it from neighbor on edge.</span>
+01143 <span class="keywordflow">else</span>
+01144 {
+01145 <span class="comment">// first, clamp to our patch (recenter on the previous pixel)</span>
+01146 <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>&lt;0) stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>+= lumelSize;
+01147 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>) stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>-= lumelSize;
+01148 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>&lt;0) stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>+= lumelSize;
+01149 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>) stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>-= lumelSize;
+01150
+01151 <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis), and get from this patch</span>
+01152 <a class="code" href="a04558.html#a14">sint</a> u, <a class="code" href="a04223.html#a576">v</a>;
+01153 u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
+01154 <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
+01155 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
+01156 }
+01157 }
+01158 <span class="comment">// else it is on a corner of the patch.</span>
+01159 <span class="keywordflow">else</span>
+01160 {
+01161 <span class="comment">// if the corner of the patch (same as tile corner) is smoothed, find on neighbor</span>
+01162 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a>(corner))
+01163 {
+01164 <span class="comment">// retrieve neigbhor info. NB: use edgeId=corner, (corner X is the start of the edge X)it works.</span>
+01165 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(corner, bindInfo);
+01166
+01167 <span class="comment">// if neighbor present.</span>
+01168 <span class="keywordflow">if</span>(bindInfo.Zone)
+01169 {
+01170 <span class="comment">// Ok, search uv on this patch.</span>
+01171 uvLocator.build(<span class="keyword">this</span>, corner, bindInfo);
+01172 patchId= uvLocator.selectPatch(stIn);
+01173 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+01174
+01175 <span class="comment">// same reasoning as in computeDisplaceCornerSmooth(), must find the pixel on the neighbor </span>
+01176 <span class="comment">// of our neighbor. But the current corner may be a corner on a bind X/1. All is managed by doing</span>
+01177 <span class="comment">// this way.</span>
+01178 patchOut-&gt;computeTileLightmapPixelAroundCorner(stOut, dest, <span class="keyword">true</span>);
+01179 }
+01180 }
+01181 }
+01182 }
+01183
+01184 }
+01185
+01186
+01187 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd12" doxytag="NL3D::CPatch::computeNewFar" ></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::CPatch::computeNewFar </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>patchSphere</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>newFar0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>newFar1</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00054">54</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a05505.html#l00048">NLMISC::CBSphere::Center</a>, <a class="el" href="a06156.html#l00827">Far0UBias</a>, <a class="el" href="a06156.html#l00827">Far0UScale</a>, <a class="el" href="a06156.html#l00827">Far0VBias</a>, <a class="el" href="a06156.html#l00827">Far0VScale</a>, <a class="el" href="a06156.html#l00828">Far1UBias</a>, <a class="el" href="a06156.html#l00828">Far1UScale</a>, <a class="el" href="a06156.html#l00828">Far1VBias</a>, <a class="el" href="a06156.html#l00828">Far1VScale</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06156.html#l00054">NL_PATCH_FAR0_ROTATED</a>, <a class="el" href="a06156.html#l00055">NL_PATCH_FAR1_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a05505.html#l00049">NLMISC::CBSphere::Radius</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00226">updateTextureFarOnly()</a>.
+<p>
+<div class="fragment"><pre>00055 {
+00056 <span class="comment">// Classify the patch.</span>
+00057 <span class="comment">//========================</span>
+00058 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a628">r</a>= (CLandscapeGlobals::RefineCenter-patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo0">Center</a>).norm() - patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo1">Radius</a>;
+00059 <span class="keywordtype">float</span> rr=0.0;
+00060 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::TileDistNear)
+00061 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::TileDistNear, newFar0= 0;
+00062 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::Far0Dist)
+00063 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::Far0Dist, newFar0= 1;
+00064 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a628">r</a>&lt;CLandscapeGlobals::Far1Dist)
+00065 rr= <a class="code" href="a04223.html#a628">r</a>-CLandscapeGlobals::Far1Dist, newFar0= 2;
+00066 <span class="keywordflow">else</span>
+00067 newFar0= 3;
+00068 <span class="comment">// Transition with the next level.</span>
+00069 newFar1=0;
+00070 <span class="keywordflow">if</span>(newFar0&lt;3 &amp;&amp; rr&gt;-(CLandscapeGlobals::FarTransition+2*patchSphere.<a class="code" href="a02291.html#NLMISC_1_1CBSphereo1">Radius</a>))
+00071 {
+00072 newFar1= newFar0+1;
+00073 }
+00074
+00075
+00076 <span class="comment">// Update Texture Info.</span>
+00077 <span class="comment">//========================</span>
+00078 <span class="keywordflow">if</span>(newFar0!=<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a> || newFar1!=<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
+00079 {
+00080 <span class="comment">// Backup old pass0</span>
+00081 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a> *oldPass0=<a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>;
+00082 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a> *oldPass1=<a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>;
+00083
+00084 <span class="comment">// Checks</span>
+00085 <span class="keywordflow">if</span> (oldPass0==NULL)
+00086 <a class="code" href="a04199.html#a6">nlassert</a> (Far0&lt;=0);
+00087 <span class="keywordflow">if</span> (oldPass1==NULL)
+00088 <a class="code" href="a04199.html#a6">nlassert</a> (Far1&lt;=0);
+00089
+00090 <span class="keywordtype">float</span> oldFar0UScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a>;
+00091 <span class="keywordtype">float</span> oldFar0VScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a>;
+00092 <span class="keywordtype">float</span> oldFar0UBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
+00093 <span class="keywordtype">float</span> oldFar0VBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
+00094 <a class="code" href="a04558.html#a7">uint8</a> oldFlags=<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>;
+00095
+00096
+00097 <span class="comment">// Don't delete the pass0 if the new newFar1 will use it</span>
+00098 <span class="keywordflow">if</span> ((newFar1==<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)&amp;&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0))
+00099 _PatchRdrPassFar0=NULL;
+00100
+00101 <span class="comment">// Don't delete the pass1 if the new newFar0 will use it</span>
+00102 <span class="keywordflow">if</span> ((newFar0==<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)&amp;&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0))
+00103 _PatchRdrPassFar1=NULL;
+00104
+00105 <span class="comment">// Pass0 have changed ?</span>
+00106 <span class="keywordflow">if</span> (newFar0!=<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)
+00107 {
+00108 <span class="comment">// Compute / get the texture Far.</span>
+00109 <span class="keywordflow">if</span>(newFar0&gt;0)
+00110 {
+00111 <span class="comment">// Free the old pass, don't used any more</span>
+00112 <span class="keywordflow">if</span> (_PatchRdrPassFar0)
+00113 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
+00114
+00115 <span class="comment">// Can we use the old pass1 ?</span>
+00116 <span class="keywordflow">if</span> (newFar0==<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
+00117 {
+00118 <span class="comment">// Yes, recycle it!</span>
+00119 _PatchRdrPassFar0=oldPass1;
+00120
+00121 <span class="comment">// Copy uv coordinates</span>
+00122 Far0UScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a>;
+00123 Far0VScale=<a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a>;
+00124 Far0UBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
+00125 Far0VBias=<a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
+00126
+00127 <span class="comment">// Copy rotation flag</span>
+00128 Flags&amp;=~<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>; <span class="comment">// erase it</span>
+00129 <span class="keywordflow">if</span> (Flags&amp;<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>)
+00130 Flags|=<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>; <span class="comment">// copy it</span>
+00131 }
+00132 <span class="keywordflow">else</span> <span class="comment">// get a new render pass</span>
+00133 {
+00134 <span class="comment">// Rotation boolean</span>
+00135 <span class="keywordtype">bool</span> bRot;
+00136 _PatchRdrPassFar0=<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getFarRenderPass(<span class="keyword">this</span>, newFar0, Far0UScale, Far0VScale, Far0UBias, Far0VBias, bRot);
+00137
+00138 <span class="comment">// Flags is set if the far texture is rotated of 90deg to the left</span>
+00139 <span class="keywordflow">if</span> (bRot)
+00140 Flags|=<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;
+00141 <span class="keywordflow">else</span>
+00142 Flags&amp;=~<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>;
+00143 }
+00144 }
+00145 <span class="keywordflow">else</span> <span class="comment">// no more far pass0</span>
+00146 {
+00147 <span class="keywordflow">if</span> (_PatchRdrPassFar0)
+00148 {
+00149 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
+00150 _PatchRdrPassFar0=NULL;
+00151 }
+00152 }
+00153 }
+00154
+00155 <span class="comment">// Pass1 have changed ?</span>
+00156 <span class="keywordflow">if</span> (newFar1!=<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>)
+00157 {
+00158 <span class="comment">// Now let's go with pass1</span>
+00159 <span class="keywordflow">if</span>(newFar1&gt;0)
+00160 {
+00161 <span class="comment">// Delete the pass1 if not used any more</span>
+00162 <span class="keywordflow">if</span> (_PatchRdrPassFar1)
+00163 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
+00164
+00165 <span class="comment">// Can we use the old pass1 ?</span>
+00166 <span class="keywordflow">if</span> (newFar1==<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>)
+00167 {
+00168 <span class="comment">// Yes, recycle it!</span>
+00169 _PatchRdrPassFar1= oldPass0;
+00170 <a class="code" href="a04199.html#a6">nlassert</a> (_PatchRdrPassFar1);
+00171
+00172 <span class="comment">// Copy uv coordinates</span>
+00173 <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a>=oldFar0UScale;
+00174 <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a>=oldFar0VScale;
+00175 <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>=oldFar0UBias;
+00176 <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>=oldFar0VBias;
+00177
+00178 <span class="comment">// Copy rotation flag</span>
+00179 Flags&amp;=~<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>; <span class="comment">// erase it</span>
+00180 <span class="keywordflow">if</span> (oldFlags&amp;<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>)
+00181 Flags|=<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>; <span class="comment">// copy it</span>
+00182 }
+00183 <span class="keywordflow">else</span> <span class="comment">// get a new render pass</span>
+00184 {
+00185 <span class="comment">// Rotation boolean</span>
+00186 <span class="keywordtype">bool</span> bRot;
+00187 _PatchRdrPassFar1=<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getFarRenderPass(<span class="keyword">this</span>, newFar1, Far1UScale, Far1VScale, Far1UBias, Far1VBias, bRot);
+00188 <a class="code" href="a04199.html#a6">nlassert</a> (_PatchRdrPassFar1);
+00189
+00190 <span class="comment">// Flags is set if the far texture is rotated of 90deg to the left</span>
+00191 <span class="keywordflow">if</span> (bRot)
+00192 Flags|=<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;
+00193 <span class="keywordflow">else</span>
+00194 Flags&amp;=~<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>;
+00195 }
+00196
+00197 <span class="comment">// Compute info for transition.</span>
+00198 <span class="keywordtype">float</span> farDist;
+00199 <span class="keywordflow">switch</span>(newFar1)
+00200 {
+00201 <span class="keywordflow">case</span> 1: farDist= CLandscapeGlobals::TileDistNear; <span class="keywordflow">break</span>;
+00202 <span class="keywordflow">case</span> 2: farDist= CLandscapeGlobals::Far0Dist; <span class="keywordflow">break</span>;
+00203 <span class="keywordflow">case</span> 3: farDist= CLandscapeGlobals::Far1Dist; <span class="keywordflow">break</span>;
+00204 <span class="keywordflow">default</span>: <a class="code" href="a04199.html#a12">nlstop</a>;
+00205 };
+00206 <a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>= <a class="code" href="a05378.html#a373">sqr</a>(farDist-CLandscapeGlobals::FarTransition);
+00207 <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>= 1.0f/(<a class="code" href="a05378.html#a373">sqr</a>(farDist)-<a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>);
+00208 }
+00209 <span class="keywordflow">else</span> <span class="comment">// no more far pass1</span>
+00210 {
+00211 <span class="keywordflow">if</span> (_PatchRdrPassFar1)
+00212 {
+00213 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
+00214 _PatchRdrPassFar1=NULL;
+00215 }
+00216 }
+00217 }
+00218
+00219 }
+00220
+00221 <span class="comment">// Don't copy Far0 and Far1.</span>
+00222 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_7" doxytag="NL3D::CPatch::computeNoise" ></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::CPatch::computeNoise </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>displace</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the Final displacement for s,t ([0;1], [0;1]). This is the top call. displace.norm() should be &lt;= NL3D_NOISE_MAX.
+<p>
+Definition at line <a class="el" href="a06158.html#l00874">874</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00258">computeDisplaceInteriorSmooth()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01338">computeVertex()</a>.
+<p>
+<div class="fragment"><pre>00875 {
+00876 <span class="keywordtype">float</span> so= <a class="code" href="a04223.html#a626">s</a>*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00877 <span class="keywordtype">float</span> to= <a class="code" href="a04223.html#a627">t</a>*<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00878
+00879
+00880 <span class="comment">// Pre-Compute Border Smothing.</span>
+00881 <span class="comment">//=========================</span>
+00882 <span class="comment">// If we are on a border, flag it.</span>
+00883 <a class="code" href="a04558.html#a6">sint8</a> smoothNormalBorderX= 0;
+00884 <a class="code" href="a04558.html#a6">sint8</a> smoothNormalBorderY= 0;
+00885 <span class="comment">// NB: because OrderS and OrderT &gt;=2, smoothNormalBorderX=-1 and smoothNormalBorderX=1 are exclusive (as smoothNormalBorderY).</span>
+00886 <span class="keywordflow">if</span>(so &lt; 1) smoothNormalBorderX= -1;
+00887 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(so &gt; OrderS-1) smoothNormalBorderX= 1;
+00888 <span class="keywordflow">if</span>(to &lt; 1) smoothNormalBorderY= -1;
+00889 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(to &gt; OrderT-1) smoothNormalBorderY= 1;
+00890
+00891 <span class="keywordtype">bool</span> smoothNormalEdge= (smoothNormalBorderX!=0) != (smoothNormalBorderY!=0);
+00892 <span class="keywordtype">bool</span> smoothNormalCorner= (smoothNormalBorderX!=0) &amp;&amp; (smoothNormalBorderY!=0);
+00893
+00894
+00895 <span class="comment">// Do same thing, but to know if we must compute a displace on an interior, on an edge or on a corner.</span>
+00896 <a class="code" href="a04558.html#a6">sint8</a> smoothDisplaceBorderX= 0;
+00897 <a class="code" href="a04558.html#a6">sint8</a> smoothDisplaceBorderY= 0;
+00898 <span class="comment">// NB: because OrderS and OrderT &gt;=2, smoothBorderX=-1 and smoothBorderX=1 are exclusive (as smoothBorderY).</span>
+00899 <span class="keywordflow">if</span>(so &lt; 0.5) smoothDisplaceBorderX= -1;
+00900 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(so &gt; OrderS-0.5) smoothDisplaceBorderX= 1;
+00901 <span class="keywordflow">if</span>(to &lt; 0.5) smoothDisplaceBorderY= -1;
+00902 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(to &gt; OrderT-0.5) smoothDisplaceBorderY= 1;
+00903
+00904 <span class="keywordtype">bool</span> smoothDisplaceEdge= (smoothDisplaceBorderX!=0) != (smoothDisplaceBorderY!=0);
+00905 <span class="keywordtype">bool</span> smoothDisplaceCorner= (smoothDisplaceBorderX!=0) &amp;&amp; (smoothDisplaceBorderY!=0);
+00906
+00907
+00908 <span class="comment">// Compute Displace value.</span>
+00909 <span class="comment">//=========================</span>
+00910 <span class="keywordtype">float</span> displaceValue;
+00911
+00912 <span class="keywordflow">if</span>(smoothDisplaceCorner)
+00913 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_0">computeDisplaceCornerSmooth</a>(so, to, smoothDisplaceBorderX, smoothDisplaceBorderY);
+00914 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothDisplaceEdge)
+00915 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_1">computeDisplaceEdgeSmooth</a>(so, to, smoothDisplaceBorderX, smoothDisplaceBorderY);
+00916 <span class="keywordflow">else</span>
+00917 displaceValue= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_2">computeDisplaceInteriorSmooth</a>(so, to);
+00918
+00919
+00920
+00921 <span class="comment">// Compute Displace normal.</span>
+00922 <span class="comment">//=========================</span>
+00923
+00924 <span class="comment">// Evaluate the normal.</span>
+00925 CVector displaceNormal;
+00926
+00927
+00928 <span class="comment">// smooth on edges and on corners.</span>
+00929 <span class="keywordflow">if</span>(smoothNormalCorner)
+00930 displaceNormal= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_8">computeNormalCornerSmooth</a>(so, to, smoothNormalBorderX, smoothNormalBorderY);
+00931 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothNormalEdge)
+00932 displaceNormal= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(so, to, smoothNormalBorderX, smoothNormalBorderY);
+00933 <span class="keywordflow">else</span>
+00934 {
+00935 <span class="comment">// unpack...</span>
+00936 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00937 <span class="comment">// eval.</span>
+00938 displaceNormal= bpatch-&gt;evalNormal(s, t);
+00939 }
+00940
+00941
+00942
+00943 <span class="comment">// Final result.</span>
+00944 <span class="comment">//=========================</span>
+00945 displace= displaceNormal * displaceValue;
+00946 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_8" doxytag="NL3D::CPatch::computeNormalCornerSmooth" ></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> NL3D::CPatch::computeNormalCornerSmooth </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderY</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). Special case on corner.
+<p>
+Definition at line <a class="el" href="a06158.html#l00728">728</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00117">NL3D::noiseCeilF()</a>, <a class="el" href="a06158.html#l00113">NL3D::noiseFloorF()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>.
+<p>
+<div class="fragment"><pre>00729 {
+00730 CBindInfo bindInfoX;
+00731 CBindInfo bindInfoY;
+00732 <a class="code" href="a04558.html#a15">uint</a> edgeX=0;
+00733 <a class="code" href="a04558.html#a15">uint</a> edgeY=0;
+00734 <a class="code" href="a04558.html#a15">uint</a> corner;
+00735 CBezierPatch *bpatch;
+00736 bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00737
+00738 <span class="comment">// both must be not null</span>
+00739 <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX!=0) &amp;&amp; (smoothBorderY!=0) );
+00740
+00741
+00742 <span class="comment">// Get the edge against we must share displace.</span>
+00743 <span class="keywordflow">if</span>(smoothBorderX==-1) edgeX=0;
+00744 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) edgeX=2;
+00745 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00746 <span class="keywordflow">if</span>(smoothBorderY==1) edgeY=1;
+00747 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) edgeY=3;
+00748 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00749
+00750 <span class="comment">// Get the corner against we must share displace.</span>
+00751 <span class="keywordflow">if</span>(smoothBorderX==-1)
+00752 {
+00753 <span class="keywordflow">if</span>(smoothBorderY==-1) corner=0;
+00754 <span class="keywordflow">else</span> corner=1;
+00755 }
+00756 <span class="keywordflow">else</span>
+00757 {
+00758 <span class="keywordflow">if</span>(smoothBorderY==-1) corner=3;
+00759 <span class="keywordflow">else</span> corner=2;
+00760 }
+00761
+00762 <span class="comment">// If this corner is smoothed, blend with 4 neighbors patchs.</span>
+00763 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz637_0">getCornerSmoothFlag</a>(corner))
+00764 {
+00765 <span class="comment">// Build the bindInfo against the 2 edge.</span>
+00766 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeX, bindInfoX);
+00767 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edgeY, bindInfoY);
+00768
+00769 <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
+00770 <span class="keywordflow">if</span>(!bindInfoX.Zone || !bindInfoY.Zone)
+00771 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00772 <span class="keywordflow">else</span>
+00773 {
+00774 CVector ret;
+00775
+00776
+00777 <span class="comment">// Compute the coordinate on the border of the edge, and the coef of the blend.</span>
+00778 <span class="keywordtype">float</span> se=<a class="code" href="a04223.html#a626">s</a>;
+00779 <span class="keywordtype">float</span> te=<a class="code" href="a04223.html#a627">t</a>;
+00780 <span class="keywordtype">float</span> coefX;
+00781 <span class="keywordtype">float</span> coefY;
+00782 <span class="keywordflow">if</span>(smoothBorderX==-1) se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coefX=<a class="code" href="a04223.html#a626">s</a>-se;
+00783 <span class="keywordflow">else</span> se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coefX=se-<a class="code" href="a04223.html#a626">s</a>;
+00784 <span class="keywordflow">if</span>(smoothBorderY==-1) te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coefY=<a class="code" href="a04223.html#a627">t</a>-te;
+00785 <span class="keywordflow">else</span> te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coefY=te-<a class="code" href="a04223.html#a627">t</a>;
+00786 coefX= 0.5f + coefX*0.5f;
+00787 coefY= 0.5f + coefY*0.5f;
+00788
+00789
+00790 <span class="comment">// Compute our contribution.</span>
+00791 ret= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>()) *coefX*coefY;
+00792
+00793
+00794 <span class="comment">// compute Neighboring info.</span>
+00795 CPatchUVLocator uvLocatorX;
+00796 CPatchUVLocator uvLocatorY;
+00797 <a class="code" href="a03660.html">CVector2f</a> stIn, stOut;
+00798 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00799 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00800
+00801 uvLocatorX.build(<span class="keyword">this</span>, edgeX, bindInfoX);
+00802 uvLocatorY.build(<span class="keyword">this</span>, edgeY, bindInfoY);
+00803
+00804 <span class="comment">// Patch on our X side.</span>
+00805 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
+00806 patchId= uvLocatorX.selectPatch(stIn);
+00807 uvLocatorX.locateUV(stIn, patchId, patchOut, stOut);
+00808 bpatch= patchOut-&gt;unpackIntoCache();
+00809 ret+= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT()) *(1-coefX)*coefY;
+00810
+00811 <span class="comment">// Patch on our Y side.</span>
+00812 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
+00813 patchId= uvLocatorY.selectPatch(stIn);
+00814 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
+00815 bpatch= patchOut-&gt;unpackIntoCache();
+00816 ret+= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT()) *coefX*(1-coefY);
+00817
+00818 <span class="comment">/* compute contribution of the patch adjacent to me.</span>
+00819 <span class="comment"> Same reasoning as in computeDisplaceCornerSmooth().</span>
+00820 <span class="comment"> */</span>
+00821 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
+00822 patchId= uvLocatorY.selectPatch(stIn);
+00823 uvLocatorY.locateUV(stIn, patchId, patchOut, stOut);
+00824 <span class="comment">// Because we compute the normal exactly on the edge, we must inform this method not to take us as neighbor.</span>
+00825 <span class="comment">// ugly but simpler.</span>
+00826 ret+= patchOut-&gt;computeNormalOnNeighbor(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, bindInfoY.Edge[patchId]) *(1-coefX)*(1-coefY);
+00827
+00828 <span class="keywordflow">return</span> ret;
+00829 }
+00830 }
+00831 <span class="comment">// else must blend with 0.</span>
+00832 <span class="keywordflow">else</span>
+00833 {
+00834 <span class="comment">// compute coef.</span>
+00835 <span class="keywordtype">float</span> se=<a class="code" href="a04223.html#a626">s</a>;
+00836 <span class="keywordtype">float</span> te=<a class="code" href="a04223.html#a627">t</a>;
+00837 <span class="keywordtype">float</span> coefX;
+00838 <span class="keywordtype">float</span> coefY;
+00839 <span class="keywordflow">if</span>(smoothBorderX==-1) se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coefX=<a class="code" href="a04223.html#a626">s</a>-se;
+00840 <span class="keywordflow">else</span> se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coefX=se-<a class="code" href="a04223.html#a626">s</a>;
+00841 <span class="keywordflow">if</span>(smoothBorderY==-1) te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coefY=<a class="code" href="a04223.html#a627">t</a>-te;
+00842 <span class="keywordflow">else</span> te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coefY=te-<a class="code" href="a04223.html#a627">t</a>;
+00843
+00844
+00845 <span class="comment">// To have smooth continuities with smooth on edge (if any), we must do this.</span>
+00846 CVector rx, ry;
+00847 <span class="comment">// Compute a smooth with my X neighbor.</span>
+00848 rx= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(s, t, smoothBorderX, 0);
+00849 <span class="comment">// Compute a smooth with my Y neighbor.</span>
+00850 ry= <a class="code" href="a03057.html#NL3D_1_1CPatchz670_9">computeNormalEdgeSmooth</a>(s, t, 0, smoothBorderY);
+00851
+00852 <span class="comment">// Blend the 2 result.</span>
+00853 <span class="keywordflow">if</span>(coefY + coefX&gt;0)
+00854 {
+00855 <span class="comment">// This the weight used to blend to 0.</span>
+00856 <span class="keywordtype">float</span> maxCoef= max(coefY, coefX);
+00857 <span class="comment">// This the weight used to blend beetween rx and ry.</span>
+00858 <span class="keywordtype">float</span> ooSum= 1.0f / (coefY + coefX);
+00859 <span class="keywordtype">float</span> blendCoefX= coefX * ooSum;
+00860 <span class="keywordtype">float</span> blendCoefY= coefY * ooSum;
+00861
+00862 <span class="keywordflow">return</span> maxCoef* (rx*blendCoefY + ry*blendCoefX);
+00863 }
+00864 <span class="keywordflow">else</span>
+00865 {
+00866 <span class="keywordflow">return</span> CVector::Null;
+00867 }
+00868 }
+00869 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_9" doxytag="NL3D::CPatch::computeNormalEdgeSmooth" ></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> NL3D::CPatch::computeNormalEdgeSmooth </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderX</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>smoothBorderY</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). Special case on edge.
+<p>
+Definition at line <a class="el" href="a06158.html#l00588">588</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06156.html#l00579">getSmoothFlag()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06158.html#l00117">NL3D::noiseCeilF()</a>, <a class="el" href="a06158.html#l00113">NL3D::noiseFloorF()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00874">computeNoise()</a>, and <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>.
+<p>
+<div class="fragment"><pre>00589 {
+00590 CBindInfo bindInfo;
+00591 <a class="code" href="a04558.html#a15">uint</a> edge=0;
+00592 CBezierPatch *bpatch;
+00593 bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00594
+00595 <span class="comment">// only one must be not null</span>
+00596 <a class="code" href="a04199.html#a6">nlassert</a>( (smoothBorderX==0) != (smoothBorderY==0) );
+00597
+00598
+00599 <span class="comment">// Get the edge against we must share displace.</span>
+00600 <span class="keywordflow">if</span>(smoothBorderX==-1) edge=0;
+00601 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1) edge=1;
+00602 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) edge=2;
+00603 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) edge=3;
+00604 <span class="keywordflow">else</span> <a class="code" href="a04199.html#a12">nlstop</a>;
+00605
+00606 <span class="comment">// If the edge is smoothed, blend with neighbor.</span>
+00607 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz641_0">getSmoothFlag</a>(edge))
+00608 {
+00609 <span class="comment">// Build the bindInfo against this edge.</span>
+00610 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00611
+00612 <span class="comment">// Fast reject: if no neighbor, just do a simple computeDisplaceInteriorSmooth.</span>
+00613 <span class="keywordflow">if</span>(!bindInfo.Zone)
+00614 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00615 <span class="keywordflow">else</span>
+00616 {
+00617 CVector r0, r1;
+00618
+00619 <span class="comment">// Compute our contribution.</span>
+00620 r0= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00621
+00622 <span class="comment">// Compute the coordinate on the border of the edge, and the coef of the blend.</span>
+00623 <span class="keywordtype">float</span> se=<a class="code" href="a04223.html#a626">s</a>;
+00624 <span class="keywordtype">float</span> te=<a class="code" href="a04223.html#a627">t</a>;
+00625 <span class="keywordtype">float</span> coef=0.0;
+00626 <span class="keywordflow">if</span>(smoothBorderX==-1) se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coef=<a class="code" href="a04223.html#a626">s</a>-se;
+00627 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coef=se-<a class="code" href="a04223.html#a626">s</a>;
+00628 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coef=<a class="code" href="a04223.html#a627">t</a>-te;
+00629 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1) te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coef=te-<a class="code" href="a04223.html#a627">t</a>;
+00630 coef= 0.5f + coef*0.5f;
+00631
+00632 <span class="comment">// Compute contribution of the normal on the neighbor, on the border of the edge.</span>
+00633 CPatchUVLocator uvLocator;
+00634 <a class="code" href="a03660.html">CVector2f</a> stIn, stOut;
+00635 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00636 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00637
+00638 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00639 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(se, te);
+00640 patchId= uvLocator.selectPatch(stIn);
+00641 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00642
+00643 bpatch= patchOut-&gt;unpackIntoCache();
+00644 r1= bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT());
+00645
+00646 <span class="comment">// NB: don't bother problems with bind 1/X and the choice of the patch, because bind are C1, so normal is C0.</span>
+00647
+00648 <span class="comment">// Blend 2 result. For speed optim, don't normalize.</span>
+00649 <span class="keywordflow">return</span> r0*coef + r1*(1-coef);
+00650 }
+00651 }
+00652 <span class="comment">// else blend with vector Null.</span>
+00653 <span class="keywordflow">else</span>
+00654 {
+00655 <span class="comment">// compute coef.</span>
+00656 <span class="keywordtype">float</span> se=<a class="code" href="a04223.html#a626">s</a>;
+00657 <span class="keywordtype">float</span> te=<a class="code" href="a04223.html#a627">t</a>;
+00658 <span class="keywordtype">float</span> coef=0.0;
+00659 <span class="keywordflow">if</span>(smoothBorderX==-1) se= <a class="code" href="a05363.html#a448">noiseFloorF</a>(se), coef=<a class="code" href="a04223.html#a626">s</a>-se;
+00660 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderX==1) se= <a class="code" href="a05363.html#a449">noiseCeilF</a>(se), coef=se-<a class="code" href="a04223.html#a626">s</a>;
+00661 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==-1) te= <a class="code" href="a05363.html#a448">noiseFloorF</a>(te), coef=<a class="code" href="a04223.html#a627">t</a>-te;
+00662 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(smoothBorderY==1) te= <a class="code" href="a05363.html#a449">noiseCeilF</a>(te), coef=te-<a class="code" href="a04223.html#a627">t</a>;
+00663
+00664 <span class="comment">// Compute our contribution.</span>
+00665 CVector r0;
+00666 r0= bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00667
+00668 <span class="comment">// Blend with 0.</span>
+00669 <span class="keywordflow">return</span> r0*coef;
+00670 }
+00671 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz670_10" doxytag="NL3D::CPatch::computeNormalOnNeighbor" ></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> NL3D::CPatch::computeNormalOnNeighbor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edgeExclude</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+same reasoning as in <a class="el" href="a03057.html#NL3D_1_1CPatchz670_6">computeDisplaceRawOnNeighbor()</a>.
+<p>
+Definition at line <a class="el" href="a06158.html#l00675">675</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06156.html#l00392">getOrderS()</a>, <a class="el" href="a06156.html#l00393">getOrderT()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>.
+<p>
+<div class="fragment"><pre>00676 {
+00677 <a class="code" href="a04558.html#a14">sint</a> edge= -1;
+00678
+00679 <span class="comment">// look on what neighbor patch we must find the value (if any).</span>
+00680 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>&lt;1 &amp;&amp; edgeExclude!=0) edge=0;
+00681 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>-1 &amp;&amp; edgeExclude!=1) edge=1;
+00682 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>&gt;<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>-1 &amp;&amp; edgeExclude!=2) edge=2;
+00683 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>&lt;1 &amp;&amp; edgeExclude!=3) edge=3;
+00684
+00685
+00686 <span class="comment">// If the location is In the patch, just return normal value. (case of a bind 1/X).</span>
+00687 <span class="keywordflow">if</span>(edge==-1)
+00688 {
+00689 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00690 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00691 }
+00692 <span class="comment">// else must find on neighbor.</span>
+00693 <span class="keywordflow">else</span>
+00694 {
+00695 CBindInfo bindInfo;
+00696 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00697
+00698 <span class="comment">// Fast reject: if no neighbor on the edge, just do a simple computeDisplaceRaw()</span>
+00699 <span class="keywordflow">if</span>(!bindInfo.Zone)
+00700 {
+00701 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00702 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(s/<a class="code" href="a03057.html#NL3D_1_1CPatcha16">getOrderS</a>(), t/<a class="code" href="a03057.html#NL3D_1_1CPatcha17">getOrderT</a>());
+00703 }
+00704 <span class="comment">// else must find on neighbor.</span>
+00705 <span class="keywordflow">else</span>
+00706 {
+00707 CPatchUVLocator uvLocator;
+00708 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00709
+00710 <a class="code" href="a03660.html">CVector2f</a> stIn;
+00711 <a class="code" href="a03660.html">CVector2f</a> stOut;
+00712 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00713 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00714
+00715 <span class="comment">// look on neighbor. same reasoning as in computeDisplaceEdgeSmooth();</span>
+00716 stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(s, t);
+00717 patchId= uvLocator.selectPatch(stIn);
+00718 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00719 CBezierPatch *bpatch= patchOut-&gt;unpackIntoCache();
+00720 <span class="keywordflow">return</span> bpatch-&gt;evalNormal(stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>/patchOut-&gt;getOrderS(), stOut.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>/patchOut-&gt;getOrderT());
+00721 }
+00722
+00723 }
+00724 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_0" doxytag="NL3D::CPatch::computeSoftwareGeomorphAndAlpha" ></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::CPatch::computeSoftwareGeomorphAndAlpha </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="a06161.html#l01378">1378</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01311">computeGeomorphFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01359">computeGeomorphTileVertexListVB()</a>, <a class="el" href="a06161.html#l01298">computeGeomorphVertexList()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06492.html#l00132">NL3D::CTessBlock::getClipped()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>01379 {
+01380 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+01381 <span class="keywordflow">return</span>;
+01382
+01383 <span class="comment">// Compute Geomorph.</span>
+01384 <span class="comment">//=======</span>
+01385 <span class="comment">// Need only to fill CTessVertex, so do it only for FarVertices</span>
+01386 <span class="comment">// Hence Geomorph is done twice on edges of patches!!.</span>
+01387 <span class="comment">// If not too near for precise, fast compute of geomorph.</span>
+01388 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()==0 )
+01389 {
+01390 <span class="comment">// Just update all vertices of master block.</span>
+01391 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01392 }
+01393 <span class="keywordflow">else</span>
+01394 {
+01395 <span class="comment">// update all vertices of master block.</span>
+01396 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01397 <span class="comment">// update vertices of others block.</span>
+01398 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01399 {
+01400 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01401 <span class="comment">// Precise Clip.</span>
+01402 <span class="keywordflow">if</span>(!tblock.getClipped())
+01403 {
+01404 <span class="comment">// compute the geomorph of the vertices in the tessblock.</span>
+01405 <a class="code" href="a03057.html#NL3D_1_1CPatchd11">computeGeomorphVertexList</a>(tblock.FarVertexList);
+01406 }
+01407 }
+01408 }
+01409
+01410
+01411 <span class="comment">// Fill Far0.</span>
+01412 <span class="comment">//=======</span>
+01413 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
+01414 {
+01415 <span class="comment">// Fill Far0 VB.</span>
+01416 <a class="code" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01417 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01418 {
+01419 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01420 <span class="comment">// Precise Clip.</span>
+01421 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+01422 <a class="code" href="a03057.html#NL3D_1_1CPatchd9">computeGeomorphFar0VertexListVB</a>(tblock.FarVertexList);
+01423 }
+01424 }
+01425 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
+01426 {
+01427 <span class="comment">// Fill Tile VB.</span>
+01428 <span class="comment">// No Tiles in MasterBlock!!</span>
+01429 <span class="comment">// Traverse the TessBlocks to compute vertices.</span>
+01430 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01431 {
+01432 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01433 <span class="comment">// Precise Clip.</span>
+01434 <span class="keywordflow">if</span>( tblock.visibleTile() )
+01435 <a class="code" href="a03057.html#NL3D_1_1CPatchd10">computeGeomorphTileVertexListVB</a>(tblock.NearVertexList);
+01436 }
+01437 }
+01438
+01439 <span class="comment">// Fill Far1.</span>
+01440 <span class="comment">//=======</span>
+01441 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+01442 {
+01443 <span class="comment">// Fill VB.</span>
+01444 <a class="code" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01445 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01446 {
+01447 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01448 <span class="comment">// Precise Clip.</span>
+01449 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+01450 <a class="code" href="a03057.html#NL3D_1_1CPatchd8">computeGeomorphAlphaFar1VertexListVB</a>(tblock.FarVertexList);
+01451 }
+01452 }
+01453 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd13" doxytag="NL3D::CPatch::computeTbTm" ></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::CPatch::computeTbTm </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>numtb</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>numtm</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00942">942</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, <a class="el" href="a06157.html#l01225">getTileLightMapUvInfo()</a>, <a class="el" href="a06157.html#l01247">releaseTileLightMap()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00943 {
+00944 <a class="code" href="a04558.html#a14">sint</a> is= ts&amp;1;
+00945 <a class="code" href="a04558.html#a14">sint</a> it= tt&amp;1;
+00946 ts&gt;&gt;=1;
+00947 tt&gt;&gt;=1;
+00948
+00949 numtb= tt*(<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1) + ts;
+00950 numtm= it*2+is;
+00951 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_4" doxytag="NL3D::CPatch::computeTileLightmap" ></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::CPatch::computeTileLightmap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00750">750</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l01739">addTileLightmapWithTLI()</a>, <a class="el" href="a06157.html#l00557">computeTileLightmapAutomatic()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00488">modulateTileLightmapWithTileColors()</a>, <a class="el" href="a05646.html#l00244">stride</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
+<p>
+<div class="fragment"><pre>00751 {
+00752 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
+00753 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_5">computeTileLightmapAutomatic</a>(ts, tt, dest, stride);
+00754 <span class="keywordflow">else</span>
+00755 {
+00756 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_13">computeTileLightmapPrecomputed</a>(ts, tt, dest, stride);
+00757 <span class="comment">// Add the inlufence of TLI.</span>
+00758 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_2">addTileLightmapWithTLI</a>(ts, tt, dest, stride);
+00759 }
+00760
+00761 <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
+00762 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_21">modulateTileLightmapWithTileColors</a>(ts, tt, dest, stride);
+00763 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_5" doxytag="NL3D::CPatch::computeTileLightmapAutomatic" ></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::CPatch::computeTileLightmapAutomatic </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00557">557</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
+<p>
+<div class="fragment"><pre>00558 {
+00559 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+00560 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
+00561 {
+00562 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
+00563 {
+00564 <span class="comment">// compute this pixel.</span>
+00565 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, x, y, dest+ y*stride + x);
+00566 }
+00567 }
+00568 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_6" doxytag="NL3D::CPatch::computeTileLightmapEdge" ></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::CPatch::computeTileLightmapEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>inverse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00765">765</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l01758">addTileLightmapEdgeWithTLI()</a>, <a class="el" href="a06157.html#l00571">computeTileLightmapEdgeAutomatic()</a>, <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00508">modulateTileLightmapEdgeWithTileColors()</a>, <a class="el" href="a05646.html#l00244">stride</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
+<p>
+<div class="fragment"><pre>00766 {
+00767 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
+00768 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_7">computeTileLightmapEdgeAutomatic</a>(ts, tt, edge, dest, stride, inverse);
+00769 <span class="keywordflow">else</span>
+00770 {
+00771 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_8">computeTileLightmapEdgePrecomputed</a>(ts, tt, edge, dest, stride, inverse);
+00772 <span class="comment">// Add the inlufence of TLI.</span>
+00773 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_0">addTileLightmapEdgeWithTLI</a>(ts, tt, edge, dest, stride, inverse);
+00774 }
+00775
+00776 <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
+00777 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_19">modulateTileLightmapEdgeWithTileColors</a>(ts, tt, edge, dest, stride, inverse);
+00778 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_7" doxytag="NL3D::CPatch::computeTileLightmapEdgeAutomatic" ></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::CPatch::computeTileLightmapEdgeAutomatic </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>inverse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00571">571</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
+<p>
+<div class="fragment"><pre>00572 {
+00573 <span class="comment">// get coordinate according to edge.</span>
+00574 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
+00575 <span class="keywordflow">switch</span>(edge)
+00576 {
+00577 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
+00578 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+00579 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+00580 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
+00581 };
+00582
+00583 <a class="code" href="a04558.html#a15">uint</a> i;
+00584 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
+00585 {
+00586 <span class="comment">// if vertical edge</span>
+00587 <span class="keywordflow">if</span>( (edge&amp;1)==0 ) <a class="code" href="a04223.html#a573">y</a>= i;
+00588 <span class="comment">// else horizontal edge</span>
+00589 <span class="keywordflow">else</span> <a class="code" href="a04223.html#a572">x</a>= i;
+00590
+00591 <span class="comment">// manage inverse.</span>
+00592 <a class="code" href="a04558.html#a15">uint</a> where;
+00593 <span class="keywordflow">if</span>(inverse) where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
+00594 <span class="keywordflow">else</span> where= i;
+00595 <span class="comment">// compute this pixel.</span>
+00596 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, x, y, dest+ where*stride);
+00597 }
+00598 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_8" doxytag="NL3D::CPatch::computeTileLightmapEdgePrecomputed" ></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::CPatch::computeTileLightmapEdgePrecomputed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>inverse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00704">704</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06157.html#l00701">NL3D::NL3DDeltaLumel</a>, <a class="el" href="a06157.html#l00700">NL3D::NL3DPixelStartLumel</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l00236">x</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
+<p>
+<div class="fragment"><pre>00705 {
+00706 <span class="comment">// Lumel table</span>
+00707 <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
+00708
+00709 <span class="comment">// Witch corner to start ?</span>
+00710 <a class="code" href="a04558.html#a15">uint</a> pixel=<a class="code" href="a05363.html#a227">NL3DPixelStartLumel</a>[edge];
+00711 <a class="code" href="a04558.html#a15">uint</a> delta=<a class="code" href="a05363.html#a228">NL3DDeltaLumel</a>[edge];
+00712
+00713 <span class="comment">// For each lumels</span>
+00714 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *<a class="code" href="a04223.html#a652">src</a>=&amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[(ts + (tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>))*<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>]);
+00715 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>;
+00716 <span class="keywordflow">if</span> (inverse)
+00717 {
+00718 <a class="code" href="a04558.html#a15">uint</a> inverseStride=<a class="code" href="a04223.html#a582">stride</a>*(4-1);
+00719 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;4; <a class="code" href="a04223.html#a572">x</a>++)
+00720 {
+00721 <span class="comment">// lumel</span>
+00722 dest[inverseStride-<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a582">stride</a>]=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (src, pixel)];
+00723 pixel+=delta;
+00724 }
+00725 }
+00726 <span class="keywordflow">else</span>
+00727 {
+00728 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;4; <a class="code" href="a04223.html#a572">x</a>++)
+00729 {
+00730 <span class="comment">// lumel</span>
+00731 dest[<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a582">stride</a>]=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (src, pixel)];
+00732 pixel+=delta;
+00733 }
+00734 }
+00735 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_9" doxytag="NL3D::CPatch::computeTileLightmapPixel" ></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::CPatch::computeTileLightmapPixel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00782">782</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l01793">addTileLightmapPixelWithTLI()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a05863.html#l00413">NL3D::CLandscape::getAutomaticLighting()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06157.html#l00544">modulateTileLightmapPixelWithTileColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, and <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>.
+<p>
+<div class="fragment"><pre>00783 {
+00784 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLighting())
+00785 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_11">computeTileLightmapPixelAutomatic</a>(ts, tt, s, t, dest);
+00786 <span class="keywordflow">else</span>
+00787 {
+00788 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_12">computeTileLightmapPixelPrecomputed</a>(ts, tt, s, t, dest);
+00789 <span class="comment">// Add the inlufence of TLI.</span>
+00790 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_1">addTileLightmapPixelWithTLI</a>(ts, tt, s, t, dest);
+00791 }
+00792
+00793 <span class="comment">// modulate dest with tileColors (at center of lumels).</span>
+00794 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_20">modulateTileLightmapPixelWithTileColors</a>(ts, tt, s, t, dest);
+00795 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_10" doxytag="NL3D::CPatch::computeTileLightmapPixelAroundCorner" ></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::CPatch::computeTileLightmapPixelAroundCorner </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>stIn</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>lookAround</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00799">799</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06165.html#l00202">NL3D::CPatchUVLocator::locateUV()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>.
+<p>
+<div class="fragment"><pre>00800 {
+00801 <span class="keywordtype">bool</span> mustLookOnNeighbor= <span class="keyword">false</span>;
+00802
+00803 <span class="comment">// Get the Uv, in [0,Order?*NL_LUMEL_BY_TILE] basis (ie lumel basis).</span>
+00804 <a class="code" href="a04558.html#a14">sint</a> u, <a class="code" href="a04223.html#a576">v</a>;
+00805 u= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>*NL_LUMEL_BY_TILE);
+00806 <a class="code" href="a04223.html#a576">v</a>= (<a class="code" href="a04558.html#a14">sint</a>)floor(stIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>*NL_LUMEL_BY_TILE);
+00807
+00808 <span class="comment">// if allowed, try to go on neighbor patch.</span>
+00809 <span class="keywordflow">if</span>(lookAround)
+00810 {
+00811 <span class="comment">// try to know if we must go on a neighbor patch (maybe false with bind X/1).</span>
+00812 <span class="keywordflow">if</span>( u&lt;0 || u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> || <a class="code" href="a04223.html#a576">v&lt;0 || v&gt;</a>=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)
+00813 mustLookOnNeighbor= <span class="keyword">true</span>;
+00814 }
+00815
+00816
+00817 <span class="comment">// If we must get (if possible) the pixel in the current patch, do it.</span>
+00818 <span class="keywordflow">if</span>(!mustLookOnNeighbor)
+00819 {
+00820 <span class="comment">// if out this patch, abort.</span>
+00821 <span class="keywordflow">if</span>( u&lt;0 || u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> || <a class="code" href="a04223.html#a576">v&lt;0 || v&gt;</a>=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>)
+00822 <span class="keywordflow">return</span>;
+00823 <span class="keywordflow">else</span>
+00824 {
+00825 <span class="comment">// get this pixel.</span>
+00826 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_9">computeTileLightmapPixel</a>(u&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, v&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, u&amp;(NL_LUMEL_BY_TILE-1), v&amp;(NL_LUMEL_BY_TILE-1), dest);
+00827 }
+00828 }
+00829 <span class="comment">// else get from the best neighbor patch.</span>
+00830 <span class="keywordflow">else</span>
+00831 {
+00832 <span class="comment">// choose against which edge we must find the pixel.</span>
+00833 <a class="code" href="a04558.html#a15">uint</a> edge=0;
+00834 <span class="keywordflow">if</span>(u&lt;0) edge=0;
+00835 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a576">v</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>) edge=1;
+00836 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(u&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>) edge=2;
+00837 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a576">v</a>&lt;0) edge=3;
+00838
+00839 <span class="comment">// retrieve info on neighbor.</span>
+00840 CBindInfo bindInfo;
+00841 <a class="code" href="a03057.html#NL3D_1_1CPatcha9">getBindNeighbor</a>(edge, bindInfo);
+00842
+00843 <span class="comment">// if neighbor present.</span>
+00844 <span class="keywordflow">if</span>(bindInfo.Zone)
+00845 {
+00846 <a class="code" href="a03660.html">CVector2f</a> stOut;
+00847 <a class="code" href="a03057.html#NL3D_1_1CPatcha6">CPatch</a> *patchOut;
+00848 <a class="code" href="a04558.html#a15">uint</a> patchId;
+00849
+00850 <span class="comment">// Ok, search uv on this patch.</span>
+00851 CPatchUVLocator uvLocator;
+00852 uvLocator.build(<span class="keyword">this</span>, edge, bindInfo);
+00853 patchId= uvLocator.selectPatch(stIn);
+00854 uvLocator.locateUV(stIn, patchId, patchOut, stOut);
+00855
+00856 <span class="comment">// retry only one time, so at next call, must find the data IN htis patch (else abort).</span>
+00857 patchOut-&gt;computeTileLightmapPixelAroundCorner(stOut, dest, <span class="keyword">false</span>);
+00858 }
+00859 }
+00860 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_11" doxytag="NL3D::CPatch::computeTileLightmapPixelAutomatic" ></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::CPatch::computeTileLightmapPixelAutomatic </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00601">601</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a05863.html#l00415">NL3D::CLandscape::getAutomaticLightDir()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00557">computeTileLightmapAutomatic()</a>, <a class="el" href="a06157.html#l00571">computeTileLightmapEdgeAutomatic()</a>, and <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
+<p>
+<div class="fragment"><pre>00602 {
+00603 <span class="keywordtype">float</span> u,<a class="code" href="a04223.html#a576">v</a>;
+00604 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> lumelSize= 1.f/<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+00605
+00606 <span class="comment">// use 3 computeVertex to compute a normal. This is slow....</span>
+00607 CVector p0, p1 ,p2;
+00608 <span class="comment">// 1st vert. Top-left of the lumel.</span>
+00609 u= (ts + <a class="code" href="a04223.html#a626">s</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00610 <a class="code" href="a04223.html#a576">v</a>= (tt + <a class="code" href="a04223.html#a627">t</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00611 p0= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
+00612 <span class="comment">// 2nd vert. Bottom-left of the lumel.</span>
+00613 u= (ts + <a class="code" href="a04223.html#a626">s</a>*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00614 <a class="code" href="a04223.html#a576">v</a>= (tt + (<a class="code" href="a04223.html#a627">t</a>+1)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00615 p1= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
+00616 <span class="comment">// 3rd vert. Center-Right of the lumel.</span>
+00617 u= (ts + (<a class="code" href="a04223.html#a626">s</a>+1)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00618 <a class="code" href="a04223.html#a576">v</a>= (tt + (<a class="code" href="a04223.html#a627">t</a>+0.5f)*lumelSize )/<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00619 p2= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(u, v);
+00620
+00621 <span class="comment">// the normal.</span>
+00622 CVector normal;
+00623 normal= (p1-p0)^(p2-p0);
+00624 normal.normalize();
+00625
+00626 <span class="comment">// lighting.</span>
+00627 <span class="keywordtype">float</span> c= -normal*<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getAutomaticLightDir();
+00628 c= max(c, 0.f);
+00629 <a class="code" href="a04558.html#a14">sint</a> ic;
+00630
+00631 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00632 <span class="preprocessor"></span> <span class="comment">// FastFloor using fistp. Don't care convention.</span>
+00633 <span class="keywordtype">float</span> fc= c*256;
+00634 _asm
+00635 {
+00636 fld fc
+00637 fistp ic
+00638 }
+00639 <span class="preprocessor">#else</span>
+00640 <span class="preprocessor"></span> ic= (<a class="code" href="a04558.html#a14">sint</a>)floor(c*256);
+00641 <span class="preprocessor">#endif</span>
+00642 <span class="preprocessor"></span> <a class="code" href="a05378.html#a374">clamp</a>(ic, 0, 255);
+00643
+00644 <span class="comment">// ambiant/diffuse lighting.</span>
+00645 *dest= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getStaticLight()[ic];
+00646 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_12" doxytag="NL3D::CPatch::computeTileLightmapPixelPrecomputed" ></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::CPatch::computeTileLightmapPixelPrecomputed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00738">738</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
+<p>
+<div class="fragment"><pre>00739 {
+00740 <span class="comment">// Lumel table</span>
+00741 <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
+00742
+00743 <span class="comment">// Return the lumel</span>
+00744 *dest=colorTable[<a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (&amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]), s+(t&lt;&lt;2))];
+00745 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_13" doxytag="NL3D::CPatch::computeTileLightmapPrecomputed" ></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::CPatch::computeTileLightmapPrecomputed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00678">678</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00380">NL3D::CLandscape::getStaticLight()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
+<p>
+<div class="fragment"><pre>00679 {
+00680 <span class="comment">// Lumel table</span>
+00681 <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a>* colorTable=<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a> ()-&gt;getStaticLight ();
+00682 <span class="comment">// Unpack the lumels</span>
+00683 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
+00684 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (buffer, &amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]));
+00685
+00686 <span class="comment">// Retrun it</span>
+00687 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+00688 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
+00689 {
+00690 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
+00691 {
+00692 <span class="comment">// lumel</span>
+00693 dest[<a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a582">stride</a> + <a class="code" href="a04223.html#a572">x</a>]=colorTable[<a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04223.html#a572">x</a>+(<a class="code" href="a04223.html#a573">y</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>)]];
+00694 }
+00695 }
+00696 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha5" doxytag="NL3D::CPatch::computeVertex" ></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> NL3D::CPatch::computeVertex </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Compute a vertex. Compute a vertex according to:<ul>
+<li>s,t</li><li>patch control points uncompressed with zone Bias/Scale.</li></ul>
+<p>
+Patch UV geometric correction.<ul>
+<li>Patch noise (and noise of Patch neighbor).</li></ul>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01338">1338</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06158.html#l00874">computeNoise()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03106">NL3D::CLandscape::getNoiseMode()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00335">addTileTrianglesInBBox()</a>, <a class="el" href="a06497.html#l02468">NL3D::CTessFace::averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06768.html#l03346">NL3D::CZoneLighter::processZonePointLightRT()</a>, <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>01339 {
+01340 <span class="comment">// \todo yoyo: TODO_UVCORRECT: use UV correction.</span>
+01341
+01342 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getNoiseMode())
+01343 {
+01344 <span class="comment">// compute displacement map to disturb result.</span>
+01345 CVector displace;
+01346 <a class="code" href="a03057.html#NL3D_1_1CPatchz670_7">computeNoise</a>(s,t, displace);
+01347
+01348 <span class="comment">// return patch(s,t) + dispalcement result.</span>
+01349 <span class="comment">// unpack. Do it after computeNoise(), because this last may change the cache.</span>
+01350 CBezierPatch *patch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+01351 <span class="keywordflow">return</span> patch-&gt;eval(s,t) + displace;
+01352 }
+01353 <span class="keywordflow">else</span>
+01354 {
+01355 <span class="comment">// unpack and return patch(s,t).</span>
+01356 CBezierPatch *patch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+01357 <span class="keywordflow">return</span> patch-&gt;eval(s,t);
+01358 }
+01359 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz668_4" doxytag="NL3D::CPatch::computeVertexButCorner" ></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> NL3D::CPatch::computeVertexButCorner </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>onCorner</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex()</a>.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01456">1456</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00985">t</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>.
+<p>
+<div class="fragment"><pre>01457 {
+01458 <span class="comment">// must be compiled</span>
+01459 <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
+01460
+01461 <span class="comment">// Test is on a edge/corner of the patch</span>
+01462 <a class="code" href="a04558.html#a14">sint</a> edgeIdS= -1;
+01463 <a class="code" href="a04558.html#a14">sint</a> edgeIdT= -1;
+01464 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==0) edgeIdS= 0;
+01465 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a626">s</a>==1) edgeIdS= 2;
+01466 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==0) edgeIdT= 3;
+01467 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a627">t</a>==1) edgeIdT= 1;
+01468
+01469 <span class="comment">// test if on a corner</span>
+01470 <span class="keywordflow">if</span>(edgeIdS&gt;=0 &amp;&amp; edgeIdT&gt;=0)
+01471 {
+01472 <span class="comment">// indicate that yes, we are on a corner</span>
+01473 onCorner= <span class="keyword">true</span>;
+01474 <span class="comment">// return the baseVertex according to edge falgs</span>
+01475 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==3) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0]-&gt;EndPos;
+01476 <span class="keywordflow">if</span>(edgeIdS==0 &amp;&amp; edgeIdT==1) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[1]-&gt;EndPos;
+01477 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==1) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[2]-&gt;EndPos;
+01478 <span class="keywordflow">if</span>(edgeIdS==2 &amp;&amp; edgeIdT==3) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[3]-&gt;EndPos;
+01479 <a class="code" href="a04199.html#a12">nlstop</a>;
+01480 <span class="comment">// Error, but Avoid warning</span>
+01481 <span class="keywordflow">return</span> CVector::Null;
+01482 }
+01483 <span class="comment">// else, std case</span>
+01484 <span class="keywordflow">else</span>
+01485 {
+01486 onCorner= <span class="keyword">false</span>;
+01487 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(s, t);
+01488 }
+01489 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_0" doxytag="NL3D::CPatch::copyTileFlagsFromPatch" ></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::CPatch::copyTileFlagsFromPatch </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03057.html">CPatch</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>src</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>
+Set this patch flags from an other one. The patchs must match
+<p>
+Definition at line <a class="el" href="a06155.html#l02245">2245</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01542">NL3D::CZone::copyTilesFlags()</a>.
+<p>
+<div class="fragment"><pre>02246 {
+02247 <a class="code" href="a04199.html#a6">nlassert</a>(OrderS == <a class="code" href="a04223.html#a652">src</a>-&gt;OrderS
+02248 &amp;&amp; OrderT == <a class="code" href="a04223.html#a652">src</a>-&gt;OrderT);
+02249
+02250 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>.size(); ++k)
+02251 {
+02252 <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[k].copyFlagsFromOther(<a class="code" href="a04223.html#a652">src</a>-&gt;Tiles[k]);
+02253 }
+02254 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_14" doxytag="NL3D::CPatch::CPatch::getCurrentTLIColor" ></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="a03337.html">CRGBA</a> NL3D::CPatch::CPatch::getCurrentTLIColor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>x</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>y</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd14" doxytag="NL3D::CPatch::createFaceVectorFar0OrTile" ></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::CPatch::createFaceVectorFar0OrTile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00663">663</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00198">NL3D::CTessBlock::createFaceVectorFar0()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>.
+<p>
+<div class="fragment"><pre>00664 {
+00665 <span class="comment">// If Far Mode.</span>
+00666 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
+00667 {
+00668 <span class="comment">// Create the face for all TessBlocks.</span>
+00669 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00670 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00671 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00672 }
+00673 <span class="comment">// Or If Tile Mode.</span>
+00674 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
+00675 {
+00676 <span class="comment">// Create the face for all TessBlocks.</span>
+00677 <span class="comment">// No tiles in MasterBlock!</span>
+00678 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00679 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00680 }
+00681 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd15" doxytag="NL3D::CPatch::createFaceVectorFar1" ></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::CPatch::createFaceVectorFar1 </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00641">641</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00242">NL3D::CTessBlock::createFaceVectorFar1()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>.
+<p>
+<div class="fragment"><pre>00642 {
+00643 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00644 {
+00645 <span class="comment">// Create the face for all TessBlocks.</span>
+00646 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00647 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00648 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00649 }
+00650 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz671_0" doxytag="NL3D::CPatch::createVegetableBlock" ></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::CPatch::createVegetableBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>numTb</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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>
+Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06162.html#l00294">294</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
+<p>
+References <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06156.html#l00098">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>, <a class="el" href="a06156.html#l00097">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, and <a class="el" href="a06156.html#l00893">VegetableClipBlocks</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, and <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>.
+<p>
+<div class="fragment"><pre>00295 {
+00296 <span class="comment">// TessBlock width</span>
+00297 <a class="code" href="a04558.html#a15">uint</a> tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> &gt;&gt; 1;
+00298 <span class="comment">// clipBlock width</span>
+00299 <a class="code" href="a04558.html#a15">uint</a> nTbPerCb= <a class="code" href="a04733.html#a13">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK</a>;
+00300 <a class="code" href="a04558.html#a15">uint</a> cbWidth= (tbWidth + nTbPerCb-1) &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
+00301
+00302 <span class="comment">// compute tessBlock coordinate.</span>
+00303 <a class="code" href="a04558.html#a15">uint</a> tbs ,tbt;
+00304 tbs= ts &gt;&gt; 1;
+00305 tbt= tt &gt;&gt; 1;
+00306 <span class="comment">// compute clipBlock coordinate.</span>
+00307 <a class="code" href="a04558.html#a15">uint</a> cbs,cbt;
+00308 cbs= tbs &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
+00309 cbt= tbt &gt;&gt; <a class="code" href="a04733.html#a12">NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT</a>;
+00310
+00311 <span class="comment">// create the vegetable block.</span>
+00312 <a class="code" href="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a> *vegetBlock= <span class="keyword">new</span> <a class="code" href="a03057.html#NL3D_1_1CPatchn0">CLandscapeVegetableBlock</a>;
+00313 <span class="comment">// Init / append to list.</span>
+00314 <span class="comment">// compute center of the vegetableBlock (approx).</span>
+00315 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00316 CVector center= bpatch-&gt;eval( (<span class="keywordtype">float</span>)(tbs*2+1)/OrderS, (<span class="keywordtype">float</span>)(tbt*2+1)/OrderT );
+00317 <span class="comment">// Lower-Left tile is (tbs*2, tbt*2)</span>
+00318 vegetBlock-&gt;init(center, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager, VegetableClipBlocks[cbt *cbWidth + cbs], <span class="keyword">this</span>, tbs*2, tbt*2, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableBlockList);
+00319
+00320 <span class="comment">// set in the tessBlock</span>
+00321 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock= vegetBlock;
+00322 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_2" doxytag="NL3D::CPatch::debugAllocationMarkIndices" ></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::CPatch::debugAllocationMarkIndices </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>marker</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00914">914</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00893">debugAllocationMarkIndicesFarList()</a>, <a class="el" href="a06161.html#l00904">debugAllocationMarkIndicesNearList()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00915 {
+00916 <a class="code" href="a04558.html#a14">sint</a> i;
+00917
+00918 <span class="comment">// Do it For Far.</span>
+00919 <a class="code" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, marker);
+00920 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00921 {
+00922 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00923 <a class="code" href="a03057.html#NL3D_1_1CPatchd16">debugAllocationMarkIndicesFarList</a>(tblock.FarVertexList, marker);
+00924 }
+00925 <span class="comment">// Do it For Near.</span>
+00926 <span class="comment">// No Tiles in MasterBlock!!</span>
+00927 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00928 {
+00929 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00930 <a class="code" href="a03057.html#NL3D_1_1CPatchd17">debugAllocationMarkIndicesNearList</a>(tblock.NearVertexList, marker);
+00931 }
+00932
+00933 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd16" doxytag="NL3D::CPatch::debugAllocationMarkIndicesFarList" ></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::CPatch::debugAllocationMarkIndicesFarList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertList</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>marker</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00893">893</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>.
+<p>
+<div class="fragment"><pre>00894 {
+00895 <span class="comment">// Traverse the vertList.</span>
+00896 CTessFarVertex *pVert;
+00897 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+00898 {
+00899 pVert-&gt;Index0= marker;
+00900 pVert-&gt;Index1= marker;
+00901 }
+00902 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd17" doxytag="NL3D::CPatch::debugAllocationMarkIndicesNearList" ></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::CPatch::debugAllocationMarkIndicesNearList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertList</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>marker</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00904">904</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>.
+<p>
+<div class="fragment"><pre>00905 {
+00906 <span class="comment">// Traverse the vertList.</span>
+00907 CTessNearVertex *pVert;
+00908 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
+00909 {
+00910 pVert-&gt;Index= marker;
+00911 }
+00912 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz675_1" doxytag="NL3D::CPatch::decRefDLMContext" ></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::CPatch::decRefDLMContext </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>count</em> = 1 </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>
+Dec a ref count to the DLMContext, deleting it if refCount== 0.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01977">1977</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l02035">endDLMLighting()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>01978 {
+01979 <span class="comment">// the patch must be compiled.</span>
+01980 <a class="code" href="a04199.html#a6">nlassert</a>(Zone);
+01981 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContextRefCount&gt;0);
+01982
+01983 <span class="comment">// dec Ref.</span>
+01984 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>-= <a class="code" href="a04223.html#a577">count</a>;
+01985 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContextRefCount&gt;=0);
+01986
+01987 <span class="comment">// If 0, delete the context.</span>
+01988 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>==0)
+01989 {
+01990 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>;
+01991 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
+01992
+01993 <span class="comment">// If the patch is visible, it may have Far Vertices created, </span>
+01994 <span class="comment">// hence, we must reset their DLM Uvs (to point to black pixel)</span>
+01995 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+01996 {
+01997 <span class="comment">// setup DLM Uv with new _DLMContext</span>
+01998 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_10">fillVBFarsDLMUvOnly</a>();
+01999 }
+02000 }
+02001 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_8" doxytag="NL3D::CPatch::decRefTessBlocks" ></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::CPatch::decRefTessBlocks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00658">658</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06156.html#l00886">TessBlockRefCount</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00659 {
+00660 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>--;
+00661 <span class="comment">// If no loinger need the tessblocks, delete them.</span>
+00662 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_2">TessBlockRefCount</a>==0)
+00663 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
+00664 <a class="code" href="a04199.html#a6">nlassert</a>(TessBlockRefCount&gt;=0);
+00665 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz651_0" doxytag="NL3D::CPatch::deleteAllVegetableIgs" ></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::CPatch::deleteAllVegetableIgs </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>
+Delete any vegetable Ig still existing in this patch.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06162.html#l00282">282</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
+<p>
+References <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, and <a class="el" href="a05862.html#l03120">NL3D::CLandscape::enableVegetable()</a>.
+<p>
+<div class="fragment"><pre>00283 {
+00284 <span class="comment">// For all TessBlocks, try to release their VegetableBlock</span>
+00285 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00286 {
+00287 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a>(i);
+00288 }
+00289
+00290 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd18" doxytag="NL3D::CPatch::deleteFaceVectorFar0OrTile" ></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::CPatch::deleteFaceVectorFar0OrTile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00683">683</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00213">NL3D::CTessBlock::deleteFaceVectorFar0()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>.
+<p>
+<div class="fragment"><pre>00684 {
+00685 <span class="comment">// If Far Mode.</span>
+00686 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
+00687 {
+00688 <span class="comment">// delete the face for all TessBlocks.</span>
+00689 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.deleteFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00690 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00691 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00692 }
+00693 <span class="comment">// Or If Tile Mode.</span>
+00694 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
+00695 {
+00696 <span class="comment">// delete the face for all TessBlocks.</span>
+00697 <span class="comment">// No tiles in MasterBlock!</span>
+00698 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00699 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00700 }
+00701 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd19" doxytag="NL3D::CPatch::deleteFaceVectorFar1" ></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::CPatch::deleteFaceVectorFar1 </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00652">652</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00256">NL3D::CTessBlock::deleteFaceVectorFar1()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>.
+<p>
+<div class="fragment"><pre>00653 {
+00654 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00655 {
+00656 <span class="comment">// delete the face for all TessBlocks.</span>
+00657 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.deleteFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00658 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00659 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i].deleteFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00660 }
+00661 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha7" doxytag="NL3D::CPatch::deleteTileUvs" ></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::CPatch::deleteTileUvs </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="a06155.html#l02142">2142</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+<div class="fragment"><pre>02143 {
+02144 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;deleteTileUvs();
+02145 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;deleteTileUvs();
+02146 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_3" doxytag="NL3D::CPatch::deleteVBAndFaceVector" ></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::CPatch::deleteVBAndFaceVector </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="a06161.html#l00837">837</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
+<p>
+<div class="fragment"><pre>00838 {
+00839 <a class="code" href="a03057.html#NL3D_1_1CPatchd32">updateVBAlloc</a>(<span class="keyword">false</span>);
+00840 <a class="code" href="a03057.html#NL3D_1_1CPatchd19">deleteFaceVectorFar1</a>();
+00841 <a class="code" href="a03057.html#NL3D_1_1CPatchd18">deleteFaceVectorFar0OrTile</a>();
+00842 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_4" doxytag="NL3D::CPatch::deleteVBAndFaceVectorFar1Only" ></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::CPatch::deleteVBAndFaceVectorFar1Only </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="a06161.html#l00854">854</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>00855 {
+00856 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00857 {
+00858 <span class="comment">// alloc VB.</span>
+00859 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, <span class="keyword">false</span>);
+00860 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00861 {
+00862 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00863 <span class="comment">// need update VB only if tessBlock is visible.</span>
+00864 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+00865 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
+00866 }
+00867 }
+00868
+00869 <a class="code" href="a03057.html#NL3D_1_1CPatchd19">deleteFaceVectorFar1</a>();
+00870 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_9" doxytag="NL3D::CPatch::dirtTessBlockFaceVector" ></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::CPatch::dirtTessBlockFaceVector </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03475.html">CTessBlock</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>block</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00783">783</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00354">NL3D::CTessBlock::appendToModifyListAndDeleteFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06492.html#l00152">NL3D::CTessBlock::isInModifyList()</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, and <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>.
+<p>
+<div class="fragment"><pre>00784 {
+00785 <span class="comment">// If patch is visible, block's faceVector should exist, but are no more valid.</span>
+00786 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+00787 {
+00788 <span class="comment">// If this tessBlock not already notified to modification.</span>
+00789 <span class="keywordflow">if</span>(!tb.isInModifyList())
+00790 {
+00791 <span class="comment">// Then append, and delete all FaceVector.</span>
+00792 <span class="comment">// NB: delete FaceVector now, because the TessBlock himself may disapear soon.</span>
+00793 tb.appendToModifyListAndDeleteFaceVector(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_TessBlockModificationRoot, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00794 }
+00795 }
+00796 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz657_1" doxytag="NL3D::CPatch::endDLMLighting" ></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::CPatch::endDLMLighting </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>
+end Dynamic light Process, deleting the DLMContext if necessary. NB: _DLMContext-&gt;compileLighting() is not called, since done during render phase. Called by <a class="el" href="a02702.html">CLandscape</a>. _DLMContext must exist
+<p>
+Definition at line <a class="el" href="a06157.html#l02035">2035</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06164.html#l00127">NL3D::CPatchDLMContext::OldPointLightCount</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>.
+<p>
+<div class="fragment"><pre>02036 {
+02037 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
+02038
+02039 <span class="comment">// delete reference from old pointLight influences, at prec render() pass. _DLMContext may be deleted here,</span>
+02040 <span class="comment">// if no more lights use it, and if the patch is not in Near.</span>
+02041 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;OldPointLightCount);
+02042 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_5" doxytag="NL3D::CPatch::evalLumelBlock" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatch::evalLumelBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>original</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>unCompressed</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>width</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>height</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>
+Eval an uncompressed 4x4 block against the original<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00244">244</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05646.html#l00237">v</a>, and <a class="el" href="a05646.html#l01013">width</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01267">packShadowMap()</a>.
+<p>
+<div class="fragment"><pre>00245 {
+00246 <span class="comment">// Sum</span>
+00247 <a class="code" href="a04558.html#a15">uint</a> sum=0;
+00248
+00249 <span class="comment">// Eval error for each..</span>
+00250 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;<a class="code" href="a04223.html#a633">height</a>; <a class="code" href="a04223.html#a576">v</a>++)
+00251 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;<a class="code" href="a04223.html#a632">width</a>; u++)
+00252 {
+00253 sum += abs((<a class="code" href="a04558.html#a14">sint</a>)original[v*4+u]-(<a class="code" href="a04558.html#a14">sint</a>)unCompressed[v*4+u]);
+00254 }
+00255
+00256 <span class="comment">// return the sum</span>
+00257 <span class="keywordflow">return</span> sum;
+00258 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_10" doxytag="NL3D::CPatch::extendTessBlockWithEndPos" ></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::CPatch::extendTessBlockWithEndPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00766">766</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>.
+<p>
+<div class="fragment"><pre>00767 {
+00768 <span class="keywordflow">if</span>(face-&gt;Level&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
+00769 {
+00770 <span class="comment">// get the tessBlock of the face.</span>
+00771 <a class="code" href="a04558.html#a15">uint</a> numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
+00772
+00773 <span class="comment">// Must enlarge the BSphere of the tesblock!!</span>
+00774 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereFirst(face-&gt;VBase-&gt;EndPos);
+00775 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VLeft-&gt;EndPos);
+00776 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereAdd(face-&gt;VRight-&gt;EndPos);
+00777 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].extendSphereCompile();
+00778 }
+00779 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_5" doxytag="NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB" ></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::CPatch::fillFar0DLMUvOnlyVertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01609">1609</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>.
+<p>
+<div class="fragment"><pre>01610 {
+01611 <span class="comment">// The Buffers must have been locked</span>
+01612 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator);
+01613 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator-&gt;bufferLocked());
+01614 <span class="comment">// VBInfo must be OK.</span>
+01615 <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs());
+01616
+01617 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01618 <span class="keyword">static</span> CUV uvDLM;
+01619
+01620 <span class="comment">// If the DLMContext exist</span>
+01621 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
+01622 {
+01623 <span class="comment">// Traverse the vertList, to compute new uvDLM</span>
+01624 CTessFarVertex *pVert;
+01625 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01626 {
+01627 <span class="comment">// Compute/build the new vertex.</span>
+01628 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
+01629 CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
+01630
+01631 <span class="comment">// compute Uvs.</span>
+01632 CParamCoord pc= pVert-&gt;PCoord;
+01633
+01634 <span class="comment">// compute Dynamic lightmap Uv with DLM context info.</span>
+01635 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
+01636 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
+01637
+01638 <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
+01639 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
+01640 }
+01641 }
+01642 <span class="comment">// else, reset all Uvs</span>
+01643 <span class="keywordflow">else</span>
+01644 {
+01645 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
+01646 uvDLM.U= 1;
+01647 uvDLM.V= 1;
+01648
+01649 <span class="comment">// Traverse the vertList, to reset uv</span>
+01650 CTessFarVertex *pVert;
+01651 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01652 {
+01653 <span class="comment">// Compute/build the new vertex.</span>
+01654 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
+01655 CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
+01656
+01657 <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
+01658 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
+01659 }
+01660 }
+01661 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd20" doxytag="NL3D::CPatch::fillFar0VertexListVB" ></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::CPatch::fillFar0VertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01161">1161</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>01162 {
+01163 <span class="comment">// Traverse the vertList.</span>
+01164 CTessFarVertex *pVert;
+01165 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01166 {
+01167 <a class="code" href="a03057.html#NL3D_1_1CPatchd21">fillFar0VertexVB</a>(pVert);
+01168 }
+01169 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd21" doxytag="NL3D::CPatch::fillFar0VertexVB" ></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::CPatch::fillFar0VertexVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00946">946</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00827">Far0UBias</a>, <a class="el" href="a06156.html#l00827">Far0UScale</a>, <a class="el" href="a06156.html#l00827">Far0VBias</a>, <a class="el" href="a06156.html#l00827">Far0VScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a06156.html#l00054">NL_PATCH_FAR0_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, and <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>.
+<p>
+<div class="fragment"><pre>00947 {
+00948 <span class="comment">// The Buffers must have been locked</span>
+00949 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator);
+00950 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar0VBAllocator-&gt;bufferLocked());
+00951 <span class="comment">// VBInfo must be OK.</span>
+00952 <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs());
+00953
+00954 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+00955 <span class="comment">// Compute/build the new vertex.</span>
+00956 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar0VBInfo.VertexCoordPointer;
+00957 CurVBPtr+= pVert-&gt;Index0 * CLandscapeGlobals::CurrentFar0VBInfo.VertexSize;
+00958
+00959 <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
+00960
+00961 <span class="comment">// compute Uvs.</span>
+00962 <span class="keyword">static</span> CUV uv;
+00963 CParamCoord pc= pVert-&gt;PCoord;
+00964 <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;<a class="code" href="a04733.html#a2">NL_PATCH_FAR0_ROTATED</a>)
+00965 {
+00966 uv.U= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
+00967 uv.V= (1.f-pc.getS())* <a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
+00968 }
+00969 <span class="keywordflow">else</span>
+00970 {
+00971 uv.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchr10">Far0UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr9">Far0UBias</a>;
+00972 uv.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr12">Far0VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr11">Far0VBias</a>;
+00973 }
+00974
+00975 <span class="comment">// compute Dynamic lightmap Uv.</span>
+00976 <span class="keyword">static</span> CUV uvDLM;
+00977 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>) <span class="comment">// (NB: Suppose BTB kill this test).</span>
+00978 {
+00979 <span class="comment">// compute UV with DLM context info.</span>
+00980 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
+00981 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
+00982 }
+00983 <span class="keywordflow">else</span>
+00984 {
+00985 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
+00986 uvDLM.U= 1;
+00987 uvDLM.V= 1;
+00988 }
+00989
+00990 <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
+00991 <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
+00992 {
+00993 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
+00994 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+00995 <span class="comment">// Set Uvs.</span>
+00996 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff0)= uv;
+00997 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
+00998 }
+00999 <span class="keywordflow">else</span>
+01000 {
+01001 <span class="comment">// Else must setup Vertex program inputs</span>
+01002 <span class="comment">// v[0]== StartPos.</span>
+01003 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
+01004 <span class="comment">// v[8]== Tex0</span>
+01005 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff0)= uv;
+01006 <span class="comment">// v[9]== Tex1</span>
+01007 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.TexCoordOff1)= uvDLM;
+01008
+01009 <span class="comment">// v[10]== GeomInfo.</span>
+01010 <span class="keyword">static</span> CUV geomInfo;
+01011 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
+01012 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
+01013 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.GeomInfoOff)= geomInfo;
+01014
+01015 <span class="comment">// v[11]== EndPos - StartPos</span>
+01016 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentFar0VBInfo.DeltaPosOff)=
+01017 pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
+01018 }
+01019 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_6" doxytag="NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB" ></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::CPatch::fillFar1DLMUvOnlyVertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01664">1664</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>.
+<p>
+<div class="fragment"><pre>01665 {
+01666 <span class="comment">// The Buffers must have been locked</span>
+01667 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator);
+01668 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator-&gt;bufferLocked());
+01669 <span class="comment">// VBInfo must be OK.</span>
+01670 <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs());
+01671
+01672 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01673 <span class="keyword">static</span> CUV uvDLM;
+01674
+01675 <span class="comment">// If the DLMContext exist</span>
+01676 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
+01677 {
+01678 <span class="comment">// Traverse the vertList, to compute new uvDLM</span>
+01679 CTessFarVertex *pVert;
+01680 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01681 {
+01682 <span class="comment">// Compute/build the new vertex.</span>
+01683 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
+01684 CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
+01685
+01686 <span class="comment">// compute Uvs.</span>
+01687 CParamCoord pc= pVert-&gt;PCoord;
+01688
+01689 <span class="comment">// compute Dynamic lightmap Uv with DLM context info.</span>
+01690 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
+01691 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
+01692
+01693 <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
+01694 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
+01695 }
+01696 }
+01697 <span class="comment">// else, reset all Uvs</span>
+01698 <span class="keywordflow">else</span>
+01699 {
+01700 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
+01701 uvDLM.U= 1;
+01702 uvDLM.V= 1;
+01703
+01704 <span class="comment">// Traverse the vertList, to reset uv</span>
+01705 CTessFarVertex *pVert;
+01706 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01707 {
+01708 <span class="comment">// Compute/build the new vertex.</span>
+01709 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
+01710 CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
+01711
+01712 <span class="comment">// Set Uv DLM only (NB: same code for VertexProgram or not, only TexCoordOff1 may change).</span>
+01713 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
+01714 }
+01715 }
+01716 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd22" doxytag="NL3D::CPatch::fillFar1VertexListVB" ></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::CPatch::fillFar1VertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01173">1173</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>01174 {
+01175 <span class="comment">// Traverse the vertList.</span>
+01176 CTessFarVertex *pVert;
+01177 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+01178 {
+01179 <a class="code" href="a03057.html#NL3D_1_1CPatchd23">fillFar1VertexVB</a>(pVert);
+01180 }
+01181 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd23" doxytag="NL3D::CPatch::fillFar1VertexVB" ></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::CPatch::fillFar1VertexVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01022">1022</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00828">Far1UBias</a>, <a class="el" href="a06156.html#l00828">Far1UScale</a>, <a class="el" href="a06156.html#l00828">Far1VBias</a>, <a class="el" href="a06156.html#l00828">Far1VScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a06156.html#l00055">NL_PATCH_FAR1_ROTATED</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00845">OOTransitionSqrDelta</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00844">TransitionSqrMin</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, and <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>.
+<p>
+<div class="fragment"><pre>01023 {
+01024 <span class="comment">// The Buffers must have been locked</span>
+01025 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator);
+01026 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentFar1VBAllocator-&gt;bufferLocked());
+01027 <span class="comment">// VBInfo must be OK.</span>
+01028 <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs());
+01029
+01030 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01031 <span class="comment">// Compute/build the new vertex.</span>
+01032 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentFar1VBInfo.VertexCoordPointer;
+01033 CurVBPtr+= pVert-&gt;Index1 * CLandscapeGlobals::CurrentFar1VBInfo.VertexSize;
+01034
+01035 <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
+01036
+01037 <span class="comment">// compute Uvs.</span>
+01038 <span class="keyword">static</span> CUV uv;
+01039 CParamCoord pc= pVert-&gt;PCoord;
+01040 <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;<a class="code" href="a04733.html#a3">NL_PATCH_FAR1_ROTATED</a>)
+01041 {
+01042 uv.U= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
+01043 uv.V= (1.f-pc.getS())* <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
+01044 }
+01045 <span class="keywordflow">else</span>
+01046 {
+01047 uv.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchr15">Far1UScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr14">Far1UBias</a>;
+01048 uv.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchr17">Far1VScale</a> + <a class="code" href="a03057.html#NL3D_1_1CPatchr16">Far1VBias</a>;
+01049 }
+01050
+01051 <span class="comment">// compute Dynamic lightmap Uv.</span>
+01052 <span class="keyword">static</span> CUV uvDLM;
+01053 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>) <span class="comment">// (NB: Suppose BTB kill this test).</span>
+01054 {
+01055 <span class="comment">// compute UV with DLM context info.</span>
+01056 uvDLM.U= pc.getS()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias;
+01057 uvDLM.V= pc.getT()* <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias;
+01058 }
+01059 <span class="keywordflow">else</span>
+01060 {
+01061 <span class="comment">// just set UV so the vertex point to a black pixel (see CTextureDLM).</span>
+01062 uvDLM.U= 1;
+01063 uvDLM.V= 1;
+01064 }
+01065
+01066 <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
+01067 <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
+01068 {
+01069 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
+01070 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+01071 <span class="comment">// Set Uvs.</span>
+01072 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff0)= uv;
+01073 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
+01074 <span class="comment">// Set default color.</span>
+01075 <span class="keyword">static</span> <a class="code" href="a03337.html">CRGBA</a> col(255,255,255,255);
+01076 *(<a class="code" href="a03337.html">CRGBA</a>*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.ColorOff)= col;
+01077 }
+01078 <span class="keywordflow">else</span>
+01079 {
+01080 <span class="comment">// Else must setup Vertex program inputs</span>
+01081 <span class="comment">// v[0]== StartPos.</span>
+01082 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
+01083 <span class="comment">// v[8]== Tex0</span>
+01084 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff0)= uv;
+01085 <span class="comment">// v[9]== Tex1</span>
+01086 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.TexCoordOff1)= uvDLM;
+01087
+01088 <span class="comment">// v[10]== GeomInfo.</span>
+01089 <span class="keyword">static</span> CUV geomInfo;
+01090 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
+01091 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
+01092 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.GeomInfoOff)= geomInfo;
+01093
+01094 <span class="comment">// v[11]== EndPos - StartPos</span>
+01095 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.DeltaPosOff)=
+01096 pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
+01097
+01098 <span class="comment">// v[12]== Alpha information</span>
+01099 <span class="comment">// Hopefully, fillVBFar1Only() is called each Time the Far1 change, in preRender().</span>
+01100 <span class="comment">// So TransitionSqrMin and OOTransitionSqrDelta in CPath are valid.</span>
+01101 geomInfo.U= <a class="code" href="a03057.html#NL3D_1_1CPatchr28">TransitionSqrMin</a>;
+01102 geomInfo.V= <a class="code" href="a03057.html#NL3D_1_1CPatchr19">OOTransitionSqrDelta</a>;
+01103 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentFar1VBInfo.AlphaInfoOff)= geomInfo;
+01104
+01105 }
+01106 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz643_3" doxytag="NL3D::CPatch::fillPatchQuadBlock" ></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::CPatch::fillPatchQuadBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03068.html">CPatchQuadBlock</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>quadBlock</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>
+Fill a <a class="el" href="a03068.html">CPatchQuadBlock</a>, from its required PatchId. <a class="el" href="a04199.html#a6">nlassert(PatchId size is less than NL_PATCH_BLOCK_MAX_QUAD)</a>
+<p>
+Definition at line <a class="el" href="a06155.html#l00460">460</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00064">NL_PATCH_BLOCK_MAX_QUAD</a>, <a class="el" href="a06156.html#l00065">NL_PATCH_BLOCK_MAX_VERTEX</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderS</a>, <a class="el" href="a06156.html#l00199">NL3D::CPatchBlockIdent::OrderT</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="a06156.html#l00201">NL3D::CPatchBlockIdent::T0</a>, <a class="el" href="a06156.html#l00201">NL3D::CPatchBlockIdent::T1</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l02359">NL3D::CLandscape::fillPatchQuadBlock()</a>.
+<p>
+<div class="fragment"><pre>00461 {
+00462 CPatchBlockIdent &amp;pbId= quadBlock.PatchBlockId;
+00463 <a class="code" href="a04558.html#a15">uint</a> lenS= pbId.S1-pbId.S0;
+00464 <a class="code" href="a04558.html#a15">uint</a> lenT= pbId.T1-pbId.T0;
+00465 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.OrderS==OrderS );
+00466 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.OrderT==OrderT );
+00467 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.S1&lt;=OrderS );
+00468 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.T1&lt;=OrderT );
+00469 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.S0&lt;pbId.S1 );
+00470 <a class="code" href="a04199.html#a6">nlassert</a>( pbId.T0&lt;pbId.T1 );
+00471 <a class="code" href="a04199.html#a6">nlassert</a>( lenS&lt;=NL_PATCH_BLOCK_MAX_QUAD );
+00472 <a class="code" href="a04199.html#a6">nlassert</a>( lenT&lt;=NL_PATCH_BLOCK_MAX_QUAD );
+00473
+00474 <span class="comment">// Fill vertices.</span>
+00475 <a class="code" href="a04558.html#a15">uint</a> s0= pbId.S0;
+00476 <a class="code" href="a04558.html#a15">uint</a> t0= pbId.T0;
+00477 <span class="comment">// some preca.</span>
+00478 <span class="keywordtype">float</span> startS0= (<span class="keywordtype">float</span>)s0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
+00479 <span class="keywordtype">float</span> startT0= (<span class="keywordtype">float</span>)t0 / (<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
+00480 <span class="keywordtype">float</span> ds= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>);
+00481 <span class="keywordtype">float</span> dt= 1.0f/(<span class="keywordtype">float</span>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>);
+00482
+00483 <span class="comment">// Parse all quads vertices corner.</span>
+00484 <a class="code" href="a04558.html#a15">uint</a> sl,tl;
+00485 <span class="keywordflow">for</span>(tl=0; tl&lt;lenT+1; tl++)
+00486 {
+00487 <span class="keywordtype">float</span> fs, ft;
+00488 <span class="comment">// compute t patch coordinates.</span>
+00489 ft= startT0 + (<span class="keywordtype">float</span>)tl * dt ;
+00490 <span class="keywordflow">for</span>(sl=0; sl&lt;lenS+1; sl++)
+00491 {
+00492 <span class="comment">// compute s patch coordinates.</span>
+00493 fs= startS0 + (<span class="keywordtype">float</span>)sl * ds ;
+00494
+00495 <span class="comment">// Must use computeContinousVertex, to ensure continous coordinate on patch edges</span>
+00496 quadBlock.Vertices[sl + tl*<a class="code" href="a04733.html#a10">NL_PATCH_BLOCK_MAX_VERTEX</a>]= <a class="code" href="a03057.html#NL3D_1_1CPatcha4">computeContinousVertex</a>(fs, ft);
+00497 }
+00498 }
+00499
+00500 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd24" doxytag="NL3D::CPatch::fillTileVertexListVB" ></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::CPatch::fillTileVertexListVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vertList</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01185">1185</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06161.html#l01109">fillTileVertexVB()</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01198">fillVB()</a>, and <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>01186 {
+01187 <span class="comment">// Traverse the vertList.</span>
+01188 CTessNearVertex *pVert;
+01189 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
+01190 {
+01191 <a class="code" href="a03057.html#NL3D_1_1CPatchd25">fillTileVertexVB</a>(pVert);
+01192 }
+01193 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd25" doxytag="NL3D::CPatch::fillTileVertexVB" ></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::CPatch::fillTileVertexVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pVert</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01109">1109</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00137">NL3D::CTessNearVertex::PUv0</a>, <a class="el" href="a06498.html#l00138">NL3D::CTessNearVertex::PUv1</a>, <a class="el" href="a06498.html#l00140">NL3D::CTessNearVertex::PUv2</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01556">checkFillVertexVBNear()</a>, and <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>.
+<p>
+<div class="fragment"><pre>01110 {
+01111 <span class="comment">// The Buffers must have been locked</span>
+01112 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentTileVBAllocator);
+01113 <a class="code" href="a04199.html#a6">nlassert</a>(CLandscapeGlobals::CurrentTileVBAllocator-&gt;bufferLocked());
+01114 <span class="comment">// VBInfo must be OK.</span>
+01115 <a class="code" href="a04199.html#a6">nlassert</a>(!CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs());
+01116
+01117 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> *CurVBPtr;
+01118 <span class="comment">// Compute/build the new vertex.</span>
+01119 CurVBPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)CLandscapeGlobals::CurrentTileVBInfo.VertexCoordPointer;
+01120 CurVBPtr+= pVert-&gt;Index * CLandscapeGlobals::CurrentTileVBInfo.VertexSize;
+01121
+01122
+01123 <span class="comment">// NB: the filling order of data is important, for AGP write combiners.</span>
+01124
+01125 <span class="comment">// If not VertexProgram (NB: Suppose BTB kill this test).</span>
+01126 <span class="keywordflow">if</span>( !CLandscapeGlobals::VertexProgramEnabled )
+01127 {
+01128 <span class="comment">// Set Pos. Set it local to the current center of landscape</span>
+01129 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;Pos - CLandscapeGlobals::PZBModelPosition;
+01130 <span class="comment">// Set Uvs.</span>
+01131 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff0)= pVert-&gt;PUv0;
+01132 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff1)= pVert-&gt;PUv1;
+01133 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff2)= pVert-&gt;PUv2;
+01134 }
+01135 <span class="keywordflow">else</span>
+01136 {
+01137 <span class="comment">// Else must setup Vertex program inputs</span>
+01138 <span class="comment">// v[0]== StartPos.</span>
+01139 *(CVector*)CurVBPtr= pVert-&gt;Src-&gt;StartPos;
+01140 <span class="comment">// v[8]== Tex0</span>
+01141 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff0)= pVert-&gt;PUv0;
+01142 <span class="comment">// v[9]== Tex1</span>
+01143 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff1)= pVert-&gt;PUv1;
+01144 <span class="comment">// v[13]== Tex2</span>
+01145 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.TexCoordOff2)= pVert-&gt;PUv2;
+01146
+01147 <span class="comment">// v[10]== GeomInfo.</span>
+01148 <span class="keyword">static</span> CUV geomInfo;
+01149 geomInfo.U= pVert-&gt;Src-&gt;MaxFaceSize * CLandscapeGlobals::OORefineThreshold;
+01150 geomInfo.V= pVert-&gt;Src-&gt;MaxNearLimit;
+01151 *(CUV*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.GeomInfoOff)= geomInfo;
+01152
+01153 <span class="comment">// v[11]== EndPos - StartPos</span>
+01154 *(CVector*)(CurVBPtr + CLandscapeGlobals::CurrentTileVBInfo.DeltaPosOff)=
+01155 pVert-&gt;Src-&gt;EndPos - pVert-&gt;Src-&gt;StartPos;
+01156 }
+01157 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_7" doxytag="NL3D::CPatch::fillVB" ></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::CPatch::fillVB </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="a06161.html#l01198">1198</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01248">fillVBIfVisible()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>.
+<p>
+<div class="fragment"><pre>01199 {
+01200 <span class="comment">// Fill Far0.</span>
+01201 <span class="comment">//=======</span>
+01202 <span class="comment">// fill only if no reallcoation occurs</span>
+01203 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
+01204 {
+01205 <span class="comment">// Fill Far0 VB.</span>
+01206 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01207 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01208 {
+01209 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01210 <span class="comment">// fill only if tblock visible.</span>
+01211 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+01212 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
+01213 }
+01214 }
+01215 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0 &amp;&amp; !CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs() )
+01216 {
+01217 <span class="comment">// Fill Tile VB.</span>
+01218 <span class="comment">// No Tiles in MasterBlock!!</span>
+01219 <span class="comment">// Traverse the TessBlocks to add vertices.</span>
+01220 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01221 {
+01222 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01223 <span class="comment">// fill only if tblock visible.</span>
+01224 <span class="keywordflow">if</span>( tblock.visibleTile() )
+01225 <a class="code" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a>(tblock.NearVertexList);
+01226 }
+01227 }
+01228
+01229 <span class="comment">// Fill Far1.</span>
+01230 <span class="comment">//=======</span>
+01231 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
+01232 {
+01233 <span class="comment">// Fill VB.</span>
+01234 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01235 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01236 {
+01237 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01238 <span class="comment">// fill only if tblock visible.</span>
+01239 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+01240 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
+01241 }
+01242 }
+01243
+01244 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_8" doxytag="NL3D::CPatch::fillVBFar0Only" ></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::CPatch::fillVBFar0Only </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="a06161.html#l01256">1256</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>01257 {
+01258 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
+01259 {
+01260 <span class="comment">// Fill Far0 VB.</span>
+01261 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01262 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01263 {
+01264 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01265 <span class="comment">// fill only if tblock visible.</span>
+01266 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+01267 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
+01268 }
+01269 }
+01270 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_9" doxytag="NL3D::CPatch::fillVBFar1Only" ></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::CPatch::fillVBFar1Only </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="a06161.html#l01274">1274</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>.
+<p>
+<div class="fragment"><pre>01275 {
+01276 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
+01277 {
+01278 <span class="comment">// Fill VB.</span>
+01279 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01280 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01281 {
+01282 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01283 <span class="comment">// fill only if tblock visible.</span>
+01284 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+01285 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
+01286 }
+01287 }
+01288 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_10" doxytag="NL3D::CPatch::fillVBFarsDLMUvOnly" ></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::CPatch::fillVBFarsDLMUvOnly </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="a06161.html#l01720">1720</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01609">fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01664">fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, and <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>.
+<p>
+<div class="fragment"><pre>01721 {
+01722 <span class="comment">// Do it for Far0.</span>
+01723 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs() )
+01724 {
+01725 <span class="comment">// Fill Far0 VB.</span>
+01726 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01727 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01728 {
+01729 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01730 <span class="comment">// fill only if tblock visible.</span>
+01731 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+01732 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_5">fillFar0DLMUvOnlyVertexListVB</a>(tblock.FarVertexList);
+01733 }
+01734 }
+01735
+01736 <span class="comment">// Do it for Far1.</span>
+01737 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0 &amp;&amp; !CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs() )
+01738 {
+01739 <span class="comment">// Fill VB.</span>
+01740 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList);
+01741 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+01742 {
+01743 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01744 <span class="comment">// fill only if tblock visible.</span>
+01745 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+01746 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_6">fillFar1DLMUvOnlyVertexListVB</a>(tblock.FarVertexList);
+01747 }
+01748 }
+01749 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_11" doxytag="NL3D::CPatch::fillVBIfVisible" ></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::CPatch::fillVBIfVisible </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="a06161.html#l01248">1248</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01198">fillVB()</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>01249 {
+01250 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()==<span class="keyword">false</span>)
+01251 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
+01252 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha8" doxytag="NL3D::CPatch::forceMergeAtTileLevel" ></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::CPatch::forceMergeAtTileLevel </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>
+For changing TileMaxSubdivision. force tesselation to be under tile.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02022">2022</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l02448">NL3D::CTessFace::forceMergeAtTileLevel()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01259">NL3D::CZone::forceMergeAtTileLevel()</a>.
+<p>
+<div class="fragment"><pre>02023 {
+02024 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
+02025
+02026 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;forceMergeAtTileLevel();
+02027 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;forceMergeAtTileLevel();
+02028 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz671_1" doxytag="NL3D::CPatch::generateTileVegetable" ></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::CPatch::generateTileVegetable </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetIg</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>distType</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02719.html">CLandscapeVegetableBlockCreateContext</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vbCreateCtx</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>
+Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06162.html#l00050">50</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a05863.html#l00908">NL3D::CLandscape::_VegetableManager</a>, <a class="el" href="a06340.html#l00661">NLMISC::CRGBAF::A</a>, <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06340.html#l00659">NLMISC::CRGBAF::B</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06696.html#l00037">NL3D::CVegetableLightEx::computeCurrentColors()</a>, <a class="el" href="a06179.html#l00267">NL3D::CPointLight::computeLinearAttenuation()</a>, <a class="el" href="a06697.html#l00060">NL3D::CVegetableLightEx::Direction</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05478.html#l00105">NL3D::CBezierPatch::eval()</a>, <a class="el" href="a05478.html#l00187">NL3D::CBezierPatch::evalNormal()</a>, <a class="el" href="a06340.html#l00657">NLMISC::CRGBAF::G</a>, <a class="el" href="a06686.html#l00190">NL3D::CVegetable::generateGroupBiLinear()</a>, <a class="el" href="a06686.html#l00306">NL3D::CVegetable::generateInstance()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06180.html#l00116">NL3D::CPointLight::getPosition()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a05862.html#l03218">NL3D::CLandscape::getTileVegetableDesc()</a>, <a class="el" href="a06550.html#l00112">NL3D::CTileVegetableDesc::getVegetableList()</a>, <a class="el" href="a06550.html#l00120">NL3D::CTileVegetableDesc::getVegetableSeed()</a>, <a class="el" href="a06164.html#l00121">NL3D::CPatchDLMContext::MaxU8</a>, <a class="el" href="a06164.html#l00122">NL3D::CPatchDLMContext::MaxV8</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06164.html#l00121">NL3D::CPatchDLMContext::MinU8</a>, <a class="el" href="a06164.html#l00122">NL3D::CPatchDLMContext::MinV8</a>, <a class="el" href="a05867.html#l00072">NL3D_PATCH_TILE_AREA</a>, <a class="el" href="a06693.html#l00051">NL3D_VEGETABLE_BLOCK_ELTDIST</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a05972.html#l01170">NLMISC::CMatrix::normalize()</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a06697.html#l00058">NL3D::CVegetableLightEx::PointLight</a>, <a class="el" href="a06697.html#l00062">NL3D::CVegetableLightEx::PointLightFactor</a>, <a class="el" href="a06340.html#l00655">NLMISC::CRGBAF::R</a>, <a class="el" href="a06686.html#l00296">NL3D::CVegetable::reserveIgAddInstances()</a>, <a class="el" href="a06698.html#l00882">NL3D::CVegetableManager::reserveIgCompile()</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05538.html#l02935">size</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
+<p>
+Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>.
+<p>
+<div class="fragment"><pre>00052 {
+00053 <a class="code" href="a04558.html#a15">uint</a> i;
+00054
+00055 <span class="comment">// Get tile infos for vegetable</span>
+00056 <span class="comment">// =========================</span>
+00057
+00058 <span class="comment">// Get the state for this vegetable tile</span>
+00059 CTileElement::TVegetableInfo vegetWaterState= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tt * <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts].getVegetableState();
+00060 <span class="comment">// If vegetable disabled, skip!</span>
+00061 <span class="keywordflow">if</span>(vegetWaterState == CTileElement::VegetableDisabled)
+00062 <span class="keywordflow">return</span>;
+00063
+00064 <span class="comment">// get the tileId under this tile (&lt;=&gt; the tile material)</span>
+00065 <a class="code" href="a04558.html#a15">uint</a> tileId= Tiles[tt * <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a> + ts].Tile[0];
+00066
+00067 <span class="comment">// get list of vegetable for this tile, and for hist distanceType category.</span>
+00068 <span class="keyword">const</span> CTileVegetableDesc &amp;tileVegetDesc= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileVegetableDesc(tileId);
+00069 <span class="keyword">const</span> std::vector&lt;CVegetable&gt; &amp;vegetableList= tileVegetDesc.getVegetableList(distType);
+00070 <a class="code" href="a04558.html#a15">uint</a> distAddSeed= tileVegetDesc.getVegetableSeed(distType);
+00071 <a class="code" href="a04558.html#a15">uint</a> numVegetable= vegetableList.size();
+00072
+00073 <span class="comment">// If no vegetables at all, skip.</span>
+00074 <span class="keywordflow">if</span>(numVegetable==0)
+00075 <span class="keywordflow">return</span>;
+00076
+00077 <span class="comment">// compute approximate tile position and normal: get the middle</span>
+00078 <span class="keywordtype">float</span> tileU= (ts + 0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00079 <span class="keywordtype">float</span> tileV= (tt + 0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00080 CBezierPatch *bpatch= <a class="code" href="a03057.html#NL3D_1_1CPatcha30">unpackIntoCache</a>();
+00081 <span class="comment">// Get approximate position for the tile (usefull for noise). NB: eval() is faster than computeVertex().</span>
+00082 CVector tilePos= bpatch-&gt;eval(tileU, tileV);
+00083 <span class="comment">// Get also the normal used for all instances on this tile (not precise, </span>
+00084 <span class="comment">// don't take noise into account, but faster).</span>
+00085 CVector tileNormal= bpatch-&gt;evalNormal(tileU, tileV);
+00086
+00087 <span class="comment">// Compute also position on middle of 4 edges of this tile, for generateGroupBiLinear().</span>
+00088 CVector tilePosBiLinear[4];
+00089 <span class="keywordtype">float</span> OOos= 1.0f / <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+00090 <span class="keywordtype">float</span> OOot= 1.0f / <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+00091 tilePosBiLinear[0]= bpatch-&gt;eval( (ts + 0.0f) * OOos, (tt + 0.5f) * OOot);
+00092 tilePosBiLinear[1]= bpatch-&gt;eval( (ts + 1.0f) * OOos, (tt + 0.5f) * OOot);
+00093 tilePosBiLinear[2]= bpatch-&gt;eval( (ts + 0.5f) * OOos, (tt + 0.0f) * OOot);
+00094 tilePosBiLinear[3]= bpatch-&gt;eval( (ts + 0.5f) * OOos, (tt + 1.0f) * OOot);
+00095
+00096
+00097 <span class="comment">// compute a rotation matrix with the normal</span>
+00098 CMatrix matInstance;
+00099 matInstance.setRot(CVector::I, CVector::J, tileNormal);
+00100 <span class="comment">// must normalize the matrix. use the vector which is the most orthogonal to tileNormal</span>
+00101 <span class="comment">// If tileNormal is much more a J vector, then use plane (I,tileNormal), and vice-versa</span>
+00102 <span class="keywordflow">if</span>(fabs(tileNormal.y) &gt; fabs(tileNormal.x))
+00103 matInstance.normalize(CMatrix::ZXY);
+00104 <span class="keywordflow">else</span>
+00105 matInstance.normalize(CMatrix::ZYX);
+00106
+00107
+00108 <span class="comment">// prepare color / lighting</span>
+00109 <span class="comment">// =========================</span>
+00110
+00111 <span class="comment">// say that ambient never change. VegetableManager handle the ambient and diffuse itself (for precomputeLighting)</span>
+00112 <a class="code" href="a03338.html">CRGBAF</a> ambientF= <a class="code" href="a03338.html">CRGBAF</a>(1,1,1,1);
+00113
+00114 <span class="comment">// Compute the tileLightmap (not modified by tileColor).</span>
+00115 <span class="keyword">static</span> <a class="code" href="a04558.html#a7">uint8</a> tileLumelmap[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> * <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
+00116 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_3">getTileLumelmapPrecomputed</a>(ts, tt, tileLumelmap, NL_LUMEL_BY_TILE);
+00117 <span class="comment">// compute diffuse color by substracting from ambient.</span>
+00118 CRGBAF diffuseColorF[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a> * <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
+00119 <span class="comment">// TODO_VEGET_OPTIM: optimize this.</span>
+00120 <span class="comment">// For all lumel of this tile.</span>
+00121 <span class="keywordflow">for</span>(i= 0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
+00122 {
+00123 <span class="comment">// mul by 2, because shade is done twice here: by vertex, and by landscape.</span>
+00124 <a class="code" href="a04558.html#a14">sint</a> tileLumel= 2*tileLumelmap[i];
+00125 tileLumel= <a class="code" href="a04061.html#a0">min</a>(tileLumel, 255);
+00126 <span class="keywordtype">float</span> tlf= tileLumel / 255.f;
+00127 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>= tlf;
+00128 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>= tlf;
+00129 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>= tlf;
+00130 diffuseColorF[i].<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo0">A</a>= 1;
+00131 }
+00132
+00133 <span class="comment">// Compute The CVegetableLightEx, adding pointLight effect to vegetation</span>
+00134 <span class="comment">// First get pointLight at this tiles.</span>
+00135 <span class="keyword">static</span> vector&lt;CPointLightInfluence&gt; lightList;
+00136 lightList.clear();
+00137 <a class="code" href="a03057.html#NL3D_1_1CPatchz645_0">appendTileLightInfluences</a>( CUV(tileU, tileV), lightList);
+00138 <span class="comment">// for each light, modulate the factor of influence</span>
+00139 <span class="keywordflow">for</span>(i=0; i&lt;lightList.size();i++)
+00140 {
+00141 CPointLight *pl= lightList[i].PointLight;
+00142 <span class="comment">// compute the attenuation to the pos of the tile</span>
+00143 <span class="keywordtype">float</span> att= pl-&gt;computeLinearAttenuation(tilePos);
+00144 <span class="comment">// modulate the influence with this factor</span>
+00145 lightList[i].BkupInfluence= lightList[i].Influence;
+00146 lightList[i].Influence*= att;
+00147 }
+00148 <span class="comment">// sort the light by influence</span>
+00149 sort(lightList.begin(), lightList.end());
+00150 <span class="comment">// Setup the vegetLex directly in the ig. </span>
+00151 CVegetableLightEx &amp;vegetLex= vegetIg-&gt;VegetableLightEx;
+00152 <span class="comment">// take only 2 first, computing direction to tilePos and computing attenuation.</span>
+00153 vegetLex.NumLights= <a class="code" href="a04061.html#a0">min</a>((<a class="code" href="a04558.html#a15">uint</a>)CVegetableLightEx::MaxNumLight, (<a class="code" href="a04558.html#a15">uint</a>)lightList.size());
+00154 <span class="keywordflow">for</span>(i=0;i&lt;vegetLex.NumLights;i++)
+00155 {
+00156 <span class="comment">// WARNING: can C cast to CPointLightNamed here because comes from CPatch::appendTileLightInfluences() only!</span>
+00157 CPointLightNamed *pl= (CPointLightNamed*)(lightList[i].PointLight);
+00158 <span class="comment">// copy to vegetLex.</span>
+00159 vegetLex.PointLight[i]= pl;
+00160 <span class="comment">// get the attenuation</span>
+00161 vegetLex.PointLightFactor[i]= (<a class="code" href="a04558.html#a15">uint</a>)(256* lightList[i].Influence);
+00162 <span class="comment">// Setup the direction from pointLight.</span>
+00163 vegetLex.Direction[i]= tilePos - pl-&gt;getPosition();
+00164 vegetLex.Direction[i].normalize();
+00165 }
+00166 <span class="comment">// compute now the current colors of the vegetLex.</span>
+00167 vegetLex.computeCurrentColors();
+00168
+00169
+00170 <span class="comment">// Compute Dynamic Lightmap UV for this tile.</span>
+00171 <a class="code" href="a04199.html#a6">nlassert</a>(_DLMContext);
+00172 CUV dlmUV;
+00173 <span class="comment">// get coordinate in 0..1 in texture.</span>
+00174 dlmUV.U= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUBias + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMUScale * tileU;
+00175 dlmUV.V= <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVBias + <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;DLMVScale * tileV;
+00176 <span class="comment">// get coordinate in 0..255.</span>
+00177 CVegetableUV8 dlmUV8;
+00178 dlmUV8.U= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dlmUV.U * 255 + 0.5f);
+00179 dlmUV8.V= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dlmUV.V * 255 + 0.5f);
+00180 <span class="comment">// bound them, ensuring 8Bits UV "uncompressed" by driver are in the lightmap area.</span>
+00181 <a class="code" href="a05378.html#a374">clamp</a>(dlmUV8.U, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MinU8, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MaxU8);
+00182 <a class="code" href="a05378.html#a374">clamp</a>(dlmUV8.V, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MinV8, <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;MaxV8);
+00183
+00184
+00185 <span class="comment">// for all vegetable of this list, generate instances.</span>
+00186 <span class="comment">// =========================</span>
+00187
+00188 <span class="comment">// Get an array for each vegetable (static for speed).</span>
+00189 <span class="keyword">typedef</span> std::vector&lt;NLMISC::CVector2f&gt; TPositionVector;
+00190 <span class="keyword">static</span> std::vector&lt;TPositionVector&gt; instanceUVArray;
+00191 <span class="comment">// realloc if necessary.</span>
+00192 <span class="keywordflow">if</span>(instanceUVArray.size() &lt; numVegetable)
+00193 {
+00194 <span class="comment">// clean.</span>
+00195 <a class="code" href="a05378.html#a381">contReset</a>(instanceUVArray);
+00196 <span class="comment">// realloc.</span>
+00197 instanceUVArray.resize(numVegetable);
+00198 }
+00199
+00200 <span class="comment">// First, for each vegetable, generate the number of instance to create, and their relative position.</span>
+00201 <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
+00202 {
+00203 <span class="comment">// get the vegetable</span>
+00204 <span class="keyword">const</span> CVegetable &amp;veget= vegetableList[i];
+00205
+00206 <span class="comment">// generate instance for this vegetable.</span>
+00207 veget.generateGroupBiLinear(tilePos, tilePosBiLinear, tileNormal, NL3D_PATCH_TILE_AREA, i + distAddSeed, instanceUVArray[i]);
+00208 }
+00209
+00210 <span class="comment">// Then, now that we kno how many instance to generate for each vegetable, reserve space.</span>
+00211 CVegetableInstanceGroupReserve vegetIgReserve;
+00212 <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
+00213 {
+00214 <span class="comment">// get the vegetable</span>
+00215 <span class="keyword">const</span> CVegetable &amp;veget= vegetableList[i];
+00216
+00217 <span class="comment">// reseve instance space for this vegetable.</span>
+00218 <span class="comment">// instanceUVArray[i].size() is the number of instances to create.</span>
+00219 veget.reserveIgAddInstances(vegetIgReserve, (CVegetable::TVegetableWater)vegetWaterState, instanceUVArray[i].<a class="code" href="a04115.html#a94">size</a>());
+00220 }
+00221 <span class="comment">// actual reseve memory of the ig.</span>
+00222 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager-&gt;reserveIgCompile(vegetIg, vegetIgReserve);
+00223
+00224
+00225 <span class="comment">// generate the instances for all the vegetables.</span>
+00226 <span class="keywordflow">for</span>(i= 0; i&lt;numVegetable; i++)
+00227 {
+00228 <span class="comment">// get the vegetable</span>
+00229 <span class="keyword">const</span> CVegetable &amp;veget= vegetableList[i];
+00230
+00231 <span class="comment">// get the relatives position of the instances</span>
+00232 std::vector&lt;CVector2f&gt; &amp;instanceUV= instanceUVArray[i];
+00233
+00234 <span class="comment">// For all instance, generate the real instances.</span>
+00235 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;instanceUV.size(); j++)
+00236 {
+00237 <span class="comment">// generate the position in world Space.</span>
+00238 <span class="comment">// instanceUV is in [0..1] interval, which maps to a tile, so explode to the patch</span>
+00239 CVector instancePos;
+00240 vbCreateCtx.eval(ts, tt, instanceUV[j].<a class="code" href="a04223.html#a572">x</a>, instanceUV[j].<a class="code" href="a04223.html#a573">y</a>, instancePos);
+00241 <span class="comment">// NB: use same normal for rotation for all instances in a same tile.</span>
+00242 matInstance.setPos( instancePos );
+00243
+00244 <span class="comment">// peek color into the lightmap.</span>
+00245 <a class="code" href="a04558.html#a14">sint</a> lumelS= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(instanceUV[j].<a class="code" href="a04223.html#a572">x</a> * NL_LUMEL_BY_TILE);
+00246 <a class="code" href="a04558.html#a14">sint</a> lumelT= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(instanceUV[j].<a class="code" href="a04223.html#a573">y</a> * NL_LUMEL_BY_TILE);
+00247 <a class="code" href="a05378.html#a374">clamp</a>(lumelS, 0, NL_LUMEL_BY_TILE-1);
+00248 <a class="code" href="a05378.html#a374">clamp</a>(lumelT, 0, NL_LUMEL_BY_TILE-1);
+00249
+00250 <span class="comment">// generate the instance of the vegetable</span>
+00251 veget.generateInstance(vegetIg, matInstance, ambientF,
+00252 diffuseColorF[ (lumelT&lt;&lt;NL_LUMEL_BY_TILE_SHIFT) + lumelS ],
+00253 (distType+1) * NL3D_VEGETABLE_BLOCK_ELTDIST, (CVegetable::TVegetableWater)vegetWaterState, dlmUV8);
+00254 }
+00255 }
+00256 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha9" doxytag="NL3D::CPatch::getBindNeighbor" ></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::CPatch::getBindNeighbor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03058.html">CBindInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>neighborEdge</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+return neighborhood information.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02213">2213</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06758.html#l00718">NL3D::CZone::buildBindInfo()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a06156.html#l00316">NL3D::CPatch::CBindInfo::MultipleBindNum</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>, <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00471">computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00422">computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, and <a class="el" href="a06157.html#l00799">computeTileLightmapPixelAroundCorner()</a>.
+<p>
+<div class="fragment"><pre>02214 {
+02215 <a class="code" href="a04199.html#a6">nlassert</a>(edge&lt;4);
+02216
+02217 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[edge]!=NULL)
+02218 {
+02219 <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;buildBindInfo(PatchId, edge, _BindZoneNeighbor[edge], neighborEdge);
+02220 }
+02221 <span class="keywordflow">else</span>
+02222 {
+02223 neighborEdge.Zone= NULL;
+02224 neighborEdge.NPatchs= 0;
+02225 neighborEdge.MultipleBindNum= 0;
+02226 }
+02227 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz637_0" doxytag="NL3D::CPatch::getCornerSmoothFlag" ></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::CPatch::getCornerSmoothFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>corner</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>
+
+<p>
+Definition at line <a class="el" href="a06158.html#l00962">962</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.
+<p>
+<div class="fragment"><pre>00963 {
+00964 <a class="code" href="a04199.html#a6">nlassert</a>(corner&lt;=3);
+00965 <a class="code" href="a04558.html#a15">uint</a> mask= 1&lt;&lt;corner;
+00966 <span class="keywordflow">return</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>&amp; mask)!=0;
+00967 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha10" doxytag="NL3D::CPatch::getCornerVertex" ></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="a03482.html">CTessVertex</a>* NL3D::CPatch::getCornerVertex </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>corner</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>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00659">659</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00820">BaseVertices</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>.
+<p>
+<div class="fragment"><pre>00660 {
+00661 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[corner];
+00662 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_15" doxytag="NL3D::CPatch::getCurrentTileTLIColors" ></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::CPatch::getCurrentTileTLIColors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>corners</em>[4]</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01655">1655</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06760.html#l00586">NL3D::CZone::_PointLightArray</a>, <a class="el" href="a06340.html#l00250">NLMISC::CRGBA::avg2RGBOnly()</a>, <a class="el" href="a06187.html#l00063">NL3D::CPointLightNamedArray::getPointLights()</a>, <a class="el" href="a06156.html#l00391">getZone()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01758">addTileLightmapEdgeWithTLI()</a>, <a class="el" href="a06157.html#l01793">addTileLightmapPixelWithTLI()</a>, and <a class="el" href="a06157.html#l01739">addTileLightmapWithTLI()</a>.
+<p>
+<div class="fragment"><pre>01656 {
+01657 <span class="comment">// Get ref on array of PointLightNamed.</span>
+01658 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatcha20">getZone</a>()-&gt;_PointLightArray.getPointLights().size() &gt;0 )
+01659 {
+01660 <span class="comment">// get coord of the tessBlock</span>
+01661 <a class="code" href="a04558.html#a15">uint</a> tbs= ts&gt;&gt;1;
+01662 <a class="code" href="a04558.html#a15">uint</a> tbt= tt&gt;&gt;1;
+01663 <span class="comment">// get tile id local to tessBlock.</span>
+01664 <a class="code" href="a04558.html#a15">uint</a> tls= ts-(tbs&lt;&lt;1);
+01665 <a class="code" href="a04558.html#a15">uint</a> tlt= tt-(tbt&lt;&lt;1);
+01666
+01667 <span class="comment">// For each corner of the tessBlock, compute lighting with pointLights.</span>
+01668 <a class="code" href="a03337.html">CRGBA</a> tbCorners[4];
+01669 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a573">y</a>=0;<a class="code" href="a04223.html#a573">y</a>&lt;2;<a class="code" href="a04223.html#a573">y</a>++)
+01670 {
+01671 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>=0;<a class="code" href="a04223.html#a572">x</a>&lt;2;<a class="code" href="a04223.html#a572">x</a>++)
+01672 {
+01673 <a class="code" href="a03337.html">CRGBA</a> &amp;cornerCol= tbCorners[<a class="code" href="a04223.html#a573">y</a>*2+<a class="code" href="a04223.html#a572">x</a>];
+01674 cornerCol= getCurrentTLIColor(tbs+x, tbt+y);
+01675 }
+01676 }
+01677
+01678 <span class="comment">// Then biLinear to tile Level (tessBlock==2x2 tiles).</span>
+01679 <a class="code" href="a03337.html">CRGBA</a> tbEdges[4];
+01680 <a class="code" href="a03337.html">CRGBA</a> tbMiddle;
+01681 <span class="comment">// left.</span>
+01682 tbEdges[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[0], tbCorners[2]);
+01683 <span class="comment">// bottom</span>
+01684 tbEdges[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[2], tbCorners[3]);
+01685 <span class="comment">// right</span>
+01686 tbEdges[2].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[1], tbCorners[3]);
+01687 <span class="comment">// up</span>
+01688 tbEdges[3].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbCorners[0], tbCorners[1]);
+01689 <span class="comment">// middle.</span>
+01690 tbMiddle.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_1">avg2RGBOnly</a>(tbEdges[0], tbEdges[2]);
+01691
+01692 <span class="comment">// just copy result according to tile pos in tessBlock.</span>
+01693 <span class="keywordflow">if</span>(tlt==0)
+01694 {
+01695 <span class="keywordflow">if</span>(tls==0)
+01696 {
+01697 corners[0]= tbCorners[0];
+01698 corners[1]= tbEdges[3];
+01699 corners[2]= tbEdges[0];
+01700 corners[3]= tbMiddle;
+01701 }
+01702 <span class="keywordflow">else</span>
+01703 {
+01704 corners[0]= tbEdges[3];
+01705 corners[1]= tbCorners[1];
+01706 corners[2]= tbMiddle;
+01707 corners[3]= tbEdges[2];
+01708 }
+01709 }
+01710 <span class="keywordflow">else</span>
+01711 {
+01712 <span class="keywordflow">if</span>(tls==0)
+01713 {
+01714 corners[0]= tbEdges[0];
+01715 corners[1]= tbMiddle;
+01716 corners[2]= tbCorners[2];
+01717 corners[3]= tbEdges[1];
+01718 }
+01719 <span class="keywordflow">else</span>
+01720 {
+01721 corners[0]= tbMiddle;
+01722 corners[1]= tbEdges[2];
+01723 corners[2]= tbEdges[1];
+01724 corners[3]= tbCorners[3];
+01725 }
+01726 }
+01727 }
+01728 <span class="keywordflow">else</span>
+01729 {
+01730 <span class="comment">// Just fill with 0s.</span>
+01731 corners[0]= CRGBA::Black;
+01732 corners[1]= CRGBA::Black;
+01733 corners[2]= CRGBA::Black;
+01734 corners[3]= CRGBA::Black;
+01735 }
+01736 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha11" doxytag="NL3D::CPatch::getErrorSize" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CPatch::getErrorSize </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="a06156.html#l00395">395</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00816">ErrorSize</a>.
+<p>
+<div class="fragment"><pre>00395 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha12" doxytag="NL3D::CPatch::getFar0" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CPatch::getFar0 </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="a06156.html#l00396">396</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00396 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha13" doxytag="NL3D::CPatch::getFar1" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CPatch::getFar1 </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="a06156.html#l00397">397</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00397 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha14" doxytag="NL3D::CPatch::getLandscape" ></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="a02702.html">CLandscape</a> * NL3D::CPatch::getLandscape </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the landscape in which is placed this patch.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02186">2186</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06760.html#l00461">NL3D::CZone::getLandscape()</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06497.html#l00372">NL3D::CTessFace::allocTileUv()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06497.html#l00511">NL3D::CTessFace::buildTileFaces()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>, <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>, <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>, <a class="el" href="a06157.html#l00601">computeTileLightmapPixelAutomatic()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06497.html#l00528">NL3D::CTessFace::deleteTileFaces()</a>, <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00115">release()</a>, <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, <a class="el" href="a06497.html#l02274">NL3D::CTessFace::unbind()</a>, <a class="el" href="a06497.html#l02643">NL3D::CTessFace::updateBindAndSplit()</a>, <a class="el" href="a06497.html#l02108">NL3D::CTessFace::updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>02187 {
+02188 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getLandscape();
+02189 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz645_2" doxytag="NL3D::CPatch::getLumel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> NL3D::CPatch::getLumel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>uv</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>
+Get the lumel under the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01499">1499</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06157.html#l00670">getTileLumelmapPixelPrecomputed()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, and <a class="el" href="a05646.html#l00236">w</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03254">NL3D::CLandscape::getLumel()</a>.
+<p>
+<div class="fragment"><pre>01500 {
+01501 <span class="comment">// compute tile coord and lumel coord.</span>
+01502 <a class="code" href="a04558.html#a14">sint</a> ts, tt;
+01503 <span class="comment">// get in lumel coord.</span>
+01504 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a575">w</a>= (<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>);
+01505 <a class="code" href="a04558.html#a14">sint</a> h= (<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>);
+01506 <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
+01507 <span class="comment">// add 128, to round and get cneter of lumel.</span>
+01508 ts= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U* (w&lt;&lt;8) + 128); ts&gt;&gt;=8;
+01509 tt= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V* (h&lt;&lt;8) + 128); tt&gt;&gt;=8;
+01510 <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, w-1);
+01511 <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, h-1);
+01512 <span class="comment">// get the lumel</span>
+01513 <a class="code" href="a04558.html#a7">uint8</a> ret;
+01514 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_2">getTileLumelmapPixelPrecomputed</a>(ts&gt;&gt;NL_LUMEL_BY_TILE_SHIFT, tt&gt;&gt;NL_LUMEL_BY_TILE_SHIFT,
+01515 ts&amp;(NL_LUMEL_BY_TILE-1), tt&amp;(NL_LUMEL_BY_TILE-1), ret);
+01516
+01517 <span class="keywordflow">return</span> ret;
+01518 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_1" doxytag="NL3D::CPatch::getNextFar0ToRdr" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextFar0ToRdr </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="a06156.html#l00465">465</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00872">_NextRdrFar0</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00465 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr0">_NextRdrFar0</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_2" doxytag="NL3D::CPatch::getNextFar1ToRdr" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextFar1ToRdr </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="a06156.html#l00467">467</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00874">_NextRdrFar1</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00467 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr1">_NextRdrFar1</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz655_0" doxytag="NL3D::CPatch::getNextNearUL" ></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="a03057.html">CPatch</a>* NL3D::CPatch::getNextNearUL </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>
+For lighting update, get Next (CiruclarList). If ==this, then list is empty.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00750">750</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l01203">_ULNearNext</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>, and <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
+<p>
+<div class="fragment"><pre>00750 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz655_1" doxytag="NL3D::CPatch::getNumNearTessBlocks" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatch::getNumNearTessBlocks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+get the number of Near TessBlocks. Actually OrderS/2*OrderT/2.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00753">753</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
+<p>
+<div class="fragment"><pre>00753 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_11" doxytag="NL3D::CPatch::getNumTessBlock" ></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::CPatch::getNumTessBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pc</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>numtb</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00738">738</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00739 {
+00740 <a class="code" href="a04558.html#a15">uint</a> tboS= (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1);
+00741 <a class="code" href="a04558.html#a15">uint</a> tboT= (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1);
+00742
+00743 <span class="comment">// Coordinate of the tessblock (2*2 a tile!! so the &gt;&gt;1).</span>
+00744 <a class="code" href="a04558.html#a15">uint</a> ts= ((<a class="code" href="a04558.html#a15">uint</a>)pc.S * tboS) / 0x8000;
+00745 <a class="code" href="a04558.html#a15">uint</a> tt= ((<a class="code" href="a04558.html#a15">uint</a>)pc.T * tboT) / 0x8000;
+00746 numtb= tt*tboS + ts;
+00747
+00748 <span class="keywordtype">bool</span> edgeS= (ts*0x8000) == ((<a class="code" href="a04558.html#a15">uint</a>)pc.S * tboS);
+00749 <span class="keywordtype">bool</span> edgeT= (tt*0x8000) == ((<a class="code" href="a04558.html#a15">uint</a>)pc.T * tboT);
+00750
+00751 <span class="comment">// Does this vertex lies on a corner of a TessBlock?</span>
+00752 <span class="keywordflow">if</span>(edgeS &amp;&amp; edgeT)
+00753 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>;
+00754 <span class="comment">// Does this vertex lies on a edge of a TessBlock?</span>
+00755 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(edgeS || edgeT)
+00756 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>;
+00757 <span class="comment">// Else it lies exclusively IN a TessBlock.</span>
+00758 <span class="keywordflow">else</span>
+00759 <a class="code" href="a04223.html#a581">type</a>= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy1">FVTessBlock</a>;
+00760
+00761 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_12" doxytag="NL3D::CPatch::getNumTessBlock" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatch::getNumTessBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00722">722</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVBase</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVLeft</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVRight</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, and <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00723 {
+00724 <span class="comment">// To which tessBlocks link the face?</span>
+00725 <span class="comment">// compute an approx middle of the face.</span>
+00726 CParamCoord edgeMid(face-&gt;PVLeft, face-&gt;PVRight);
+00727 CParamCoord middle(edgeMid, face-&gt;PVBase);
+00728 <span class="comment">// Coordinate of the tessblock (2*2 a tile!! so the &gt;&gt;1).</span>
+00729 <a class="code" href="a04558.html#a15">uint</a> ts= ((<a class="code" href="a04558.html#a15">uint</a>)middle.S * (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1)) / 0x8000;
+00730 <a class="code" href="a04558.html#a15">uint</a> tt= ((<a class="code" href="a04558.html#a15">uint</a>)middle.T * (<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>&gt;&gt;1)) / 0x8000;
+00731 <a class="code" href="a04558.html#a15">uint</a> numtb= tt*(<a class="code" href="a04558.html#a15">uint</a>)(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1) + ts;
+00732
+00733 <span class="keywordflow">return</span> numtb;
+00734 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha15" doxytag="NL3D::CPatch::getOrderForEdge" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> NL3D::CPatch::getOrderForEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a6">sint8</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>edge</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02196">2196</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>.
+<p>
+<div class="fragment"><pre>02197 {
+02198 <a class="code" href="a04558.html#a15">uint</a> e= ((<a class="code" href="a04558.html#a14">sint</a>)edge + 256)&amp;3;
+02199 <span class="comment">// If an horizontal edge.</span>
+02200 <span class="keywordflow">if</span>( e&amp;1 ) <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;
+02201 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;
+02202 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha16" doxytag="NL3D::CPatch::getOrderS" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> NL3D::CPatch::getOrderS </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="a06156.html#l00392">392</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06519.html#l00276">NL3D::CTextureFar::allocatePatch()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06768.html#l01451">NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06519.html#l00335">NL3D::CTextureFar::removePatch()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06519.html#l00368">NL3D::CTextureFar::touchPatchULAndNext()</a>, and <a class="el" href="a06519.html#l00176">NL3D::CTextureFar::tryAllocatePatch()</a>.
+<p>
+<div class="fragment"><pre>00392 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha17" doxytag="NL3D::CPatch::getOrderT" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> NL3D::CPatch::getOrderT </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="a06156.html#l00393">393</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06519.html#l00276">NL3D::CTextureFar::allocatePatch()</a>, <a class="el" href="a06165.html#l00038">NL3D::CPatchUVLocator::build()</a>, <a class="el" href="a05862.html#l02380">NL3D::CLandscape::buildCollideFaces()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a05876.html#l00295">NL3D::CLandscapeVegetableBlockCreateContext::eval()</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05862.html#l02075">NL3D::CLandscape::getFarRenderPass()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06519.html#l00335">NL3D::CTextureFar::removePatch()</a>, <a class="el" href="a06165.html#l00175">NL3D::CPatchUVLocator::selectPatch()</a>, <a class="el" href="a06519.html#l00368">NL3D::CTextureFar::touchPatchULAndNext()</a>, and <a class="el" href="a06519.html#l00176">NL3D::CTextureFar::tryAllocatePatch()</a>.
+<p>
+<div class="fragment"><pre>00393 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha18" doxytag="NL3D::CPatch::getPatchId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a9">uint16</a> NL3D::CPatch::getPatchId </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="a06156.html#l00398">398</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, and <a class="el" href="a06768.html#l01451">NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample()</a>.
+<p>
+<div class="fragment"><pre>00398 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr22">PatchId</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd26" doxytag="NL3D::CPatch::getRootFaceForEdge" ></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="a03476.html">CTessFace</a> * NL3D::CPatch::getRootFaceForEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>edge</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01751">1751</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
+<p>
+<div class="fragment"><pre>01752 {
+01753 <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
+01754
+01755 <span class="comment">// See tessellation rules.</span>
+01756 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
+01757 {
+01758 <span class="keywordflow">if</span>(edge==0 || edge==1)
+01759 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
+01760 <span class="keywordflow">else</span>
+01761 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
+01762 }
+01763 <span class="keywordflow">else</span>
+01764 {
+01765 <span class="keywordflow">if</span>(edge==0 || edge==3)
+01766 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
+01767 <span class="keywordflow">else</span>
+01768 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
+01769 }
+01770 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd27" doxytag="NL3D::CPatch::getRootVertexForEdge" ></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="a03482.html">CTessVertex</a> * NL3D::CPatch::getRootVertexForEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>edge</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01773">1773</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
+<p>
+<div class="fragment"><pre>01774 {
+01775 <span class="comment">// Return the vertex which is the start of edge.</span>
+01776 <a class="code" href="a04199.html#a6">nlassert</a>(edge&gt;=0 &amp;&amp; edge&lt;=3);
+01777
+01778 <span class="comment">// See tessellation rules.</span>
+01779 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
+01780 {
+01781 <span class="keywordflow">switch</span>(edge)
+01782 {
+01783 <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight;
+01784 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase;
+01785 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft;
+01786 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase;
+01787 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> NULL;
+01788 }
+01789 }
+01790 <span class="keywordflow">else</span>
+01791 {
+01792 <span class="keywordflow">switch</span>(edge)
+01793 {
+01794 <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase;
+01795 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft;
+01796 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase;
+01797 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight;
+01798 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> NULL;
+01799 }
+01800 }
+01801 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz641_0" doxytag="NL3D::CPatch::getSmoothFlag" ></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::CPatch::getSmoothFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>edge</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the smooth flag for the n-th edge. Return true if this edge must by smoothed, false else.
+<p>
+Definition at line <a class="el" href="a06156.html#l00579">579</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, and <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>.
+<p>
+<div class="fragment"><pre>00580 {
+00581 <span class="comment">// Test it</span>
+00582 <span class="keywordflow">return</span> ((<a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;(1&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>)))!=0);
+00583 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz643_4" doxytag="NL3D::CPatch::getTesselatedPos" ></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> NL3D::CPatch::getTesselatedPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03640.html">CUV</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>uv</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>
+From the current tesselation of this patch, and a UV in this patch, return tesselated position.
+<p>
+Definition at line <a class="el" href="a06155.html#l00579">579</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06497.html#l03101">NL3D::CTessFace::getTesselatedPos()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l02496">NL3D::CLandscape::getTesselatedPos()</a>.
+<p>
+<div class="fragment"><pre>00580 {
+00581 <span class="comment">// clamp values.</span>
+00582 <a class="code" href="a05378.html#a374">clamp</a>(uv.U, 0, 1);
+00583 <a class="code" href="a05378.html#a374">clamp</a>(uv.V, 0, 1);
+00584 <span class="comment">// recurs down the 2 sons.</span>
+00585 CVector ret= CVector::Null;
+00586 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
+00587 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
+00588
+00589 <span class="keywordflow">return</span> ret;
+00590 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz647_0" doxytag="NL3D::CPatch::getTileElement" ></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="a03522.html">CTileElement</a> * NL3D::CPatch::getTileElement </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>uv</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>
+Get the lumel under the position.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02265">2265</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l01865">NL3D::CLandscape::getTileElement()</a>.
+<p>
+<div class="fragment"><pre>02266 {
+02267 <span class="comment">// compute tile coord and lumel coord.</span>
+02268 <a class="code" href="a04558.html#a14">sint</a> ts, tt;
+02269
+02270 <span class="comment">// fastFloor: use a precision of 256 to avoid doing OptFastFloorBegin.</span>
+02271 <span class="comment">// add 128, to round and get cneter of lumel.</span>
+02272 ts= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.U* (OrderS&lt;&lt;8) + 128); ts&gt;&gt;=8;
+02273 tt= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(uv.V* (OrderT&lt;&lt;8) + 128); tt&gt;&gt;=8;
+02274 <a class="code" href="a05378.html#a374">clamp</a>(ts, 0, OrderS-1);
+02275 <a class="code" href="a05378.html#a374">clamp</a>(tt, 0, OrderT-1);
+02276
+02277 <span class="comment">// get the lumel</span>
+02278 <span class="keywordflow">return</span> &amp;(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[ts+tt*<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>]);
+02279 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_16" doxytag="NL3D::CPatch::getTileLightMap" ></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::CPatch::getTileLightMap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03069.html">CPatchRdrPass</a> *&amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>rdrpass</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01191">1191</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05862.html#l01945">NL3D::CLandscape::getTileLightMap()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00100">NL3D::CTessBlock::LightMapRdrPass</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>01192 {
+01193 <span class="comment">// TessBlocks must have been allocated.</span>
+01194 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
+01195
+01196 <span class="comment">// get what tessBlock to use.</span>
+01197 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01198 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
+01199 CTessBlock &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
+01200
+01201 <span class="comment">// If the lightmap Id has not been computed, compute it.</span>
+01202 <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
+01203 {
+01204 <span class="comment">// Compute the lightmap texture, with help of TileColors, with neighboring info etc...</span>
+01205 <a class="code" href="a03337.html">CRGBA</a> lightText[<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>];
+01206 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a>(ts&amp;(~1), tt&amp;(~1), lightText);
+01207
+01208 <span class="comment">// Create a rdrPass with this texture, donlod to Driver etc...</span>
+01209 tessBlock.LightMapId= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileLightMap(lightText, rdrpass);
+01210
+01211 <span class="comment">// store this rdrpass ptr.</span>
+01212 tessBlock.LightMapRdrPass= rdrpass;
+01213 }
+01214
+01215 <span class="comment">// We are using this 2x2 tiles lightmap.</span>
+01216 tessBlock.LightMapRefCount++;
+01217
+01218
+01219 <span class="comment">// get the rdrpass ptr of the tessBlock lightmap</span>
+01220 rdrpass= tessBlock.LightMapRdrPass;
+01221 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_17" doxytag="NL3D::CPatch::getTileLightMapUvInfo" ></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::CPatch::getTileLightMapUvInfo </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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>uvScaleBias</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01225">1225</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a05862.html#l02003">NL3D::CLandscape::getTileLightMapUvInfo()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</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="a06497.html#l00636">NL3D::CTessFace::initTileUvLightmap()</a>.
+<p>
+<div class="fragment"><pre>01226 {
+01227 <span class="comment">// TessBlocks must have been allocated.</span>
+01228 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
+01229
+01230 <span class="comment">// get what tessBlock to use.</span>
+01231 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01232 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
+01233 CTessBlock &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
+01234
+01235 <span class="comment">// Get the uvScaleBias for the tile 0,0 of the block.</span>
+01236 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileLightMapUvInfo(tessBlock.LightMapId, uvScaleBias);
+01237
+01238 <span class="comment">// Must increment the bias, for the good tile in the 2x2 block Lightmap.</span>
+01239 <a class="code" href="a04558.html#a15">uint</a> tsDec= ts &amp; 1;
+01240 <a class="code" href="a04558.html#a15">uint</a> ttDec= tt &amp; 1;
+01241 uvScaleBias.x+= tsDec * uvScaleBias.z;
+01242 uvScaleBias.y+= ttDec * uvScaleBias.z;
+01243 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz671_2" doxytag="NL3D::CPatch::getTileLumelmapPixelPrecomputed" ></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::CPatch::getTileLumelmapPixelPrecomputed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+same as computeTileLightmapPixelPrecomputed, but brut result, not modified by colorTable. Actually used for Lightmap get interface.
+<p>
+Definition at line <a class="el" href="a06157.html#l00670">670</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06157.html#l00134">NL3D::getUnpackLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01499">getLumel()</a>.
+<p>
+<div class="fragment"><pre>00671 {
+00672 <span class="comment">// Return the lumel</span>
+00673 dest= <a class="code" href="a05363.html#a441">getUnpackLumelBlock</a> (&amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]), s+(t&lt;&lt;2));
+00674 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz671_3" doxytag="NL3D::CPatch::getTileLumelmapPrecomputed" ></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::CPatch::getTileLumelmapPrecomputed </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</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>
+Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00650">650</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a06156.html#l00059">NL_LUMEL_BY_TILE_SHIFT</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>.
+<p>
+<div class="fragment"><pre>00651 {
+00652 <span class="comment">// Unpack the lumels</span>
+00653 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>];
+00654 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (buffer, &amp;(CompressedLumels[(ts + (tt*OrderS))*NL_BLOCK_LUMEL_COMPRESSED_SIZE]));
+00655
+00656 <span class="comment">// Retrun it</span>
+00657 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+00658 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
+00659 {
+00660 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
+00661 {
+00662 <span class="comment">// lumel</span>
+00663 dest[<a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a582">stride</a> + <a class="code" href="a04223.html#a572">x</a>]= <a class="code" href="a04223.html#a589">buffer</a>[<a class="code" href="a04223.html#a572">x</a>+(<a class="code" href="a04223.html#a573">y</a>&lt;&lt;<a class="code" href="a04733.html#a6">NL_LUMEL_BY_TILE_SHIFT</a>)];
+00664 }
+00665 }
+00666 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha19" doxytag="NL3D::CPatch::getTileMaterialRefCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatch::getTileMaterialRefCount </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get number of TileMaterial created in this Patch.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00788">788</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00788 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz665_0" doxytag="NL3D::CPatch::getTileRenderPass" ></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="a03069.html">CPatchRdrPass</a> * NL3D::CPatch::getTileRenderPass </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tileId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pass</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02040">2040</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05862.html#l01790">NL3D::CLandscape::getTileRenderPass()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a05867.html#l00053">NL3D_TILE_PASS_ADD</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05867.html#l00051">NL3D_TILE_PASS_RGB1</a>, <a class="el" href="a05867.html#l00052">NL3D_TILE_PASS_RGB2</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06156.html#l00340">Tiles</a>.
+<p>
+<div class="fragment"><pre>02041 {
+02042 <span class="comment">// All but lightmap.</span>
+02043 <a class="code" href="a04199.html#a6">nlassert</a>(pass==NL3D_TILE_PASS_RGB0 || pass==NL3D_TILE_PASS_RGB1 || pass==NL3D_TILE_PASS_RGB2 ||
+02044 pass==NL3D_TILE_PASS_ADD);
+02045
+02046 <span class="keywordtype">bool</span> additive= (pass==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>);
+02047 <a class="code" href="a04558.html#a14">sint</a> passNum= pass-<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>;
+02048 <span class="comment">// If additive, take the additve tile of bigger existing pass.</span>
+02049 <span class="keywordflow">if</span>(additive)
+02050 {
+02051 <span class="comment">// Default: take addtive of pass 0.</span>
+02052 passNum= 0;
+02053 <span class="comment">// If the pass1 is not empty, may take its tile.</span>
+02054 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[1]!=0xFFFF)
+02055 {
+02056 passNum= 1;
+02057 <span class="comment">// If the pass2 is not empty, take its tile.</span>
+02058 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[2]!=0xFFFF)
+02059 passNum= 2;
+02060 }
+02061 }
+02062
+02063 <a class="code" href="a04558.html#a14">sint</a> tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[passNum];
+02064 <span class="keywordflow">if</span>(tileNumber==0xFFFF)
+02065 {
+02066 <span class="comment">// Display a "fake" only if pass 0.</span>
+02067 <span class="keywordflow">if</span>(pass==<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>)
+02068 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileRenderPass(0xFFFF, <span class="keyword">false</span>);
+02069 <span class="comment">// Else, this tile do not have such a pass (not a transition).</span>
+02070 <span class="keywordflow">return</span> NULL;
+02071 }
+02072 <span class="keywordflow">else</span>
+02073 {
+02074 <span class="comment">// return still may be NULL, in additive case.</span>
+02075 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileRenderPass(tileNumber, additive);
+02076 }
+02077 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_18" doxytag="NL3D::CPatch::getTileTileColors" ></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::CPatch::getTileTileColors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>corners</em>[4]</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00345">345</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06539.html#l00048">NL3D::CTileColor::Color565</a>, <a class="el" href="a06340.html#l00162">NLMISC::CRGBA::set565()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00508">modulateTileLightmapEdgeWithTileColors()</a>, <a class="el" href="a06157.html#l00544">modulateTileLightmapPixelWithTileColors()</a>, and <a class="el" href="a06157.html#l00488">modulateTileLightmapWithTileColors()</a>.
+<p>
+<div class="fragment"><pre>00346 {
+00347 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;4;i++)
+00348 {
+00349 CTileColor &amp;tcol= <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>[ (tt+(i&gt;&gt;1))*(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>+1) + (ts+(i&amp;1)) ];
+00350 <a class="code" href="a03337.html">CRGBA</a> &amp;col= corners[i];
+00351 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa15">set565</a> (tcol.Color565);
+00352 }
+00353 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz665_1" doxytag="NL3D::CPatch::getTileUvInfo" ></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::CPatch::getTileUvInfo </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tileId</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pass</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>alpha</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>orient</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>uvScaleBias</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>is256x256</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>uvOff</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l02080">2080</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a05862.html#l01820">NL3D::CLandscape::getTileUvScaleBiasRot()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a05867.html#l00053">NL3D_TILE_PASS_ADD</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05867.html#l00051">NL3D_TILE_PASS_RGB1</a>, <a class="el" href="a05867.html#l00052">NL3D_TILE_PASS_RGB2</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a05646.html#l00244">type</a>, <a class="el" href="a05981.html#l00096">uint8</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="a06497.html#l00565">NL3D::CTessFace::initTileUvRGBA()</a>.
+<p>
+<div class="fragment"><pre>02081 {
+02082 <span class="comment">// All but lightmap.</span>
+02083 <a class="code" href="a04199.html#a6">nlassert</a>(pass==NL3D_TILE_PASS_RGB0 || pass==NL3D_TILE_PASS_RGB1 || pass==NL3D_TILE_PASS_RGB2 ||
+02084 pass==NL3D_TILE_PASS_ADD);
+02085
+02086 <span class="keywordtype">bool</span> additive= (pass==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>);
+02087 <a class="code" href="a04558.html#a14">sint</a> passNum= pass-<a class="code" href="a04444.html#a2">NL3D_TILE_PASS_RGB0</a>;
+02088 <span class="comment">// If additive, take the additve tile of bigger existing pass.</span>
+02089 <span class="keywordflow">if</span>(additive)
+02090 {
+02091 <span class="comment">// Default: take addtive of pass 0.</span>
+02092 passNum= 0;
+02093 <span class="comment">// If the pass1 is not empty, may take its tile.</span>
+02094 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[1]!=0xFFFF)
+02095 {
+02096 passNum= 1;
+02097 <span class="comment">// If the pass2 is not empty, take its tile.</span>
+02098 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[2]!=0xFFFF)
+02099 passNum= 2;
+02100 }
+02101 }
+02102
+02103 <a class="code" href="a04558.html#a14">sint</a> tileNumber= <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[tileId].Tile[passNum];
+02104 <span class="keywordflow">if</span>(tileNumber==0xFFFF)
+02105 {
+02106 <span class="comment">// dummy... Should not be called here.</span>
+02107 orient= 0;
+02108 uvScaleBias.x=0;
+02109 uvScaleBias.y=0;
+02110 uvScaleBias.z=1;
+02111 is256x256=<span class="keyword">false</span>;
+02112 uvOff=0;
+02113 }
+02114 <span class="keywordflow">else</span>
+02115 {
+02116 orient= Tiles[tileId].getTileOrient(passNum);
+02117 Tiles[tileId].getTile256Info(is256x256, uvOff);
+02118 CTile::TBitmap <a class="code" href="a04223.html#a581">type</a>;
+02119 <span class="comment">// If alpha wanted, return its UV info (works either for Alpha in Diffuse Pass and Alpha in Additive Pass)</span>
+02120 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a663">alpha</a>)
+02121 <a class="code" href="a04223.html#a581">type</a>= CTile::alpha;
+02122 <span class="keywordflow">else</span>
+02123 {
+02124 <span class="keywordflow">if</span>(additive)
+02125 <a class="code" href="a04223.html#a581">type</a>= CTile::additive;
+02126 <span class="keywordflow">else</span>
+02127 <a class="code" href="a04223.html#a581">type</a>= CTile::diffuse;
+02128 }
+02129
+02130 <a class="code" href="a04558.html#a7">uint8</a> rotalpha;
+02131 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;getTileUvScaleBiasRot(tileNumber, type, uvScaleBias, rotalpha);
+02132
+02133 <span class="comment">// Add the special rotation of alpha.</span>
+02134 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a663">alpha</a>)
+02135 orient= (orient+rotalpha)&amp;3;
+02136 }
+02137
+02138 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha20" doxytag="NL3D::CPatch::getZone" ></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="a03730.html">CZone</a>* NL3D::CPatch::getZone </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="a06156.html#l00391">391</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, <a class="el" href="a06157.html#l01655">getCurrentTileTLIColors()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, and <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>.
+<p>
+<div class="fragment"><pre>00391 {<span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha21" doxytag="NL3D::CPatch::isRenderClipped" ></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::CPatch::isRenderClipped </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00594">594</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06760.html#l00539">NL3D::CZone::isPatchRenderClipped()</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06157.html#l02005">beginDLMLighting()</a>, <a class="el" href="a06161.html#l01502">checkCreateVertexVBFar()</a>, <a class="el" href="a06161.html#l01543">checkCreateVertexVBNear()</a>, <a class="el" href="a06161.html#l01571">checkDeleteVertexVBFar()</a>, <a class="el" href="a06161.html#l01589">checkDeleteVertexVBNear()</a>, <a class="el" href="a06161.html#l01522">checkFillVertexVBFar()</a>, <a class="el" href="a06161.html#l01556">checkFillVertexVBNear()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06161.html#l01248">fillVBIfVisible()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06157.html#l02021">processDLMLight()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00115">release()</a>, <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, and <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>.
+<p>
+<div class="fragment"><pre>00595 {
+00596 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
+00597 <span class="keywordflow">return</span> <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;isPatchRenderClipped(PatchId);
+00598 <span class="keywordflow">else</span>
+00599 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00600 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz655_2" doxytag="NL3D::CPatch::linkBeforeNearUL" ></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::CPatch::linkBeforeNearUL </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>patchNext</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>
+For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01880">1880</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03394">NL3D::CLandscape::linkPatchToNearUL()</a>.
+<p>
+<div class="fragment"><pre>01881 {
+01882 <a class="code" href="a04199.html#a6">nlassert</a>(patchNext);
+01883
+01884 <span class="comment">// first, unlink others from me. NB: works even if _ULNearPrec==_ULNearNext==this.</span>
+01885 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>;
+01886 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;
+01887 <span class="comment">// link to igNext.</span>
+01888 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= patchNext;
+01889 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= patchNext-&gt;_ULNearPrec;
+01890 <span class="comment">// link others to me.</span>
+01891 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <span class="keyword">this</span>;
+01892 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <span class="keyword">this</span>;
+01893 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz669_0" doxytag="NL3D::CPatch::linkTessFaceWithEdge" ></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="a03476.html">CTessFace</a> * NL3D::CPatch::linkTessFaceWithEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>linkTo</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>
+Used by <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a>. Search in the tesselation the first face which own the edge uv0-uv1. link it with linkTo, and return it. NULL if not found (obviously because not so tesselated)
+<p>
+Definition at line <a class="el" href="a06155.html#l01834">1834</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l02904">NL3D::CTessFace::linkTessFaceWithEdge()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>.
+<p>
+<div class="fragment"><pre>01835 {
+01836 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
+01837 <span class="comment">// Try to link with Root Son0</span>
+01838 <a class="code" href="a03057.html#NL3D_1_1CPatchn2">CTessFace</a> *face= <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
+01839 <span class="comment">// if Failed Try to link with Root Son1</span>
+01840 <span class="keywordflow">if</span>(!face)
+01841 face= <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
+01842 <span class="keywordflow">return</span> face;
+01843 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd28" doxytag="NL3D::CPatch::makeRoots" ></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::CPatch::makeRoots </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01124">1124</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06156.html#l00822">BaseFarVertices</a>, <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06497.html#l00345">NL3D::CTessFace::computeSplitPoint()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06156.html#l00816">ErrorSize</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FBase</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVBase</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVLeft</a>, <a class="el" href="a06498.html#l00282">NL3D::CTessFace::FVRight</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05862.html#l03010">NL3D::CLandscape::newTessFace()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">NL3D::CTessFace::Patch</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVBase</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVLeft</a>, <a class="el" href="a06498.html#l00245">NL3D::CTessFace::PVRight</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, <a class="el" href="a06498.html#l00083">NL3D::CParamCoord::setST()</a>, <a class="el" href="a06498.html#l00274">NL3D::CTessFace::Size</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VBase</a>, <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VLeft</a>, and <a class="el" href="a06498.html#l00241">NL3D::CTessFace::VRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>.
+<p>
+<div class="fragment"><pre>01125 {
+01126 CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
+01127 CTessVertex *b= BaseVertices[1];
+01128 CTessVertex *c= BaseVertices[2];
+01129 CTessVertex *d= BaseVertices[3];
+01130
+01131 <span class="comment">// Set positions.</span>
+01132 a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
+01133 b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
+01134 c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
+01135 d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
+01136
+01137 <span class="comment">// Init Far vetices.</span>
+01138 CTessFarVertex *fa= &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchr4">BaseFarVertices</a>[0];
+01139 CTessFarVertex *fb= &amp;BaseFarVertices[1];
+01140 CTessFarVertex *fc= &amp;BaseFarVertices[2];
+01141 CTessFarVertex *fd= &amp;BaseFarVertices[3];
+01142 fa-&gt;Src= a;
+01143 fa-&gt;PCoord.setST(0,0);
+01144 fb-&gt;Src= b;
+01145 fb-&gt;PCoord.setST(0,1);
+01146 fc-&gt;Src= c;
+01147 fc-&gt;PCoord.setST(1,1);
+01148 fd-&gt;Src= d;
+01149 fd-&gt;PCoord.setST(1,0);
+01150
+01151 <span class="comment">// We don't have to fill the Far vertices VB here, because this patch is still not visible.</span>
+01152 <span class="comment">// NB: we can't because we don't have any driver here.</span>
+01153 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>()==<span class="keyword">true</span>);
+01154
+01155
+01156 <span class="comment">// Make Roots.</span>
+01157 <span class="comment">/*</span>
+01158 <span class="comment"> Tesselation layout. For Square Face, and if OrderS&gt;=OrderT.</span>
+01159 <span class="comment"></span>
+01160 <span class="comment"> A-------D</span>
+01161 <span class="comment"> |\ Son1 |</span>
+01162 <span class="comment"> | \ |</span>
+01163 <span class="comment"> | \ |</span>
+01164 <span class="comment"> | Son0 \|</span>
+01165 <span class="comment"> B-------C</span>
+01166 <span class="comment"></span>
+01167 <span class="comment"> For rectangles whith OrderT&gt;OrderS. It is VERY IMPORTANT, for splitRectangular() reasons.</span>
+01168 <span class="comment"></span>
+01169 <span class="comment"> A-------D</span>
+01170 <span class="comment"> | Son0 /|</span>
+01171 <span class="comment"> | / |</span>
+01172 <span class="comment"> | / |</span>
+01173 <span class="comment"> |/ Son1 |</span>
+01174 <span class="comment"> B-------C</span>
+01175 <span class="comment"></span>
+01176 <span class="comment"> */</span>
+01177 <a class="code" href="a04199.html#a6">nlassert</a>(Son0==NULL);
+01178 <a class="code" href="a04199.html#a6">nlassert</a>(Son1==NULL);
+01179 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;newTessFace();
+01180 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>= <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;newTessFace();
+01181
+01182 <span class="comment">// Son0.</span>
+01183 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Patch= <span class="keyword">this</span>;
+01184 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Level= 0;
+01185 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
+01186 {
+01187 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase= b;
+01188 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft= c;
+01189 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight= a;
+01190 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase= fb;
+01191 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft= fc;
+01192 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight= fa;
+01193 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVBase.setST(0, 1);
+01194 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVLeft.setST(1, 1);
+01195 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVRight.setST(0, 0);
+01196 }
+01197 <span class="keywordflow">else</span>
+01198 {
+01199 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase= a;
+01200 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft= b;
+01201 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight= d;
+01202 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVBase= fa;
+01203 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVLeft= fb;
+01204 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FVRight= fd;
+01205 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVBase.setST(0, 0);
+01206 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVLeft.setST(0, 1);
+01207 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;PVRight.setST(1, 0);
+01208 }
+01209 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FBase= <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>;
+01210 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft= NULL;
+01211 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight= NULL;
+01212 <span class="comment">// No tile info.</span>
+01213 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;Size= <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>/2;
+01214 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;computeSplitPoint();
+01215
+01216 <span class="comment">// Son1.</span>
+01217 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Patch= <span class="keyword">this</span>;
+01218 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Level= 0;
+01219 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>)
+01220 {
+01221 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase= d;
+01222 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft= a;
+01223 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight= c;
+01224 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase= fd;
+01225 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVLeft= fa;
+01226 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVRight= fc;
+01227 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVBase.setST(1, 0);
+01228 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVLeft.setST(0, 0);
+01229 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVRight.setST(1, 1);
+01230 }
+01231 <span class="keywordflow">else</span>
+01232 {
+01233 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase= c;
+01234 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft= d;
+01235 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight= b;
+01236 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVBase= fc;
+01237 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVLeft= fd;
+01238 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FVRight= fb;
+01239 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVBase.setST(1, 1);
+01240 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVLeft.setST(1, 0);
+01241 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;PVRight.setST(0, 1);
+01242 }
+01243 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FBase= <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>;
+01244 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft= NULL;
+01245 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight= NULL;
+01246 <span class="comment">// No tile info.</span>
+01247 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;Size= <a class="code" href="a03057.html#NL3D_1_1CPatchr6">ErrorSize</a>/2;
+01248 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;computeSplitPoint();
+01249
+01250
+01251 <span class="comment">// Prepare the render list...</span>
+01252 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
+01253 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_18">resetMasterBlock</a>();
+01254 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fa);
+01255 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fb);
+01256 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fc);
+01257 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_4">appendFarVertexToRenderList</a>(fd);
+01258 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a>(Son0);
+01259 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_2">appendFaceToRenderList</a>(Son1);
+01260
+01261 <span class="comment">// Usefull for geomorph: Init 2 root faces MaxNearLimit, and MaxFaceSize</span>
+01262 <span class="comment">// NB: since no geomorph is made on endpoints (StartPos==EndPos) of patchs, this is not usefull.</span>
+01263 <span class="comment">// but it is important to ensure the VP or software geomorph won't crash with bad float values.</span>
+01264 <span class="comment">// Init MaxFaceSize.</span>
+01265 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase-&gt;MaxFaceSize= 1;
+01266 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft-&gt;MaxFaceSize= 1;
+01267 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight-&gt;MaxFaceSize= 1;
+01268 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase-&gt;MaxFaceSize= 1;
+01269 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft-&gt;MaxFaceSize= 1;
+01270 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight-&gt;MaxFaceSize= 1;
+01271 <span class="comment">// Init MaxNearLimit.</span>
+01272 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VBase-&gt;MaxNearLimit= 1;
+01273 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VLeft-&gt;MaxNearLimit= 1;
+01274 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;VRight-&gt;MaxNearLimit= 1;
+01275 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VBase-&gt;MaxNearLimit= 1;
+01276 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VLeft-&gt;MaxNearLimit= 1;
+01277 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;VRight-&gt;MaxNearLimit= 1;
+01278
+01279 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_19" doxytag="NL3D::CPatch::modulateTileLightmapEdgeWithTileColors" ></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::CPatch::modulateTileLightmapEdgeWithTileColors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>inverse</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00508">508</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00765">computeTileLightmapEdge()</a>.
+<p>
+<div class="fragment"><pre>00509 {
+00510 <span class="comment">// Get the tileColors around this tile</span>
+00511 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+00512 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
+00513
+00514 <span class="comment">// get coordinate according to edge.</span>
+00515 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>=0,<a class="code" href="a04223.html#a573">y</a>=0;
+00516 <span class="keywordflow">switch</span>(edge)
+00517 {
+00518 <span class="keywordflow">case</span> 0: <a class="code" href="a04223.html#a572">x</a>= 0; <span class="keywordflow">break</span>;
+00519 <span class="keywordflow">case</span> 1: <a class="code" href="a04223.html#a573">y</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+00520 <span class="keywordflow">case</span> 2: <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1; <span class="keywordflow">break</span>;
+00521 <span class="keywordflow">case</span> 3: <a class="code" href="a04223.html#a573">y</a>= 0; <span class="keywordflow">break</span>;
+00522 };
+00523
+00524 <span class="comment">// For all lumel of the edge, bilinear.</span>
+00525 <a class="code" href="a04558.html#a15">uint</a> i;
+00526 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; i++)
+00527 {
+00528 <span class="comment">// if vertical edge</span>
+00529 <span class="keywordflow">if</span>( (edge&amp;1)==0 ) <a class="code" href="a04223.html#a573">y</a>= i;
+00530 <span class="comment">// else horizontal edge</span>
+00531 <span class="keywordflow">else</span> <a class="code" href="a04223.html#a572">x</a>= i;
+00532
+00533 <span class="comment">// manage inverse.</span>
+00534 <a class="code" href="a04558.html#a15">uint</a> where;
+00535 <span class="keywordflow">if</span>(inverse) where= (<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>-1)-i;
+00536 <span class="keywordflow">else</span> where= i;
+00537 <span class="comment">// compute this pixel, and modulate</span>
+00538 <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, x, y, dest[where*stride]);
+00539 }
+00540 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_20" doxytag="NL3D::CPatch::modulateTileLightmapPixelWithTileColors" ></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::CPatch::modulateTileLightmapPixelWithTileColors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00544">544</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00782">computeTileLightmapPixel()</a>.
+<p>
+<div class="fragment"><pre>00545 {
+00546 <span class="comment">// Get the tileColors around this tile</span>
+00547 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+00548 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
+00549
+00550 <span class="comment">// compute this pixel, and modulate</span>
+00551 <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, s, t, *dest);
+00552 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_21" doxytag="NL3D::CPatch::modulateTileLightmapWithTileColors" ></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::CPatch::modulateTileLightmapWithTileColors </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</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> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>stride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00488">488</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00419">NL3D::bilinearColorAndModulatex2()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05646.html#l00244">stride</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00750">computeTileLightmap()</a>.
+<p>
+<div class="fragment"><pre>00489 {
+00490 <span class="comment">// Get the tileColors around this tile</span>
+00491 <a class="code" href="a03337.html">CRGBA</a> corners[4];
+00492 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_18">getTileTileColors</a>(ts, tt, corners);
+00493
+00494 <span class="comment">// For all lumel, bilinear.</span>
+00495 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a572">x</a>, <a class="code" href="a04223.html#a573">y</a>;
+00496 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a573">y</a>++)
+00497 {
+00498 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a572">x</a>++)
+00499 {
+00500 <span class="comment">// compute this pixel, and modulate</span>
+00501 <a class="code" href="a05363.html#a444">bilinearColorAndModulatex2</a>(corners, x, y, dest[y*stride + x]);
+00502 }
+00503 }
+00504 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_6" doxytag="NL3D::CPatch::packLumelBlock" ></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::CPatch::packLumelBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>source</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>alpha0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>alpha1</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>
+Pack a 4x4 lumel block<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00261">261</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00053">NL3D::NL3DDecompressLumelFactor0Case0</a>, <a class="el" href="a06157.html#l00061">NL3D::NL3DDecompressLumelFactor0Case1</a>, <a class="el" href="a06157.html#l00057">NL3D::NL3DDecompressLumelFactor1Case0</a>, <a class="el" href="a06157.html#l00065">NL3D::NL3DDecompressLumelFactor1Case1</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l01132">value</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01267">packShadowMap()</a>.
+<p>
+<div class="fragment"><pre>00262 {
+00263 <span class="comment">// Precalc the height values..</span>
+00264 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a658">value</a>[8];
+00265
+00266 <span class="comment">// For each value</span>
+00267 <a class="code" href="a04558.html#a15">uint</a> i;
+00268 <span class="keywordflow">for</span> (i=0; i&lt;8; i++)
+00269 {
+00270 <span class="comment">// Case 0 or 1 ?</span>
+00271 <span class="keywordflow">if</span> (alpha0&gt;alpha1)
+00272 <span class="comment">// Case 0</span>
+00273 <a class="code" href="a04223.html#a658">value</a>[i]=(<a class="code" href="a05363.html#a223">NL3DDecompressLumelFactor0Case0</a>[i]*alpha0+<a class="code" href="a05363.html#a224">NL3DDecompressLumelFactor1Case0</a>[i]*alpha1)/7;
+00274 <span class="keywordflow">else</span>
+00275 {
+00276 <span class="keywordflow">if</span> (i&lt;6)
+00277 <a class="code" href="a04223.html#a658">value</a>[i]=(<a class="code" href="a05363.html#a225">NL3DDecompressLumelFactor0Case1</a>[i]*alpha0+<a class="code" href="a05363.html#a226">NL3DDecompressLumelFactor1Case1</a>[i]*alpha1)/5;
+00278 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i==6)
+00279 <a class="code" href="a04223.html#a658">value</a>[i]=0;
+00280 <span class="keywordflow">else</span>
+00281 <a class="code" href="a04223.html#a658">value</a>[i]=255;
+00282 }
+00283 }
+00284
+00285 <span class="comment">// Store alpha value</span>
+00286 dest[0]=alpha0;
+00287 dest[1]=alpha1;
+00288
+00289 <span class="comment">// Clear dest codes</span>
+00290 <span class="keywordflow">for</span> (i=0; i&lt;6; i++)
+00291 {
+00292 <span class="comment">// Clear the code</span>
+00293 dest[2+i]=0;
+00294 }
+00295
+00296 <span class="comment">// For each original select the best</span>
+00297 <a class="code" href="a04558.html#a15">uint</a> codeOffset=2;
+00298 <a class="code" href="a04558.html#a14">sint</a> codeShift=5;
+00299 <span class="keywordflow">for</span> (i=0; i&lt;16; i++)
+00300 {
+00301 <span class="comment">// Best dist and code</span>
+00302 <a class="code" href="a04558.html#a15">uint</a> bestDist=10000;
+00303 <a class="code" href="a04558.html#a7">uint8</a> bestCode=0;
+00304
+00305 <span class="comment">// Calc distance</span>
+00306 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> code=0; code&lt;8; code++)
+00307 {
+00308 <span class="comment">// Distance from original value</span>
+00309 <a class="code" href="a04558.html#a15">uint</a> dist=abs ((<a class="code" href="a04558.html#a14">sint</a>)(source[i])-(<a class="code" href="a04558.html#a14">sint</a>)(value[code]));
+00310
+00311 <span class="comment">// The best ?</span>
+00312 <span class="keywordflow">if</span> (dist&lt;bestDist)
+00313 {
+00314 <span class="comment">// New best</span>
+00315 bestDist=dist;
+00316 bestCode=code;
+00317 }
+00318
+00319 <span class="comment">// Perfect, stop searching</span>
+00320 <span class="keywordflow">if</span> (dist==0)
+00321 <span class="keywordflow">break</span>;
+00322 }
+00323
+00324 <span class="comment">// Store the best</span>
+00325 <span class="keywordflow">if</span> (codeShift&gt;=0)
+00326 dest[codeOffset]|=bestCode&lt;&lt;codeShift;
+00327 <span class="keywordflow">else</span>
+00328 {
+00329 dest[codeOffset]|=bestCode&gt;&gt;(-codeShift);
+00330 dest[codeOffset+1]|=bestCode&lt;&lt;(8+codeShift);
+00331 }
+00332
+00333
+00334 <span class="comment">// Next shift</span>
+00335 codeShift-=3;
+00336 <span class="keywordflow">if</span> (codeShift&lt;=-3)
+00337 {
+00338 codeOffset++;
+00339 codeShift+=8;
+00340 }
+00341 }
+00342 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_1" doxytag="NL3D::CPatch::packShadowMap" ></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::CPatch::packShadowMap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pLumel</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>
+Pack the lumels of the patches. Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method compress the lumels passed in parameter and stored them in its Lumels member.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>pShadow</em>&nbsp;</td><td>is a pointer on the destination lumel buffer. Size must be (OrderS*4+1)*(OrderS*4+1). </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_2">resetCompressedLumels()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01267">1267</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06157.html#l00244">evalLumelBlock()</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06157.html#l00261">packLumelBlock()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>.
+<p>
+<div class="fragment"><pre>01268 {
+01269 <span class="comment">// Number of lumel by lines</span>
+01270 <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+01271
+01272 <span class="comment">// Number of block in a line</span>
+01273 <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
+01274 <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
+01275
+01276 <span class="comment">// Number of line</span>
+01277 <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+01278
+01279 <span class="comment">// Number of block line</span>
+01280 <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
+01281 <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
+01282
+01283 <span class="comment">// Resize the compressed buffer</span>
+01284 <a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>.resize (numLumelBlock*numLineBlock*NL_BLOCK_LUMEL_COMPRESSED_SIZE);
+01285
+01286 <span class="comment">// Input of compresed data</span>
+01287 <a class="code" href="a04558.html#a7">uint8</a> *compressedData=&amp;<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[0];
+01288
+01289 <span class="comment">// Each line block</span>
+01290 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lineBlock=0; lineBlock&lt;numLineBlock; lineBlock++)
+01291 {
+01292 <span class="comment">// Block pointer</span>
+01293 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *blockLine=pLumelSrc;
+01294
+01295 <span class="comment">// Each lumel block</span>
+01296 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lumelBlock=0; lumelBlock&lt;numLumelBlock; lumelBlock++)
+01297 {
+01298 <span class="comment">// *** Unpack the block</span>
+01299 <a class="code" href="a04558.html#a15">uint</a> countU;
+01300
+01301 <span class="comment">// Last block ?</span>
+01302 <span class="keywordflow">if</span> (lumelBlock==numLumelBlock-1)
+01303 countU=lumelCount&amp;3;
+01304 <span class="keywordflow">else</span>
+01305 countU=4;
+01306
+01307 <span class="comment">// Destination lumel</span>
+01308 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *blockSrc=blockLine;
+01309
+01310 <span class="comment">// Temp block</span>
+01311 <a class="code" href="a04558.html#a7">uint8</a> originalBlock[4*4];
+01312
+01313 <span class="comment">// Copy the lumels in the bloc</span>
+01314 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; <a class="code" href="a04223.html#a576">v</a>++)
+01315 {
+01316 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>; u++)
+01317 {
+01318 <span class="comment">// Copy the lumel</span>
+01319 originalBlock[(<a class="code" href="a04223.html#a576">v</a>&lt;&lt;2)+u]=blockSrc[u];
+01320 }
+01321
+01322 <span class="comment">// Next line</span>
+01323 blockSrc+=lumelCount;
+01324 }
+01325
+01326 <span class="comment">// Get min and max alpha</span>
+01327 <a class="code" href="a04558.html#a7">uint8</a> alphaMin=255;
+01328 <a class="code" href="a04558.html#a7">uint8</a> alphaMax=0;
+01329
+01330 <span class="comment">// Scan</span>
+01331 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;16; i++)
+01332 {
+01333 <span class="comment">// Min ?</span>
+01334 <span class="keywordflow">if</span> (originalBlock[i]&lt;alphaMin)
+01335 alphaMin=originalBlock[i];
+01336 <span class="keywordflow">if</span> (originalBlock[i]&gt;alphaMax)
+01337 alphaMax=originalBlock[i];
+01338 }
+01339
+01340 <span class="comment">// *** Try to compress by 2 methods</span>
+01341
+01342 <span class="comment">// Blcok uncompressed</span>
+01343 <a class="code" href="a04558.html#a7">uint8</a> uncompressedBlock[4*4];
+01344
+01345 <span class="comment">// Pack the block</span>
+01346 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (compressedData, originalBlock, alphaMin, alphaMax);
+01347
+01348 <span class="comment">// Unpack the block</span>
+01349 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (uncompressedBlock, compressedData);
+01350
+01351 <span class="comment">// Eval error</span>
+01352 <a class="code" href="a04558.html#a15">uint</a> firstMethod=<a class="code" href="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (originalBlock, uncompressedBlock, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE);
+01353
+01354 <span class="comment">// second compression</span>
+01355 <a class="code" href="a04558.html#a7">uint8</a> secondCompressedBlock[<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>];
+01356 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_6">packLumelBlock</a> (secondCompressedBlock, originalBlock, alphaMax, alphaMin);
+01357
+01358 <span class="comment">// Unpack the block</span>
+01359 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (uncompressedBlock, secondCompressedBlock);
+01360
+01361 <span class="comment">// Eval error</span>
+01362 <a class="code" href="a04558.html#a15">uint</a> secondMethod=<a class="code" href="a03057.html#NL3D_1_1CPatchz640_5">evalLumelBlock</a> (originalBlock, uncompressedBlock, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE);
+01363
+01364 <span class="comment">// Second best ?</span>
+01365 <span class="keywordflow">if</span> (secondMethod&lt;firstMethod)
+01366 {
+01367 <span class="comment">// Copy compressed data</span>
+01368 memcpy (compressedData, secondCompressedBlock, NL_BLOCK_LUMEL_COMPRESSED_SIZE);
+01369 }
+01370
+01371 <span class="comment">// Next source block</span>
+01372 compressedData+=<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>;
+01373
+01374 <span class="comment">// Next block on the line</span>
+01375 blockLine+=4;
+01376 }
+01377
+01378 <span class="comment">// Next line of block</span>
+01379 pLumelSrc+=lumelCount*4;
+01380 }
+01381 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_3" doxytag="NL3D::CPatch::preRender" ></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::CPatch::preRender </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>patchSphere</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>
+preRender this patch. Build Max faces / pass etc...
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00249">249</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06497.html#l00083">NL3D::CTileMaterial::appendTileToEachRenderPass()</a>, <a class="el" href="a06491.html#l00146">NL3D::CTessBlock::clip()</a>, <a class="el" href="a06491.html#l00160">NL3D::CTessBlock::clipFar()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06161.html#l01161">fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01173">fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">fillTileVertexListVB()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06491.html#l00139">NL3D::CTessBlock::forceClip()</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06492.html#l00090">NL3D::CTessBlock::RdrTileRoot</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06491.html#l00267">NL3D::CTessBlock::refillFaceVectorTile()</a>, <a class="el" href="a06491.html#l00130">NL3D::CTessBlock::resetClip()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06161.html#l00744">updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, <a class="el" href="a06161.html#l00774">updateTileVBAlloc()</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+<div class="fragment"><pre>00250 {
+00251 <span class="comment">// 0. Classify the patch, and update TextureInfo.</span>
+00252 <span class="comment">//=======================</span>
+00253 <a class="code" href="a04558.html#a14">sint</a> newFar0,newFar1;
+00254 <span class="comment">// compute new Far0 and new Far1.</span>
+00255 <a class="code" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a>(patchSphere, newFar0, newFar1);
+00256
+00257
+00258 <span class="comment">// 2. Update vertices in VB</span>
+00259 <span class="comment">//========================</span>
+00260 <a class="code" href="a04558.html#a14">sint</a> oldFar0= <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>, oldFar1= <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>;
+00261
+00262 <span class="comment">// Test if go in or go out tileMode.</span>
+00263 <span class="keywordtype">bool</span> changeTileMode;
+00264 <span class="comment">// this is true if a change is made, and if old or current is in TileMode.</span>
+00265 changeTileMode= (newFar0!=oldFar0) &amp;&amp; (newFar0==0 || oldFar0==0);
+00266 <span class="comment">// Or this is true if Far0 / Far1 was invalid before.</span>
+00267 changeTileMode= changeTileMode || oldFar0==-1 || oldFar1==-1;
+00268
+00269 <span class="comment">// Pre VB change.</span>
+00270 <span class="comment">//------------------</span>
+00271 <span class="comment">// In this case, major change: delete all VB, then recreate after.</span>
+00272 <span class="keywordflow">if</span>(changeTileMode)
+00273 {
+00274 <span class="comment">// delete the old VB (NB: isRenderClipped()==false here). </span>
+00275 <span class="comment">// NB: Far0 and Far1 are still unmodified, so deleteVB() will do the good job.</span>
+00276 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
+00277 }
+00278 <span class="keywordflow">else</span>
+00279 {
+00280 <span class="comment">// minor change: Far0 UV, or Far1.</span>
+00281 <span class="comment">// Far0 UV: do nothing here.</span>
+00282 <span class="comment">// If change in Far1, must delete Far1</span>
+00283 <span class="keywordflow">if</span>(newFar1!=oldFar1)
+00284 {
+00285 <span class="comment">// NB: Far1 is still unmodified, so deleteVB() will do the good job.</span>
+00286 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_4">deleteVBAndFaceVectorFar1Only</a>();
+00287 }
+00288 }
+00289
+00290 <span class="comment">// Far change.</span>
+00291 <span class="comment">//------------------</span>
+00292 <span class="comment">// Set new far values</span>
+00293 Far0= newFar0;
+00294 Far1= newFar1;
+00295
+00296
+00297 <span class="comment">// Post VB change.</span>
+00298 <span class="comment">//------------------</span>
+00299 <span class="keywordflow">if</span>(changeTileMode)
+00300 {
+00301 <span class="comment">// major change: recreate all the VB.</span>
+00302 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a>();
+00303 <span class="comment">// Then try to refill if possible.</span>
+00304 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
+00305 }
+00306 <span class="keywordflow">else</span>
+00307 {
+00308 <span class="comment">// minor change: Far0 UV, or Far1.</span>
+00309 <span class="comment">// If change in Far0</span>
+00310 <span class="keywordflow">if</span>(newFar0!=oldFar0)
+00311 {
+00312 <span class="comment">// Then must recompute VB with good UVs.</span>
+00313 <span class="comment">// An optimisation is to check if UVs had really change (see UScale ...)</span>
+00314 <span class="comment">// but the case they don't change is very rare: 1/16.</span>
+00315 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_8">fillVBFar0Only</a>();
+00316 }
+00317
+00318 <span class="comment">// If change in Far1, must allcoate and recompute UVs.</span>
+00319 <span class="keywordflow">if</span>(newFar1!=oldFar1)
+00320 {
+00321 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_1">allocateVBAndFaceVectorFar1Only</a>();
+00322 <span class="comment">// try to fill if no reallocation problem</span>
+00323 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_9">fillVBFar1Only</a>();
+00324 }
+00325 }
+00326
+00327
+00328 <span class="comment">// 3. Append patch to renderList.</span>
+00329 <span class="comment">//=====================</span>
+00330 <span class="comment">// This patch is visible. So if good far, append.</span>
+00331 <span class="keywordflow">if</span>(Far0&gt;0)
+00332 {
+00333 <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>-&gt;appendRdrPatchFar0(<span class="keyword">this</span>);
+00334 }
+00335 <span class="comment">// Same for Far1.</span>
+00336 <span class="keywordflow">if</span>(Far1&gt;0)
+00337 {
+00338 <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>-&gt;appendRdrPatchFar1(<span class="keyword">this</span>);
+00339 }
+00340
+00341
+00342 <span class="comment">// 4. Clip tess blocks.</span>
+00343 <span class="comment">//=====================</span>
+00344 <span class="comment">// If we are in Tile/FarTransition</span>
+00345 <span class="keywordtype">bool</span> doClipFar= Far0==0 &amp;&amp; Far1==1;
+00346 <span class="comment">// Parse all TessBlocks.</span>
+00347 <a class="code" href="a04558.html#a15">uint</a> nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
+00348 CTessBlock *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
+00349 <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
+00350 {
+00351 CTessBlock &amp;tblock= *pTessBlock;
+00352
+00353 <span class="comment">// bkup the old result for clipping</span>
+00354 <span class="keywordtype">bool</span> oldVisibleFar0= tblock.visibleFar0();
+00355 <span class="keywordtype">bool</span> oldVisibleTile= tblock.visibleTile();
+00356 <span class="keywordtype">bool</span> oldVisibleFar1= tblock.visibleFar1();
+00357
+00358 <span class="comment">// If this TessBlock is empty, do not need to clip</span>
+00359 <span class="keywordflow">if</span>(tblock.FaceTileMaterialRefCount==0)
+00360 {
+00361 <span class="comment">// Simply force the clip.</span>
+00362 tblock.forceClip();
+00363 }
+00364 <span class="keywordflow">else</span>
+00365 {
+00366 <span class="comment">// clip the tessBlock.</span>
+00367 tblock.resetClip();
+00368 tblock.clip();
+00369 <span class="comment">// If we are in Tile/FarTransition</span>
+00370 <span class="keywordflow">if</span>(doClipFar)
+00371 tblock.clipFar(CLandscapeGlobals::RefineCenter, CLandscapeGlobals::TileDistNear, CLandscapeGlobals::FarTransition);
+00372
+00373 <span class="comment">// If TileMode, and if tile visible</span>
+00374 <span class="keywordflow">if</span>(Far0==0 &amp;&amp; tblock.visibleTile() )
+00375 {
+00376 <span class="comment">// Append all tiles (if any) to the renderPass list!</span>
+00377 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0;j&lt;<a class="code" href="a05069.html#a1">NL3D_TESSBLOCK_TILESIZE</a>; j++)
+00378 {
+00379 <span class="comment">// If tile exist</span>
+00380 <span class="keywordflow">if</span>(tblock.RdrTileRoot[j])
+00381 <span class="comment">// add it to the renderList</span>
+00382 tblock.RdrTileRoot[j]-&gt;appendTileToEachRenderPass(NumRenderableFaces);
+00383 }
+00384 }
+00385 }
+00386
+00387 <span class="comment">// If change of clip in tessBlock, must update the tessBlock</span>
+00388 <span class="keywordflow">if</span>( Far0&gt; 0 &amp;&amp; oldVisibleFar0 != tblock.visibleFar0() )
+00389 {
+00390 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+00391 {
+00392 <span class="comment">// allocate</span>
+00393 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
+00394 <span class="comment">// fill only if possible.</span>
+00395 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentFar0VBAllocator-&gt;reallocationOccurs())
+00396 <a class="code" href="a03057.html#NL3D_1_1CPatchd20">fillFar0VertexListVB</a>(tblock.FarVertexList);
+00397 <span class="comment">// rebuild triangles index list.</span>
+00398 tblock.refillFaceVectorFar0();
+00399 }
+00400 <span class="keywordflow">else</span>
+00401 {
+00402 <span class="comment">// delete</span>
+00403 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
+00404 }
+00405 }
+00406 <span class="keywordflow">if</span>( Far0==0 &amp;&amp; oldVisibleTile != tblock.visibleTile() )
+00407 {
+00408 <span class="keywordflow">if</span>( tblock.visibleTile() )
+00409 {
+00410 <span class="comment">// allocate</span>
+00411 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, <span class="keyword">true</span>);
+00412 <span class="comment">// fill only if possible.</span>
+00413 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentTileVBAllocator-&gt;reallocationOccurs())
+00414 <a class="code" href="a03057.html#NL3D_1_1CPatchd24">fillTileVertexListVB</a>(tblock.NearVertexList);
+00415 <span class="comment">// rebuild triangles index list.</span>
+00416 tblock.refillFaceVectorTile();
+00417 }
+00418 <span class="keywordflow">else</span>
+00419 {
+00420 <span class="comment">// delete</span>
+00421 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, <span class="keyword">false</span>);
+00422 }
+00423 }
+00424 <span class="keywordflow">if</span>( Far1&gt; 0 &amp;&amp; oldVisibleFar1 != tblock.visibleFar1() )
+00425 {
+00426 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+00427 {
+00428 <span class="comment">// allocate</span>
+00429 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">true</span>);
+00430 <span class="comment">// fill only if possible.</span>
+00431 <span class="keywordflow">if</span>(!CLandscapeGlobals::CurrentFar1VBAllocator-&gt;reallocationOccurs())
+00432 <a class="code" href="a03057.html#NL3D_1_1CPatchd22">fillFar1VertexListVB</a>(tblock.FarVertexList);
+00433 <span class="comment">// rebuild triangles index list.</span>
+00434 tblock.refillFaceVectorFar1();
+00435 }
+00436 <span class="keywordflow">else</span>
+00437 {
+00438 <span class="comment">// delete</span>
+00439 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, <span class="keyword">false</span>);
+00440 }
+00441 }
+00442 }
+00443
+00444 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz657_2" doxytag="NL3D::CPatch::processDLMLight" ></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::CPatch::processDLMLight </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03065.html">CPatchDLMPointLight</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pl</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>
+Process a Dynamic light, creating the DLMContext if necessary. Increment RefCount. Called by <a class="el" href="a02702.html">CLandscape</a>.
+<p>
+Definition at line <a class="el" href="a06157.html#l02021">2021</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06163.html#l00648">NL3D::CPatchDLMContext::addPointLightInfluence()</a>, <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06164.html#l00128">NL3D::CPatchDLMContext::CurPointLightCount</a>, and <a class="el" href="a06155.html#l00594">isRenderClipped()</a>.
+<p>
+<div class="fragment"><pre>02022 {
+02023 <span class="comment">// add reference to currentLight, creating DLMContext if needed</span>
+02024 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_0">addRefDLMContext</a>();
+02025
+02026 <span class="comment">// add curLight counter</span>
+02027 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;CurPointLightCount++;
+02028
+02029 <span class="comment">// compute lighting, only if patch is visible</span>
+02030 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+02031 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>-&gt;addPointLightInfluence(pl);
+02032 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz651_1" doxytag="NL3D::CPatch::recreateAllVegetableIgs" ></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::CPatch::recreateAllVegetableIgs </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>
+Recreate any vegetable block (as possible) in this patch. (usefull for edition).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06162.html#l00260">260</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
+<p>
+References <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05862.html#l03168">NL3D::CLandscape::isVegetableActive()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03120">NL3D::CLandscape::enableVegetable()</a>.
+<p>
+<div class="fragment"><pre>00261 {
+00262 <span class="comment">// For all TessBlocks, try to release their VegetableBlock</span>
+00263 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> numtb=0; numtb&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); numtb++)
+00264 {
+00265 <span class="comment">// if the vegetableBlock is deleted, and if there is at least one Material in the tessBlock, and if possible</span>
+00266 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].VegetableBlock==NULL &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount&gt;0
+00267 &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;isVegetableActive())
+00268 {
+00269 <span class="comment">// compute tessBlock coordinate</span>
+00270 <a class="code" href="a04558.html#a15">uint</a> tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
+00271 <a class="code" href="a04558.html#a15">uint</a> ts= numtb&amp;(tbWidth-1);
+00272 <a class="code" href="a04558.html#a15">uint</a> tt= numtb/tbWidth;
+00273 <span class="comment">// crate the vegetable with tilecooridante (ie tessBlock coord *2);</span>
+00274 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_0">createVegetableBlock</a>(numtb, ts*2, tt*2);
+00275 }
+00276 }
+00277
+00278 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz649_12" doxytag="NL3D::CPatch::recreateTessBlockFaceVector" ></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::CPatch::recreateTessBlockFaceVector </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03475.html">CTessBlock</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>block</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00705">705</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06491.html#l00198">NL3D::CTessBlock::createFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00242">NL3D::CTessBlock::createFaceVectorFar1()</a>, <a class="el" href="a06491.html#l00302">NL3D::CTessBlock::createFaceVectorTile()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, and <a class="el" href="a06156.html#l00884">MasterBlock</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00896">NL3D::CLandscape::updateTessBlocksFaceVector()</a>.
+<p>
+<div class="fragment"><pre>00706 {
+00707 <span class="comment">// Do it Only if patch is visible.</span>
+00708 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+00709 {
+00710 <span class="comment">// Far0.</span>
+00711 <span class="comment">// If Far Mode.</span>
+00712 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
+00713 {
+00714 <span class="comment">// Create the face for this TessBlock only.</span>
+00715 block.createFaceVectorFar0(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00716 }
+00717 <span class="comment">// Or If Tile Mode.</span>
+00718 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
+00719 {
+00720 <span class="comment">// No tiles in MasterBlock! So no need to call createFaceVectorTile(), if this block is the MasterBlock.</span>
+00721 <span class="keywordflow">if</span>(&amp;block != &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>)
+00722 block.createFaceVectorTile(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00723 }
+00724
+00725 <span class="comment">// Far1.</span>
+00726 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00727 {
+00728 <span class="comment">// Create the face for this TessBlock only.</span>
+00729 block.createFaceVectorFar1(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_FaceVectorManager);
+00730 }
+00731 }
+00732
+00733 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha22" doxytag="NL3D::CPatch::recreateTileUvs" ></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::CPatch::recreateTileUvs </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="a06155.html#l02150">2150</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTileFace &gt;::clear()</a>, <a class="el" href="a06116.html#l00124">NLMISC::CObjectVector&lt; CTessBlock &gt;::clear()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>.
+<p>
+<div class="fragment"><pre>02151 {
+02152 <span class="comment">// Reset the Tile rdr list.</span>
+02153 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> tb=0; tb&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();tb++)
+02154 {
+02155 <span class="comment">// Vertices must all be reseted.</span>
+02156 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[tb].NearVertexList.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_0">clear</a>();
+02157 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a05069.html#a1">NL3D_TESSBLOCK_TILESIZE</a>;i++)
+02158 {
+02159 CTileMaterial *tm= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[tb].RdrTileRoot[i];
+02160 <span class="keywordflow">if</span>(tm)
+02161 {
+02162 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> pass=0;pass&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;pass++)
+02163 {
+02164 tm-&gt;TileFaceList[pass].<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_0">clear</a>();
+02165 }
+02166 }
+02167 }
+02168 }
+02169
+02170 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;recreateTileUvs();
+02171 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;recreateTileUvs();
+02172 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha23" doxytag="NL3D::CPatch::refineAll" ></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::CPatch::refineAll </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>
+Refine this patch. Even if clipped. Refine all nodes.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01493">1493</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06497.html#l01783">NL3D::CTessFace::refineAll()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01132">NL3D::CZone::refineAll()</a>.
+<p>
+<div class="fragment"><pre>01494 {
+01495 <span class="comment">// refineAll.</span>
+01496 <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
+01497 <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
+01498 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;refineAll();
+01499 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;refineAll();
+01500 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha24" doxytag="NL3D::CPatch::refreshTesselationGeometry" ></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::CPatch::refreshTesselationGeometry </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="a06155.html#l01531">1531</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00820">BaseVertices</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06497.html#l02519">NL3D::CTessFace::refreshTesselationGeometry()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>.
+<p>
+<div class="fragment"><pre>01532 {
+01533 <a class="code" href="a04199.html#a6">nlassert</a>(Son0);
+01534 <a class="code" href="a04199.html#a6">nlassert</a>(Son1);
+01535
+01536 <span class="comment">// Recompute the BaseVertices.</span>
+01537 CTessVertex *a= <a class="code" href="a03057.html#NL3D_1_1CPatchr5">BaseVertices</a>[0];
+01538 CTessVertex *b= BaseVertices[1];
+01539 CTessVertex *c= BaseVertices[2];
+01540 CTessVertex *d= BaseVertices[3];
+01541 <span class="comment">// Set positions.</span>
+01542 a-&gt;Pos= a-&gt;StartPos= a-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,0);
+01543 b-&gt;Pos= b-&gt;StartPos= b-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(0,1);
+01544 c-&gt;Pos= c-&gt;StartPos= c-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,1);
+01545 d-&gt;Pos= d-&gt;StartPos= d-&gt;EndPos= <a class="code" href="a03057.html#NL3D_1_1CPatcha5">computeVertex</a>(1,0);
+01546
+01547
+01548 <span class="comment">// refresh the tesselation of sons.</span>
+01549 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;refreshTesselationGeometry();
+01550 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;refreshTesselationGeometry();
+01551 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha25" doxytag="NL3D::CPatch::release" ></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::CPatch::release </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>
+Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00115">115</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">_DLMContext</a>, <a class="el" href="a06156.html#l01219">_DLMContextRefCount</a>, <a class="el" href="a06760.html#l00581">NL3D::CZone::_PatchOldRenderClipped</a>, <a class="el" href="a06760.html#l00580">NL3D::CZone::_PatchRenderClipped</a>, <a class="el" href="a06156.html#l01203">_ULNearNext</a>, <a class="el" href="a06156.html#l01202">_ULNearPrec</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a05862.html#l03052">NL3D::CLandscape::deleteTessFace()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, <a class="el" href="a06155.html#l01555">resetRenderFar()</a>, <a class="el" href="a05485.html#l00075">NLMISC::CBitSet::set()</a>, <a class="el" href="a06156.html#l00818">Son0</a>, and <a class="el" href="a06156.html#l00818">Son1</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00603">NL3D::CZone::release()</a>, and <a class="el" href="a06155.html#l00109">~CPatch()</a>.
+<p>
+<div class="fragment"><pre>00116 {
+00117 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
+00118 {
+00119 <span class="comment">// First, delete the VB if the zone was removed while the patch is visible.</span>
+00120 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>())
+00121 {
+00122 <span class="comment">// release VertexBuffer.</span>
+00123 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
+00124 <span class="comment">// Flag RenderClipped in Zone</span>
+00125 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchRenderClipped.set(PatchId, <span class="keyword">true</span>);
+00126 }
+00127
+00128 <span class="comment">// THIS PATCH MSUT BE UNBOUND FIRST!!!!!</span>
+00129 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
+00130 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
+00131 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
+00132 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
+00133 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
+00134 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
+00135
+00136 <span class="comment">// Free renderPass of landscape, and maybe force computation of texture info on next preRender().</span>
+00137 <span class="comment">// Must do it here, before deletion of Zone, OrderS/T etc...</span>
+00138 <a class="code" href="a03057.html#NL3D_1_1CPatcha26">resetRenderFar</a>();
+00139
+00140 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;deleteTessFace(Son0);
+00141 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;deleteTessFace(Son1);
+00142 <span class="comment">// Vertices are smartptr/deleted in zone.</span>
+00143 }
+00144
+00145 <span class="comment">// Flag the fact that this patch can't be rendered.</span>
+00146 <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>=0;
+00147 <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>=0;
+00148 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>=NULL;
+00149 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>=NULL;
+00150 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_7">clearTessBlocks</a>();
+00151 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_18">resetMasterBlock</a>();
+00152 <span class="comment">// Flag RenderClipped in Zone</span>
+00153 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>)
+00154 {
+00155 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchRenderClipped.set( PatchId, <span class="keyword">true</span>);
+00156 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;_PatchOldRenderClipped.set( PatchId, <span class="keyword">true</span>);
+00157 }
+00158
+00159 <span class="comment">// the pathc is uncompiled. must do it after clearTessBlocks(), because may use it </span>
+00160 <span class="comment">// for vegetable manager, and for updateLighting</span>
+00161 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>= NULL;
+00162
+00163 <span class="comment">// uncompile: reset UpdateLighting circular list to NULL.</span>
+00164 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>!= NULL)
+00165 {
+00166 <span class="comment">// verify the patch is correctly unlinked from any ciruclar list.</span>
+00167 <a class="code" href="a04199.html#a6">nlassert</a>(_ULNearPrec==<span class="keyword">this</span> &amp;&amp; _ULNearNext==<span class="keyword">this</span>);
+00168 }
+00169 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= NULL;
+00170 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= NULL;
+00171
+00172 <span class="comment">// DynamciLightMap: release the _DLMContext if still exist.</span>
+00173 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>)
+00174 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>;
+00175 <span class="comment">// reset</span>
+00176 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_2">_DLMContext</a>= NULL;
+00177 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_3">_DLMContextRefCount</a>= 0;
+00178 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz666_22" doxytag="NL3D::CPatch::releaseTileLightMap" ></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::CPatch::releaseTileLightMap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ts</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>tt</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01247">1247</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05862.html#l02026">NL3D::CLandscape::releaseTileLightMap()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>01248 {
+01249 <span class="comment">// TessBlocks must have been allocated.</span>
+01250 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()!=0);
+01251
+01252 <span class="comment">// get what tessBlock to use.</span>
+01253 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01254 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, ts, tt);
+01255 CTessBlock &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb];
+01256
+01257 <span class="comment">// If no more tileMaterial use this lightmap, release it.</span>
+01258 <a class="code" href="a04199.html#a6">nlassert</a>(tessBlock.LightMapRefCount&gt;0);
+01259 tessBlock.LightMapRefCount--;
+01260 <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
+01261 {
+01262 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;releaseTileLightMap(tessBlock.LightMapId);
+01263 }
+01264 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz671_4" doxytag="NL3D::CPatch::releaseVegetableBlock" ></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::CPatch::releaseVegetableBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>numTb</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>
+release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist
+<p>
+
+<p>
+Definition at line <a class="el" href="a06162.html#l00326">326</a> of file <a class="el" href="a06162.html">patch_vegetable.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, and <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00327 {
+00328 <span class="comment">// if exist, must delete the VegetableBlock.</span>
+00329 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock)
+00330 {
+00331 <span class="comment">// delete Igs, and remove from list.</span>
+00332 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock-&gt;release(<a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableManager, <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;_VegetableBlockList);
+00333 <span class="comment">// delete.</span>
+00334 <span class="keyword">delete</span> <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock;
+00335 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb].VegetableBlock= NULL;
+00336 }
+00337 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_13" doxytag="NL3D::CPatch::removeFaceFromRenderList" ></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::CPatch::removeFaceFromRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00848">848</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06492.html#l00092">NL3D::CTessBlock::FaceTileMaterialRefCount</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06498.html#l00247">NL3D::CTessFace::Level</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTessFace &gt;::remove()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06156.html#l00810">TessBlockLimitLevel</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, and <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>00849 {
+00850 <span class="comment">// Update the number of renderable Faces</span>
+00851 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>--;
+00852 <a class="code" href="a04199.html#a6">nlassert</a>(NumRenderableFaces&gt;=0);
+00853
+00854 <span class="comment">// Update Gnal render.</span>
+00855 <span class="comment">//====================</span>
+00856 <span class="keywordflow">if</span>(face-&gt;Level&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchr26">TessBlockLimitLevel</a>)
+00857 {
+00858 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.remove(face);
+00859 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FaceTileMaterialRefCount--;
+00860
+00861 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00862 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(MasterBlock);
+00863 }
+00864 <span class="keywordflow">else</span>
+00865 {
+00866 <span class="comment">// link the face to the good tessblock.</span>
+00867 <a class="code" href="a04558.html#a15">uint</a> numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
+00868 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarFaceList.remove(face);
+00869 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount--;
+00870
+00871 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00872 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
+00873
+00874 <span class="comment">// Update Tile render (no need to do it if face not at least at tessblock level).</span>
+00875 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_14">removeFaceFromTileRenderList</a>(face);
+00876
+00877 <span class="comment">// Destroy if necessary the TessBlocks.</span>
+00878 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
+00879 }
+00880 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_14" doxytag="NL3D::CPatch::removeFaceFromTileRenderList" ></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::CPatch::removeFaceFromTileRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>face</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00913">913</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00783">dirtTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTileFace &gt;::remove()</a>, <a class="el" href="a05862.html#l03669">NL3D::CLandscape::removeFromShadowPolyReceiver()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00200">NL3D::CTileMaterial::TileFaceList</a>, <a class="el" href="a06498.html#l00261">NL3D::CTessFace::TileFaces</a>, <a class="el" href="a06498.html#l00259">NL3D::CTessFace::TileMaterial</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, and <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>.
+<p>
+<div class="fragment"><pre>00914 {
+00915 <span class="keywordflow">if</span>(face-&gt;TileMaterial)
+00916 {
+00917 <span class="comment">// For all valid faces, update their links.</span>
+00918 <span class="comment">// Do not do this for lightmap, since it use same face from RGB0 pass.</span>
+00919 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00920 {
+00921 <a class="code" href="a03057.html#NL3D_1_1CPatchn1">CPatchRdrPass</a> *tilePass= face-&gt;TileMaterial-&gt;Pass[i].PatchRdrPass;
+00922 <span class="comment">// If tile i enabled.</span>
+00923 <span class="keywordflow">if</span>(tilePass)
+00924 {
+00925 <span class="comment">// a face should have created for this pass.</span>
+00926 <a class="code" href="a04199.html#a6">nlassert</a>(face-&gt;TileFaces[i]);
+00927 face-&gt;TileMaterial-&gt;TileFaceList[i].remove(face-&gt;TileFaces[i]);
+00928 }
+00929 }
+00930
+00931 <span class="comment">// The facelist is modified, so we must update the faceVector, if visible.</span>
+00932 <a class="code" href="a04558.html#a15">uint</a> numtb= <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(face);
+00933 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_9">dirtTessBlockFaceVector</a>(TessBlocks[numtb]);
+00934
+00935 <span class="comment">// Shadow: remove it from the Shadow Triangles.</span>
+00936 <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;removeFromShadowPolyReceiver(face);
+00937 }
+00938 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_15" doxytag="NL3D::CPatch::removeFarVertexFromRenderList" ></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::CPatch::removeFarVertexFromRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>fv</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01062">1062</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>, <a class="el" href="a06155.html#l00722">getNumTessBlock()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06498.html#l00123">NL3D::CTessFarVertex::OwnerBlock</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CTessFarVertex &gt;::remove()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06156.html#l00931">TFarVertType</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>.
+<p>
+<div class="fragment"><pre>01063 {
+01064 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_0">TFarVertType</a> <a class="code" href="a04223.html#a581">type</a>;
+01065 <a class="code" href="a04558.html#a15">uint</a> numtb;
+01066 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_12">getNumTessBlock</a>(fv-&gt;PCoord, type, numtb);
+01067
+01068
+01069 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy0">FVMasterBlock</a> || <a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03057.html#NL3D_1_1CPatchz663_0NL3D_1_1CPatchy2">FVTessBlockEdge</a>)
+01070 {
+01071 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.remove(fv);
+01072 fv-&gt;OwnerBlock= NULL;
+01073 }
+01074 <span class="keywordflow">else</span>
+01075 {
+01076 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FarVertexList.remove(fv);
+01077 fv-&gt;OwnerBlock= NULL;
+01078
+01079 <span class="comment">// Destroy if necessary the TessBlocks.</span>
+01080 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
+01081 }
+01082 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_16" doxytag="NL3D::CPatch::removeNearVertexFromRenderList" ></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::CPatch::removeNearVertexFromRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>tileMat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03481.html">CTessNearVertex</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>nv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01099">1099</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00134">NL3D::CTessNearVertex::OwnerBlock</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00444">NL3D::CTessFace::deleteTileUv()</a>.
+<p>
+<div class="fragment"><pre>01100 {
+01101 <a class="code" href="a04199.html#a6">nlassert</a>(tileMat);
+01102
+01103 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01104 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tileMat-&gt;TileS, tileMat-&gt;TileT);
+01105 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].NearVertexList.remove(nv);
+01106 nv-&gt;OwnerBlock= NULL;
+01107
+01108 <span class="comment">// Destroy if necessary the TessBlocks.</span>
+01109 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
+01110 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_17" doxytag="NL3D::CPatch::removeTileMaterialFromRenderList" ></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::CPatch::removeTileMaterialFromRenderList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>tm</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01002">1002</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00942">computeTbTm()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>, <a class="el" href="a06155.html#l02186">getLandscape()</a>, <a class="el" href="a05863.html#l00622">NL3D::CLandscape::getTileCallback()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06492.html#l00094">NL3D::CTessBlock::TileMaterialRefCount</a>, <a class="el" href="a03932.html#NL3D_1_1ULandscapeTileCallbacka1">NL3D::ULandscapeTileCallback::tileRemoved()</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>01003 {
+01004 <a class="code" href="a04199.html#a6">nlassert</a>(tm);
+01005
+01006 <a class="code" href="a04558.html#a15">uint</a> numtb, numtm;
+01007 <a class="code" href="a03057.html#NL3D_1_1CPatchd13">computeTbTm</a>(numtb, numtm, tm-&gt;TileS, tm-&gt;TileT);
+01008 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].RdrTileRoot[numtm]= NULL;
+01009 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].FaceTileMaterialRefCount--;
+01010 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount--;
+01011 <span class="comment">// The master block contains the whole patch TileMaterialRefCount</span>
+01012 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.TileMaterialRefCount--;
+01013
+01014 <span class="comment">// if no more tiles in this tessBlock, delete the vegetable Block.</span>
+01015 <span class="comment">//==========</span>
+01016 <span class="comment">// if no more tiles in this tessBlock</span>
+01017 <span class="keywordflow">if</span>( <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numtb].TileMaterialRefCount==0 )
+01018 {
+01019 <span class="comment">// release the vegetableBlock (if any)</span>
+01020 <a class="code" href="a03057.html#NL3D_1_1CPatchz671_4">releaseVegetableBlock</a>(numtb);
+01021 }
+01022
+01023 <span class="comment">// Destroy if necessary the TessBlocks.</span>
+01024 <a class="code" href="a03057.html#NL3D_1_1CPatchz663_8">decRefTessBlocks</a>();
+01025
+01026 <span class="comment">// DynamicLighting. When in near, must compute the context, to have good UVs.</span>
+01027 <span class="comment">//==========</span>
+01028 <span class="comment">// dec ref the context, deleting it if needed.</span>
+01029 <a class="code" href="a03057.html#NL3D_1_1CPatchz675_1">decRefDLMContext</a>();
+01030
+01031 ULandscapeTileCallback *tileCallback = <a class="code" href="a03057.html#NL3D_1_1CPatcha14">getLandscape</a>()-&gt;getTileCallback();
+01032 <span class="keywordflow">if</span> (tileCallback)
+01033 {
+01034 tileCallback-&gt;tileRemoved((<a class="code" href="a04558.html#a13">uint64</a>) tm); <span class="comment">// pointer to tile material serves as a unique identifier</span>
+01035 }
+01036 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_4" doxytag="NL3D::CPatch::renderFar0" ></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::CPatch::renderFar0 </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>
+Render this patch, if not clipped. Call PatchCurrentDriver-&gt;renderSimpleTriangles().
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00528">528</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06492.html#l00067">NL3D::CTessBlock::Far0FaceVector</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a06161.html#l00455">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00054">NL3D::ProfNPatchRdrFar0</a>, <a class="el" href="a05872.html#l00037">NL3D::ProfNRdrFar0</a>, <a class="el" href="a06161.html#l00460">NL3D::renderFaceVector()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00529 {
+00530 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNPatchRdrFar0, 1);
+00531
+00532 <span class="preprocessor">#ifdef NL_DEBUG</span>
+00533 <span class="preprocessor"></span> <span class="comment">// Must be visible, and must be called only if the RdrPass is enabled.</span>
+00534 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; _PatchRdrPassFar0);
+00535 <span class="preprocessor">#endif</span>
+00536 <span class="preprocessor"></span>
+00537 <span class="comment">// Render tris of MasterBlock.</span>
+00538 <a class="code" href="a05363.html#a453">renderFaceVector</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far0FaceVector);
+00539 <span class="comment">// profile</span>
+00540 <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar0, <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far0FaceVector);
+00541
+00542 <span class="comment">// Render tris of TessBlocks.</span>
+00543 <a class="code" href="a04558.html#a15">uint</a> nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
+00544 CTessBlock *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
+00545 <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
+00546 {
+00547 CTessBlock &amp;tblock= *pTessBlock;
+00548 <span class="comment">// if block visible, render</span>
+00549 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+00550 {
+00551 <a class="code" href="a05363.html#a453">renderFaceVector</a>(tblock.Far0FaceVector);
+00552 <span class="comment">// profile</span>
+00553 <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar0, tblock.Far0FaceVector);
+00554 }
+00555 }
+00556 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_5" doxytag="NL3D::CPatch::renderFar1" ></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::CPatch::renderFar1 </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="a06161.html#l00560">560</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a06492.html#l00068">NL3D::CTessBlock::Far1FaceVector</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a06161.html#l00455">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00055">NL3D::ProfNPatchRdrFar1</a>, <a class="el" href="a05872.html#l00038">NL3D::ProfNRdrFar1</a>, <a class="el" href="a06161.html#l00460">NL3D::renderFaceVector()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00561 {
+00562 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNPatchRdrFar1, 1);
+00563
+00564 <span class="preprocessor">#ifdef NL_DEBUG</span>
+00565 <span class="preprocessor"></span> <span class="comment">// Must be visible, and must be called only if the RdrPass is enabled.</span>
+00566 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>() &amp;&amp; _PatchRdrPassFar1);
+00567 <span class="preprocessor">#endif</span>
+00568 <span class="preprocessor"></span>
+00569 <span class="comment">// Render tris of MasterBlock.</span>
+00570 <a class="code" href="a05363.html#a453">renderFaceVector</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far1FaceVector);
+00571 <span class="comment">// profile.</span>
+00572 <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar1, <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.Far1FaceVector);
+00573
+00574 <span class="comment">// Render tris of TessBlocks.</span>
+00575 <a class="code" href="a04558.html#a15">uint</a> nTessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
+00576 CTessBlock *pTessBlock= nTessBlock&gt;0? &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[0]: NULL ;
+00577 <span class="keywordflow">for</span>(; nTessBlock&gt;0; pTessBlock++, nTessBlock--)
+00578 {
+00579 CTessBlock &amp;tblock= *pTessBlock;
+00580 <span class="comment">// if block visible, render</span>
+00581 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+00582 {
+00583 <a class="code" href="a05363.html#a453">renderFaceVector</a>(tblock.Far1FaceVector);
+00584 <span class="comment">// profile.</span>
+00585 <a class="code" href="a04738.html#a0">NL3D_PROFILE_LAND_ADD_FACE_VECTOR</a>(ProfNRdrFar1, tblock.Far1FaceVector);
+00586 }
+00587 }
+00588 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_2" doxytag="NL3D::CPatch::resetCompressedLumels" ></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::CPatch::resetCompressedLumels </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>
+Rebuild the packed lumels without shadow. Only the interpolated color will be used.<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01384">1384</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>.
+<p>
+<div class="fragment"><pre>01385 {
+01386 <span class="comment">// Number of lumel by lines</span>
+01387 <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+01388
+01389 <span class="comment">// Number of block in a line</span>
+01390 <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
+01391 <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
+01392
+01393 <span class="comment">// Number of line</span>
+01394 <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+01395
+01396 <span class="comment">// Number of block line</span>
+01397 <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
+01398 <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
+01399
+01400 <span class="comment">// Size of the lumel array</span>
+01401 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a>=numLineBlock*numLumelBlock*8;
+01402
+01403 <span class="comment">// 4 bits per lumel</span>
+01404 <a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>.resize (size);
+01405
+01406 <span class="comment">// No line have shadows.</span>
+01407 memset (&amp;CompressedLumels[0], 0, size);
+01408 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz663_18" doxytag="NL3D::CPatch::resetMasterBlock" ></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::CPatch::resetMasterBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00709">709</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTessFace &gt;::clear()</a>, <a class="el" href="a06496.html#l00112">NL3D::CTessList&lt; CTessFarVertex &gt;::clear()</a>, <a class="el" href="a06492.html#l00089">NL3D::CTessBlock::FarFaceList</a>, <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06155.html#l00594">isRenderClipped()</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00879">NumRenderableFaces</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CTessNearVertex &gt;::size()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l00115">release()</a>.
+<p>
+<div class="fragment"><pre>00710 {
+00711 <span class="comment">// We should be not visible so FaceVector no more exist.</span>
+00712 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatcha21">isRenderClipped</a>());
+00713
+00714 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList.clear();
+00715 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarFaceList.clear();
+00716 <a class="code" href="a03057.html#NL3D_1_1CPatchz659_1">NumRenderableFaces</a>= 0;
+00717 <span class="comment">// no tiles should be here!!</span>
+00718 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.NearVertexList.size()==0);
+00719 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha26" doxytag="NL3D::CPatch::resetRenderFar" ></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::CPatch::resetRenderFar </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="a06155.html#l01555">1555</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00871">_PatchRdrPassFar0</a>, <a class="el" href="a06156.html#l00873">_PatchRdrPassFar1</a>, <a class="el" href="a05862.html#l02157">NL3D::CLandscape::freeFarRenderPass()</a>, and <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00115">release()</a>.
+<p>
+<div class="fragment"><pre>01556 {
+01557 <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>)
+01558 {
+01559 <span class="comment">// free the render pass.</span>
+01560 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar0, Far0);
+01561 <a class="code" href="a03057.html#NL3D_1_1CPatchr2">_PatchRdrPassFar0</a>= NULL;
+01562 }
+01563 <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>)
+01564 {
+01565 <span class="comment">// free the render pass.</span>
+01566 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;freeFarRenderPass (<span class="keyword">this</span>, _PatchRdrPassFar1, Far1);
+01567 <a class="code" href="a03057.html#NL3D_1_1CPatchr3">_PatchRdrPassFar1</a>= NULL;
+01568 }
+01569
+01570 <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= -1;
+01571 <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= -1;
+01572 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz653_0" doxytag="NL3D::CPatch::resetTileLightInfluences" ></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::CPatch::resetTileLightInfluences </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>
+make a valid empty array of TileLightInfluences (ie resized to good size, but with empty light influences
+<p>
+Definition at line <a class="el" href="a06157.html#l01529">1529</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a05862.html#l03298">NL3D::CLandscape::removeAllPointLights()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>.
+<p>
+<div class="fragment"><pre>01530 {
+01531 <span class="comment">// Fill default.</span>
+01532 <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>.resize((OrderS/2 +1) * (OrderT/2 +1));
+01533 <span class="comment">// Disable All light influence on all points</span>
+01534 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i &lt;<a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>.size(); i++)
+01535 {
+01536 <span class="comment">// Disable all light influence on this point.</span>
+01537 <a class="code" href="a03057.html#NL3D_1_1CPatcho4">TileLightInfluences</a>[i].Light[0]= 0xFF;
+01538 }
+01539 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha27" doxytag="NL3D::CPatch::serial" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CPatch::serial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>f</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l01576">1576</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a06155.html#l00057">_Version</a>, <a class="el" href="a06539.html#l00048">NL3D::CTileColor::Color565</a>, <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a06156.html#l00057">NL_PATCH_SMOOTH_FLAG_MASK</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00352">NoiseRotation</a>, <a class="el" href="a06157.html#l01529">resetTileLightInfluences()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, <a class="el" href="a06461.html#l00266">NLMISC::IStream::serialVersion()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, <a class="el" href="a06156.html#l00346">TileLightInfluences</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06462.html#l00759">NLMISC::IStream::xmlPop()</a>, <a class="el" href="a06462.html#l00701">NLMISC::IStream::xmlPush()</a>, and <a class="el" href="a06462.html#l00647">NLMISC::IStream::xmlSerial()</a>.
+<p>
+<div class="fragment"><pre>01577 {
+01578 <span class="comment">/*</span>
+01579 <span class="comment"> Version 7:</span>
+01580 <span class="comment"> - remove unused information from CTileColor. just keep 565 color</span>
+01581 <span class="comment"> Version 6:</span>
+01582 <span class="comment"> - default UnderWater flags for tileElements before version 6.</span>
+01583 <span class="comment"> Version 5:</span>
+01584 <span class="comment"> - TileLightInfluences serialized.</span>
+01585 <span class="comment"> Version 4:</span>
+01586 <span class="comment"> - Smooth flag serialized</span>
+01587 <span class="comment"> Version 3:</span>
+01588 <span class="comment"> - NoiseRotation.</span>
+01589 <span class="comment"> - NoiseSmooth.</span>
+01590 <span class="comment"> Version 2:</span>
+01591 <span class="comment"> - Lumels.</span>
+01592 <span class="comment"> Version 1:</span>
+01593 <span class="comment"> - Tile color.</span>
+01594 <span class="comment"> Version 0:</span>
+01595 <span class="comment"> - base version.</span>
+01596 <span class="comment"> */</span>
+01597 <a class="code" href="a04558.html#a15">uint</a> ver= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(_Version);
+01598
+01599 <span class="comment">// No more compatibility before version 2, because OrderS / OrderT not serialized in preceding version</span>
+01600 <span class="comment">// Doens't matter since CZone::serial() do not support it too.</span>
+01601 <span class="keywordflow">if</span> (ver&lt;2)
+01602 {
+01603 <span class="keywordflow">throw</span> <a class="code" href="a03798.html">EOlderStream</a>(f);
+01604 }
+01605
+01606 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (Vertices[0], Vertices[1], Vertices[2], Vertices[3], <span class="stringliteral">"VERTICIES"</span>);
+01607
+01608 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TANGENTS"</span>);
+01609 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a> (Tangents[0], Tangents[1], Tangents[2], Tangents[3]);
+01610 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a> (Tangents[4], Tangents[5], Tangents[6], Tangents[7]);
+01611 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01612
+01613 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (Interiors[0], Interiors[1], Interiors[2], Interiors[3], <span class="stringliteral">"INTERIORS"</span>);
+01614
+01615 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILES"</span>);
+01616 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(Tiles);
+01617 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01618
+01619 <span class="keywordflow">if</span>(ver&gt;=1)
+01620 {
+01621 <span class="comment">// Read/Write TileColors.</span>
+01622 <span class="keywordflow">if</span>(ver&lt;=6)
+01623 {
+01624 <a class="code" href="a04199.html#a6">nlassert</a>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>());
+01625
+01626 <span class="comment">// read old version of tilesColors (ie with LightX/LightY/LightZ, which are deprecated now)</span>
+01627 vector&lt;CTileColorOldPatchVersion6&gt; tmpArray;
+01628 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_COLORS"</span>);
+01629 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(tmpArray);
+01630 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01631
+01632 <span class="comment">// then just copy to TileColors.</span>
+01633 <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize(tmpArray.size());
+01634 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size()&gt;0)
+01635 {
+01636 memcpy(&amp;TileColors[0], &amp;tmpArray[0], <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size()*<span class="keyword">sizeof</span>(CTileColor));
+01637 }
+01638 }
+01639 <span class="keywordflow">else</span>
+01640 {
+01641 <span class="comment">// version &gt;=7, just serial array of TileColors (16 bits TileColor only)</span>
+01642 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_COLORS"</span>);
+01643 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(TileColors);
+01644 <span class="preprocessor">#ifdef NEL_FORCE_NO_USER_COLOR</span>
+01645 <span class="preprocessor"></span> CTileColor color;
+01646 color.Color565 = 0xffff;
+01647 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.size ();
+01648 <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize (0);
+01649 <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>.resize (size, color);
+01650 <span class="preprocessor">#endif // NEL_FORCE_NO_USER_COLOR</span>
+01651 <span class="preprocessor"></span> f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01652 }
+01653 }
+01654 <span class="keywordflow">if</span>(ver&gt;=2)
+01655 {
+01656 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (OrderS, <span class="stringliteral">"ORDER_S"</span>);
+01657 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (OrderT, <span class="stringliteral">"ORDER_T"</span>);
+01658
+01659 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"COMPRESSED_LUMELS"</span>);
+01660 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(CompressedLumels);
+01661 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01662 }
+01663 <span class="comment">// Else cannot create here the TileColors, because we need the OrderS/OrderT information... Done into CZone serial.</span>
+01664 <span class="keywordflow">if</span>(ver&gt;=3)
+01665 {
+01666 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (NoiseRotation, <span class="stringliteral">"NOISE_ROTATION"</span>);
+01667 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a> (_CornerSmoothFlag, <span class="stringliteral">"CORNER_SMOOTH_FLAG"</span>);
+01668 }
+01669 <span class="keywordflow">else</span>
+01670 {
+01671 <span class="comment">// No Rotation / not smooth by default.</span>
+01672 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_2">NoiseRotation</a>= 0;
+01673 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>= 0;
+01674 }
+01675 <span class="keywordflow">if</span>(ver&gt;=4)
+01676 {
+01677 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2037_3">xmlSerial</a>(Flags, <span class="stringliteral">"FLAGS"</span>);
+01678 }
+01679 <span class="keywordflow">else</span>
+01680 {
+01681 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>=<a class="code" href="a04733.html#a5">NL_PATCH_SMOOTH_FLAG_MASK</a>;
+01682 }
+01683
+01684 <span class="comment">// Serialize TileLightInfluences</span>
+01685 <span class="keywordflow">if</span>(ver&gt;=5)
+01686 {
+01687 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2038_0">xmlPush</a> (<span class="stringliteral">"TILE_LIGHT_INFLUENCES"</span>);
+01688 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(TileLightInfluences);
+01689 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2039_2">xmlPop</a> ();
+01690 }
+01691 <span class="keywordflow">else</span>
+01692 {
+01693 <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
+01694 {
+01695 <span class="comment">// Fill default.</span>
+01696 <a class="code" href="a03057.html#NL3D_1_1CPatchz653_0">resetTileLightInfluences</a>();
+01697 }
+01698 }
+01699
+01700 <span class="comment">// if read a too old version, </span>
+01701 <span class="keywordflow">if</span>(ver&lt;6 &amp;&amp; f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
+01702 {
+01703 <span class="comment">// reset tileElements vegetableState to AboveWater.</span>
+01704 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>.size(); i++)
+01705 {
+01706 <a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[i].setVegetableState(CTileElement::AboveWater);
+01707 }
+01708 }
+01709
+01710
+01711 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz637_1" doxytag="NL3D::CPatch::setCornerSmoothFlag" ></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::CPatch::setCornerSmoothFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>corner</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>smooth</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>
+setup Smooth flags for Noise on corner: used for Noise geometry and for lighting. NB: convention: corner0==A, corner1==B ...
+<p>
+Definition at line <a class="el" href="a06158.html#l00951">951</a> of file <a class="el" href="a06158.html">patch_noise.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00362">_CornerSmoothFlag</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06764.html#l00134">NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags()</a>.
+<p>
+<div class="fragment"><pre>00952 {
+00953 <a class="code" href="a04199.html#a6">nlassert</a>(corner&lt;=3);
+00954 <a class="code" href="a04558.html#a15">uint</a> mask= 1&lt;&lt;corner;
+00955 <span class="keywordflow">if</span>(smooth)
+00956 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>|= mask;
+00957 <span class="keywordflow">else</span>
+00958 <a class="code" href="a03057.html#NL3D_1_1CPatchz637_3">_CornerSmoothFlag</a>&amp;= ~mask;
+00959 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz641_1" doxytag="NL3D::CPatch::setSmoothFlag" ></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::CPatch::setSmoothFlag </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edge</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>flag</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Set the smooth flag for the n-th edge. flag is false if this edge must by smoothed, true else.
+<p>
+Definition at line <a class="el" href="a06156.html#l00567">567</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+References <a class="el" href="a06156.html#l00056">NL_PATCH_SMOOTH_FLAG_SHIFT</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00568 {
+00569 <span class="comment">// Erase it</span>
+00570 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>&amp;=~(1&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
+00571
+00572 <span class="comment">// Set it</span>
+00573 <a class="code" href="a03057.html#NL3D_1_1CPatchr18">Flags</a>|=(((<a class="code" href="a04558.html#a15">uint</a>)flag)&lt;&lt;(edge+<a class="code" href="a04733.html#a4">NL_PATCH_SMOOTH_FLAG_SHIFT</a>));
+00574 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_3" doxytag="NL3D::CPatch::setupColorsFromTileFlags" ></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::CPatch::setupColorsFromTileFlags </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>colors</em>[4] </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>
+debug coloring
+<p>
+Debug purpose only : setup the colors of this patch so that it shows which tiles have vegetable disabled, or are above, below water. User provides a table with 4 colors for each state : color 0 = above water color 1 = underwater color 2 = intersect water color 3 = vegetable disabled
+<p>
+Definition at line <a class="el" href="a06155.html#l02231">2231</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06340.html#l00154">NLMISC::CRGBA::get565()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a06156.html#l00343">TileColors</a>, <a class="el" href="a06156.html#l00340">Tiles</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>02232 {
+02233 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a626">s</a> = 0; <a class="code" href="a04223.html#a626">s</a> &lt;= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>; ++<a class="code" href="a04223.html#a626">s</a>)
+02234 {
+02235 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a627">t</a> = 0; <a class="code" href="a04223.html#a627">t</a> &lt;= <a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>; ++<a class="code" href="a04223.html#a627">t</a>)
+02236 {
+02237 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = <a class="code" href="a04061.html#a0">std::min</a>(t, (<a class="code" href="a04558.html#a15">uint</a>) (OrderT - 1)) * OrderS
+02238 + <a class="code" href="a04061.html#a0">std::min</a>(s, (<a class="code" href="a04558.html#a15">uint</a>) (OrderS - 1));
+02239 <a class="code" href="a03057.html#NL3D_1_1CPatcho3">TileColors</a>[<a class="code" href="a04223.html#a626">s</a> + <a class="code" href="a04223.html#a627">t</a> * (OrderS + 1)].Color565 = colors[(<a class="code" href="a04558.html#a15">uint</a>) (<a class="code" href="a03057.html#NL3D_1_1CPatcho5">Tiles</a>[<a class="code" href="a04223.html#a566">index</a>].getVegetableState())].<a class="code" href="a03337.html#NLMISC_1_1CRGBAa6">get565</a>();
+02240 }
+02241 }
+02242 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha28" doxytag="NL3D::CPatch::unbind" ></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::CPatch::unbind </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>
+unbind the patch from All neighbors. neighbors patchs links are modified too. The tesselation is forcemerged.
+<p>
+Definition at line <a class="el" href="a06155.html#l01724">1724</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01110">_BindZoneNeighbor</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FLeft</a>, <a class="el" href="a06497.html#l02412">NL3D::CTessFace::forceMerge()</a>, <a class="el" href="a06498.html#l00242">NL3D::CTessFace::FRight</a>, <a class="el" href="a06498.html#l00294">NL3D::CTessFace::isLeaf()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00818">Son0</a>, <a class="el" href="a06156.html#l00818">Son1</a>, and <a class="el" href="a06497.html#l02274">NL3D::CTessFace::unbind()</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00776">NL3D::CZone::bindPatch()</a>, and <a class="el" href="a06758.html#l00868">NL3D::CZone::unbindPatch()</a>.
+<p>
+<div class="fragment"><pre>01725 {
+01726 <a class="code" href="a04199.html#a6">nlassert</a>(Son0 &amp;&amp; Son1);
+01727
+01728 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;unbind();
+01729 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;unbind();
+01730 <a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;forceMerge();
+01731 <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;forceMerge();
+01732 <span class="comment">// forcemerge should have be completed.</span>
+01733 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;isLeaf());
+01734 <span class="comment">// unbind should have be completed.</span>
+01735 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FLeft == NULL);
+01736 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr23">Son0</a>-&gt;FRight == NULL);
+01737 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FLeft == NULL);
+01738 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchr24">Son1</a>-&gt;FRight == NULL);
+01739
+01740
+01741 <span class="comment">// unbind Noise.</span>
+01742 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[0]= NULL;
+01743 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[1]= NULL;
+01744 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[2]= NULL;
+01745 <a class="code" href="a03057.html#NL3D_1_1CPatchz669_1">_BindZoneNeighbor</a>[3]= NULL;
+01746
+01747 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz655_3" doxytag="NL3D::CPatch::unlinkNearUL" ></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::CPatch::unlinkNearUL </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>
+For lighting update, unlink (CiruclarList).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l01897">1897</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01203">_ULNearNext</a>, and <a class="el" href="a06156.html#l01202">_ULNearPrec</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03404">NL3D::CLandscape::unlinkPatchFromNearUL()</a>.
+<p>
+<div class="fragment"><pre>01898 {
+01899 <span class="comment">// first, unlink others from me. NB: works even if _ULNearPrec==_ULNearNext==this.</span>
+01900 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>-&gt;_ULNearPrec= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>;
+01901 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>-&gt;_ULNearNext= <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>;
+01902 <span class="comment">// reset</span>
+01903 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_1">_ULNearPrec</a>= <span class="keyword">this</span>;
+01904 <a class="code" href="a03057.html#NL3D_1_1CPatchz673_0">_ULNearNext</a>= <span class="keyword">this</span>;
+01905 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha29" doxytag="NL3D::CPatch::unpack" ></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::CPatch::unpack </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>p</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>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00192">192</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06760.html#l00485">NL3D::CZone::getPatchBias()</a>, <a class="el" href="a06760.html#l00486">NL3D::CZone::getPatchScale()</a>, <a class="el" href="a05479.html#l00081">NL3D::CBezierPatch::Interiors</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">NL3D::CBezierPatch::Tangents</a>, <a class="el" href="a06156.html#l00121">NL3D::CVector3s::unpack()</a>, and <a class="el" href="a05479.html#l00077">NL3D::CBezierPatch::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>.
+<p>
+<div class="fragment"><pre>00193 {
+00194 <a class="code" href="a04558.html#a14">sint</a> i;
+00195 <span class="keyword">const</span> CVector &amp;bias= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getPatchBias();
+00196 <span class="keywordtype">float</span> scale= <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;getPatchScale();
+00197
+00198 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00199 <a class="code" href="a03057.html#NL3D_1_1CPatcho6">Vertices</a>[i].unpack(p.Vertices[i], bias, scale);
+00200 <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
+00201 <a class="code" href="a03057.html#NL3D_1_1CPatcho2">Tangents</a>[i].unpack(p.Tangents[i], bias, scale);
+00202 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00203 <a class="code" href="a03057.html#NL3D_1_1CPatcho1">Interiors</a>[i].unpack(p.Interiors[i], bias, scale);
+00204 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcha30" doxytag="NL3D::CPatch::unpackIntoCache" ></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="a02258.html">CBezierPatch</a> * NL3D::CPatch::unpackIntoCache </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06155.html#l00182">182</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00055">CachePatch</a>, <a class="el" href="a06155.html#l00056">LastPatch</a>, and <a class="el" href="a06155.html#l00192">unpack()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00504">addPatchBlocksInBBox()</a>, <a class="el" href="a06155.html#l00270">addTrianglesInBBox()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l00257">buildBBox()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06158.html#l00874">computeNoise()</a>, <a class="el" href="a06158.html#l00728">computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">computeNormalOnNeighbor()</a>, <a class="el" href="a06155.html#l01338">computeVertex()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>, and <a class="el" href="a06768.html#l03346">NL3D::CZoneLighter::processZonePointLightRT()</a>.
+<p>
+<div class="fragment"><pre>00183 {
+00184 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a>!=<span class="keyword">this</span>)
+00185 {
+00186 <a class="code" href="a03057.html#NL3D_1_1CPatcha29">unpack</a>(CachePatch);
+00187 <a class="code" href="a03057.html#NL3D_1_1CPatchv2">LastPatch</a>=<span class="keyword">this</span>;
+00188 }
+00189 <span class="keywordflow">return</span> &amp;<a class="code" href="a03057.html#NL3D_1_1CPatchv1">CachePatch</a>;
+00190 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_7" doxytag="NL3D::CPatch::unpackLumelBlock" ></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::CPatch::unpackLumelBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>src</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>
+Unpack a 4x4 lumel block<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_4">unpackShadowMap()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00070">70</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a06157.html#l01267">packShadowMap()</a>, and <a class="el" href="a06157.html#l00170">unpackShadowMap()</a>.
+<p>
+<div class="fragment"><pre>00071 {
+00072 <span class="comment">// Take the two alpha values</span>
+00073 <a class="code" href="a04558.html#a15">uint</a> alpha0=<a class="code" href="a04223.html#a652">src</a>[0];
+00074 <a class="code" href="a04558.html#a15">uint</a> alpha1=<a class="code" href="a04223.html#a652">src</a>[1];
+00075
+00076 <span class="comment">// precompute the 8 possible values, for each possible code.</span>
+00077 <span class="comment">// ------------------</span>
+00078 <a class="code" href="a04558.html#a7">uint8</a> values[8];
+00079 <span class="comment">// Case 0</span>
+00080 <span class="keywordflow">if</span> (alpha0&gt;alpha1)
+00081 {
+00082 <span class="comment">// unrolled, and hardcoded for faster compute</span>
+00083 values[0]= alpha0;
+00084 values[1]= alpha1;
+00085 values[2]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*219 + alpha1*37 ) &gt;&gt;8 ) ; <span class="comment">// 6*256/7</span>
+00086 values[3]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*183 + alpha1*73 ) &gt;&gt;8 ) ; <span class="comment">// 5*256/7</span>
+00087 values[4]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*146 + alpha1*110) &gt;&gt;8 ) ; <span class="comment">// 4*256/7</span>
+00088 values[5]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*110 + alpha1*146) &gt;&gt;8 ) ; <span class="comment">// 3*256/7</span>
+00089 values[6]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*73 + alpha1*183) &gt;&gt;8 ) ; <span class="comment">// 2*256/7</span>
+00090 values[7]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*37 + alpha1*219) &gt;&gt;8 ) ; <span class="comment">// 1*256/7</span>
+00091 }
+00092 <span class="comment">// Case 1</span>
+00093 <span class="keywordflow">else</span>
+00094 {
+00095 <span class="comment">// unrolled, and hardcoded for faster compute</span>
+00096 values[0]= alpha0;
+00097 values[1]= alpha1;
+00098 values[2]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*205 + alpha1*51 ) &gt;&gt;8 ) ; <span class="comment">// 4*256/5</span>
+00099 values[3]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*154 + alpha1*102) &gt;&gt;8 ) ; <span class="comment">// 3*256/5</span>
+00100 values[4]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*102 + alpha1*154) &gt;&gt;8 ) ; <span class="comment">// 2*256/5</span>
+00101 values[5]= (<a class="code" href="a04558.html#a7">uint8</a>) ( (alpha0*51 + alpha1*205) &gt;&gt;8 ) ; <span class="comment">// 1*256/5</span>
+00102 values[6]= 0;
+00103 values[7]= 255;
+00104 }
+00105
+00106
+00107 <span class="comment">// For each pixel, set the value according to the code</span>
+00108 <span class="comment">// ------------------</span>
+00109 <a class="code" href="a04558.html#a15">uint</a> block8Pixs[2];
+00110 <span class="comment">// Split the 48 bits data in 2 24 bits pass.</span>
+00111 block8Pixs[0]= ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[2]&lt;&lt;16) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[3]&lt;&lt;8) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[4]) ;
+00112 block8Pixs[1]= ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[5]&lt;&lt;16) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[6]&lt;&lt;8) + ((<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a04223.html#a652">src</a>[7]) ;
+00113
+00114 <span class="comment">// write all lumels</span>
+00115 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;2; i++)
+00116 {
+00117 <a class="code" href="a04558.html#a15">uint</a> blockPix= block8Pixs[i];
+00118 <span class="comment">// parse the 8 pixs, and write seq to dest</span>
+00119 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> n=8; n&gt;0; n--, dest++)
+00120 {
+00121 <a class="code" href="a04558.html#a15">uint</a> code= (blockPix&gt;&gt;21)&amp;0x7;
+00122
+00123 <span class="comment">// read LUT, and store</span>
+00124 *dest= values[code];
+00125
+00126 <span class="comment">// shift the block</span>
+00127 blockPix&lt;&lt;= 3;
+00128 }
+00129 }
+00130
+00131 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz640_4" doxytag="NL3D::CPatch::unpackShadowMap" ></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::CPatch::unpackShadowMap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pShadow</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>
+Unpack the lumels of the patches. Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method uncompress the lumels stored in its Lumels member.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>pShadow</em>&nbsp;</td><td>is a pointer on the destination lumel buffer. Size must be ((OrderS*4/ratio)+1)*((OrderT*4/ratio)+1). </td></tr>
+ <tr><td valign=top><em>ratio</em>&nbsp;</td><td>is the one over the ratio of the texture destination. Must be 1 or 2. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03057.html#NL3D_1_1CPatchz640_1">packShadowMap()</a>, <a class="el" href="a03057.html#NL3D_1_1CPatchz640_2">resetCompressedLumels()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06157.html#l00170">170</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00337">CompressedLumels</a>, <a class="el" href="a06156.html#l00061">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>, <a class="el" href="a06156.html#l00060">NL_LUMEL_BY_TILE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06157.html#l00070">unpackLumelBlock()</a>, and <a class="el" href="a05646.html#l00237">v</a>.
+<p>
+Referenced by <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>.
+<p>
+<div class="fragment"><pre>00171 {
+00172 <span class="comment">// Input of compresed data</span>
+00173 <a class="code" href="a04558.html#a7">uint8</a> *compressedData=&amp;<a class="code" href="a03057.html#NL3D_1_1CPatcho0">CompressedLumels</a>[0];
+00174
+00175 <span class="comment">// Number of lumel by lines</span>
+00176 <a class="code" href="a04558.html#a15">uint</a> lumelCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+00177
+00178 <span class="comment">// Number of block in a line</span>
+00179 <a class="code" href="a04199.html#a6">nlassert</a> ((lumelCount&amp;0x3)==0);
+00180 <a class="code" href="a04558.html#a15">uint</a> numLumelBlock=lumelCount&gt;&gt;2;
+00181
+00182 <span class="comment">// Number of line</span>
+00183 <a class="code" href="a04558.html#a15">uint</a> lineCount=<a class="code" href="a03057.html#NL3D_1_1CPatchr21">OrderT</a>*<a class="code" href="a04733.html#a7">NL_LUMEL_BY_TILE</a>;
+00184
+00185 <span class="comment">// Number of block line</span>
+00186 <a class="code" href="a04199.html#a6">nlassert</a> ((lineCount&amp;0x3)==0);
+00187 <a class="code" href="a04558.html#a15">uint</a> numLineBlock=lineCount&gt;&gt;2;
+00188
+00189 <span class="comment">// Destination lumel block size</span>
+00190 <a class="code" href="a04558.html#a15">uint</a> lumelDestBlockSize=4;
+00191
+00192 <span class="comment">// Destination lumel line block size</span>
+00193 <a class="code" href="a04558.html#a15">uint</a> lumelDestLineBlockSize=lumelCount*lumelDestBlockSize;
+00194
+00195 <span class="comment">// Each line block</span>
+00196 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lineBlock=0; lineBlock&lt;numLineBlock; lineBlock++)
+00197 {
+00198 <a class="code" href="a04558.html#a15">uint</a> countVx4=16;
+00199
+00200 <span class="comment">// Block pointer</span>
+00201 <a class="code" href="a04558.html#a7">uint8</a> *blockLine=pLumelDest;
+00202
+00203 <span class="comment">// Each lumel block</span>
+00204 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> lumelBlock=0; lumelBlock&lt;numLumelBlock; lumelBlock++)
+00205 {
+00206 <span class="comment">// *** Unpack the block</span>
+00207 <a class="code" href="a04558.html#a15">uint</a> countU=4;
+00208
+00209 <span class="comment">// Destination lumel</span>
+00210 <a class="code" href="a04558.html#a7">uint8</a> *blockDest=blockLine;
+00211
+00212 <span class="comment">// Temp block</span>
+00213 <a class="code" href="a04558.html#a7">uint8</a> block[4*4];
+00214
+00215 <span class="comment">// Block unpacking...</span>
+00216 <a class="code" href="a03057.html#NL3D_1_1CPatchz640_7">unpackLumelBlock</a> (block, compressedData);
+00217
+00218 <span class="comment">// Copy the lumels</span>
+00219 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a576">v</a>=0; <a class="code" href="a04223.html#a576">v</a>&lt;countVx4; <a class="code" href="a04223.html#a576">v</a>+=4)
+00220 {
+00221 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u=0; u&lt;countU; u++)
+00222 {
+00223 <span class="comment">// Copy the lumel</span>
+00224 blockDest[u]=block[<a class="code" href="a04223.html#a576">v</a>+u];
+00225 }
+00226
+00227 <span class="comment">// Next line</span>
+00228 blockDest+=lumelCount;
+00229 }
+00230
+00231 <span class="comment">// Next source block</span>
+00232 compressedData+=<a class="code" href="a04733.html#a8">NL_BLOCK_LUMEL_COMPRESSED_SIZE</a>;
+00233
+00234 <span class="comment">// Next block on the line</span>
+00235 blockLine+=lumelDestBlockSize;
+00236 }
+00237
+00238 <span class="comment">// Next line of block</span>
+00239 pLumelDest+=lumelDestLineBlockSize;
+00240 }
+00241 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_6" doxytag="NL3D::CPatch::updateClipPatchVB" ></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::CPatch::updateClipPatchVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>renderClipped</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l01464">1464</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>, <a class="el" href="a06116.html#l00180">NLMISC::CObjectVector&lt; CTessBlock &gt;::empty()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06491.html#l00139">NL3D::CTessBlock::forceClip()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>01465 {
+01466 <span class="comment">// If now the patch is invisible</span>
+01467 <span class="keywordflow">if</span>(renderClipped)
+01468 {
+01469 <span class="comment">// Then delete vertices.</span>
+01470 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_3">deleteVBAndFaceVector</a>();
+01471
+01472 <span class="comment">// Now, all vertices in VB are deleted.</span>
+01473 <span class="comment">// Force clip state of all TessBlocks, so no allocation will be done on Vertices in VB.</span>
+01474 <span class="keywordflow">if</span>(!<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_0">empty</a>())
+01475 {
+01476 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();i++)
+01477 {
+01478 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+01479 tblock.forceClip();
+01480 }
+01481 }
+01482 }
+01483 <span class="keywordflow">else</span>
+01484 {
+01485 <span class="comment">// else allocate / fill them.</span>
+01486 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_0">allocateVBAndFaceVector</a>();
+01487 <span class="comment">// NB: fillVB() test if any reallocation occurs.</span>
+01488 <a class="code" href="a03057.html#NL3D_1_1CPatchz649_7">fillVB</a>();
+01489 }
+01490 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd29" doxytag="NL3D::CPatch::updateFar0VBAlloc" ></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::CPatch::updateFar0VBAlloc </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertList</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>alloc</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00744">744</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00124">NL3D::CTessFarVertex::Index0</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
+<p>
+<div class="fragment"><pre>00745 {
+00746 <span class="comment">// Traverse the vertList.</span>
+00747 CTessFarVertex *pVert;
+00748 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+00749 {
+00750 <span class="keywordflow">if</span>(alloc)
+00751 pVert-&gt;Index0= CLandscapeGlobals::CurrentFar0VBAllocator-&gt;allocateVertex();
+00752 <span class="keywordflow">else</span>
+00753 CLandscapeGlobals::CurrentFar0VBAllocator-&gt;deleteVertex(pVert-&gt;Index0);
+00754 }
+00755 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd30" doxytag="NL3D::CPatch::updateFar1VBAlloc" ></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::CPatch::updateFar1VBAlloc </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03480.html">CTessFarVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertList</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>alloc</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00759">759</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00125">NL3D::CTessFarVertex::Index1</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
+<p>
+<div class="fragment"><pre>00760 {
+00761 <span class="comment">// Traverse the vertList.</span>
+00762 CTessFarVertex *pVert;
+00763 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessFarVertex*)pVert-&gt;Next)
+00764 {
+00765 <span class="keywordflow">if</span>(alloc)
+00766 pVert-&gt;Index1= CLandscapeGlobals::CurrentFar1VBAllocator-&gt;allocateVertex();
+00767 <span class="keywordflow">else</span>
+00768 CLandscapeGlobals::CurrentFar1VBAllocator-&gt;deleteVertex(pVert-&gt;Index1);
+00769 }
+00770 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz655_4" doxytag="NL3D::CPatch::updateTessBlockLighting" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatch::updateTessBlockLighting </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>numTb</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>
+recompute the near lightmap of tessBlock "numTb". return the number of pixels updated by computing of this tessBlock. Actually 0 if the tessBlock lightmap is not computed, or 100 (NL_TILE_LIGHTMAP_SIZE*NL_TILE_LIGHTMAP_SIZE) pixels.
+<p>
+Definition at line <a class="el" href="a06157.html#l01909">1909</a> of file <a class="el" href="a06157.html">patch_lightmap.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l00864">computeNearBlockLightmap()</a>, <a class="el" href="a06760.html#l00558">NL3D::CZone::Landscape</a>, <a class="el" href="a06492.html#l00098">NL3D::CTessBlock::LightMapId</a>, <a class="el" href="a06492.html#l00099">NL3D::CTessBlock::LightMapRefCount</a>, <a class="el" href="a06532.html#l00035">NL_TILE_LIGHTMAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05862.html#l02048">NL3D::CLandscape::refillTileLightMap()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03459">NL3D::CLandscape::updateLightingTextureNear()</a>.
+<p>
+<div class="fragment"><pre>01910 {
+01911 <span class="comment">// TessBlocks must have been allocated and tessBlockId must be ok.</span>
+01912 <a class="code" href="a04199.html#a6">nlassert</a>(numTb&lt;<a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>());
+01913
+01914 <span class="comment">// compute tessBlock coordinate</span>
+01915 <a class="code" href="a04558.html#a15">uint</a> tbWidth= <a class="code" href="a03057.html#NL3D_1_1CPatchr20">OrderS</a>&gt;&gt;1;
+01916 <a class="code" href="a04558.html#a15">uint</a> ts= numTb&amp;(tbWidth-1);
+01917 <a class="code" href="a04558.html#a15">uint</a> tt= numTb/tbWidth;
+01918 <span class="comment">// expand to tile coordinate.</span>
+01919 ts*= 2;
+01920 tt*= 2;
+01921
+01922 <span class="comment">// get what tessBlock to use.</span>
+01923 CTessBlock &amp;tessBlock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[numTb];
+01924
+01925 <span class="comment">// If the lightmap Id has not been computed, quit</span>
+01926 <span class="keywordflow">if</span>(tessBlock.LightMapRefCount==0)
+01927 <span class="keywordflow">return</span> 0;
+01928 <span class="keywordflow">else</span>
+01929 {
+01930 <span class="comment">// Recompute the lightmap texture, with help of TileColors, with neighboring info etc...</span>
+01931 <a class="code" href="a03337.html">CRGBA</a> lightText[<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>];
+01932 <a class="code" href="a03057.html#NL3D_1_1CPatchz666_3">computeNearBlockLightmap</a>(ts&amp;(~1), tt&amp;(~1), lightText);
+01933
+01934 <span class="comment">// donlod this texture to Driver etc...</span>
+01935 <a class="code" href="a03057.html#NL3D_1_1CPatchr29">Zone</a>-&gt;Landscape-&gt;refillTileLightMap(tessBlock.LightMapId, lightText);
+01936
+01937 <span class="comment">// return number of pixels computed.</span>
+01938 <span class="keywordflow">return</span> <a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>*<a class="code" href="a05109.html#a0">NL_TILE_LIGHTMAP_SIZE</a>;
+01939 }
+01940 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz639_7" doxytag="NL3D::CPatch::updateTextureFarOnly" ></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::CPatch::updateTextureFarOnly </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02291.html">NLMISC::CBSphere</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>patchSphere</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00226">226</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00227 {
+00228 <a class="code" href="a04558.html#a14">sint</a> newFar0,newFar1;
+00229 <span class="comment">// compute new Far0 and new Far1.</span>
+00230 <a class="code" href="a03057.html#NL3D_1_1CPatchd12">computeNewFar</a>(patchSphere, newFar0, newFar1);
+00231
+00232 <span class="comment">// Far change.</span>
+00233 <span class="comment">//------------------</span>
+00234 <span class="comment">// Set new far values</span>
+00235 <a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>= newFar0;
+00236 <a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>= newFar1;
+00237 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd31" doxytag="NL3D::CPatch::updateTileVBAlloc" ></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::CPatch::updateTileVBAlloc </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03481.html">CTessNearVertex</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertList</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>alloc</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00774">774</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; T &gt;::begin()</a>, <a class="el" href="a06498.html#l00135">NL3D::CTessNearVertex::Index</a>, and <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00249">preRender()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>.
+<p>
+<div class="fragment"><pre>00775 {
+00776 <span class="comment">// Traverse the vertList.</span>
+00777 CTessNearVertex *pVert;
+00778 <span class="keywordflow">for</span>(pVert= vertList.begin(); pVert; pVert= (CTessNearVertex*)pVert-&gt;Next)
+00779 {
+00780 <span class="keywordflow">if</span>(alloc)
+00781 pVert-&gt;Index= CLandscapeGlobals::CurrentTileVBAllocator-&gt;allocateVertex();
+00782 <span class="keywordflow">else</span>
+00783 CLandscapeGlobals::CurrentTileVBAllocator-&gt;deleteVertex(pVert-&gt;Index);
+00784 }
+00785 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchd32" doxytag="NL3D::CPatch::updateVBAlloc" ></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::CPatch::updateVBAlloc </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>alloc</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>
+
+<p>
+Definition at line <a class="el" href="a06161.html#l00789">789</a> of file <a class="el" href="a06161.html">patch_render.cpp</a>.
+<p>
+References <a class="el" href="a06492.html#l00085">NL3D::CTessBlock::FarVertexList</a>, <a class="el" href="a06156.html#l00884">MasterBlock</a>, <a class="el" href="a06492.html#l00086">NL3D::CTessBlock::NearVertexList</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CTessBlock &gt;::size()</a>, <a class="el" href="a06156.html#l00882">TessBlocks</a>, <a class="el" href="a06161.html#l00744">updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">updateFar1VBAlloc()</a>, <a class="el" href="a06161.html#l00774">updateTileVBAlloc()</a>, <a class="el" href="a06492.html#l00133">NL3D::CTessBlock::visibleFar0()</a>, <a class="el" href="a06492.html#l00135">NL3D::CTessBlock::visibleFar1()</a>, and <a class="el" href="a06492.html#l00134">NL3D::CTessBlock::visibleTile()</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00845">allocateVBAndFaceVector()</a>, and <a class="el" href="a06161.html#l00837">deleteVBAndFaceVector()</a>.
+<p>
+<div class="fragment"><pre>00790 {
+00791 <span class="comment">// update Far0.</span>
+00792 <span class="comment">//=======</span>
+00793 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>&gt;0)
+00794 {
+00795 <span class="comment">// alloc Far0 VB.</span>
+00796 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, alloc);
+00797 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00798 {
+00799 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00800 <span class="comment">// need update VB only if tessBlock is visible.</span>
+00801 <span class="keywordflow">if</span>( tblock.visibleFar0() )
+00802 <a class="code" href="a03057.html#NL3D_1_1CPatchd29">updateFar0VBAlloc</a>(tblock.FarVertexList, alloc);
+00803 }
+00804 }
+00805 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a03057.html#NL3D_1_1CPatchr8">Far0</a>==0)
+00806 {
+00807 <span class="comment">// alloc Tile VB.</span>
+00808 <span class="comment">// No Tiles in MasterBlock!!</span>
+00809 <span class="comment">// Traverse the TessBlocks to add vertices.</span>
+00810 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00811 {
+00812 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00813 <span class="comment">// Add the vertices.</span>
+00814 <span class="comment">// need update VB only if tessBlock is visible.</span>
+00815 <span class="keywordflow">if</span>( tblock.visibleTile() )
+00816 <a class="code" href="a03057.html#NL3D_1_1CPatchd31">updateTileVBAlloc</a>(tblock.NearVertexList, alloc);
+00817 }
+00818 }
+00819
+00820 <span class="comment">// update Far1.</span>
+00821 <span class="comment">//=======</span>
+00822 <span class="keywordflow">if</span>(<a class="code" href="a03057.html#NL3D_1_1CPatchr13">Far1</a>&gt;0)
+00823 {
+00824 <span class="comment">// alloc VB.</span>
+00825 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(<a class="code" href="a03057.html#NL3D_1_1CPatchz659_0">MasterBlock</a>.FarVertexList, alloc);
+00826 <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="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>(); i++)
+00827 {
+00828 CTessBlock &amp;tblock= <a class="code" href="a03057.html#NL3D_1_1CPatchz659_3">TessBlocks</a>[i];
+00829 <span class="comment">// need update VB only if tessBlock is visible.</span>
+00830 <span class="keywordflow">if</span>( tblock.visibleFar1() )
+00831 <a class="code" href="a03057.html#NL3D_1_1CPatchd30">updateFar1VBAlloc</a>(tblock.FarVertexList, alloc);
+00832 }
+00833 }
+00834 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchn0" doxytag="NL3D::CPatch::CLandscapeVegetableBlock" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> friend class <a class="el" href="a02717.html">CLandscapeVegetableBlock</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00796">796</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchn1" doxytag="NL3D::CPatch::CPatchRdrPass" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> friend class <a class="el" href="a03069.html">CPatchRdrPass</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00797">797</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchn2" doxytag="NL3D::CPatch::CTessFace" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> friend class <a class="el" href="a03476.html">CTessFace</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00794">794</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchn3" doxytag="NL3D::CPatch::CZone" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> friend class <a class="el" href="a03730.html">CZone</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00795">795</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchz669_1" doxytag="NL3D::CPatch::_BindZoneNeighbor" ></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="a03730.html">CZone</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz669_1">NL3D::CPatch::_BindZoneNeighbor</a>[4]<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The 4 neighbors zone of this patch (setuped at <a class="el" href="a03057.html#NL3D_1_1CPatcha1">bind()</a> time). NB: NULL if zone not loaded, or if no patch near us.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l01110">1110</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02213">getBindNeighbor()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz637_3" doxytag="NL3D::CPatch::_CornerSmoothFlag" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz637_3">NL3D::CPatch::_CornerSmoothFlag</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Put here for packing with NoiseRotation.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00362">362</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06158.html#l00962">getCornerSmoothFlag()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06158.html#l00951">setCornerSmoothFlag()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz675_2" doxytag="NL3D::CPatch::_DLMContext" ></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="a03060.html">CPatchDLMContext</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz675_2">NL3D::CPatch::_DLMContext</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The Dynamic LightMap context. created only when compiled, AND (when in Near OR (when in Far AND touched by pointLight)) else NULL.
+<p>
+Definition at line <a class="el" href="a06156.html#l01214">1214</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06157.html#l02005">beginDLMLighting()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, <a class="el" href="a06157.html#l02035">endDLMLighting()</a>, <a class="el" href="a06161.html#l01609">fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>, <a class="el" href="a06157.html#l02021">processDLMLight()</a>, and <a class="el" href="a06155.html#l00115">release()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz675_3" doxytag="NL3D::CPatch::_DLMContextRefCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz675_3">NL3D::CPatch::_DLMContextRefCount</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The reference count for DLMContext. Each TileMaterial created add a reference. Each pointLight wich touch the patch too.
+<p>
+Definition at line <a class="el" href="a06156.html#l01219">1219</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01950">addRefDLMContext()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01977">decRefDLMContext()</a>, and <a class="el" href="a06155.html#l00115">release()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr0" doxytag="NL3D::CPatch::_NextRdrFar0" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr0">NL3D::CPatch::_NextRdrFar0</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="a06156.html#l00872">872</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06156.html#l00465">getNextFar0ToRdr()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr1" doxytag="NL3D::CPatch::_NextRdrFar1" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr1">NL3D::CPatch::_NextRdrFar1</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="a06156.html#l00874">874</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06156.html#l00467">getNextFar1ToRdr()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr2" doxytag="NL3D::CPatch::_PatchRdrPassFar0" ></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="a03069.html">CPatchRdrPass</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr2">NL3D::CPatch::_PatchRdrPassFar0</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="a06156.html#l00871">871</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, and <a class="el" href="a06155.html#l01555">resetRenderFar()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr3" doxytag="NL3D::CPatch::_PatchRdrPassFar1" ></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="a03069.html">CPatchRdrPass</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr3">NL3D::CPatch::_PatchRdrPassFar1</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="a06156.html#l00873">873</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, and <a class="el" href="a06155.html#l01555">resetRenderFar()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz673_0" doxytag="NL3D::CPatch::_ULNearNext" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz673_0">NL3D::CPatch::_ULNearNext</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="a06156.html#l01203">1203</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06156.html#l00750">getNextNearUL()</a>, <a class="el" href="a06157.html#l01880">linkBeforeNearUL()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06157.html#l01897">unlinkNearUL()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz673_1" doxytag="NL3D::CPatch::_ULNearPrec" ></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="a03057.html">CPatch</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchz673_1">NL3D::CPatch::_ULNearPrec</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="a06156.html#l01202">1202</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06157.html#l01880">linkBeforeNearUL()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06157.html#l01897">unlinkNearUL()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchv0" doxytag="NL3D::CPatch::_Version" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03057.html#NL3D_1_1CPatchv0">NL3D::CPatch::_Version</a> = 7<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Stream version of the class.
+<p>
+Definition at line <a class="el" href="a06155.html#l00057">57</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01576">serial()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr4" doxytag="NL3D::CPatch::BaseFarVertices" ></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="a03480.html">CTessFarVertex</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr4">NL3D::CPatch::BaseFarVertices</a>[4]<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="a06156.html#l00822">822</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01124">makeRoots()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr5" doxytag="NL3D::CPatch::BaseVertices" ></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="a03482.html">CTessVertex</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr5">NL3D::CPatch::BaseVertices</a>[4]<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="a06156.html#l00820">820</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l01363">computeContinousVertex()</a>, <a class="el" href="a06155.html#l01456">computeVertexButCorner()</a>, <a class="el" href="a06156.html#l00659">getCornerVertex()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, and <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchv1" doxytag="NL3D::CPatch::CachePatch" ></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="a02258.html">CBezierPatch</a> <a class="el" href="a03057.html#NL3D_1_1CPatchv1">NL3D::CPatch::CachePatch</a><code> [static, 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="a06155.html#l00055">55</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho0" doxytag="NL3D::CPatch::CompressedLumels" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a04558.html#a7">uint8</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho0">NL3D::CPatch::CompressedLumels</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00337">337</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l00704">computeTileLightmapEdgePrecomputed()</a>, <a class="el" href="a06157.html#l00738">computeTileLightmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00678">computeTileLightmapPrecomputed()</a>, <a class="el" href="a06157.html#l00670">getTileLumelmapPixelPrecomputed()</a>, <a class="el" href="a06157.html#l00650">getTileLumelmapPrecomputed()</a>, <a class="el" href="a06157.html#l01267">packShadowMap()</a>, <a class="el" href="a06157.html#l01384">resetCompressedLumels()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06157.html#l00170">unpackShadowMap()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr6" doxytag="NL3D::CPatch::ErrorSize" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr6">NL3D::CPatch::ErrorSize</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="a06156.html#l00816">816</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00206">computeDefaultErrorSize()</a>, <a class="el" href="a06156.html#l00395">getErrorSize()</a>, and <a class="el" href="a06155.html#l01124">makeRoots()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr7" doxytag="NL3D::CPatch::ExcludeFromRefineAll" ></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="a03057.html#NL3D_1_1CPatchr7">NL3D::CPatch::ExcludeFromRefineAll</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="a06156.html#l00807">807</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06758.html#l01132">NL3D::CZone::refineAll()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr8" doxytag="NL3D::CPatch::Far0" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr8">NL3D::CPatch::Far0</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="a06156.html#l00867">867</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr9" doxytag="NL3D::CPatch::Far0UBias" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr9">NL3D::CPatch::Far0UBias</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr10" doxytag="NL3D::CPatch::Far0UScale" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr10">NL3D::CPatch::Far0UScale</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr11" doxytag="NL3D::CPatch::Far0VBias" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr11">NL3D::CPatch::Far0VBias</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr12" doxytag="NL3D::CPatch::Far0VScale" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr12">NL3D::CPatch::Far0VScale</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="a06156.html#l00827">827</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l00946">fillFar0VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr13" doxytag="NL3D::CPatch::Far1" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr13">NL3D::CPatch::Far1</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="a06156.html#l00868">868</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr14" doxytag="NL3D::CPatch::Far1UBias" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr14">NL3D::CPatch::Far1UBias</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr15" doxytag="NL3D::CPatch::Far1UScale" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr15">NL3D::CPatch::Far1UScale</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr16" doxytag="NL3D::CPatch::Far1VBias" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr16">NL3D::CPatch::Far1VBias</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr17" doxytag="NL3D::CPatch::Far1VScale" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr17">NL3D::CPatch::Far1VScale</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="a06156.html#l00828">828</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr18" doxytag="NL3D::CPatch::Flags" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr18">NL3D::CPatch::Flags</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Flags NL_PATCH_FAR0_ROTATED and NL_PATCH_FAR1_ROTATED NL_PATCH_FAR0_ROTATED for Far0, NL_PATCH_FAR1_ROTATED for Far1 If the flag is set, the far texture of the patch is rotated of 1 (to the left of course)<p>
+Flags NL_PATCH_SMOOTH_FLAG_MASK 4 flag for smooth edge. Same as <a class="el" href="a03067.html">CPatchInfo::CBindInfo</a> shifted by (&lt;&lt;NL_PATCH_SMOOTH_FLAG_SHIFT). See CPatchInfo::CBindInfo::Flags for details.
+<p>
+Definition at line <a class="el" href="a06156.html#l00840">840</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho1" doxytag="NL3D::CPatch::Interiors" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho1">NL3D::CPatch::Interiors</a>[4]
+ </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="a06156.html#l00329">329</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchv2" doxytag="NL3D::CPatch::LastPatch" ></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="a03057.html">CPatch</a> * <a class="el" href="a03057.html#NL3D_1_1CPatchv2">NL3D::CPatch::LastPatch</a> = NULL<code> [static, 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="a06155.html#l00056">56</a> of file <a class="el" href="a06155.html">patch.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00182">unpackIntoCache()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz659_0" doxytag="NL3D::CPatch::MasterBlock" ></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="a03475.html">CTessBlock</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_0">NL3D::CPatch::MasterBlock</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="a06156.html#l00884">884</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06156.html#l00788">getTileMaterialRefCount()</a>, <a class="el" href="a06161.html#l00705">recreateTessBlockFaceVector()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz637_2" doxytag="NL3D::CPatch::NoiseRotation" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz637_2">NL3D::CPatch::NoiseRotation</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00352">352</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06158.html#l00168">computeDisplaceRawCoordinates()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz659_1" doxytag="NL3D::CPatch::NumRenderableFaces" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_1">NL3D::CPatch::NumRenderableFaces</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="a06156.html#l00879">879</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06160.html#l00069">NL3D::CPatchRdrPass::appendRdrPatchFar0()</a>, <a class="el" href="a06160.html#l00075">NL3D::CPatchRdrPass::appendRdrPatchFar1()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, and <a class="el" href="a06155.html#l00709">resetMasterBlock()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr19" doxytag="NL3D::CPatch::OOTransitionSqrDelta" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr19">NL3D::CPatch::OOTransitionSqrDelta</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="a06156.html#l00845">845</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr20" doxytag="NL3D::CPatch::OrderS" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr20">NL3D::CPatch::OrderS</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="a06156.html#l00804">804</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr21" doxytag="NL3D::CPatch::OrderT" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr21">NL3D::CPatch::OrderT</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="a06156.html#l00804">804</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06758.html#l00499">NL3D::CZone::compile()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr22" doxytag="NL3D::CPatch::PatchId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a9">uint16</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr22">NL3D::CPatch::PatchId</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="a06156.html#l00802">802</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr23" doxytag="NL3D::CPatch::Son0" ></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="a03476.html">CTessFace</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr23">NL3D::CPatch::Son0</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="a06156.html#l00818">818</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02176">appendTessellationLeaves()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02142">deleteTileUvs()</a>, <a class="el" href="a06155.html#l02022">forceMergeAtTileLevel()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06155.html#l00579">getTesselatedPos()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06155.html#l01493">refineAll()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr24" doxytag="NL3D::CPatch::Son1" ></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="a03476.html">CTessFace</a> * <a class="el" href="a03057.html#NL3D_1_1CPatchr24">NL3D::CPatch::Son1</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="a06156.html#l00818">818</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02176">appendTessellationLeaves()</a>, <a class="el" href="a06155.html#l01505">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">bind()</a>, <a class="el" href="a06155.html#l01805">changeEdgeNeighbor()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, <a class="el" href="a06155.html#l02142">deleteTileUvs()</a>, <a class="el" href="a06155.html#l02022">forceMergeAtTileLevel()</a>, <a class="el" href="a06155.html#l01751">getRootFaceForEdge()</a>, <a class="el" href="a06155.html#l01773">getRootVertexForEdge()</a>, <a class="el" href="a06155.html#l00579">getTesselatedPos()</a>, <a class="el" href="a06155.html#l01834">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">makeRoots()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06155.html#l01493">refineAll()</a>, <a class="el" href="a06155.html#l01531">refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l00115">release()</a>, and <a class="el" href="a06155.html#l01724">unbind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr25" doxytag="NL3D::CPatch::SquareLimitLevel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr25">NL3D::CPatch::SquareLimitLevel</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="a06156.html#l00814">814</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, and <a class="el" href="a06497.html#l02954">NL3D::CTessFace::isRectangular()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho2" doxytag="NL3D::CPatch::Tangents" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho2">NL3D::CPatch::Tangents</a>[8]
+ </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="a06156.html#l00328">328</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr26" doxytag="NL3D::CPatch::TessBlockLimitLevel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr26">NL3D::CPatch::TessBlockLimitLevel</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="a06156.html#l00810">810</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, and <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz659_2" doxytag="NL3D::CPatch::TessBlockRefCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchz659_2">NL3D::CPatch::TessBlockRefCount</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="a06156.html#l00886">886</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06155.html#l00061">CPatch()</a>, and <a class="el" href="a06155.html#l00658">decRefTessBlocks()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz659_3" doxytag="NL3D::CPatch::TessBlocks" ></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="a03000.html">NLMISC::CObjectVector</a>&lt;<a class="el" href="a03475.html">CTessBlock</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatchz659_3">NL3D::CPatch::TessBlocks</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="a06156.html#l00882">882</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06161.html#l00873">allocateVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00800">appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l00884">appendFaceToTileRenderList()</a>, <a class="el" href="a06155.html#l01040">appendFarVertexToRenderList()</a>, <a class="el" href="a06155.html#l01086">appendNearVertexToRenderList()</a>, <a class="el" href="a06155.html#l00955">appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, <a class="el" href="a06161.html#l01378">computeSoftwareGeomorphAndAlpha()</a>, <a class="el" href="a06161.html#l00663">createFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00641">createFaceVectorFar1()</a>, <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>, <a class="el" href="a06161.html#l00914">debugAllocationMarkIndices()</a>, <a class="el" href="a06162.html#l00282">deleteAllVegetableIgs()</a>, <a class="el" href="a06161.html#l00683">deleteFaceVectorFar0OrTile()</a>, <a class="el" href="a06161.html#l00652">deleteFaceVectorFar1()</a>, <a class="el" href="a06161.html#l00854">deleteVBAndFaceVectorFar1Only()</a>, <a class="el" href="a06155.html#l00766">extendTessBlockWithEndPos()</a>, <a class="el" href="a06161.html#l01198">fillVB()</a>, <a class="el" href="a06161.html#l01256">fillVBFar0Only()</a>, <a class="el" href="a06161.html#l01274">fillVBFar1Only()</a>, <a class="el" href="a06161.html#l01720">fillVBFarsDLMUvOnly()</a>, <a class="el" href="a06156.html#l00753">getNumNearTessBlocks()</a>, <a class="el" href="a06157.html#l01191">getTileLightMap()</a>, <a class="el" href="a06157.html#l01225">getTileLightMapUvInfo()</a>, <a class="el" href="a06161.html#l00249">preRender()</a>, <a class="el" href="a06162.html#l00260">recreateAllVegetableIgs()</a>, <a class="el" href="a06155.html#l02150">recreateTileUvs()</a>, <a class="el" href="a06157.html#l01247">releaseTileLightMap()</a>, <a class="el" href="a06162.html#l00326">releaseVegetableBlock()</a>, <a class="el" href="a06155.html#l00848">removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l00913">removeFaceFromTileRenderList()</a>, <a class="el" href="a06155.html#l01062">removeFarVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01099">removeNearVertexFromRenderList()</a>, <a class="el" href="a06155.html#l01002">removeTileMaterialFromRenderList()</a>, <a class="el" href="a06161.html#l00528">renderFar0()</a>, <a class="el" href="a06161.html#l00560">renderFar1()</a>, <a class="el" href="a06161.html#l01464">updateClipPatchVB()</a>, <a class="el" href="a06157.html#l01909">updateTessBlockLighting()</a>, and <a class="el" href="a06161.html#l00789">updateVBAlloc()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho3" doxytag="NL3D::CPatch::TileColors" ></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="a03520.html">CTileColor</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho3">NL3D::CPatch::TileColors</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00343">343</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06163.html#l00888">NL3D::CPatchDLMContext::compileLighting()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06157.html#l00345">getTileTileColors()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06155.html#l02231">setupColorsFromTileFlags()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho4" doxytag="NL3D::CPatch::TileLightInfluences" ></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="a03527.html">CTileLightInfluence</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho4">NL3D::CPatch::TileLightInfluences</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00346">346</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l01543">appendTileLightInfluences()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06157.html#l01529">resetTileLightInfluences()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, and <a class="el" href="a06155.html#l01576">serial()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr27" doxytag="NL3D::CPatch::TileLimitLevel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03057.html#NL3D_1_1CPatchr27">NL3D::CPatch::TileLimitLevel</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="a06156.html#l00812">812</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01283">compile()</a>, <a class="el" href="a06497.html#l00216">NL3D::CTessFace::computeNearLimit()</a>, <a class="el" href="a06497.html#l00675">NL3D::CTessFace::computeTileMaterial()</a>, <a class="el" href="a06497.html#l02969">NL3D::CTessFace::deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">NL3D::CTessFace::doMerge()</a>, <a class="el" href="a06497.html#l02448">NL3D::CTessFace::forceMergeAtTileLevel()</a>, <a class="el" href="a06497.html#l03017">NL3D::CTessFace::recreateTileUvs()</a>, <a class="el" href="a06497.html#l01783">NL3D::CTessFace::refineAll()</a>, <a class="el" href="a06497.html#l00835">NL3D::CTessFace::releaseTileMaterial()</a>, <a class="el" href="a06497.html#l01283">NL3D::CTessFace::split()</a>, <a class="el" href="a06497.html#l00911">NL3D::CTessFace::splitRectangular()</a>, <a class="el" href="a06497.html#l00278">NL3D::CTessFace::updateErrorMetric()</a>, <a class="el" href="a06497.html#l02108">NL3D::CTessFace::updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">NL3D::CTessFace::updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho5" doxytag="NL3D::CPatch::Tiles" ></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="a03522.html">CTileElement</a>&gt; <a class="el" href="a03057.html#NL3D_1_1CPatcho5">NL3D::CPatch::Tiles</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00340">340</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06158.html#l00136">computeDisplaceRawInteger()</a>, <a class="el" href="a06163.html#l00964">NL3D::CPatchDLMContext::computeTextureFar()</a>, <a class="el" href="a06155.html#l02245">copyTileFlagsFromPatch()</a>, <a class="el" href="a06162.html#l00050">generateTileVegetable()</a>, <a class="el" href="a06155.html#l02265">getTileElement()</a>, <a class="el" href="a06155.html#l02040">getTileRenderPass()</a>, <a class="el" href="a06155.html#l02080">getTileUvInfo()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06155.html#l01576">serial()</a>, and <a class="el" href="a06155.html#l02231">setupColorsFromTileFlags()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr28" doxytag="NL3D::CPatch::TransitionSqrMin" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03057.html#NL3D_1_1CPatchr28">NL3D::CPatch::TransitionSqrMin</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="a06156.html#l00844">844</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01329">computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l00054">computeNewFar()</a>, and <a class="el" href="a06161.html#l01022">fillFar1VertexVB()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchz661_0" doxytag="NL3D::CPatch::VegetableClipBlocks" ></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="a03673.html">CVegetableClipBlock</a>*&gt; <a class="el" href="a03057.html#NL3D_1_1CPatchz661_0">NL3D::CPatch::VegetableClipBlocks</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+list of vegetable clipBlocks, created/destroyed at same time as TessBlocks.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00893">893</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00611">addRefTessBlocks()</a>, <a class="el" href="a06155.html#l00669">clearTessBlocks()</a>, and <a class="el" href="a06162.html#l00294">createVegetableBlock()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatcho6" doxytag="NL3D::CPatch::Vertices" ></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="a03663.html">CVector3s</a> <a class="el" href="a03057.html#NL3D_1_1CPatcho6">NL3D::CPatch::Vertices</a>[4]
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The patch coordinates (see <a class="el" href="a02258.html">CBezierPatch</a>).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06156.html#l00327">327</a> of file <a class="el" href="a06156.html">patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, and <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchr29" doxytag="NL3D::CPatch::Zone" ></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="a03730.html">CZone</a>* <a class="el" href="a03057.html#NL3D_1_1CPatchr29">NL3D::CPatch::Zone</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="a06156.html#l00799">799</a> of file <a class="el" href="a06156.html">patch.h</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06156.html">patch.h</a><li><a class="el" href="a06155.html">patch.cpp</a><li><a class="el" href="a06157.html">patch_lightmap.cpp</a><li><a class="el" href="a06158.html">patch_noise.cpp</a><li><a class="el" href="a06161.html">patch_render.cpp</a><li><a class="el" href="a06162.html">patch_vegetable.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:00:40 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>