aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03060.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a03060.html')
-rw-r--r--docs/doxygen/nel/a03060.html2425
1 files changed, 2425 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03060.html b/docs/doxygen/nel/a03060.html
new file mode 100644
index 00000000..975a5bef
--- /dev/null
+++ b/docs/doxygen/nel/a03060.html
@@ -0,0 +1,2425 @@
+<!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::CPatchDLMContext 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::CPatchDLMContext Class Reference</h1><code>#include &lt;<a class="el" href="a06164.html">patchdlm_context.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NL3D::CPatchDLMContext:
+<p><center><img src="a03060.png" usemap="#NL3D::CPatchDLMContext_map" border="0" alt=""></center>
+<map name="NL3D::CPatchDLMContext_map">
+<area href="a02718.html" alt="NL3D::CTessNodeList" shape="rect" coords="0,0,160,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A Dynamic LightMap (DLM) context for a patch. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00100">100</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4">TCompileType</a> { <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw2">ModulateTileColor</a> = 0,
+<a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw1">ModulateTextureFar</a>,
+<a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw0">ModulateConstant</a>,
+<a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw3">NoModulate</a>
+ }</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">see <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta2">compileLighting()</a> <a href="#NL3D_1_1CPatchDLMContextw4">More...</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="a03060.html#NL3D_1_1CPatchDLMContexta0">addPointLightInfluence</a> (const <a class="el" href="a03065.html">CPatchDLMPointLight</a> &amp;pl)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta1">clearLighting</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta2">compileLighting</a> (<a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4">TCompileType</a> compType, <a class="el" href="a03337.html">NLMISC::CRGBA</a> modulateCte=<a class="el" href="a03337.html#NLMISC_1_1CRGBAs6">NLMISC::CRGBA::White</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta3">CPatchDLMContext</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CPatchDLMContexta3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta4">generate</a> (<a class="el" href="a03057.html">CPatch</a> *patch, <a class="el" href="a03493.html">CTextureDLM</a> *textureDLM, <a class="el" href="a03063.html">CPatchDLMContextList</a> *ctxList)</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="a03060.html#NL3D_1_1CPatchDLMContexta5">getMemorySize</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="a03060.html#NL3D_1_1CPatchDLMContexta6">getPatch</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta7">~CPatchDLMContext</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor: lightmap is released from _DLMTexture. <a href="#NL3D_1_1CPatchDLMContexta7"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Data Fields</h2></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="a03060.html#NL3D_1_1CPatchDLMContexto0">CurPointLightCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto1">DLMUBias</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mapping to this rectangle from 0-1 basis. <a href="#NL3D_1_1CPatchDLMContexto1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto2">DLMUScale</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mapping to this rectangle from 0-1 basis. <a href="#NL3D_1_1CPatchDLMContexto2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto3">DLMVBias</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mapping to this rectangle from 0-1 basis. <a href="#NL3D_1_1CPatchDLMContexto3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto4">DLMVScale</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mapping to this rectangle from 0-1 basis. <a href="#NL3D_1_1CPatchDLMContexto4"></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="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</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="a03060.html#NL3D_1_1CPatchDLMContexto6">MaxU8</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">texture coordinate bound in 8 bits. Important for Vegetable special DLM mapping <a href="#NL3D_1_1CPatchDLMContexto6"></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="a03060.html#NL3D_1_1CPatchDLMContexto7">MaxV8</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="a03060.html#NL3D_1_1CPatchDLMContexto8">MinU8</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">texture coordinate bound in 8 bits. Important for Vegetable special DLM mapping <a href="#NL3D_1_1CPatchDLMContexto8"></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="a03060.html#NL3D_1_1CPatchDLMContexto9">MinV8</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02718.html">CTessNodeList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko0">Next</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto11">OldPointLightCount</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02718.html">CTessNodeList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko1">Prec</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto13">TextPosX</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto14">TextPosY</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a></td></tr>
+
+<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextd0">computeTextureFar</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Static 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="a03060.html#NL3D_1_1CPatchDLMContexth0">blendTileToTexture</a> (const <a class="el" href="a03337.html">CRGBA</a> *srcPixel, <a class="el" href="a04558.html#a14">sint</a> srcDeltaX, <a class="el" href="a04558.html#a14">sint</a> srcDeltaY, <a class="el" href="a03337.html">CRGBA</a> *dstPixel, <a class="el" href="a04558.html#a15">uint</a> dstStride)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexth1">computeTileFarSrcDeltas</a> (<a class="el" href="a04558.html#a14">sint</a> nRot, bool is256x256, <a class="el" href="a04558.html#a7">uint8</a> uvOff, const <a class="el" href="a03337.html">CRGBA</a> *srcPixel, <a class="el" href="a04558.html#a14">sint</a> &amp;srcDeltaX, <a class="el" href="a04558.html#a14">sint</a> &amp;srcDeltaY)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexth2">copyTileToTexture</a> (const <a class="el" href="a03337.html">CRGBA</a> *srcPixel, <a class="el" href="a04558.html#a14">sint</a> srcDeltaX, <a class="el" href="a04558.html#a14">sint</a> srcDeltaY, <a class="el" href="a03337.html">CRGBA</a> *dstPixel, <a class="el" href="a04558.html#a15">uint</a> dstStride)</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="a03000.html">NLMISC::CObjectVector</a>&lt; <a class="el" href="a03061.html">CCluster</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bounding Sphere QuadTree (with NSkips paradigm). <a href="#NL3D_1_1CPatchDLMContextr0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03063.html">CPatchDLMContextList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03493.html">CTextureDLM</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The DLM texture (only one per landscape). <a href="#NL3D_1_1CPatchDLMContextr2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr3">_IsDstTextureFullBlack</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</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="a03337.html">CRGBA</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The computed lightmap: Width*Height. <a href="#NL3D_1_1CPatchDLMContextr5"></a><br><br></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="a04558.html#a9">uint16</a>,<br>
+ false &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</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="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The patch which owns us. <a href="#NL3D_1_1CPatchDLMContextr7"></a><br><br></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="a03337.html">CRGBA</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr8">_TextureFar</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="a03062.html">CVertex</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bezier Patch Array information: Width*Height. <a href="#NL3D_1_1CPatchDLMContextr9"></a><br><br></td></tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextw4" doxytag="NL3D::CPatchDLMContext::TCompileType" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContextw4">NL3D::CPatchDLMContext::TCompileType</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+see <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta2">compileLighting()</a>
+<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_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw2" doxytag="ModulateTileColor" ></a>ModulateTileColor</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw1" doxytag="ModulateTextureFar" ></a>ModulateTextureFar</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw0" doxytag="ModulateConstant" ></a>ModulateConstant</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw3" doxytag="NoModulate" ></a>NoModulate</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00111">111</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+<div class="fragment"><pre>00111 {<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw2">ModulateTileColor</a>=0, <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw1">ModulateTextureFar</a>, <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw0">ModulateConstant</a>, <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw3">NoModulate</a>};
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta3" doxytag="NL3D::CPatchDLMContext::CPatchDLMContext" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::CPatchDLMContext </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="a06163.html#l00171">171</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00177">_DLMContextList</a>, <a class="el" href="a06164.html#l00175">_DLMTexture</a>, <a class="el" href="a06164.html#l00202">_IsDstTextureFullBlack</a>, <a class="el" href="a06164.html#l00200">_IsSrcTextureFullBlack</a>, <a class="el" href="a06164.html#l00128">CurPointLightCount</a>, and <a class="el" href="a06164.html#l00127">OldPointLightCount</a>.
+<p>
+<div class="fragment"><pre>00172 {
+00173 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>= NULL;
+00174 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>= NULL;
+00175 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a>= NULL;
+00176 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto11">OldPointLightCount</a>= 0;
+00177 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto0">CurPointLightCount</a>= 0;
+00178 <span class="comment">// By default there is crash in textures</span>
+00179 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>= <span class="keyword">false</span>;
+00180 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr3">_IsDstTextureFullBlack</a>= <span class="keyword">false</span>;
+00181 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta7" doxytag="NL3D::CPatchDLMContext::~CPatchDLMContext" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::~<a class="el" href="a03060.html">CPatchDLMContext</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>
+Destructor: lightmap is released from _DLMTexture.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l00185">185</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00177">_DLMContextList</a>, <a class="el" href="a06164.html#l00175">_DLMTexture</a>, <a class="el" href="a06515.html#l00363">NL3D::CTextureDLM::releaseLightMap()</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CPatchDLMContext &gt;::remove()</a>, <a class="el" href="a06164.html#l00117">TextPosX</a>, and <a class="el" href="a06164.html#l00117">TextPosY</a>.
+<p>
+<div class="fragment"><pre>00186 {
+00187 <span class="comment">// release the lightmap in the texture</span>
+00188 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>)
+00189 {
+00190 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;releaseLightMap(TextPosX, TextPosY);
+00191 }
+00192 <span class="comment">// exit</span>
+00193 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>= NULL;
+00194 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>= NULL;
+00195
+00196 <span class="comment">// remove it from list.</span>
+00197 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a>)
+00198 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a>-&gt;remove(<span class="keyword">this</span>);
+00199 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta0" doxytag="NL3D::CPatchDLMContext::addPointLightInfluence" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::addPointLightInfluence </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <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>
+Add a pointLight influence to the lighting: RAM texture is updated. NB: full src blackness is reseted.
+<p>
+Definition at line <a class="el" href="a06163.html#l00648">648</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00197">_Clusters</a>, <a class="el" href="a06164.html#l00200">_IsSrcTextureFullBlack</a>, <a class="el" href="a06164.html#l00183">_LightMap</a>, <a class="el" href="a06340.html#l00264">NLMISC::CRGBA::addRGBOnly()</a>, <a class="el" href="a06164.html#l00073">NL3D::CPatchDLMPointLight::AttMax</a>, <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06164.html#l00059">NL3D::CPatchDLMPointLight::B</a>, <a class="el" href="a06164.html#l00081">NL3D::CPatchDLMPointLight::BSphere</a>, <a class="el" href="a06164.html#l00069">NL3D::CPatchDLMPointLight::CosMin</a>, <a class="el" href="a06164.html#l00065">NL3D::CPatchDLMPointLight::Dir</a>, <a class="el" href="a06163.html#l00641">NL3D::fastClamp01()</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06164.html#l00059">NL3D::CPatchDLMPointLight::G</a>, <a class="el" href="a06164.html#l00061">NL3D::CPatchDLMPointLight::IsSpot</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06163.html#l00208">NL_DLM_CLIP_FACTOR</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06164.html#l00107">NL3D::CPatchDLMContext::CVertex::Normal</a>, <a class="el" href="a06164.html#l00077">NL3D::CPatchDLMPointLight::OOAttDelta</a>, <a class="el" href="a06164.html#l00071">NL3D::CPatchDLMPointLight::OOCosDelta</a>, <a class="el" href="a05701.html#l00138">NLMISC::OptFastFloor24()</a>, <a class="el" href="a05701.html#l00136">NLMISC::OptFastFloorBegin24()</a>, <a class="el" href="a05701.html#l00137">NLMISC::OptFastFloorEnd24()</a>, <a class="el" href="a06164.html#l00063">NL3D::CPatchDLMPointLight::Pos</a>, <a class="el" href="a06164.html#l00106">NL3D::CPatchDLMContext::CVertex::Pos</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a06164.html#l00059">NL3D::CPatchDLMPointLight::R</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CCluster &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CRGBA &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVertex &gt;::size()</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#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l02021">NL3D::CPatch::processDLMLight()</a>.
+<p>
+<div class="fragment"><pre>00649 {
+00650 <a class="code" href="a04558.html#a15">uint</a> nverts= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
+00651 <a class="code" href="a04199.html#a6">nlassert</a>(nverts==<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>());
+00652
+00653 <span class="keywordflow">if</span>(nverts==0)
+00654 <span class="keywordflow">return</span>;
+00655 CVertex *vert= &amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a>[0];
+00656
+00657
+00658 <span class="comment">// precise clip: parse the quadTree of sphere</span>
+00659 <span class="comment">//================</span>
+00660 <a class="code" href="a04558.html#a15">uint</a> i, <a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>;
+00661 <a class="code" href="a04558.html#a15">uint</a> startX, startY, endX, endY;
+00662 startX= 0xFFFFFFFF;
+00663 startY= 0xFFFFFFFF;
+00664 endX= 0;
+00665 endY= 0;
+00666 <span class="keywordflow">for</span>(i=0;i&lt;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();)
+00667 {
+00668 <span class="comment">// If the sphere intersect pl, </span>
+00669 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[i].BSphere.intersect(pl.BSphere) )
+00670 {
+00671 <span class="comment">// if this cluster is a leaf, extend start/end</span>
+00672 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[i].NSkips==0)
+00673 {
+00674 <a class="code" href="a04223.html#a572">x</a>= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[i].X;
+00675 <a class="code" href="a04223.html#a573">y</a>= _Clusters[i].Y;
+00676 startX= <a class="code" href="a04061.html#a0">min</a>(startX, x);
+00677 startY= <a class="code" href="a04061.html#a0">min</a>(startY, y);
+00678 endX= max(endX, x+1);
+00679 endY= max(endY, y+1);
+00680 }
+00681 <span class="comment">// go to next cluster (a brother, a parent or a son)</span>
+00682 i++;
+00683 }
+00684 <span class="keywordflow">else</span>
+00685 {
+00686 <span class="comment">// if this cluster is a leaf, just go to next cluster (a parent or a brother)</span>
+00687 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[i].NSkips==0)
+00688 i++;
+00689 <span class="comment">// else, go to next brother or parent (NSkips say how to go)</span>
+00690 <span class="keywordflow">else</span>
+00691 i+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[i].NSkips;
+00692 }
+00693 }
+00694 <span class="comment">// if never intersect, just quit.</span>
+00695 <span class="keywordflow">if</span>(startX==0xFFFFFFFF)
+00696 <span class="keywordflow">return</span>;
+00697
+00698 <span class="comment">// get vertices in array to process.</span>
+00699 startX*=<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a>;
+00700 startY*=<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a>;
+00701 endX= <a class="code" href="a04061.html#a0">min</a>(endX*NL_DLM_CLIP_FACTOR+1, Width);
+00702 endY= <a class="code" href="a04061.html#a0">min</a>(endY*NL_DLM_CLIP_FACTOR+1, Height);
+00703
+00704 <span class="comment">// TestYoyo only.</span>
+00705 <span class="comment">/*extern uint YOYO_LandDLCount;</span>
+00706 <span class="comment"> YOYO_LandDLCount+= (endX - startX) * (endY - startY);*/</span>
+00707
+00708 <span class="comment">// process all vertices</span>
+00709 <span class="comment">//================</span>
+00710 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a628">r</a>,g,b;
+00711 <a class="code" href="a03337.html">CRGBA</a> *dst= &amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>[0];
+00712 CVertex *originVert= vert;
+00713 <a class="code" href="a03337.html">CRGBA</a> *originDst= dst;
+00714
+00715 <span class="comment">// TestYoyo: finally, precache does not seems to impact final result.</span>
+00716 <span class="comment">// precache loading, for better cache use. NB: precache the entire line, ignoring clip result.</span>
+00717 <span class="comment">// Precache only if interesting.</span>
+00718 <span class="comment">/*if( (endX - startX)*4&gt;=Width &amp;&amp; (endY-startY)&gt;=2)</span>
+00719 <span class="comment"> {</span>
+00720 <span class="comment"> vert= originVert + startY*Width;</span>
+00721 <span class="comment"> dst= originDst + startY*Width;</span>
+00722 <span class="comment"> uint nPixelLine= (endY-startY)*Width;</span>
+00723 <span class="comment"> CFastMem::precacheBest(vert, nPixelLine * sizeof(CVertex));</span>
+00724 <span class="comment"> CFastMem::precacheBest(dst, nPixelLine * sizeof(CRGBA));</span>
+00725 <span class="comment"> }*/</span>
+00726
+00727 <span class="comment">// Start 24 precision, for faster compute.</span>
+00728 <a class="code" href="a05378.html#a399">OptFastFloorBegin24</a>();
+00729
+00730 <span class="comment">// If the pointLight is a spot, compute is more complex/slower</span>
+00731 <span class="keywordflow">if</span>(pl.IsSpot)
+00732 {
+00733 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=startY; <a class="code" href="a04223.html#a573">y</a>&lt;endY; <a class="code" href="a04223.html#a573">y</a>++)
+00734 {
+00735 nverts= endX - startX;
+00736
+00737 vert= originVert + startX + <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>;
+00738 dst= originDst + startX + <a class="code" href="a04223.html#a573">y</a>*Width;
+00739 <span class="keywordflow">for</span>(;nverts&gt;0; nverts--, vert++, dst++)
+00740 {
+00741 CVector dirToP= vert-&gt;Pos - pl.Pos;
+00742 <span class="keywordtype">float</span> dist= dirToP.norm();
+00743 dirToP/= dist;
+00744
+00745 <span class="comment">// compute cos for pl. attenuation</span>
+00746 <span class="keywordtype">float</span> cosSpot= dirToP * pl.Dir;
+00747 <span class="keywordtype">float</span> attSpot= (cosSpot-pl.CosMin) * pl.OOCosDelta;
+00748 <a class="code" href="a05363.html#a454">fastClamp01</a>(attSpot);
+00749
+00750 <span class="comment">// distance attenuation</span>
+00751 <span class="keywordtype">float</span> attDist= (dist-pl.AttMax) * pl.OOAttDelta;
+00752 <a class="code" href="a05363.html#a454">fastClamp01</a>(attDist);
+00753
+00754 <span class="comment">// compute diffuse lighting</span>
+00755 <span class="keywordtype">float</span> diff= -(vert-&gt;Normal * dirToP);
+00756 <a class="code" href="a05363.html#a454">fastClamp01</a>(diff);
+00757
+00758 <span class="comment">// compute colors.</span>
+00759 diff*= attSpot * attDist;
+00760 <a class="code" href="a04223.html#a628">r</a>= pl.R*diff;
+00761 g= pl.G*diff;
+00762 b= pl.B*diff;
+00763
+00764 <a class="code" href="a03337.html">CRGBA</a> col;
+00765 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(r);
+00766 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(g);
+00767 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(b);
+00768
+00769 <span class="comment">// add to map.</span>
+00770 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00771 <span class="preprocessor"></span> <span class="comment">// Fast AddClamp.</span>
+00772 __asm
+00773 {
+00774 mov esi, dst
+00775
+00776 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>
+00777 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>
+00778 sbb cl, cl
+00779 or al, cl
+00780 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>, al
+00781
+00782 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>
+00783 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>
+00784 sbb cl, cl
+00785 or al, cl
+00786 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>, al
+00787
+00788 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>
+00789 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>
+00790 sbb cl, cl
+00791 or al, cl
+00792 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>, al
+00793 }
+00794 <span class="preprocessor">#else</span>
+00795 <span class="preprocessor"></span> <span class="comment">// add and clamp to map.</span>
+00796 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_0">addRGBOnly</a>(*dst, col);
+00797 <span class="preprocessor">#endif</span>
+00798 <span class="preprocessor"></span> }
+00799 }
+00800 }
+00801 <span class="comment">// else, pointLight with no Spot cone attenuation</span>
+00802 <span class="keywordflow">else</span>
+00803 {
+00804 <span class="comment">// TestYoyo</span>
+00805 <span class="comment">/*extern void YOYO_startDLMItCount();</span>
+00806 <span class="comment"> YOYO_startDLMItCount();*/</span>
+00807
+00808 <span class="comment">// Compute lightmap pixels of interest </span>
+00809 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=startY; <a class="code" href="a04223.html#a573">y</a>&lt;endY; <a class="code" href="a04223.html#a573">y</a>++)
+00810 {
+00811 nverts= endX - startX;
+00812
+00813 vert= originVert + startX + <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>;
+00814 dst= originDst + startX + <a class="code" href="a04223.html#a573">y</a>*Width;
+00815 <span class="keywordflow">for</span>(;nverts&gt;0; nverts--, vert++, dst++)
+00816 {
+00817 CVector dirToP= vert-&gt;Pos - pl.Pos;
+00818 <span class="keywordtype">float</span> dist= dirToP.norm();
+00819 <span class="keywordtype">float</span> OODist= 1.0f / dist;
+00820 dirToP*= OODist;
+00821
+00822 <span class="comment">// distance attenuation</span>
+00823 <span class="keywordtype">float</span> attDist= (dist-pl.AttMax) * pl.OOAttDelta;
+00824 <a class="code" href="a05363.html#a454">fastClamp01</a>(attDist);
+00825
+00826 <span class="comment">// compute diffuse lighting</span>
+00827 <span class="keywordtype">float</span> diff= -(vert-&gt;Normal * dirToP);
+00828 <a class="code" href="a05363.html#a454">fastClamp01</a>(diff);
+00829
+00830 <span class="comment">// compute colors.</span>
+00831 diff*= attDist;
+00832 <a class="code" href="a04223.html#a628">r</a>= pl.R*diff;
+00833 g= pl.G*diff;
+00834 b= pl.B*diff;
+00835
+00836 <a class="code" href="a03337.html">CRGBA</a> col;
+00837 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(r);
+00838 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(g);
+00839 col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a401">OptFastFloor24</a>(b);
+00840
+00841 <span class="comment">// add to map.</span>
+00842 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00843 <span class="preprocessor"></span> <span class="comment">// Fast AddClamp.</span>
+00844 __asm
+00845 {
+00846 mov esi, dst
+00847
+00848 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>
+00849 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>
+00850 sbb cl, cl
+00851 or al, cl
+00852 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>, al
+00853
+00854 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>
+00855 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>
+00856 sbb cl, cl
+00857 or al, cl
+00858 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>, al
+00859
+00860 mov al, [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>
+00861 add al, col.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>
+00862 sbb cl, cl
+00863 or al, cl
+00864 mov [esi]dst.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>, al
+00865 }
+00866 <span class="preprocessor">#else</span>
+00867 <span class="preprocessor"></span> <span class="comment">// add and clamp to map.</span>
+00868 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_0">addRGBOnly</a>(*dst, col);
+00869 <span class="preprocessor">#endif</span>
+00870 <span class="preprocessor"></span> }
+00871 }
+00872
+00873 <span class="comment">// TestYoyo</span>
+00874 <span class="comment">/*extern void YOYO_endDLMItCount();</span>
+00875 <span class="comment"> YOYO_endDLMItCount();*/</span>
+00876 }
+00877
+00878 <span class="comment">// Stop 24 bit precision</span>
+00879 <a class="code" href="a05378.html#a400">OptFastFloorEnd24</a>();
+00880
+00881 <span class="comment">// Src texture is modified, hence it can't be black.</span>
+00882 <span class="comment">//==============</span>
+00883 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>= <span class="keyword">false</span>;
+00884 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexth0" doxytag="NL3D::CPatchDLMContext::blendTileToTexture" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::blendTileToTexture </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcPixel</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>srcDeltaX</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>srcDeltaY</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dstPixel</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>dstStride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l01237">1237</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06340.html#l00227">NLMISC::CRGBA::blendFromuiRGBOnly()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l01124">src</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00964">computeTextureFar()</a>.
+<p>
+<div class="fragment"><pre>01238 {
+01239 <span class="comment">// blend the 2x2 tile with the texture.</span>
+01240 <a class="code" href="a03337.html">CRGBA</a> *dst;
+01241 <a class="code" href="a03337.html">CRGBA</a> <a class="code" href="a04223.html#a652">src</a>;
+01242
+01243 <span class="comment">// first line.</span>
+01244 dst= &amp;dstPixel[0]; <a class="code" href="a04223.html#a652">src</a>= srcPixel[0];
+01245 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_3">blendFromuiRGBOnly</a>(*dst, src, <a class="code" href="a04223.html#a652">src</a>.A);
+01246
+01247 dst= &amp;dstPixel[1]; <a class="code" href="a04223.html#a652">src</a>= srcPixel[srcDeltaX];
+01248 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_3">blendFromuiRGBOnly</a>(*dst, src, <a class="code" href="a04223.html#a652">src</a>.A);
+01249
+01250 <span class="comment">// second line.</span>
+01251 dst= &amp;dstPixel[0+dstStride]; <a class="code" href="a04223.html#a652">src</a>= srcPixel[srcDeltaY];
+01252 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_3">blendFromuiRGBOnly</a>(*dst, src, <a class="code" href="a04223.html#a652">src</a>.A);
+01253
+01254 dst= &amp;dstPixel[1+dstStride]; <a class="code" href="a04223.html#a652">src</a>= srcPixel[srcDeltaY+srcDeltaX];
+01255 dst-&gt;<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_3">blendFromuiRGBOnly</a>(*dst, src, <a class="code" href="a04223.html#a652">src</a>.A);
+01256 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta1" doxytag="NL3D::CPatchDLMContext::clearLighting" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::clearLighting </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Fill texture space with Black: RAM texture is updated. NB: full src blackness is cached.
+<p>
+Definition at line <a class="el" href="a06163.html#l00592">592</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00200">_IsSrcTextureFullBlack</a>, <a class="el" href="a06164.html#l00183">_LightMap</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CRGBA &gt;::size()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l02005">NL3D::CPatch::beginDLMLighting()</a>, and <a class="el" href="a06163.html#l00214">generate()</a>.
+<p>
+<div class="fragment"><pre>00593 {
+00594 <span class="comment">// If the srcTexture is not already black.</span>
+00595 <span class="keywordflow">if</span>(!<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>)
+00596 {
+00597 <span class="comment">// Reset Lightmap with black.</span>
+00598 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a>= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>();
+00599 <span class="keywordflow">if</span>(<a class="code" href="a04223.html#a577">count</a>&gt;0)
+00600 {
+00601 memset(&amp;_LightMap[0], 0, count * <span class="keyword">sizeof</span>(<a class="code" href="a03337.html">CRGBA</a>));
+00602 }
+00603
+00604 <span class="comment">// Now the src lightmap is fully black</span>
+00605 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>= <span class="keyword">true</span>;
+00606 }
+00607 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta2" doxytag="NL3D::CPatchDLMContext::compileLighting" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::compileLighting </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4">TCompileType</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>compType</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>modulateCte</em> = <a class="el" href="a03337.html#NLMISC_1_1CRGBAs6">NLMISC::CRGBA::White</a></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>
+update VRAM texture with RAM texture. Uploaded in 16 bits format. NB: full dst blackness is cached. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>compType</em>&nbsp;</td><td>say if, before writing to the texture, the lightmap is modulated with _Patch TileColor, _Patch textureFar (precomputed in the context), modulate with a constant or not modulated at all </td></tr>
+ <tr><td valign=top><em>modulateCte</em>&nbsp;</td><td>used only if compType==ModulateConstant. this is the cte to be modulate by lightmap before copy to texture</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l00888">888</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00175">_DLMTexture</a>, <a class="el" href="a06164.html#l00202">_IsDstTextureFullBlack</a>, <a class="el" href="a06164.html#l00200">_IsSrcTextureFullBlack</a>, <a class="el" href="a06164.html#l00183">_LightMap</a>, <a class="el" href="a06164.html#l00208">_LowResTileColors</a>, <a class="el" href="a06164.html#l00215">_TextureFar</a>, <a class="el" href="a06515.html#l00241">NL3D::CTextureDLM::copyRect()</a>, <a class="el" href="a06515.html#l00257">NL3D::CTextureDLM::fillRect()</a>, <a class="el" href="a06515.html#l00273">NL3D::CTextureDLM::modulateAndfillRect565()</a>, <a class="el" href="a06515.html#l00305">NL3D::CTextureDLM::modulateAndfillRect8888()</a>, <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw0">ModulateConstant</a>, <a class="el" href="a06515.html#l00335">NL3D::CTextureDLM::modulateConstantAndfillRect()</a>, <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw1">ModulateTextureFar</a>, <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw2">ModulateTileColor</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CRGBA &gt;::size()</a>, <a class="el" href="a06164.html#l00117">TextPosX</a>, <a class="el" href="a06164.html#l00117">TextPosY</a>, <a class="el" href="a06156.html#l00343">NL3D::CPatch::TileColors</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00889 {
+00890 <span class="comment">// If srcTexture is full black, and if dst texture is already full black too, don't need to update dst texture</span>
+00891 <span class="keywordflow">if</span>(! (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a> &amp;&amp; <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr3">_IsDstTextureFullBlack</a>) )
+00892 {
+00893 <span class="comment">// if lightMap allocated</span>
+00894 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>()&gt;0 &amp;&amp; <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>)
+00895 {
+00896 <span class="comment">// If the srcTexture is full black (ie no pointLight influence touch it), </span>
+00897 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>)
+00898 {
+00899 <span class="comment">// reset the texture to full black.</span>
+00900 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;fillRect(TextPosX, TextPosY, Width, Height, 0);
+00901 }
+00902 <span class="comment">// else the srcTexture is not full black (ie some pointLight influence touch it), </span>
+00903 <span class="keywordflow">else</span>
+00904 {
+00905 <span class="comment">// if must modulate with tileColor</span>
+00906 <span class="keywordflow">if</span>(compType == <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw2">ModulateTileColor</a>)
+00907 {
+00908 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors.size()&gt;=0);
+00909 <span class="preprocessor"> #ifdef NL_DLM_TILE_RES</span>
+00910 <span class="preprocessor"></span> <span class="comment">// retrieve userColor pointer.</span>
+00911 <a class="code" href="a04558.html#a9">uint16</a> *tileColor= (<a class="code" href="a04558.html#a9">uint16</a>*)(&amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors[0]);
+00912 <span class="preprocessor"> #else</span>
+00913 <span class="preprocessor"></span> <a class="code" href="a04558.html#a9">uint16</a> *tileColor= (<a class="code" href="a04558.html#a9">uint16</a>*)(&amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</a>[0]);
+00914 <span class="preprocessor"> #endif</span>
+00915 <span class="preprocessor"></span>
+00916 <span class="comment">// modulate and fill dest.</span>
+00917 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;modulateAndfillRect565(TextPosX, TextPosY, Width, Height, &amp;_LightMap[0], tileColor);
+00918 }
+00919 <span class="comment">// else if must modulate with textureFar</span>
+00920 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(compType == <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw1">ModulateTextureFar</a>)
+00921 {
+00922 <span class="comment">// modulate and fill dest.</span>
+00923 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;modulateAndfillRect8888(TextPosX, TextPosY, Width, Height, &amp;_LightMap[0], &amp;_TextureFar[0]);
+00924 }
+00925 <span class="comment">// else if must modulate with constante</span>
+00926 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(compType == <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextw4NL3D_1_1CPatchDLMContextw0">ModulateConstant</a>)
+00927 {
+00928 <span class="comment">// modulate and fill dest.</span>
+00929 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;modulateConstantAndfillRect(TextPosX, TextPosY, Width, Height, &amp;_LightMap[0], modulateCte);
+00930 }
+00931 <span class="comment">// else, no Modulate.</span>
+00932 <span class="keywordflow">else</span>
+00933 {
+00934 <span class="comment">// just copy lightmap to texture</span>
+00935 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;copyRect(TextPosX, TextPosY, Width, Height, &amp;_LightMap[0]);
+00936 }
+00937 }
+00938 }
+00939
+00940
+00941 <span class="comment">// copy full black state</span>
+00942 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr3">_IsDstTextureFullBlack</a>= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr4">_IsSrcTextureFullBlack</a>;
+00943 }
+00944 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextd0" doxytag="NL3D::CPatchDLMContext::computeTextureFar" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::computeTextureFar </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="a06163.html#l00964">964</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00208">_LowResTileColors</a>, <a class="el" href="a06164.html#l00215">_TextureFar</a>, <a class="el" href="a06163.html#l01237">blendTileToTexture()</a>, <a class="el" href="a06163.html#l01140">computeTileFarSrcDeltas()</a>, <a class="el" href="a06163.html#l01224">copyTileToTexture()</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06156.html#l00392">NL3D::CPatch::getOrderS()</a>, <a class="el" href="a06156.html#l00393">NL3D::CPatch::getOrderT()</a>, <a class="el" href="a06543.html#l00077">NL3D::CTileFarBank::CTileFar::getPixels()</a>, <a class="el" href="a06543.html#l00129">NL3D::CTileFarBank::getTile()</a>, <a class="el" href="a06540.html#l00064">NL3D::CTileElement::getTile256Info()</a>, <a class="el" href="a06540.html#l00046">NL3D::CTileElement::getTileOrient()</a>, <a class="el" href="a06543.html#l00083">NL3D::CTileFarBank::CTileFar::isFill()</a>, <a class="el" href="a06541.html#l00053">NL_TILE_ELM_LAYER_EMPTY</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CRGBA &gt;::resize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a06541.html#l00077">NL3D::CTileElement::Tile</a>, <a class="el" href="a06156.html#l00343">NL3D::CPatch::TileColors</a>, <a class="el" href="a05863.html#l00146">NL3D::CLandscape::TileFarBank</a>, <a class="el" href="a06156.html#l00340">NL3D::CPatch::Tiles</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>, <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="a06163.html#l00214">generate()</a>.
+<p>
+<div class="fragment"><pre>00965 {
+00966 <span class="comment">// First compute Far at order1 Level (ie 2x2 pixels per tiles).</span>
+00967 <span class="comment">//==================</span>
+00968 <span class="keyword">static</span> vector&lt;CRGBA&gt; tileFars;
+00969 <span class="comment">// Get the FarBank from landscape.</span>
+00970 CTileFarBank &amp;farBank= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getLandscape()-&gt;TileFarBank;
+00971 <span class="comment">// size of the texture.</span>
+00972 <a class="code" href="a04558.html#a15">uint</a> os= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS();
+00973 <a class="code" href="a04558.html#a15">uint</a> ot= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderT();
+00974 <span class="comment">// resize tmp texture. keep a border of 1 pixel around this texture (for average with border)</span>
+00975 <a class="code" href="a04558.html#a15">uint</a> tfWidth= os*2+2;
+00976 <a class="code" href="a04558.html#a15">uint</a> tfHeight= ot*2+2;
+00977 <a class="code" href="a04558.html#a15">uint</a> tfSize= tfWidth * tfHeight;
+00978 tileFars.resize(tfSize);
+00979 <a class="code" href="a03337.html">CRGBA</a> *dst= &amp;tileFars[0];
+00980
+00981 <span class="comment">// default: fill dst with black (for possible non-existing tiles).</span>
+00982 memset(dst, 0, tfSize*<span class="keyword">sizeof</span>(<a class="code" href="a03337.html">CRGBA</a>));
+00983
+00984 <span class="comment">// For all tiles.</span>
+00985 <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>;
+00986 <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;ot; <a class="code" href="a04223.html#a573">y</a>++)
+00987 {
+00988 <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;os;<a class="code" href="a04223.html#a572">x</a>++)
+00989 {
+00990 <span class="comment">// get the tile from patch.</span>
+00991 CTileElement &amp;tileElm= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;Tiles[<a class="code" href="a04223.html#a573">y</a>*os + <a class="code" href="a04223.html#a572">x</a>];
+00992
+00993 <span class="comment">// For all layers</span>
+00994 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a05373.html#a2">l</a>=0; <a class="code" href="a05373.html#a2">l</a>&lt;3;<a class="code" href="a05373.html#a2">l</a>++)
+00995 {
+00996 <a class="code" href="a04558.html#a9">uint16</a> tileId= tileElm.Tile[0];
+00997 <span class="keywordflow">if</span> (tileId!=<a class="code" href="a05118.html#a12">NL_TILE_ELM_LAYER_EMPTY</a>)
+00998 {
+00999 <span class="comment">// Get the read only pointer on the far tile</span>
+01000 <span class="keyword">const</span> CTileFarBank::CTileFar* pTile= farBank.getTile (tileId);
+01001 <span class="comment">// if exist.</span>
+01002 <span class="keywordflow">if</span>(pTile &amp;&amp; pTile-&gt;isFill (CTileFarBank::diffuse))
+01003 {
+01004 <span class="comment">// get tile element information.</span>
+01005 <a class="code" href="a04558.html#a14">sint</a> nRot= tileElm.getTileOrient(l);
+01006 <span class="keywordtype">bool</span> is256x256;
+01007 <a class="code" href="a04558.html#a7">uint8</a> uvOff;
+01008 tileElm.getTile256Info(is256x256, uvOff);
+01009
+01010 <span class="comment">// compute src pixel</span>
+01011 <span class="keyword">const</span> <a class="code" href="a03337.html">CRGBA</a> *srcPixel= pTile-&gt;getPixels(CTileFarBank::diffuse, CTileFarBank::order1);
+01012 <span class="comment">// compute src info, for this tile rot and 256x256 context.</span>
+01013 <a class="code" href="a04558.html#a14">sint</a> srcDeltaX;
+01014 <a class="code" href="a04558.html#a14">sint</a> srcDeltaY;
+01015 srcPixel= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexth1">computeTileFarSrcDeltas</a>(nRot, is256x256, uvOff, srcPixel, srcDeltaX, srcDeltaY);
+01016
+01017 <span class="comment">// compute dst coordinate. start writing at pixel (1,1)</span>
+01018 <a class="code" href="a03337.html">CRGBA</a> *dstPixel= dst + (<a class="code" href="a04223.html#a573">y</a>*2+1)*tfWidth + <a class="code" href="a04223.html#a572">x</a>*2+1;
+01019
+01020 <span class="keywordflow">if</span>(<a class="code" href="a05373.html#a2">l</a>==0)
+01021 {
+01022 <span class="comment">// copy the tile content to the texture.</span>
+01023 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexth2">copyTileToTexture</a>(srcPixel, srcDeltaX, srcDeltaY, dstPixel, tfWidth);
+01024 }
+01025 <span class="keywordflow">else</span>
+01026 {
+01027 <span class="comment">// blend the tile content to the texture.</span>
+01028 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexth0">blendTileToTexture</a>(srcPixel, srcDeltaX, srcDeltaY, dstPixel, tfWidth);
+01029 }
+01030 }
+01031 <span class="keywordflow">else</span>
+01032 <span class="comment">// go to next tile.</span>
+01033 <span class="keywordflow">break</span>;
+01034 }
+01035 <span class="keywordflow">else</span>
+01036 <span class="comment">// go to next tile.</span>
+01037 <span class="keywordflow">break</span>;
+01038 }
+01039 }
+01040 }
+01041
+01042 <span class="comment">/* copy borders pixels from border of current patch</span>
+01043 <span class="comment"> NB: this is not correct, but visually sufficient.</span>
+01044 <span class="comment"> To look on neighbor would be more complex.</span>
+01045 <span class="comment"> */</span>
+01046
+01047 <span class="comment">// copy lines up and down.</span>
+01048 <a class="code" href="a04223.html#a573">y</a>= tfHeight-1;
+01049 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=1;<a class="code" href="a04223.html#a572">x</a>&lt;tfWidth-1;<a class="code" href="a04223.html#a572">x</a>++)
+01050 {
+01051 <span class="comment">// copy line 0 from line 1.</span>
+01052 dst[0*tfWidth + <a class="code" href="a04223.html#a572">x</a>]= dst[1*tfWidth + <a class="code" href="a04223.html#a572">x</a>];
+01053 <span class="comment">// copy last line from last line-1.</span>
+01054 dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + <a class="code" href="a04223.html#a572">x</a>]= dst[(<a class="code" href="a04223.html#a573">y</a>-1)*tfWidth + <a class="code" href="a04223.html#a572">x</a>];
+01055 }
+01056
+01057 <span class="comment">// copy column left and right</span>
+01058 <a class="code" href="a04223.html#a572">x</a>= tfWidth-1;
+01059 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=1;<a class="code" href="a04223.html#a573">y</a>&lt;tfHeight-1;<a class="code" href="a04223.html#a573">y</a>++)
+01060 {
+01061 <span class="comment">// copy column 0 from column 1.</span>
+01062 dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + 0]= dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + 1];
+01063 <span class="comment">// copy last column from last column-1.</span>
+01064 dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + <a class="code" href="a04223.html#a572">x</a>]= dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + <a class="code" href="a04223.html#a572">x</a>-1];
+01065 }
+01066
+01067 <span class="comment">// copy 4 corners</span>
+01068 <a class="code" href="a04223.html#a572">x</a>= tfWidth-1;
+01069 <a class="code" href="a04223.html#a573">y</a>= tfHeight-1;
+01070 <span class="comment">// top-left corner</span>
+01071 dst[0]= dst[1];
+01072 <span class="comment">// top-right corner</span>
+01073 dst[<a class="code" href="a04223.html#a572">x</a>]= dst[<a class="code" href="a04223.html#a572">x</a>-1];
+01074 <span class="comment">// bottom-left corner</span>
+01075 dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + 0]= dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + 1];
+01076 <span class="comment">// bottom-right corner</span>
+01077 dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + <a class="code" href="a04223.html#a572">x</a>]= dst[<a class="code" href="a04223.html#a573">y</a>*tfWidth + <a class="code" href="a04223.html#a572">x</a>-1];
+01078
+01079
+01080 <span class="comment">// Average to DLM resolution (ie OrderS+1, OrderT+1)</span>
+01081 <span class="comment">//==================</span>
+01082 <span class="comment">// resize _TextureFar.</span>
+01083 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr8">_TextureFar</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(Width*Height);
+01084 <a class="code" href="a03337.html">CRGBA</a> *<a class="code" href="a04223.html#a652">src</a>= &amp;tileFars[0];
+01085 dst= &amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr8">_TextureFar</a>[0];
+01086
+01087 <span class="comment">// for all pixels of dst texture.</span>
+01088 <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="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>;<a class="code" href="a04223.html#a573">y</a>++)
+01089 {
+01090 <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="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>;<a class="code" href="a04223.html#a572">x</a>++, dst++)
+01091 {
+01092 <span class="comment">// compute coordinate in tileFars.</span>
+01093 <a class="code" href="a04558.html#a15">uint</a> x2, y2;
+01094 <span class="preprocessor">#ifdef NL_DLM_TILE_RES</span>
+01095 <span class="preprocessor"></span> x2= <a class="code" href="a04223.html#a572">x</a> * 2;
+01096 y2= <a class="code" href="a04223.html#a573">y</a> * 2;
+01097 <span class="preprocessor">#else</span>
+01098 <span class="preprocessor"></span> <span class="comment">// easiest method: sample every 2 tiles.</span>
+01099 x2= <a class="code" href="a04223.html#a572">x</a> * 4;
+01100 y2= <a class="code" href="a04223.html#a573">y</a> * 4;
+01101 <span class="preprocessor">#endif</span>
+01102 <span class="preprocessor"></span>
+01103 <span class="comment">// Average the 4 pixels around this tile corner</span>
+01104 dst-&gt;avg4RGBOnly(src[y2*tfWidth + x2],
+01105 src[y2*tfWidth + x2+1],
+01106 src[(y2+1)*tfWidth + x2],
+01107 src[(y2+1)*tfWidth + x2+1]);
+01108 }
+01109 }
+01110
+01111
+01112 <span class="comment">// Modulate result with TileColors.</span>
+01113 <span class="comment">//==================</span>
+01114 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors.size()&gt;=0);
+01115 <span class="preprocessor"> #ifdef NL_DLM_TILE_RES</span>
+01116 <span class="preprocessor"></span> <span class="comment">// retrieve userColor pointer.</span>
+01117 <a class="code" href="a04558.html#a9">uint16</a> *tileColor= (<a class="code" href="a04558.html#a9">uint16</a>*)(&amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors[0]);
+01118 <span class="preprocessor"> #else</span>
+01119 <span class="preprocessor"></span> <a class="code" href="a04558.html#a9">uint16</a> *tileColor= (<a class="code" href="a04558.html#a9">uint16</a>*)(&amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</a>[0]);
+01120 <span class="preprocessor"> #endif</span>
+01121 <span class="preprocessor"></span>
+01122 <span class="comment">// For all pixels</span>
+01123 dst= &amp;_TextureFar[0];
+01124 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> n= Width*Height; n&gt;0; n--, dst++, tileColor++)
+01125 {
+01126 <a class="code" href="a04558.html#a9">uint16</a> tc= *tileColor;
+01127 <span class="comment">// modulate R.</span>
+01128 dst-&gt;R= ( (tc&gt;&gt;11) * dst-&gt;R)&gt;&gt;5;
+01129 <span class="comment">// modulate G.</span>
+01130 dst-&gt;G= (((tc&gt;&gt;5)&amp;63) * dst-&gt;G)&gt;&gt;6;
+01131 <span class="comment">// modulate B.</span>
+01132 dst-&gt;B= ( (tc&amp;31) * dst-&gt;B)&gt;&gt;5;
+01133 }
+01134
+01135 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexth1" doxytag="NL3D::CPatchDLMContext::computeTileFarSrcDeltas" ></a><p>
+<table class="mdTable" 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="a03337.html">CRGBA</a> * NL3D::CPatchDLMContext::computeTileFarSrcDeltas </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>nRot</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>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>&nbsp;</td>
+ <td class="mdname" nowrap> <em>uvOff</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcPixel</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>srcDeltaX</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>srcDeltaY</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l01140">1140</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00104">sint</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="a06163.html#l00964">computeTextureFar()</a>.
+<p>
+<div class="fragment"><pre>01141 {
+01142 <span class="comment">// NB: code copied from CTextureFar::rebuildRectangle()</span>
+01143
+01144 <span class="comment">// The tileSize at order1 is 2.</span>
+01145 <a class="code" href="a04558.html#a15">uint</a> tileSize= 2;
+01146
+01147 <span class="comment">// Source size</span>
+01148 <a class="code" href="a04558.html#a14">sint</a> sourceSize;
+01149
+01150 <span class="comment">// Source offset (for 256)</span>
+01151 <a class="code" href="a04558.html#a15">uint</a> sourceOffset=0;
+01152
+01153 <span class="comment">// 256 ?</span>
+01154 <span class="keywordflow">if</span> (is256x256)
+01155 {
+01156 <span class="comment">// On the left ?</span>
+01157 <span class="keywordflow">if</span> (uvOff&amp;0x02)
+01158 sourceOffset+=tileSize;
+01159
+01160 <span class="comment">// On the bottom ?</span>
+01161 <span class="keywordflow">if</span> ((uvOff==1)||(uvOff==2))
+01162 sourceOffset+=2*tileSize*tileSize;
+01163
+01164 <span class="comment">// Yes, 256</span>
+01165 sourceSize=tileSize&lt;&lt;1;
+01166 }
+01167 <span class="keywordflow">else</span>
+01168 {
+01169 <span class="comment">// No, 128</span>
+01170 sourceSize=tileSize;
+01171 }
+01172
+01173 <span class="comment">// Compute offset and deltas</span>
+01174 <span class="keywordflow">switch</span> (nRot)
+01175 {
+01176 <span class="keywordflow">case</span> 0:
+01177 <span class="comment">// Source pointers</span>
+01178 srcPixel= srcPixel+sourceOffset;
+01179
+01180 <span class="comment">// Source delta</span>
+01181 srcDeltaX=1;
+01182 srcDeltaY=sourceSize;
+01183 <span class="keywordflow">break</span>;
+01184 <span class="keywordflow">case</span> 1:
+01185 {
+01186 <span class="comment">// Source pointers</span>
+01187 <a class="code" href="a04558.html#a15">uint</a> newOffset=sourceOffset+(tileSize-1);
+01188 srcPixel=srcPixel+newOffset;
+01189
+01190 <span class="comment">// Source delta</span>
+01191 srcDeltaX=sourceSize;
+01192 srcDeltaY=-1;
+01193 }
+01194 <span class="keywordflow">break</span>;
+01195 <span class="keywordflow">case</span> 2:
+01196 {
+01197 <span class="comment">// Destination pointer</span>
+01198 <a class="code" href="a04558.html#a15">uint</a> newOffset=sourceOffset+(tileSize-1)*sourceSize+tileSize-1;
+01199 srcPixel=srcPixel+newOffset;
+01200
+01201 <span class="comment">// Source delta</span>
+01202 srcDeltaX=-1;
+01203 srcDeltaY=-sourceSize;
+01204 }
+01205 <span class="keywordflow">break</span>;
+01206 <span class="keywordflow">case</span> 3:
+01207 {
+01208 <span class="comment">// Destination pointer</span>
+01209 <a class="code" href="a04558.html#a15">uint</a> newOffset=sourceOffset+(tileSize-1)*sourceSize;
+01210 srcPixel=srcPixel+newOffset;
+01211
+01212 <span class="comment">// Source delta</span>
+01213 srcDeltaX=-sourceSize;
+01214 srcDeltaY=1;
+01215 }
+01216 <span class="keywordflow">break</span>;
+01217 }
+01218
+01219 <span class="keywordflow">return</span> srcPixel;
+01220 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexth2" doxytag="NL3D::CPatchDLMContext::copyTileToTexture" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::copyTileToTexture </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcPixel</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>srcDeltaX</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>srcDeltaY</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>dstPixel</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>dstStride</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l01224">1224</a> of file <a class="el" href="a06163.html">patchdlm_context.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="a06163.html#l00964">computeTextureFar()</a>.
+<p>
+<div class="fragment"><pre>01225 {
+01226 <span class="comment">// copy the 2x2 tile to the texture.</span>
+01227
+01228 <span class="comment">// first line.</span>
+01229 dstPixel[0]= srcPixel[0];
+01230 dstPixel[1]= srcPixel[srcDeltaX];
+01231 <span class="comment">// second line.</span>
+01232 dstPixel[0+dstStride]= srcPixel[srcDeltaY];
+01233 dstPixel[1+dstStride]= srcPixel[srcDeltaY+srcDeltaX];
+01234 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta4" doxytag="NL3D::CPatchDLMContext::generate" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::generate </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="mdname" nowrap> <em>patch</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03493.html">CTextureDLM</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>textureDLM</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03063.html">CPatchDLMContextList</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ctxList</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>
+generate: link to patch and allocate texture space, compile vertices etc... The context is also linked to the list, and removed automaticllay at dtor Texture space is filled with black (RAM only) <dl compact><dt><b>Returns:</b></dt><dd>false if cannot allocate texture space for this patch</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06163.html#l00214">214</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00197">_Clusters</a>, <a class="el" href="a06164.html#l00177">_DLMContextList</a>, <a class="el" href="a06164.html#l00175">_DLMTexture</a>, <a class="el" href="a06164.html#l00183">_LightMap</a>, <a class="el" href="a06164.html#l00208">_LowResTileColors</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CPatchDLMContext &gt;::append()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06163.html#l00592">clearLighting()</a>, <a class="el" href="a06539.html#l00048">NL3D::CTileColor::Color565</a>, <a class="el" href="a06163.html#l00964">computeTextureFar()</a>, <a class="el" href="a06515.html#l00164">NL3D::CTextureDLM::createLightMap()</a>, <a class="el" href="a06164.html#l00119">DLMUBias</a>, <a class="el" href="a06164.html#l00119">DLMUScale</a>, <a class="el" href="a06164.html#l00119">DLMVBias</a>, <a class="el" href="a06164.html#l00119">DLMVScale</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="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05385.html#l00090">NLMISC::CAABBox::getCenter()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a06156.html#l00392">NL3D::CPatch::getOrderS()</a>, <a class="el" href="a06156.html#l00393">NL3D::CPatch::getOrderT()</a>, <a class="el" href="a05385.html#l00096">NLMISC::CAABBox::getRadius()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a06164.html#l00121">MaxU8</a>, <a class="el" href="a06164.html#l00122">MaxV8</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06164.html#l00121">MinU8</a>, <a class="el" href="a06164.html#l00122">MinV8</a>, <a class="el" href="a06163.html#l00208">NL_DLM_CLIP_FACTOR</a>, <a class="el" href="a06163.html#l00211">NL_DLM_CLIP_NUM_LEVEL</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06164.html#l00107">NL3D::CPatchDLMContext::CVertex::Normal</a>, <a class="el" href="a06164.html#l00106">NL3D::CPatchDLMContext::CVertex::Pos</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; uint16, false &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CCluster &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CVertex &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CRGBA &gt;::resize()</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CCluster &gt;::size()</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a06164.html#l00117">TextPosX</a>, <a class="el" href="a06164.html#l00117">TextPosY</a>, <a class="el" href="a06156.html#l00343">NL3D::CPatch::TileColors</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a06155.html#l00182">NL3D::CPatch::unpackIntoCache()</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#l01950">NL3D::CPatch::addRefDLMContext()</a>.
+<p>
+<div class="fragment"><pre>00215 {
+00216 <a class="code" href="a04199.html#a6">nlassert</a>(patch);
+00217 <a class="code" href="a04199.html#a6">nlassert</a>(textureDLM);
+00218 <a class="code" href="a04199.html#a6">nlassert</a>(ctxList);
+00219
+00220 <span class="comment">// keep info on patch/landscape.</span>
+00221 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>= patch;
+00222 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>= textureDLM;
+00223 <span class="comment">// append to the list.</span>
+00224 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a>= ctxList;
+00225 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr1">_DLMContextList</a>-&gt;append(<span class="keyword">this</span>);
+00226
+00227 <span class="comment">// Get Texture Size info; </span>
+00228 <span class="preprocessor">#ifdef NL_DLM_TILE_RES</span>
+00229 <span class="preprocessor"></span> <span class="comment">// get coord at cornes of tiles</span>
+00230 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>= (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS())+1;
+00231 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>= (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderT())+1;
+00232 <span class="preprocessor">#else</span>
+00233 <span class="preprocessor"></span> <span class="comment">// get coord at cornes of tessBlocks</span>
+00234 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>= (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS()/2)+1;
+00235 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>= (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderT()/2)+1;
+00236 <span class="preprocessor">#endif</span>
+00237 <span class="preprocessor"></span>
+00238 <span class="comment">// Allocate space in texture</span>
+00239 <span class="keywordflow">if</span>(!<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;createLightMap(Width, Height, TextPosX, TextPosY))
+00240 {
+00241 <span class="comment">// Mark as not allocated.</span>
+00242 <span class="comment">// NB: the context still work with NULL _DLMTexture, but do nothing (excpetionnal case)</span>
+00243 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>= NULL;
+00244 }
+00245
+00246 <span class="comment">// If the lightmap is correclty allocated in the global texture, compute UVBias.</span>
+00247 <span class="keywordflow">if</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>)
+00248 {
+00249 <span class="comment">// Compute patch UV matrix from pixels. Must map to center of pixels.</span>
+00250 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto2">DLMUScale</a>= (<span class="keywordtype">float</span>)(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>-1) / (<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;getWidth();
+00251 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto4">DLMVScale</a>= (<span class="keywordtype">float</span>)(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>-1) / (<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;getHeight();
+00252 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto1">DLMUBias</a>= ((<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto13">TextPosX</a>+0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;getWidth();
+00253 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto3">DLMVBias</a>= ((<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto14">TextPosY</a>+0.5f) / (<span class="keywordtype">float</span>)<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr2">_DLMTexture</a>-&gt;getHeight();
+00254 }
+00255 <span class="keywordflow">else</span>
+00256 {
+00257 <span class="comment">// Build UVBias such that the UVs point to Black</span>
+00258 <span class="comment">// NB: TextureDLM ensure that point (MaxX,MaxY) of texture is black.</span>
+00259 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto2">DLMUScale</a>= 0;
+00260 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto4">DLMVScale</a>= 0;
+00261 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto1">DLMUBias</a>= 1;
+00262 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto3">DLMVBias</a>= 1;
+00263 }
+00264
+00265 <span class="comment">// TestYoyo: to see lightmap usage in the big texture</span>
+00266 <span class="comment">/*DLMUScale= _Patch-&gt;getOrderS();</span>
+00267 <span class="comment"> DLMVScale= _Patch-&gt;getOrderT();</span>
+00268 <span class="comment"> DLMUBias= 0;</span>
+00269 <span class="comment"> DLMVBias= 0;*/</span>
+00270
+00271
+00272 <span class="comment">// Bound 8bits UV for Vegetable. This is to ensure vegetable Dlm UVs won't peek in neighbor lightmaps.</span>
+00273 <a class="code" href="a04558.html#a14">sint</a> tmpU, tmpV;
+00274 <span class="comment">// Bound U minimum</span>
+00275 tmpU= (<a class="code" href="a04558.html#a14">sint</a>)ceil ( (DLMUBias) * 255 );
+00276 <a class="code" href="a05378.html#a374">clamp</a>(tmpU, 0, 255);
+00277 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto8">MinU8</a>= tmpU;
+00278 <span class="comment">// Bound U maximum</span>
+00279 tmpU= (<a class="code" href="a04558.html#a14">sint</a>)floor( (DLMUBias+DLMUScale) * 255 );
+00280 <a class="code" href="a05378.html#a374">clamp</a>(tmpU, (<a class="code" href="a04558.html#a14">sint</a>)MinU8, 255);
+00281 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto6">MaxU8</a>= tmpU;
+00282 <span class="comment">// Bound V minimum</span>
+00283 tmpV= (<a class="code" href="a04558.html#a14">sint</a>)ceil ( (DLMVBias) * 255 );
+00284 <a class="code" href="a05378.html#a374">clamp</a>(tmpV, 0, 255);
+00285 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto9">MinV8</a>= tmpV;
+00286 <span class="comment">// Bound V maximum</span>
+00287 tmpV= (<a class="code" href="a04558.html#a14">sint</a>)floor( (DLMVBias+DLMVScale) * 255 );
+00288 <a class="code" href="a05378.html#a374">clamp</a>(tmpV, (<a class="code" href="a04558.html#a14">sint</a>)MinV8, 255);
+00289 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto7">MaxV8</a>= tmpV;
+00290
+00291
+00292 <span class="comment">// Allocate RAM Lightmap</span>
+00293 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(Width*Height);
+00294
+00295 <span class="comment">// generate Vertices: pos and normals</span>
+00296 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(Width*Height);
+00297 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a626">s</a>, <a class="code" href="a04223.html#a627">t</a>;
+00298 <span class="keywordtype">float</span> ds= 1.0f / (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>-1);
+00299 <span class="keywordtype">float</span> dt= 1.0f / (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>-1);
+00300 <span class="comment">// eval all the patch.</span>
+00301 <a class="code" href="a04223.html#a627">t</a>= 0;
+00302 <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>;
+00303 <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="a03060.html#NL3D_1_1CPatchDLMContexto5">Height</a>; <a class="code" href="a04223.html#a573">y</a>++, <a class="code" href="a04223.html#a627">t</a>+=dt)
+00304 {
+00305 <a class="code" href="a04223.html#a626">s</a>= 0;
+00306 <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="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>; <a class="code" href="a04223.html#a572">x</a>++, <a class="code" href="a04223.html#a626">s</a>+=ds)
+00307 {
+00308 CVertex &amp;vert= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a>[<a class="code" href="a04223.html#a573">y</a>*Width+<a class="code" href="a04223.html#a572">x</a>];
+00309 <span class="comment">// NB: use the bezier patch, and don't take Noise into account, for speed reason.</span>
+00310 CBezierPatch *bpatch= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;unpackIntoCache();
+00311 <span class="comment">// Eval pos.</span>
+00312 vert.Pos= bpatch-&gt;eval(s, t);
+00313 <span class="comment">// Eval Normal.</span>
+00314 vert.Normal= bpatch-&gt;evalNormal(s, t);
+00315 }
+00316 }
+00317
+00318 <span class="comment">// Build bounding Spheres QuadTree</span>
+00319 <span class="comment">//============</span>
+00320
+00321 <span class="comment">// Size of the cluster array (at level 0)</span>
+00322 <a class="code" href="a04558.html#a15">uint</a> bsx, bsy;
+00323 <span class="preprocessor">#ifdef NL_DLM_TILE_RES</span>
+00324 <span class="preprocessor"></span> <span class="comment">// level 0 is at tile level.</span>
+00325 bsx= max(1, (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS())/<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a> );
+00326 bsy= max(1, (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderT())/<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a> );
+00327 <span class="preprocessor">#else</span>
+00328 <span class="preprocessor"></span> <span class="comment">// level 0 is at tessBlock level.</span>
+00329 bsx= max(1, (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS()/2)/<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a> );
+00330 bsy= max(1, (<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderT()/2)/<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a> );
+00331 <span class="preprocessor">#endif</span>
+00332 <span class="preprocessor"></span>
+00333 <span class="comment">// resize bboxes for level 0.</span>
+00334 <span class="keyword">static</span> vector&lt;CAABBox&gt; tmpBBoxes[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00335 tmpBBoxes[0].resize(bsx * bsy);
+00336
+00337 <span class="comment">// Extend all leaves clusters BBoxes with patch coordinates</span>
+00338 <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;bsy;<a class="code" href="a04223.html#a573">y</a>++)
+00339 {
+00340 <span class="comment">// For Y, compute how many patch Positions used to extend bbox.</span>
+00341 <a class="code" href="a04558.html#a15">uint</a> beginY= <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a>;
+00342 <a class="code" href="a04558.html#a15">uint</a> endY= <a class="code" href="a04061.html#a0">min</a>( (y+1)*NL_DLM_CLIP_FACTOR+1, Height);
+00343 <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;bsx;<a class="code" href="a04223.html#a572">x</a>++)
+00344 {
+00345 <span class="comment">// For X, compute how many patch Positions used to extend bbox.</span>
+00346 <a class="code" href="a04558.html#a15">uint</a> beginX= <a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04740.html#a0">NL_DLM_CLIP_FACTOR</a>;
+00347 <a class="code" href="a04558.html#a15">uint</a> endX= <a class="code" href="a04061.html#a0">min</a>((x+1)*NL_DLM_CLIP_FACTOR+1, Width);
+00348 <span class="comment">// Build a bbox.</span>
+00349 CAABBox bbox;
+00350 bbox.setCenter(_Vertices[beginY*Width + beginX].Pos);
+00351 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> yi= beginY; yi&lt;endY; yi++)
+00352 {
+00353 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> xi= beginX; xi&lt;endX; xi++)
+00354 {
+00355 bbox.extend(_Vertices[yi*Width + xi].Pos);
+00356 }
+00357 }
+00358 <span class="comment">// Set the BBox info.</span>
+00359 tmpBBoxes[0][<a class="code" href="a04223.html#a573">y</a>*bsx + <a class="code" href="a04223.html#a572">x</a>]= bbox;
+00360 }
+00361 }
+00362
+00363 <span class="comment">// build parent BSpheres for quadTree hierarchy</span>
+00364 <a class="code" href="a04558.html#a15">uint</a> curLevel= 0;
+00365 <a class="code" href="a04558.html#a15">uint</a> nextLevel= 1;
+00366 <a class="code" href="a04558.html#a15">uint</a> nextBsx= max(1U, bsx/2);
+00367 <a class="code" href="a04558.html#a15">uint</a> nextBsy= max(1U, bsy/2);
+00368 <span class="comment">// the number of cluster Sons, and descendants this cluster level owns.</span>
+00369 <a class="code" href="a04558.html#a15">uint</a> tmpClusterNumToSkip[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00370 <span class="comment">// width for this cluster level.</span>
+00371 <a class="code" href="a04558.html#a15">uint</a> tmpClusterWidth[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00372 <span class="comment">// Number of sons per line/column</span>
+00373 <a class="code" href="a04558.html#a15">uint</a> tmpClusterWSon[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00374 <a class="code" href="a04558.html#a15">uint</a> tmpClusterHSon[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00375 <span class="comment">// Fill level 0 info</span>
+00376 tmpClusterNumToSkip[0]= 0;
+00377 tmpClusterWidth[0]= bsx;
+00378 tmpClusterWSon[0]= 0;
+00379 tmpClusterHSon[0]= 0;
+00380 <a class="code" href="a04558.html#a15">uint</a> finalClusterSize= bsx * bsy;
+00381
+00382 <span class="comment">// If the next level has 1x1 cases, it is not usefull (since same sphere as entire Patch)</span>
+00383 <span class="keywordflow">while</span>(nextBsx * nextBsy &gt; 1 &amp;&amp; nextLevel&lt;<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a> )
+00384 {
+00385 finalClusterSize+= nextBsx * nextBsy;
+00386
+00387 <a class="code" href="a04558.html#a15">uint</a> wSon= (bsx/nextBsx);
+00388 <a class="code" href="a04558.html#a15">uint</a> hSon= (bsy/nextBsy);
+00389 <span class="comment">// compute cluster level info.</span>
+00390 tmpClusterWidth[nextLevel]= nextBsx;
+00391 tmpClusterWSon[nextLevel]= wSon;
+00392 tmpClusterHSon[nextLevel]= hSon;
+00393 <span class="comment">// NB: level 0 has 0 sons to skip, hence level1 must skip (1+0)*4= 4 (wSon==hSon==2)</span>
+00394 <span class="comment">// level2 must skip (1+4)*4= 20 (wSon==hSon==2)</span>
+00395 tmpClusterNumToSkip[nextLevel]= (1+tmpClusterNumToSkip[curLevel]) * wSon * hSon;
+00396
+00397 <span class="comment">// alloc bboxes.</span>
+00398 tmpBBoxes[nextLevel].resize(nextBsx * nextBsy);
+00399
+00400 <span class="comment">// For all cluster of upper level, build bb, as union of finers clusters</span>
+00401 <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;nextBsy;<a class="code" href="a04223.html#a573">y</a>++)
+00402 {
+00403 <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;nextBsx;<a class="code" href="a04223.html#a572">x</a>++)
+00404 {
+00405 <span class="comment">// compute coordinate in curLevel tmpBBoxes to look</span>
+00406 <a class="code" href="a04558.html#a15">uint</a> x2= <a class="code" href="a04223.html#a572">x</a>*wSon;
+00407 <a class="code" href="a04558.html#a15">uint</a> y2= <a class="code" href="a04223.html#a573">y</a>*hSon;
+00408 <span class="comment">// Build a bbox for 4 (or 2) children clusters</span>
+00409 <span class="keywordflow">if</span>(wSon&gt;1 &amp;&amp; hSon&gt;1)
+00410 {
+00411 CAABBox bbox1;
+00412 CAABBox bbox2;
+00413 bbox1= CAABBox::computeAABBoxUnion(
+00414 tmpBBoxes[curLevel][y2*bsx + x2], tmpBBoxes[curLevel][y2*bsx + x2+1]);
+00415 bbox2= CAABBox::computeAABBoxUnion(
+00416 tmpBBoxes[curLevel][(y2+1)*bsx + x2], tmpBBoxes[curLevel][(y2+1)*bsx + x2+1]);
+00417 <span class="comment">// final father bbox.</span>
+00418 tmpBBoxes[nextLevel][<a class="code" href="a04223.html#a573">y</a>*nextBsx + <a class="code" href="a04223.html#a572">x</a>]= CAABBox::computeAABBoxUnion(bbox1, bbox2);
+00419 }
+00420 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(wSon==1)
+00421 {
+00422 CAABBox bbox1;
+00423 bbox1= CAABBox::computeAABBoxUnion(
+00424 tmpBBoxes[curLevel][y2*bsx + x2], tmpBBoxes[curLevel][(y2+1)*bsx + x2]);
+00425 <span class="comment">// final father bbox.</span>
+00426 tmpBBoxes[nextLevel][<a class="code" href="a04223.html#a573">y</a>*nextBsx + <a class="code" href="a04223.html#a572">x</a>]= bbox1;
+00427 }
+00428 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(hSon==1)
+00429 {
+00430 CAABBox bbox1;
+00431 bbox1= CAABBox::computeAABBoxUnion(
+00432 tmpBBoxes[curLevel][y2*bsx + x2], tmpBBoxes[curLevel][y2*bsx + x2+1]);
+00433 <span class="comment">// final father bbox.</span>
+00434 tmpBBoxes[nextLevel][<a class="code" href="a04223.html#a573">y</a>*nextBsx + <a class="code" href="a04223.html#a572">x</a>]= bbox1;
+00435 }
+00436 <span class="keywordflow">else</span>
+00437 <span class="comment">// impossible...</span>
+00438 <a class="code" href="a04199.html#a12">nlstop</a>;
+00439 }
+00440 }
+00441
+00442 <span class="comment">// upper level.</span>
+00443 bsx= nextBsx;
+00444 bsy= nextBsy;
+00445 nextBsx= max(1U, nextBsx/2);
+00446 nextBsy= max(1U, nextBsy/2);
+00447 curLevel++;
+00448 nextLevel++;
+00449 }
+00450
+00451
+00452 <span class="comment">// Resize clusters with size according to all levels</span>
+00453 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(finalClusterSize);
+00454 <a class="code" href="a04558.html#a15">uint</a> iDstCluster= 0;
+00455
+00456 <span class="comment">// Fill cluster hierarchy, in _Clusters.</span>
+00457 <a class="code" href="a04558.html#a15">uint</a> numLevels= nextLevel;
+00458 <span class="comment">// NB: the principle is recursive, but it is "iterated", with a stack-like: tmpClusterX and tmpClusterY;</span>
+00459 <a class="code" href="a04558.html#a15">uint</a> tmpClusterX[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00460 <a class="code" href="a04558.html#a15">uint</a> tmpClusterY[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00461 <a class="code" href="a04558.html#a15">uint</a> tmpClusterXMin[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00462 <a class="code" href="a04558.html#a15">uint</a> tmpClusterYMin[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00463 <a class="code" href="a04558.html#a15">uint</a> tmpClusterXMax[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00464 <a class="code" href="a04558.html#a15">uint</a> tmpClusterYMax[<a class="code" href="a04740.html#a1">NL_DLM_CLIP_NUM_LEVEL</a>];
+00465 <span class="comment">// we start at curLevel (the highest Level), and we must fill all the squares of this level</span>
+00466 tmpClusterX[curLevel]= 0;
+00467 tmpClusterY[curLevel]= 0;
+00468 tmpClusterXMin[curLevel]= 0;
+00469 tmpClusterYMin[curLevel]= 0;
+00470 tmpClusterXMax[curLevel]= bsx;
+00471 tmpClusterYMax[curLevel]= bsy;
+00472 <span class="comment">// while the "root" level is not pop</span>
+00473 <span class="keywordflow">while</span>(curLevel &lt; numLevels)
+00474 {
+00475 <span class="comment">// If we ended with this level (all lines done).</span>
+00476 <span class="keywordflow">if</span>(tmpClusterY[curLevel] &gt;= tmpClusterYMax[curLevel])
+00477 {
+00478 <span class="comment">// Ok, finished with this level, pop up.</span>
+00479 curLevel++;
+00480 <span class="comment">// skip.</span>
+00481 <span class="keywordflow">continue</span>;
+00482 }
+00483
+00484 <a class="code" href="a04199.html#a6">nlassert</a>(iDstCluster&lt;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>());
+00485
+00486 <span class="comment">// get the bbox from current position.</span>
+00487 CAABBox bbox= tmpBBoxes[curLevel][ tmpClusterY[curLevel] * tmpClusterWidth[curLevel] + tmpClusterX[curLevel] ];
+00488 <span class="comment">// Fill _Clusters for this square.</span>
+00489 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].BSphere.Center= bbox.getCenter();
+00490 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].BSphere.Radius= bbox.getRadius();
+00491 <span class="comment">// If leaf level, fill special info</span>
+00492 <span class="keywordflow">if</span>(curLevel == 0)
+00493 {
+00494 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].NSkips= 0;
+00495 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].X= tmpClusterX[0];
+00496 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].Y= tmpClusterY[0];
+00497 }
+00498 <span class="comment">// else, set total number of sons to skips if "invisible"</span>
+00499 <span class="keywordflow">else</span>
+00500 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>[iDstCluster].NSkips= tmpClusterNumToSkip[curLevel];
+00501
+00502 <span class="comment">// next dst cluster</span>
+00503 iDstCluster ++;
+00504
+00505
+00506 <span class="comment">// If not Leaf level, recurs. First pass, use curLevel params (tmpClusterX...)</span>
+00507 <span class="keywordflow">if</span>(curLevel &gt; 0)
+00508 {
+00509 <span class="comment">// compute info for next level.</span>
+00510 tmpClusterXMin[curLevel-1]= tmpClusterX[curLevel] * tmpClusterWSon[curLevel];
+00511 tmpClusterYMin[curLevel-1]= tmpClusterY[curLevel] * tmpClusterHSon[curLevel];
+00512 tmpClusterXMax[curLevel-1]= (tmpClusterX[curLevel]+1) * tmpClusterWSon[curLevel];
+00513 tmpClusterYMax[curLevel-1]= (tmpClusterY[curLevel]+1) * tmpClusterHSon[curLevel];
+00514 <span class="comment">// begin iteration of child level</span>
+00515 tmpClusterX[curLevel-1]= tmpClusterXMin[curLevel-1];
+00516 tmpClusterY[curLevel-1]= tmpClusterYMin[curLevel-1];
+00517 }
+00518
+00519
+00520 <span class="comment">// next square for this level</span>
+00521 tmpClusterX[curLevel]++;
+00522 <span class="comment">// if ended for X.</span>
+00523 <span class="keywordflow">if</span>(tmpClusterX[curLevel] &gt;= tmpClusterXMax[curLevel])
+00524 {
+00525 <span class="comment">// reset X.</span>
+00526 tmpClusterX[curLevel]= tmpClusterXMin[curLevel];
+00527 <span class="comment">// next line.</span>
+00528 tmpClusterY[curLevel]++;
+00529 }
+00530
+00531
+00532 <span class="comment">// If not Leaf level, recurs. Second pass, after tmpClusterX and tmpClusterY of curLevel are changed</span>
+00533 <span class="keywordflow">if</span>(curLevel &gt; 0)
+00534 {
+00535 <span class="comment">// descend in hierarchy. (recurs)</span>
+00536 curLevel--;
+00537 }
+00538
+00539 }
+00540
+00541 <span class="comment">// All dst clusters must have been filled</span>
+00542 <a class="code" href="a04199.html#a6">nlassert</a>(iDstCluster == <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>());
+00543
+00544
+00545 <span class="comment">// PreProcess Patch TileColors.</span>
+00546 <span class="comment">//============</span>
+00547 <span class="comment">// Verify that a CTileColor is nothing more than a 565 color.</span>
+00548 <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keyword">sizeof</span>(CTileColor)==<span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a9">uint16</a>));
+00549 <span class="preprocessor">#ifndef NL_DLM_TILE_RES</span>
+00550 <span class="preprocessor"></span>
+00551 <span class="comment">// retrieve patch tileColor pointer.</span>
+00552 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors.size()&gt;0);
+00553 CTileColor *tileColor= &amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;TileColors[0];
+00554
+00555 <span class="comment">// skip 1 tiles colors per column and per row</span>
+00556 <a class="code" href="a04558.html#a15">uint</a> wTileColor= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>-&gt;getOrderS()+1;
+00557 CTileColor *tcOrigin= tileColor;
+00558 <span class="comment">// alloc _LowResTileColors at same resolution than lightmap</span>
+00559 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1982_1">resize</a>(Width*Height);
+00560 <a class="code" href="a04558.html#a9">uint16</a> *dstLRtc= &amp;<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</a>[0];
+00561
+00562 <span class="comment">// For all lines of dst.</span>
+00563 <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;Height;<a class="code" href="a04223.html#a573">y</a>++)
+00564 {
+00565 <span class="comment">// tileColor start of line.</span>
+00566 tileColor= tcOrigin + <a class="code" href="a04223.html#a573">y</a>*2* wTileColor;
+00567 <a class="code" href="a04558.html#a14">sint</a> npix= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexto15">Width</a>;
+00568 <span class="comment">// for all pixels at corner of tessBlock.</span>
+00569 <span class="keywordflow">for</span>(;npix&gt;0; npix--, tileColor+=2, dstLRtc++)
+00570 {
+00571 *dstLRtc= tileColor-&gt;Color565;
+00572 }
+00573
+00574 }
+00575 <span class="preprocessor">#endif</span>
+00576 <span class="preprocessor"></span>
+00577
+00578 <span class="comment">// compute the TextureFar used for Far dynamic lightmaping.</span>
+00579 <span class="comment">//============</span>
+00580 <span class="comment">// NB: simpler to compute it at generate() time, even if not necessarly needed for near</span>
+00581 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextd0">computeTextureFar</a>();
+00582
+00583
+00584 <span class="comment">// fill texture with Black</span>
+00585 <span class="comment">//============</span>
+00586 <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexta1">clearLighting</a>();
+00587
+00588 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00589 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta5" doxytag="NL3D::CPatchDLMContext::getMemorySize" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::getMemorySize </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="a06163.html#l00948">948</a> of file <a class="el" href="a06163.html">patchdlm_context.cpp</a>.
+<p>
+References <a class="el" href="a06164.html#l00197">_Clusters</a>, <a class="el" href="a06164.html#l00183">_LightMap</a>, <a class="el" href="a06164.html#l00208">_LowResTileColors</a>, <a class="el" href="a06164.html#l00215">_TextureFar</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint16, false &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CCluster &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CRGBA &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVertex &gt;::size()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03583">NL3D::CLandscape::getDynamicLightingMemoryLoad()</a>.
+<p>
+<div class="fragment"><pre>00949 {
+00950 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a>= <span class="keyword">sizeof</span>(<a class="code" href="a03060.html#NL3D_1_1CPatchDLMContexta3">CPatchDLMContext</a>);
+00951 <a class="code" href="a04223.html#a587">size</a>+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr9">_Vertices</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>() * <span class="keyword">sizeof</span>(CVertex);
+00952 <a class="code" href="a04223.html#a587">size</a>+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr5">_LightMap</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>() * <span class="keyword">sizeof</span>(<a class="code" href="a03337.html">CRGBA</a>);
+00953 <a class="code" href="a04223.html#a587">size</a>+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr0">_Clusters</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>() * <span class="keyword">sizeof</span>(CCluster);
+00954 <a class="code" href="a04223.html#a587">size</a>+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr8">_TextureFar</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>() * <span class="keyword">sizeof</span>(<a class="code" href="a03337.html">CRGBA</a>);
+00955 <span class="preprocessor">#ifndef NL_DLM_TILE_RES</span>
+00956 <span class="preprocessor"></span> <a class="code" href="a04223.html#a587">size</a>+= <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr6">_LowResTileColors</a>.<a class="code" href="a03000.html#NLMISC_1_1CObjectVectorz1984_3">size</a>() * <span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a9">uint16</a>);
+00957 <span class="preprocessor">#endif</span>
+00958 <span class="preprocessor"></span>
+00959 <span class="keywordflow">return</span> <a class="code" href="a04223.html#a587">size</a>;
+00960 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexta6" doxytag="NL3D::CPatchDLMContext::getPatch" ></a><p>
+<table class="mdTable" 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::CPatchDLMContext::getPatch </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="a06164.html#l00164">164</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, and <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>00164 {<span class="keywordflow">return</span> <a class="code" href="a03060.html#NL3D_1_1CPatchDLMContextr7">_Patch</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr0" doxytag="NL3D::CPatchDLMContext::_Clusters" ></a><p>
+<table class="mdTable" 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="a03061.html">CCluster</a>&gt; <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr0">NL3D::CPatchDLMContext::_Clusters</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Bounding Sphere QuadTree (with NSkips paradigm).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00197">197</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00648">addPointLightInfluence()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00948">getMemorySize()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr1" doxytag="NL3D::CPatchDLMContext::_DLMContextList" ></a><p>
+<table class="mdTable" 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="a03063.html">CPatchDLMContextList</a>* <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr1">NL3D::CPatchDLMContext::_DLMContextList</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="a06164.html#l00177">177</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00185">~CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr2" doxytag="NL3D::CPatchDLMContext::_DLMTexture" ></a><p>
+<table class="mdTable" 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="a03493.html">CTextureDLM</a>* <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr2">NL3D::CPatchDLMContext::_DLMTexture</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The DLM texture (only one per landscape).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00175">175</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00185">~CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr3" doxytag="NL3D::CPatchDLMContext::_IsDstTextureFullBlack" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContextr3">NL3D::CPatchDLMContext::_IsDstTextureFullBlack</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="a06164.html#l00202">202</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, and <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr4" doxytag="NL3D::CPatchDLMContext::_IsSrcTextureFullBlack" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContextr4">NL3D::CPatchDLMContext::_IsSrcTextureFullBlack</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="a06164.html#l00200">200</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00648">addPointLightInfluence()</a>, <a class="el" href="a06163.html#l00592">clearLighting()</a>, <a class="el" href="a06163.html#l00888">compileLighting()</a>, and <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr5" doxytag="NL3D::CPatchDLMContext::_LightMap" ></a><p>
+<table class="mdTable" 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="a03337.html">CRGBA</a>&gt; <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr5">NL3D::CPatchDLMContext::_LightMap</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The computed lightmap: Width*Height.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00183">183</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00648">addPointLightInfluence()</a>, <a class="el" href="a06163.html#l00592">clearLighting()</a>, <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00948">getMemorySize()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr6" doxytag="NL3D::CPatchDLMContext::_LowResTileColors" ></a><p>
+<table class="mdTable" 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="a04558.html#a9">uint16</a>, false&gt; <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr6">NL3D::CPatchDLMContext::_LowResTileColors</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="a06164.html#l00208">208</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00964">computeTextureFar()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00948">getMemorySize()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr7" doxytag="NL3D::CPatchDLMContext::_Patch" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContextr7">NL3D::CPatchDLMContext::_Patch</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The patch which owns us.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00173">173</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr8" doxytag="NL3D::CPatchDLMContext::_TextureFar" ></a><p>
+<table class="mdTable" 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="a03337.html">CRGBA</a>&gt; <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr8">NL3D::CPatchDLMContext::_TextureFar</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The TextureFar (at tile level or less), which is always computed at <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexta4">generate()</a>. NB: Real compute is TextureFar*UserColor, so it need only to be modulated by lightmap each frame.
+<p>
+Definition at line <a class="el" href="a06164.html#l00215">215</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00964">computeTextureFar()</a>, and <a class="el" href="a06163.html#l00948">getMemorySize()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContextr9" doxytag="NL3D::CPatchDLMContext::_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="a03000.html">NLMISC::CObjectVector</a>&lt;<a class="el" href="a03062.html">CVertex</a>&gt; <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContextr9">NL3D::CPatchDLMContext::_Vertices</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Bezier Patch Array information: Width*Height.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00180">180</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto0" doxytag="NL3D::CPatchDLMContext::CurPointLightCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto0">NL3D::CPatchDLMContext::CurPointLightCount</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="a06164.html#l00128">128</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l02005">NL3D::CPatch::beginDLMLighting()</a>, <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>, and <a class="el" href="a06157.html#l02021">NL3D::CPatch::processDLMLight()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto1" doxytag="NL3D::CPatchDLMContext::DLMUBias" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto1">NL3D::CPatchDLMContext::DLMUBias</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Mapping to this rectangle from 0-1 basis.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00119">119</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">NL3D::CPatch::fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">NL3D::CPatch::fillFar1VertexVB()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, and <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto2" doxytag="NL3D::CPatchDLMContext::DLMUScale" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto2">NL3D::CPatchDLMContext::DLMUScale</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Mapping to this rectangle from 0-1 basis.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00119">119</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">NL3D::CPatch::fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">NL3D::CPatch::fillFar1VertexVB()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, and <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto3" doxytag="NL3D::CPatchDLMContext::DLMVBias" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto3">NL3D::CPatchDLMContext::DLMVBias</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Mapping to this rectangle from 0-1 basis.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00119">119</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">NL3D::CPatch::fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">NL3D::CPatch::fillFar1VertexVB()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, and <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto4" doxytag="NL3D::CPatchDLMContext::DLMVScale" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto4">NL3D::CPatchDLMContext::DLMVScale</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Mapping to this rectangle from 0-1 basis.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00119">119</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l00946">NL3D::CPatch::fillFar0VertexVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01022">NL3D::CPatch::fillFar1VertexVB()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, and <a class="el" href="a06497.html#l00655">NL3D::CTessFace::initTileUvDLM()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto5" doxytag="NL3D::CPatchDLMContext::Height" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto5">NL3D::CPatchDLMContext::Height</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+DLM info The position and size of the DLM in the texture, in pixels.
+<p>
+Definition at line <a class="el" href="a06164.html#l00117">117</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto6" doxytag="NL3D::CPatchDLMContext::MaxU8" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto6">NL3D::CPatchDLMContext::MaxU8</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+texture coordinate bound in 8 bits. Important for Vegetable special DLM mapping
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00121">121</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto7" doxytag="NL3D::CPatchDLMContext::MaxV8" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto7">NL3D::CPatchDLMContext::MaxV8</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="a06164.html#l00122">122</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto8" doxytag="NL3D::CPatchDLMContext::MinU8" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto8">NL3D::CPatchDLMContext::MinU8</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+texture coordinate bound in 8 bits. Important for Vegetable special DLM mapping
+<p>
+
+<p>
+Definition at line <a class="el" href="a06164.html#l00121">121</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto9" doxytag="NL3D::CPatchDLMContext::MinV8" ></a><p>
+<table class="mdTable" 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="a03060.html#NL3D_1_1CPatchDLMContexto9">NL3D::CPatchDLMContext::MinV8</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="a06164.html#l00122">122</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableSortBlocko0" doxytag="NL3D::CPatchDLMContext::Next" ></a><p>
+<table class="mdTable" 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="a02718.html">CTessNodeList</a>* <a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko0">NL3D::CTessNodeList::Next</a><code> [inherited]</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="a06496.html#l00044">44</a> of file <a class="el" href="a06496.html">tess_list.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06161.html#l01329">NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01311">NL3D::CPatch::computeGeomorphFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01359">NL3D::CPatch::computeGeomorphTileVertexListVB()</a>, <a class="el" href="a06161.html#l01298">NL3D::CPatch::computeGeomorphVertexList()</a>, <a class="el" href="a06161.html#l00893">NL3D::CPatch::debugAllocationMarkIndicesFarList()</a>, <a class="el" href="a06161.html#l00904">NL3D::CPatch::debugAllocationMarkIndicesNearList()</a>, <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01161">NL3D::CPatch::fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01173">NL3D::CPatch::fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">NL3D::CPatch::fillTileVertexListVB()</a>, <a class="el" href="a05862.html#l03583">NL3D::CLandscape::getDynamicLightingMemoryLoad()</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="a05862.html#l00605">NL3D::CLandscape::refine()</a>, <a class="el" href="a06698.html#l01713">NL3D::CVegetableManager::render()</a>, <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>, <a class="el" href="a06161.html#l00744">NL3D::CPatch::updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">NL3D::CPatch::updateFar1VBAlloc()</a>, <a class="el" href="a06704.html#l00074">NL3D::CVegetableSortBlock::updateSortBlock()</a>, and <a class="el" href="a06161.html#l00774">NL3D::CPatch::updateTileVBAlloc()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto11" doxytag="NL3D::CPatchDLMContext::OldPointLightCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto11">NL3D::CPatchDLMContext::OldPointLightCount</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Lighting Process: number of light contribution to this patch in last rneder, and in cur Render. Modified by <a class="el" href="a03057.html">CPatch</a> and <a class="el" href="a02702.html">CLandscape</a>
+<p>
+Definition at line <a class="el" href="a06164.html#l00127">127</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06157.html#l02005">NL3D::CPatch::beginDLMLighting()</a>, <a class="el" href="a06163.html#l00171">CPatchDLMContext()</a>, and <a class="el" href="a06157.html#l02035">NL3D::CPatch::endDLMLighting()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableSortBlocko1" doxytag="NL3D::CPatchDLMContext::Prec" ></a><p>
+<table class="mdTable" 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="a02718.html">CTessNodeList</a>* <a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko1">NL3D::CTessNodeList::Prec</a><code> [inherited]</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="a06496.html#l00043">43</a> of file <a class="el" href="a06496.html">tess_list.h</a>.
+<p>
+Referenced by <a class="el" href="a06496.html#l00046">NL3D::CTessNodeList::CTessNodeList()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto13" doxytag="NL3D::CPatchDLMContext::TextPosX" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto13">NL3D::CPatchDLMContext::TextPosX</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+DLM info The position and size of the DLM in the texture, in pixels.
+<p>
+Definition at line <a class="el" href="a06164.html#l00117">117</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00185">~CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto14" doxytag="NL3D::CPatchDLMContext::TextPosY" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto14">NL3D::CPatchDLMContext::TextPosY</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+DLM info The position and size of the DLM in the texture, in pixels.
+<p>
+Definition at line <a class="el" href="a06164.html#l00117">117</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>.
+<p>
+Referenced by <a class="el" href="a06163.html#l00888">compileLighting()</a>, <a class="el" href="a06163.html#l00214">generate()</a>, and <a class="el" href="a06163.html#l00185">~CPatchDLMContext()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchDLMContexto15" doxytag="NL3D::CPatchDLMContext::Width" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03060.html#NL3D_1_1CPatchDLMContexto15">NL3D::CPatchDLMContext::Width</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+DLM info The position and size of the DLM in the texture, in pixels.
+<p>
+Definition at line <a class="el" href="a06164.html#l00117">117</a> of file <a class="el" href="a06164.html">patchdlm_context.h</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06164.html">patchdlm_context.h</a><li><a class="el" href="a06163.html">patchdlm_context.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:00:53 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>