aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03680.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a03680.html')
-rw-r--r--docs/doxygen/nel/a03680.html5048
1 files changed, 5048 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03680.html b/docs/doxygen/nel/a03680.html
new file mode 100644
index 00000000..3ca233d3
--- /dev/null
+++ b/docs/doxygen/nel/a03680.html
@@ -0,0 +1,5048 @@
+<!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::CVegetableManager 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::CVegetableManager Class Reference</h1><code>#include &lt;<a class="el" href="a06699.html">vegetable_manager.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Manager of vegetable. Instance Factory and rendering. A VegetableManager should be put into a <a class="el" href="a03348.html">CScene</a> model which is Opaque (ie rendered in Opaque pass), and call vegetableManager::render() at this time. a good example is <a class="el" href="a02702.html">CLandscape</a>.<p>
+Because during <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render()</a>, it uses and setup special "Vegetable Blend Layer models" to render transparents alpha blended vegetables. Toses models are transparent so they are drawn during the transparent pass of the renderTrav's <a class="el" href="a03348.html">CScene</a> (so after the Opaque pass).<p>
+<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00075">75</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>UpdateLighting management</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate <a href="#NL3D_1_1CVegetableManagerz1128_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_1">updateInstanceLighting</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, <a class="el" href="a04558.html#a15">uint</a> rdrPassId, <a class="el" href="a04558.html#a15">uint</a> instanceId)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_2">updateLightingIGPart</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="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate <a href="#NL3D_1_1CVegetableManagerz1128_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current instance to render in the first ig to update: rdrpass/instanceId. <a href="#NL3D_1_1CVegetableManagerz1128_4"></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="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frequency of update. <a href="#NL3D_1_1CVegetableManagerz1128_5"></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="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sum of all ig vertices to update. <a href="#NL3D_1_1CVegetableManagerz1128_6"></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="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current number of vertices to update. If negative, I have some advance. <a href="#NL3D_1_1CVegetableManagerz1128_7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate <a href="#NL3D_1_1CVegetableManagerz1128_9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the priority list of ig to update <a href="#NL3D_1_1CVegetableManagerz1128_10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">update lighting according to _ULNVerticesToUpdate <a href="#NL3D_1_1CVegetableManagerz1128_11"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>CVegetableBlendLayerModel mgt.</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_0">exitRenderStateForBlendLayerModel</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_1">setupRenderStateForBlendLayerModel</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">called by <a class="el" href="a03672.html">CVegetableBlendLayerModel</a>. <a href="#NL3D_1_1CVegetableManagerz1126_1"></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="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For Alpha Blend rdrPass, ordering into layers. <a href="#NL3D_1_1CVegetableManagerz1126_2"></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="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03672.html">CVegetableBlendLayerModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03672.html">CVegetableBlendLayerModel</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03348.html">CScene</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a></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="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> { <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a> = 0,
+<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>,
+<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>,
+<a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4">VegetInfoLast</a>
+ }</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Micro vegetation position against Water. Above water is the default. <a href="#NL3D_1_1CVegetableManagerw2">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="a03680.html#NL3D_1_1CVegetableManagera0">createVegetableBlendLayersModels</a> (<a class="el" href="a03348.html">CScene</a> *scene)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagera1">CVegetableManager</a> (<a class="el" href="a04558.html#a15">uint</a> maxVertexVbHardUnlit, <a class="el" href="a04558.html#a15">uint</a> maxVertexVbHardLighted, <a class="el" href="a04558.html#a15">uint</a> nbBlendLayers=20, float blendLayerDistMax=60.f)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagera2">~CVegetableManager</a> ()</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Adding Instances to an Ig.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, <a class="el" href="a03682.html">CVegetableShape</a> *shape, const <a class="el" href="a02851.html">NLMISC::CMatrix</a> &amp;mat, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;ambientColor, const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;diffuseColor, float bendFactor, float bendPhase, float bendFreqFactor, float blendDistMax, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, <a class="el" href="a03685.html">CVegetableUV8</a> dlmUV)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances</a> (<a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;vegetIgReserve, <a class="el" href="a03682.html">CVegetableShape</a> *shape, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, <a class="el" href="a04558.html#a15">uint</a> numInstances)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig, const <a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;vegetIgReserve)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">instance management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_0">createClipBlock</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a clipBlock where SortBlock will be created. <a href="#NL3D_1_1CVegetableManagerz1110_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_1">createIg</a> (<a class="el" href="a03684.html">CVegetableSortBlock</a> *sortBlock)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_2">createSortBlock</a> (<a class="el" href="a03673.html">CVegetableClipBlock</a> *clipBlock, const <a class="el" href="a03128.html">CVector</a> &amp;center, float radius)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_3">deleteClipBlock</a> (<a class="el" href="a03673.html">CVegetableClipBlock</a> *clipBlock)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete such a clipBlock. all sortBlocks and so all ig must be deleted before. <a href="#NL3D_1_1CVegetableManagerz1110_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_4">deleteIg</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *ig)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1110_5">deleteSortBlock</a> (<a class="el" href="a03684.html">CVegetableSortBlock</a> *sortBlock)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete such a SortBlock. all ig must be deleted before. <a href="#NL3D_1_1CVegetableManagerz1110_5"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Profile</div></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="a03680.html#NL3D_1_1CVegetableManagerz1120_0">getNumVegetableFaceRendered</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the number of faces rendered by the vegetable manager <a href="#NL3D_1_1CVegetableManagerz1120_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1120_1">resetNumVegetableFaceRendered</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set to 0 the number of faces rendered <a href="#NL3D_1_1CVegetableManagerz1120_1"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Shape management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1108_0">getVegetableShape</a> (const std::string &amp;shape)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load a shape if necessary, and return a shapeId for this shape. <a href="#NL3D_1_1CVegetableManagerz1108_0"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">render</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_0">loadTexture</a> (<a class="el" href="a03487.html">ITexture</a> *itex)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup a global texture used for all vegetables (smartPtr-ized). <a href="#NL3D_1_1CVegetableManagerz1114_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_1">loadTexture</a> (const std::string &amp;texName)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load a global texture used for all vegetables (lookup into CPath). <a href="#NL3D_1_1CVegetableManagerz1114_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render</a> (const <a class="el" href="a03128.html">CVector</a> &amp;viewCenter, const <a class="el" href="a03128.html">CVector</a> &amp;frontVector, const std::vector&lt; <a class="el" href="a03082.html">CPlane</a> &gt; &amp;pyramid, <a class="el" href="a03487.html">ITexture</a> *textureDLM, <a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_4">setDirectionalLight</a> (const <a class="el" href="a03337.html">CRGBA</a> &amp;ambient, const <a class="el" href="a03337.html">CRGBA</a> &amp;diffuse, const <a class="el" href="a03128.html">CVector</a> &amp;light)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup the directional light <a href="#NL3D_1_1CVegetableManagerz1114_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">unlock any AGP vertex buffers <a href="#NL3D_1_1CVegetableManagerz1114_5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_6">updateDriver</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">must give a driver to the vegetableManager, before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a>. <a href="#NL3D_1_1CVegetableManagerz1114_6"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Wind animation</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_0">setTime</a> (double time)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_1">setWind</a> (const <a class="el" href="a03128.html">CVector</a> &amp;windDir, float windFreq, float windPower, float windBendMin)</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">UpdateLighting management</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_0">setUpdateLightingFrequency</a> (float freq)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_1">setUpdateLightingTime</a> (double time)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_3">updateLightingAll</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef TShapeMap::iterator&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagery0">ItShapeMap</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
+ <a class="el" href="a03682.html">CVegetableShape</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagery1">TShapeMap</a></td></tr>
+
+<tr><td colspan=2><br><h2>Private Member Functions</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="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a> (<a class="el" href="a03682.html">CVegetableShape</a> *shape, <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a> vegetWaterState, bool &amp;instanceLighted, bool &amp;instanceDoubleSided, bool &amp;instanceZSort, bool &amp;destLighted, bool &amp;precomputeLighting)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the rdrPass and other info for a given shape. <a href="#NL3D_1_1CVegetableManagerd0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a> (<a class="el" href="a04558.html#a15">uint</a> rdrPass, <a class="el" href="a04558.html#a15">uint</a> vbHardMode)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the good allocator for the appropriate rdr pass. <a href="#NL3D_1_1CVegetableManagerd1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd2">initVertexProgram</a> (<a class="el" href="a04558.html#a15">uint</a> vpType)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">init the ith vertexProgram. <a href="#NL3D_1_1CVegetableManagerd2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a> (<a class="el" href="a02434.html">IDriver</a> *driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setup the vertexProgram constants. <a href="#NL3D_1_1CVegetableManagerd3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a> (<a class="el" href="a03674.html">CVegetableInstanceGroup</a> *, <a class="el" href="a04558.html#a15">uint</a> rdrPass)</td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a> (<a class="el" href="a04558.html#a15">uint</a> rdrPass)</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="a03064.html">CTessList</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03064.html">CTessList</a>&lt; <a class="el" href="a03673.html">CVegetableClipBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03674.html">CVegetableInstanceGroup</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03321.html">NLMISC::CRefPtr</a>&lt; <a class="el" href="a02434.html">IDriver</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</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="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">profile <a href="#NL3D_1_1CVegetableManagerr8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03680.html#NL3D_1_1CVegetableManagery1">TShapeMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02274.html">NLMISC::CBlockMemory</a>&lt; <a class="el" href="a03684.html">CVegetableSortBlock</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a> [CVegetableVBAllocator::VBTypeCount]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03686.html">CVegetableVBAllocator</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a> [CVegetableVBAllocator::VBTypeCount]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02839.html">CMaterial</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03702.html">CVertexProgram</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a> [NL3D_VEGETABLE_NRDRPASS]</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Misc data to setup renderState (computed at each render())</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_1">_BkupFog</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02851.html">NLMISC::CMatrix</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">_ViewCenter</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Wind animation</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03660.html">NLMISC::CVector2f</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03660.html">NLMISC::CVector2f</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a> [NL3D_VEGETABLE_VP_LUT_SIZE]</td></tr>
+
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a></td></tr>
+
+</table>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagery0" doxytag="NL3D::CVegetableManager::ItShapeMap" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> typedef TShapeMap::iterator <a class="el" href="a03680.html#NL3D_1_1CVegetableManagery0">NL3D::CVegetableManager::ItShapeMap</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="a06699.html#l00301">301</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00781">getVegetableShape()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagery1" doxytag="NL3D::CVegetableManager::TShapeMap" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> typedef std::map&lt;std::string, <a class="el" href="a03682.html">CVegetableShape</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagery1">NL3D::CVegetableManager::TShapeMap</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="a06699.html#l00300">300</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagerw2" doxytag="NL3D::CVegetableManager::TVegetableWater" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerw2">NL3D::CVegetableManager::TVegetableWater</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Micro vegetation position against Water. Above water is the default.
+<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_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0" doxytag="AboveWater" ></a>AboveWater</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3" doxytag="UnderWater" ></a>UnderWater</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1" doxytag="IntersectWater" ></a>IntersectWater</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4" doxytag="VegetInfoLast" ></a>VegetInfoLast</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00079">79</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+<div class="fragment"><pre>00079 { <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a> = 0, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw4">VegetInfoLast</a> };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagera1" doxytag="NL3D::CVegetableManager::CVegetableManager" ></a><p>
+<table class="mdTable" 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::CVegetableManager::CVegetableManager </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>maxVertexVbHardUnlit</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>maxVertexVbHardLighted</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>nbBlendLayers</em> = 20, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>blendLayerDistMax</em> = 60.f</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>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>maxVertexVbHardUnlit</em>&nbsp;</td><td>maximum VertexCount in VBHard for Unlit (or precomputed lighted) vegetables </td></tr>
+ <tr><td valign=top><em>maxVertexVbHardLighted</em>&nbsp;</td><td>maximum VertexCount in VBHard for Lighted vegetables </td></tr>
+ <tr><td valign=top><em>nbBlendLayers</em>&nbsp;</td><td>for ZSort/AlphaBlend rdrPass: number of layers of vegetables rendered independently. </td></tr>
+ <tr><td valign=top><em>blendLayerDistMax</em>&nbsp;</td><td>for ZSort/AlphaBlend rdrPass: distance of the farest layer.</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00058">58</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00361">_WindPrecRenderTime</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06708.html#l00072">NL3D::CVegetableVBAllocator::init()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a06698.html#l00052">NL3D_VEGETABLE_CLIP_BLOCK_BLOCKSIZE</a>, <a class="el" href="a06698.html#l00054">NL3D_VEGETABLE_INSTANCE_GROUP_BLOCKSIZE</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06698.html#l00053">NL3D_VEGETABLE_SORT_BLOCK_BLOCKSIZE</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a06339.html#l00066">NLMISC::CRGBA::set()</a>, <a class="el" href="a05641.html#l00078">NL3D::CMaterial::setAlphaTest()</a>, <a class="el" href="a05641.html#l00091">NL3D::CMaterial::setBlendFunc()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00059 :
+00060 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>(NL3D_VEGETABLE_CLIP_BLOCK_BLOCKSIZE),
+00061 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>(NL3D_VEGETABLE_SORT_BLOCK_BLOCKSIZE),
+00062 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>(NL3D_VEGETABLE_INSTANCE_GROUP_BLOCKSIZE),
+00063 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>(nbBlendLayers), <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a>(blendLayerDistMax),
+00064 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>(NULL)
+00065 {
+00066 <a class="code" href="a04558.html#a15">uint</a> i;
+00067
+00068 <span class="comment">// Init all the allocators</span>
+00069 <a class="code" href="a04199.html#a6">nlassert</a>((<a class="code" href="a04558.html#a15">uint</a>)(CVegetableVBAllocator::VBTypeCount) == 2);
+00070 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted].init( CVegetableVBAllocator::VBTypeLighted, maxVertexVbHardLighted );
+00071 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit].init( CVegetableVBAllocator::VBTypeUnlit, maxVertexVbHardUnlit );
+00072 <span class="comment">// Init soft one, with no vbHard vertices.</span>
+00073 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted].init( CVegetableVBAllocator::VBTypeLighted, 0 );
+00074 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit].init( CVegetableVBAllocator::VBTypeUnlit, 0 );
+00075
+00076 <span class="comment">// NB Vertex programs are initilized during the first call to update driver.</span>
+00077
+00078 <span class="comment">// setup the material. Unlit (doesn't matter, lighting in VP) Alpha Test.</span>
+00079 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.initUnlit();
+00080 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTest(<span class="keyword">true</span>);
+00081 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlendFunc(CMaterial::srcalpha, CMaterial::invsrcalpha);
+00082
+00083 <span class="comment">// default light.</span>
+00084 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>= (CVector(0,1, -1)).normed();
+00085 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a>.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(64, 64, 64, 255);
+00086 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a>.<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(150, 150, 150, 255);
+00087
+00088 <span class="comment">// Wind.</span>
+00089 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.set(1,0,0);
+00090 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>= 1;
+00091 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>= 1;
+00092 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>= 0;
+00093 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>= 0;
+00094 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>= 0;
+00095 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>= 0;
+00096
+00097 <span class="comment">// Init CosTable.</span>
+00098 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
+00099 {
+00100 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a>[i]= (<span class="keywordtype">float</span>)cos( i*2*Pi / NL3D_VEGETABLE_VP_LUT_SIZE );
+00101 }
+00102
+00103 <span class="comment">// init to NULL _ZSortModelLayers.</span>
+00104 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>= max(1U, _NumZSortBlendLayers);
+00105 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>.resize(_NumZSortBlendLayers, NULL);
+00106 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>.resize(_NumZSortBlendLayers, NULL);
+00107
+00108
+00109 <span class="comment">// UL</span>
+00110 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a>= 0;
+00111 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>=0;
+00112 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>= 0;
+00113 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= NULL;
+00114 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
+00115 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+00116 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= 0;
+00117 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>= <span class="keyword">false</span>;
+00118 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>= 0;
+00119
+00120 <span class="comment">// Misc.</span>
+00121 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= 0;
+00122
+00123 std::fill(_VertexProgram, _VertexProgram + NL3D_VEGETABLE_NRDRPASS, (CVertexProgram *) NULL);
+00124
+00125 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagera2" doxytag="NL3D::CVegetableManager::~CVegetableManager" ></a><p>
+<table class="mdTable" 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::CVegetableManager::~<a class="el" href="a03680.html">CVegetableManager</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00129">129</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06699.html#l00394">_ZSortScene</a>, <a class="el" href="a06348.html#l01053">NL3D::CScene::deleteModel()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00130 {
+00131 <span class="comment">// delete All VP</span>
+00132 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i &lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; i++)
+00133 {
+00134 <span class="keyword">delete</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[i];
+00135 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[i]= NULL;
+00136 }
+00137
+00138 <span class="comment">// delete ZSort models.</span>
+00139 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>)
+00140 {
+00141 <span class="comment">// remove models from scene.</span>
+00142 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i= 0; i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>; i++)
+00143 {
+00144 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>-&gt;deleteModel(_ZSortModelLayers[i]);
+00145 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]= NULL;
+00146 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>-&gt;deleteModel(_ZSortModelLayersUW[i]);
+00147 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]= NULL;
+00148 }
+00149
+00150 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>= NULL;
+00151 }
+00152 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_0" doxytag="NL3D::CVegetableManager::addInstance" ></a><p>
+<table class="mdTable" 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::CVegetableManager::addInstance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ig</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>shape</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02851.html">NLMISC::CMatrix</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ambientColor</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03338.html">NLMISC::CRGBAF</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>diffuseColor</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>bendFactor</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>bendPhase</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>bendFreqFactor</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>blendDistMax</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetWaterState</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03685.html">CVegetableUV8</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>dlmUV</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>
+add an instance to an ig, enlarging the associated clipBlock bbox. If the shape is not lighted, then only diffuseColor is used, to setup color per vertex. Warning! Use OptFastFloor()! So call must be enclosed with a OptFastFloorBegin()/OptFastFloorEnd().<p>
+Also, buffer must be locked.<p>
+ambientColor and diffuseColor should be in [0..1] (no clamp), else uint8 will wrap...<p>
+<a class="el" href="a04199.html#a6">nlassert()</a> if no sufficient space reserved in <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>dlmUV</em>&nbsp;</td><td>is the dynamic lightmap UV for this vegetable. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances()</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01036">1036</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06705.html#l00088">NL3D::CVegetableSortBlock::_Dirty</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06695.html#l00146">NL3D::CVegetableInstanceGroup::_HasZSortPassInstances</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a06695.html#l00143">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderNumTriangles</a>, <a class="el" href="a06695.html#l00144">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrders</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06695.html#l00156">NL3D::CVegetableInstanceGroup::_ULNumVertices</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06705.html#l00091">NL3D::CVegetableSortBlock::_UnderWater</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06708.html#l00185">NL3D::CVegetableVBAllocator::allocateVertex()</a>, <a class="el" href="a06340.html#l00659">NLMISC::CRGBAF::B</a>, <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::begin()</a>, <a class="el" href="a06703.html#l00134">NL3D::CVegetableShape::BendCenterMode</a>, <a class="el" href="a06703.html#l00133">NL3D::CVegetableShape::BestSidedPreComputeLighting</a>, <a class="el" href="a06697.html#l00065">NL3D::CVegetableLightEx::Color</a>, <a class="el" href="a06698.html#l00939">NL3D::computeVegetVertexLighting()</a>, <a class="el" href="a06698.html#l00986">NL3D::computeVegetVertexLightingForceBestSided()</a>, <a class="el" href="a06116.html#l00206">NLMISC::CObjectVector&lt; uint32, false &gt;::copy()</a>, <a class="el" href="a06695.html#l00100">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::DlmUV</a>, <a class="el" href="a06708.html#l00178">NL3D::CVegetableVBAllocator::exceedMaxVertexInBufferHard()</a>, <a class="el" href="a06690.html#l00045">NL3D::CVegetableClipBlock::extendBBoxOnly()</a>, <a class="el" href="a06690.html#l00062">NL3D::CVegetableClipBlock::extendSphere()</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06340.html#l00657">NLMISC::CRGBAF::G</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a06711.html#l00338">NL3D::CVertexBuffer::getNormalOff()</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a06698.html#l00817">getRdrPassInfoForShape()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06711.html#l00339">NL3D::CVertexBuffer::getTexCoordOff()</a>, <a class="el" href="a06711.html#l00441">NL3D::CVertexBuffer::getValueOffEx()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06710.html#l00438">NL3D::CVertexBuffer::getVertexCoordPointer()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06703.html#l00147">NL3D::CVegetableShape::InstanceVertices</a>, <a class="el" href="a05972.html#l00914">NLMISC::CMatrix::invert()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06694.html#l00056">NL3D::CVegetableInstanceGroup::linkBeforeUL()</a>, <a class="el" href="a06695.html#l00097">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatAmbient</a>, <a class="el" href="a06695.html#l00098">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatDiffuse</a>, <a class="el" href="a06340.html#l00243">NLMISC::CRGBA::modulateFromColorRGBOnly()</a>, <a class="el" href="a05972.html#l01244">NLMISC::CMatrix::mulVector()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06693.html#l00053">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>, <a class="el" href="a06693.html#l00061">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06709.html#l00044">NL3D_VEGETABLE_VPPOS_BENDINFO</a>, <a class="el" href="a06709.html#l00045">NL3D_VEGETABLE_VPPOS_CENTER</a>, <a class="el" href="a06709.html#l00041">NL3D_VEGETABLE_VPPOS_COLOR0</a>, <a class="el" href="a06709.html#l00042">NL3D_VEGETABLE_VPPOS_COLOR1</a>, <a class="el" href="a06709.html#l00040">NL3D_VEGETABLE_VPPOS_NORMAL</a>, <a class="el" href="a06709.html#l00043">NL3D_VEGETABLE_VPPOS_TEX0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00124">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NLightedInstances</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a06695.html#l00095">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::NormalMat</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a06340.html#l00655">NLMISC::CRGBAF::R</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a06695.html#l00093">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::Shape</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00102">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::StartIdInRdrPass</a>, <a class="el" href="a06698.html#l01496">swapIgRdrPassHardMode()</a>, <a class="el" href="a05972.html#l00935">NLMISC::CMatrix::transpose()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06703.html#l00140">NL3D::CVegetableShape::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06690.html#l00055">NL3D::CVegetableClipBlock::updateSphere()</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>, <a class="el" href="a06681.html#l00048">NLMISC::CVectorH::w</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>, and <a class="el" href="a06705.html#l00122">NL3D::CVegetableSortBlock::ZSortHardMode</a>.
+<p>
+Referenced by <a class="el" href="a06686.html#l00306">NL3D::CVegetable::generateInstance()</a>.
+<p>
+<div class="fragment"><pre>01041 {
+01042 <a class="code" href="a04558.html#a14">sint</a> i;
+01043
+01044
+01045 <span class="comment">// Some setup.</span>
+01046 <span class="comment">//--------------------</span>
+01047 <span class="keywordtype">bool</span> instanceLighted;
+01048 <span class="keywordtype">bool</span> instanceDoubleSided;
+01049 <span class="keywordtype">bool</span> instanceZSort;
+01050 <span class="keywordtype">bool</span> destLighted;
+01051 <span class="keywordtype">bool</span> precomputeLighting;
+01052
+01053 <span class="comment">// get correct rdrPass / info</span>
+01054 <a class="code" href="a04558.html#a15">uint</a> rdrPass;
+01055 rdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a>(shape, vegetWaterState, instanceLighted, instanceDoubleSided,
+01056 instanceZSort, destLighted, precomputeLighting);
+01057 <span class="comment">// bestSided Precompute lighting or not??</span>
+01058 <span class="keywordtype">bool</span> bestSidedPrecomputeLighting= precomputeLighting &amp;&amp; shape-&gt;BestSidedPreComputeLighting;
+01059
+01060
+01061 <span class="comment">// veget rdrPass</span>
+01062 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
+01063
+01064 <span class="comment">// color.</span>
+01065 <span class="comment">// setup using OptFastFloor.</span>
+01066 <a class="code" href="a03337.html">CRGBA</a> ambientRGBA, diffuseRGBA;
+01067 <a class="code" href="a03337.html">CRGBA</a> primaryRGBA, secondaryRGBA;
+01068 <span class="comment">// diffuseColor</span>
+01069 diffuseRGBA.<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#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>*255);
+01070 diffuseRGBA.<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#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>*255);
+01071 diffuseRGBA.<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#a397">NLMISC::OptFastFloor</a>(diffuseColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>*255);
+01072 diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= 255;
+01073 <span class="comment">// ambientColor</span>
+01074 ambientRGBA.<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#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo3">R</a>*255);
+01075 ambientRGBA.<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#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo2">G</a>*255);
+01076 ambientRGBA.<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#a397">NLMISC::OptFastFloor</a>(ambientColor.<a class="code" href="a03338.html#NLMISC_1_1CRGBAFo1">B</a>*255);
+01077 ambientRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= 255;
+01078
+01079 <span class="comment">// For Lighted, modulate with global light.</span>
+01080 <span class="keywordflow">if</span>(instanceLighted)
+01081 {
+01082 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, _GlobalDiffuse);
+01083 secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(ambientRGBA, _GlobalAmbient);
+01084 }
+01085 <span class="comment">// if the instance is not lighted, then don't take care of lighting</span>
+01086 <span class="keywordflow">else</span>
+01087 {
+01088 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a>;
+01089 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a>;
+01090 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>= diffuseRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a>;
+01091 <span class="comment">// may not be useFull (2Sided lighting no more supported)</span>
+01092 secondaryRGBA= primaryRGBA;
+01093 }
+01094
+01095 <span class="comment">// Copy Dynamic Lightmap UV in Alpha part (save memory for an extra cost of 1 VP instruction)</span>
+01096 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= dlmUV.U;
+01097 secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= dlmUV.V;
+01098
+01099 <span class="comment">// get ref on the vegetLex.</span>
+01100 CVegetableLightEx &amp;vegetLex= ig-&gt;VegetableLightEx;
+01101 <span class="comment">// Color of pointLights modulated by diffuse.</span>
+01102 <a class="code" href="a03337.html">CRGBA</a> diffusePL[2];
+01103 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=1)
+01104 {
+01105 diffusePL[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, vegetLex.Color[0]);
+01106 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=2)
+01107 {
+01108 diffusePL[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(diffuseRGBA, vegetLex.Color[1]);
+01109 }
+01110 }
+01111
+01112 <span class="comment">// normalize bendFreqFactor</span>
+01113 bendFreqFactor*= <a class="code" href="a05270.html#a11">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>;
+01114 bendFreqFactor= (<span class="keywordtype">float</span>)floor(bendFreqFactor + 0.5f);
+01115 bendFreqFactor/= <a class="code" href="a05270.html#a11">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>;
+01116
+01117
+01118 <span class="comment">// Get allocator, and manage VBhard overriding.</span>
+01119 <span class="comment">//--------------------</span>
+01120 CVegetableVBAllocator *allocator;
+01121 <span class="comment">// if still in Sfot mode, keep it.</span>
+01122 <span class="keywordflow">if</span>(!vegetRdrPass.HardMode)
+01123 {
+01124 <span class="comment">// get the soft allocator.</span>
+01125 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 0);
+01126 }
+01127 <span class="keywordflow">else</span>
+01128 {
+01129 <span class="comment">// Get VB allocator Hard for this rdrPass</span>
+01130 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 1);
+01131 <span class="comment">// Test if the instance don't add too many vertices for this VBHard</span>
+01132 <span class="keywordflow">if</span>(allocator-&gt;exceedMaxVertexInBufferHard(shape-&gt;VB.getNumVertices()))
+01133 {
+01134 <span class="comment">// if exceed, then must pass ALL the IG in software mode. vertices/faces are correclty updated.</span>
+01135 <span class="comment">// special: if rdrPass is the ZSort one, </span>
+01136 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01137 {
+01138 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_SortOwner-&gt;ZSortHardMode);
+01139
+01140 <span class="comment">// must do it on ALL igs of the sortBlock, for less VBuffer mode switching.</span>
+01141 CVegetableInstanceGroup *pIg= ig-&gt;_SortOwner-&gt;_InstanceGroupList.begin();
+01142 <span class="keywordflow">while</span>(pIg)
+01143 {
+01144 <span class="comment">// let's pass them in software mode.</span>
+01145 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a>(pIg, rdrPass);
+01146 <span class="comment">// next</span>
+01147 pIg= (CVegetableInstanceGroup*)pIg-&gt;Next;
+01148 }
+01149
+01150 <span class="comment">// Then all The sortBlock is in SoftMode.</span>
+01151 ig-&gt;_SortOwner-&gt;ZSortHardMode= <span class="keyword">false</span>;
+01152 }
+01153 <span class="keywordflow">else</span>
+01154 {
+01155 <span class="comment">// just do it on this Ig (can mix hardMode in a SortBlock for normal rdrPass)</span>
+01156 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd4">swapIgRdrPassHardMode</a>(ig, rdrPass);
+01157 }
+01158
+01159 <span class="comment">// now, we can use the software only Allocator to append our instance</span>
+01160 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, 0);
+01161 }
+01162 }
+01163
+01164
+01165 <span class="comment">// get correct dstVB</span>
+01166 <span class="keyword">const</span> CVertexBuffer &amp;dstVBInfo= allocator-&gt;getSoftwareVertexBuffer();
+01167
+01168
+01169 <span class="comment">// Transform vertices to a vegetable instance, and enlarge clipBlock</span>
+01170 <span class="comment">//--------------------</span>
+01171 <span class="comment">// compute matrix to multiply normals, ie (M-1)t</span>
+01172 <a class="code" href="a02851.html">CMatrix</a> normalMat;
+01173 <span class="comment">// need just rotation scale matrix.</span>
+01174 normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_10">setRot</a>(mat);
+01175 normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1967_0">invert</a>();
+01176 normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1967_7">transpose</a>();
+01177 <span class="comment">// compute Instance position</span>
+01178 CVector instancePos;
+01179 mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1963_6">getPos</a>(instancePos);
+01180
+01181
+01182 <span class="comment">// At least, the bbox of the clipBlock must include the center of the shape.</span>
+01183 ig-&gt;_ClipOwner-&gt;extendSphere(instancePos);
+01184
+01185
+01186 <span class="comment">// Vertex/triangle Info.</span>
+01187 <a class="code" href="a04558.html#a15">uint</a> numNewVertices= shape-&gt;VB.getNumVertices();
+01188 <a class="code" href="a04558.html#a15">uint</a> numNewTris= shape-&gt;TriangleIndices.size()/3;
+01189 <a class="code" href="a04558.html#a15">uint</a> numNewIndices= shape-&gt;TriangleIndices.size();
+01190
+01191 <span class="comment">// src info.</span>
+01192 <a class="code" href="a04558.html#a15">uint</a> srcNormalOff= (instanceLighted? shape-&gt;VB.getNormalOff() : 0);
+01193 <a class="code" href="a04558.html#a15">uint</a> srcTex0Off= shape-&gt;VB.getTexCoordOff(0);
+01194 <a class="code" href="a04558.html#a15">uint</a> srcTex1Off= shape-&gt;VB.getTexCoordOff(1);
+01195
+01196 <span class="comment">// dst info</span>
+01197 <a class="code" href="a04558.html#a15">uint</a> dstNormalOff= (destLighted? dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_NORMAL) : 0);
+01198 <a class="code" href="a04558.html#a15">uint</a> dstColor0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR0);
+01199 <a class="code" href="a04558.html#a15">uint</a> dstColor1Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR1);
+01200 <a class="code" href="a04558.html#a15">uint</a> dstTex0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_TEX0);
+01201 <a class="code" href="a04558.html#a15">uint</a> dstBendOff= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_BENDINFO);
+01202 <a class="code" href="a04558.html#a15">uint</a> dstCenterOff= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_CENTER);
+01203
+01204
+01205 <span class="comment">// Usefull For !destLighted only.</span>
+01206 CVector deltaPos;
+01207 <span class="keywordtype">float</span> deltaPosNorm=0.0;
+01208
+01209
+01210 <span class="comment">// UseFull for ZSORT rdrPass, the worldVertices.</span>
+01211 <span class="keyword">static</span> vector&lt;CVector&gt; worldVertices;
+01212 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01213 {
+01214 worldVertices.resize(numNewVertices);
+01215 }
+01216
+01217
+01218 <span class="comment">// For all vertices of shape, transform and store manager indices in temp shape.</span>
+01219 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numNewVertices;i++)
+01220 {
+01221 <span class="comment">// allocate a Vertex</span>
+01222 <a class="code" href="a04558.html#a15">uint</a> vid= allocator-&gt;allocateVertex();
+01223 <span class="comment">// store in tmp shape.</span>
+01224 shape-&gt;InstanceVertices[i]= vid;
+01225
+01226 <span class="comment">// Fill this vertex.</span>
+01227 <a class="code" href="a04558.html#a7">uint8</a> *srcPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)shape-&gt;VB.getVertexCoordPointer(i);
+01228 <a class="code" href="a04558.html#a7">uint8</a> *dstPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)allocator-&gt;getVertexPointer(vid);
+01229
+01230 <span class="comment">// Get bendWeight for this vertex.</span>
+01231 <span class="keywordtype">float</span> vertexBendWeight= ((<a class="code" href="a03640.html">CUV</a>*)(srcPtr + srcTex1Off))-&gt;U * bendFactor;
+01232
+01233 <span class="comment">// Pos.</span>
+01234 <span class="comment">//-------</span>
+01235 <span class="comment">// Separate Center and relative pos.</span>
+01236 CVector relPos= mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>(*(CVector*)srcPtr); <span class="comment">// mulVector, because translation in v[center]</span>
+01237 <span class="comment">// compute bendCenterPos</span>
+01238 CVector bendCenterPos;
+01239 <span class="keywordflow">if</span>(shape-&gt;BendCenterMode == CVegetableShapeBuild::BendCenterNull)
+01240 bendCenterPos= CVector::Null;
+01241 <span class="keywordflow">else</span>
+01242 {
+01243 CVector <a class="code" href="a04223.html#a576">v</a>= *(CVector*)srcPtr;
+01244 <a class="code" href="a04223.html#a576">v</a>.z= 0;
+01245 bendCenterPos= mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>(v); <span class="comment">// mulVector, because translation in v[center]</span>
+01246 }
+01247 <span class="comment">// copy</span>
+01248 deltaPos= relPos-bendCenterPos;
+01249 *(CVector*)dstPtr= deltaPos;
+01250 *(CVector*)(dstPtr + dstCenterOff)= instancePos + bendCenterPos;
+01251 <span class="comment">// if !destLighted, then VP is different</span>
+01252 <span class="keywordflow">if</span>(!destLighted)
+01253 {
+01254 deltaPosNorm= deltaPos.norm();
+01255 <span class="comment">// copy bendWeight in v.w</span>
+01256 <a class="code" href="a03668.html">CVectorH</a> *vh= (<a class="code" href="a03668.html">CVectorH</a>*)dstPtr;
+01257 <span class="comment">// Mul by deltaPosNorm, to draw an arc circle.</span>
+01258 vh-&gt;<a class="code" href="a03668.html#NLMISC_1_1CVectorHo0">w</a>= vertexBendWeight * deltaPosNorm;
+01259 }
+01260
+01261 <span class="comment">// Enlarge the clipBlock of the IG.</span>
+01262 <span class="comment">// Since small shape, enlarge with each vertices. simpler and maybe faster.</span>
+01263 <span class="comment">// TODO_VEGET: bend and clipping ...</span>
+01264 ig-&gt;_ClipOwner-&gt;extendBBoxOnly(instancePos + relPos);
+01265
+01266 <span class="comment">// prepare for ZSort</span>
+01267 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01268 {
+01269 worldVertices[i]= instancePos + relPos;
+01270 }
+01271
+01272
+01273 <span class="comment">// Color-ligthing.</span>
+01274 <span class="comment">//-------</span>
+01275 <span class="keywordflow">if</span>(!precomputeLighting)
+01276 {
+01277 <span class="comment">// just copy the primary color (means diffuse part if lighted)</span>
+01278 *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off)= primaryRGBA;
+01279 <span class="comment">// normal and secondary color</span>
+01280 <span class="keywordflow">if</span>(destLighted)
+01281 {
+01282 <span class="comment">// normal</span>
+01283 *(CVector*)(dstPtr + dstNormalOff)= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
+01284 }
+01285 <span class="comment">// If destLighted, secondaryRGBA is the ambient</span>
+01286 <span class="comment">// else secondaryRGBA is used only for Alpha (DLM uv.v).</span>
+01287 *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
+01288 }
+01289 <span class="keywordflow">else</span>
+01290 {
+01291 <a class="code" href="a04199.html#a6">nlassert</a>(!destLighted);
+01292
+01293 <span class="comment">// compute normal.</span>
+01294 CVector rotNormal= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
+01295 <span class="comment">// must normalize() because scale is possible.</span>
+01296 rotNormal.normalize();
+01297
+01298 <span class="comment">// Do the compute.</span>
+01299 <span class="keywordflow">if</span>(!bestSidedPrecomputeLighting)
+01300 {
+01301 <a class="code" href="a05363.html#a543">computeVegetVertexLighting</a>(rotNormal,
+01302 _DirectionalLight, primaryRGBA, secondaryRGBA,
+01303 vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
+01304 }
+01305 <span class="keywordflow">else</span>
+01306 {
+01307 <a class="code" href="a05363.html#a544">computeVegetVertexLightingForceBestSided</a>(rotNormal,
+01308 _DirectionalLight, primaryRGBA, secondaryRGBA,
+01309 vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
+01310 }
+01311
+01312 <span class="comment">// copy secondaryRGBA, used only for Alpha (DLM uv.v).</span>
+01313 *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
+01314 }
+01315
+01316
+01317 <span class="comment">// Texture.</span>
+01318 <span class="comment">//-------</span>
+01319 *(<a class="code" href="a03640.html">CUV</a>*)(dstPtr + dstTex0Off)= *(<a class="code" href="a03640.html">CUV</a>*)(srcPtr + srcTex0Off);
+01320
+01321 <span class="comment">// Bend.</span>
+01322 <span class="comment">//-------</span>
+01323 CVector *dstBendPtr= (CVector*)(dstPtr + dstBendOff);
+01324 <span class="comment">// setup bend Phase.</span>
+01325 dstBendPtr-&gt;y= bendPhase;
+01326 <span class="comment">// setup bend Weight.</span>
+01327 <span class="comment">// if !destLighted, then VP is different, vertexBendWeight is stored in v[0].w</span>
+01328 <span class="keywordflow">if</span>(destLighted)
+01329 dstBendPtr-&gt;x= vertexBendWeight;
+01330 <span class="keywordflow">else</span>
+01331 <span class="comment">// the VP need the norm of relPos in v[9].x</span>
+01332 dstBendPtr-&gt;x= deltaPosNorm;
+01333 <span class="comment">// setup bendFreqFactor</span>
+01334 dstBendPtr-&gt;z= bendFreqFactor;
+01336 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01337 {
+01338 <span class="comment">// get ptr on v[9].w NB: in Unlit mode, it has 4 components.</span>
+01339 <a class="code" href="a03668.html">CVectorH</a> *dstBendPtr= (<a class="code" href="a03668.html">CVectorH</a>*)(dstPtr + dstBendOff);
+01340 <span class="comment">// setup the constant of linear formula:</span>
+01341 <span class="comment">// Alpha= -1/blendTransDist * dist + blendDistMax/blendTransDist</span>
+01342 dstBendPtr-&gt;<a class="code" href="a03668.html#NLMISC_1_1CVectorHo0">w</a>= blendDistMax/<a class="code" href="a05270.html#a9">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>;
+01343 }
+01344
+01345
+01346 <span class="comment">// fill the vertex in AGP.</span>
+01347 <span class="comment">//-------</span>
+01348 allocator-&gt;flushVertex(vid);
+01349 }
+01350
+01351
+01352 <span class="comment">// must recompute the sphere according to the bbox.</span>
+01353 ig-&gt;_ClipOwner-&gt;updateSphere();
+01354
+01355
+01356 <span class="comment">// If ZSort, compute Triangle Centers and Orders for quadrant</span>
+01357 <span class="comment">//--------------------</span>
+01358 <span class="keywordflow">if</span>(rdrPass==<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01359 {
+01360 <span class="comment">// inform the SB that it must be updated.</span>
+01361 ig-&gt;_SortOwner-&gt;_Dirty= <span class="keyword">true</span>;
+01362 <span class="comment">// For deletion, inform the ig that it has instances which impact the SB.</span>
+01363 ig-&gt;_HasZSortPassInstances= <span class="keyword">true</span>;
+01364
+01365 <span class="comment">// change UnderWater falg of the SB</span>
+01366 <span class="keywordflow">if</span>(vegetWaterState == <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw0">AboveWater</a>)
+01367 ig-&gt;_SortOwner-&gt;_UnderWater= <span class="keyword">false</span>;
+01368 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(vegetWaterState == <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw3">UnderWater</a>)
+01369 ig-&gt;_SortOwner-&gt;_UnderWater= <span class="keyword">true</span>;
+01370
+01371 <span class="comment">// static to avoid reallocation</span>
+01372 <span class="keyword">static</span> vector&lt;CVector&gt; triangleCenters;
+01373 triangleCenters.resize(numNewTris);
+01374
+01375 <span class="comment">// compute triangle centers</span>
+01376 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;numNewTris; i++)
+01377 {
+01378 <span class="comment">// get index in shape.</span>
+01379 <a class="code" href="a04558.html#a15">uint</a> v0= shape-&gt;TriangleIndices[i*3+0];
+01380 <a class="code" href="a04558.html#a15">uint</a> v1= shape-&gt;TriangleIndices[i*3+1];
+01381 <a class="code" href="a04558.html#a15">uint</a> v2= shape-&gt;TriangleIndices[i*3+2];
+01382
+01383 <span class="comment">// get world coord.</span>
+01384 <span class="keyword">const</span> CVector &amp;vert0= worldVertices[v0];
+01385 <span class="keyword">const</span> CVector &amp;vert1= worldVertices[v1];
+01386 <span class="keyword">const</span> CVector &amp;vert2= worldVertices[v2];
+01387
+01388 <span class="comment">// compute center</span>
+01389 triangleCenters[i]= (vert0 + vert1 + vert2) / 3;
+01390 <span class="comment">// relative to center of the sortBlock (for sint16 compression)</span>
+01391 triangleCenters[i]-= ig-&gt;_SortOwner-&gt;_Center;
+01392 }
+01393
+01394
+01395 <span class="comment">// resize the array. Actually only modify the number of triangles really setuped.</span>
+01396 <a class="code" href="a04558.html#a15">uint</a> offTri= ig-&gt;_TriangleQuadrantOrderNumTriangles;
+01397 ig-&gt;_TriangleQuadrantOrderNumTriangles+= numNewTris;
+01398 <span class="comment">// verify user has correclty used reserveIg system.</span>
+01399 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderNumTriangles * NL3D_VEGETABLE_NUM_QUADRANT &lt;= ig-&gt;_TriangleQuadrantOrderArray.size());
+01400
+01401
+01402 <span class="comment">// compute distance for each quadrant. Since we are not sure of the sortBlockSize, mul with a (big: 16) security.</span>
+01403 <span class="comment">// NB: for landscape practical usage, this left us with more than 1mm precision.</span>
+01404 <span class="keywordtype">float</span> distFactor=32768/(16*ig-&gt;_SortOwner-&gt;_Radius);
+01405 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> quadId=0; quadId&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; quadId++)
+01406 {
+01407 <span class="keyword">const</span> CVector &amp;quadDir= CVegetableQuadrant::Dirs[quadId];
+01408
+01409 <span class="comment">// For all tris.</span>
+01410 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;numNewTris; i++)
+01411 {
+01412 <span class="comment">// compute the distance with orientation of the quadrant. (DotProduct)</span>
+01413 <span class="keywordtype">float</span> dist= triangleCenters[i] * quadDir;
+01414 <span class="comment">// compress to sint16. </span>
+01415 ig-&gt;_TriangleQuadrantOrders[quadId][offTri + i]= (<a class="code" href="a04558.html#a8">sint16</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(dist*distFactor);
+01416 }
+01417 }
+01418 }
+01419
+01420
+01421 <span class="comment">// Append list of indices and list of triangles to the IG</span>
+01422 <span class="comment">//--------------------</span>
+01423
+01424 <span class="comment">// TODO_VEGET_OPTIM: system reallocation of array is very bad...</span>
+01425
+01426
+01427 <span class="comment">// compute dest start idx.</span>
+01428 <a class="code" href="a04558.html#a15">uint</a> offVertex= vegetRdrPass.NVertices;
+01429 <a class="code" href="a04558.html#a15">uint</a> offTri= vegetRdrPass.NTriangles;
+01430 <a class="code" href="a04558.html#a15">uint</a> offTriIdx= offTri*3;
+01431
+01432 <span class="comment">// verify user has correclty used reserveIg system.</span>
+01433 <a class="code" href="a04199.html#a6">nlassert</a>(offVertex + numNewVertices &lt;= vegetRdrPass.Vertices.size());
+01434 <a class="code" href="a04199.html#a6">nlassert</a>(offTriIdx + numNewIndices &lt;= vegetRdrPass.TriangleIndices.size());
+01435 <a class="code" href="a04199.html#a6">nlassert</a>(offTriIdx + numNewIndices &lt;= vegetRdrPass.TriangleLocalIndices.size());
+01436
+01437
+01438 <span class="comment">// insert list of vertices to delete in ig vertices.</span>
+01439 vegetRdrPass.Vertices.copy(offVertex, offVertex+numNewVertices, &amp;shape-&gt;InstanceVertices[0]);
+01440
+01441 <span class="comment">// insert array of triangles in ig.</span>
+01442 <span class="comment">// for all indices, fill IG</span>
+01443 <span class="keywordflow">for</span>(i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numNewIndices; i++)
+01444 {
+01445 <span class="comment">// get the index of the vertex in the shape</span>
+01446 <a class="code" href="a04558.html#a15">uint</a> vid= shape-&gt;TriangleIndices[i];
+01447 <span class="comment">// re-direction, using InstanceVertices;</span>
+01448 vegetRdrPass.TriangleIndices[offTriIdx + i]= shape-&gt;InstanceVertices[vid];
+01449 <span class="comment">// local re-direction: adding vertexOffset.</span>
+01450 vegetRdrPass.TriangleLocalIndices[offTriIdx + i]= offVertex + vid;
+01451 }
+01452
+01453 <span class="comment">// new triangle and vertex size.</span>
+01454 vegetRdrPass.NTriangles+= numNewTris;
+01455 vegetRdrPass.NVertices+= numNewVertices;
+01456
+01457
+01458 <span class="comment">// if lighted, must add a lightedInstance for lighting update.</span>
+01459 <span class="comment">//--------------------</span>
+01460 <span class="keywordflow">if</span>(instanceLighted)
+01461 {
+01462 <span class="comment">// first, update Ig.</span>
+01463 ig-&gt;_ULNumVertices+= numNewVertices;
+01464 <span class="comment">// and update the vegetable manager.</span>
+01465 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>+= numNewVertices;
+01466 <span class="comment">// link at the end of the circular list: link before the current root.</span>
+01467 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>==NULL)
+01468 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= ig;
+01469 <span class="keywordflow">else</span>
+01470 ig-&gt;linkBeforeUL(_ULRootIg);
+01471
+01472 <span class="comment">// check good use of reserveIg.</span>
+01473 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.NLightedInstances &lt; vegetRdrPass.LightedInstances.size());
+01474
+01475 <span class="comment">// Fill instance info</span>
+01476 CVegetableInstanceGroup::CVegetableLightedInstance &amp;vli=
+01477 vegetRdrPass.LightedInstances[vegetRdrPass.NLightedInstances];
+01478 vli.Shape= shape;
+01479 vli.NormalMat= normalMat;
+01480 <span class="comment">// copy colors unmodulated by global light.</span>
+01481 vli.MatAmbient= ambientRGBA;
+01482 vli.MatDiffuse= diffuseRGBA;
+01483 <span class="comment">// store dynamic lightmap UV</span>
+01484 vli.DlmUV= dlmUV;
+01485 <span class="comment">// where vertices of this instances are wrote in the VegetRdrPass</span>
+01486 vli.StartIdInRdrPass= offVertex;
+01487
+01488 <span class="comment">// Inc size setuped.</span>
+01489 vegetRdrPass.NLightedInstances++;
+01490 }
+01491
+01492 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_0" doxytag="NL3D::CVegetableManager::createClipBlock" ></a><p>
+<table class="mdTable" 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="a03673.html">CVegetableClipBlock</a> * NL3D::CVegetableManager::createClipBlock </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>
+Create a clipBlock where SortBlock will be created.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00607">607</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00289">_ClipBlockMemory</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableClipBlock &gt;::allocate()</a>, and <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00611">NL3D::CPatch::addRefTessBlocks()</a>.
+<p>
+<div class="fragment"><pre>00608 {
+00609 <span class="comment">// create a clipblock</span>
+00610 CVegetableClipBlock *ret;
+00611 ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
+00612
+00613 <span class="comment">// append to list.</span>
+00614 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.append(ret);
+00615
+00616 <span class="keywordflow">return</span> ret;
+00617 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_1" doxytag="NL3D::CVegetableManager::createIg" ></a><p>
+<table class="mdTable" 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="a03674.html">CVegetableInstanceGroup</a> * NL3D::CVegetableManager::createIg </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>sortBlock</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>
+create an instance group in a sortBlock, where instances will be created. Instances will be frustum-clipped by the clipBlock, and sorted (for the ZSort rdrPass only) by sortBlock.
+<p>
+Definition at line <a class="el" href="a06698.html#l00672">672</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00291">_InstanceGroupMemory</a>, <a class="el" href="a06691.html#l00089">NL3D::CVegetableClipBlock::_NumIgs</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableInstanceGroup &gt;::allocate()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::append()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, and <a class="el" href="a06705.html#l00122">NL3D::CVegetableSortBlock::ZSortHardMode</a>.
+<p>
+Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>.
+<p>
+<div class="fragment"><pre>00673 {
+00674 <a class="code" href="a04199.html#a6">nlassert</a>(sortBlock);
+00675 CVegetableClipBlock *clipBlock= sortBlock-&gt;_Owner;
+00676
+00677
+00678 <span class="comment">// create an IG</span>
+00679 CVegetableInstanceGroup *ret;
+00680 ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
+00681 ret-&gt;_SortOwner= sortBlock;
+00682 ret-&gt;_ClipOwner= clipBlock;
+00683
+00684 <span class="comment">// if the clipBlock is empty, change list, because won't be no more.</span>
+00685 <span class="keywordflow">if</span>(clipBlock-&gt;_NumIgs==0)
+00686 {
+00687 <span class="comment">// remove from empty list</span>
+00688 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.remove(clipBlock);
+00689 <span class="comment">// and append to not empty one.</span>
+00690 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.append(clipBlock);
+00691 }
+00692
+00693 <span class="comment">// inc the number of igs appended to the clipBlock.</span>
+00694 clipBlock-&gt;_NumIgs++;
+00695
+00696 <span class="comment">// link ig to sortBlock.</span>
+00697 sortBlock-&gt;_InstanceGroupList.append(ret);
+00698
+00699 <span class="comment">// Special Init: The ZSort rdrPass must start with the same HardMode than SortBlock.</span>
+00700 ret-&gt;_RdrPass[<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>].HardMode= sortBlock-&gt;ZSortHardMode;
+00701
+00702 <span class="keywordflow">return</span> ret;
+00703 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_2" doxytag="NL3D::CVegetableManager::createSortBlock" ></a><p>
+<table class="mdTable" 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="a03684.html">CVegetableSortBlock</a> * NL3D::CVegetableManager::createSortBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>clipBlock</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>center</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>radius</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Create a SortBlock in a clipBlock where instance group (ig) will be created. All AlphaBlend instances created in a SortBlock should have the same vegetWaterState: AboveWater or UnderWater. Each time an instance is added to the sortBlock it changes the _UnderWater state of the sortBlock. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>center</em>&nbsp;</td><td>you must give an approximate center for the sortBlock (for sorting) </td></tr>
+ <tr><td valign=top><em>radius</em>&nbsp;</td><td>you must give an approximate radius for the sortBlock (for the system to know when you are IN the sortBlock, and then to sort in a better way)</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00637">637</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06699.html#l00290">_SortBlockMemory</a>, <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory&lt; CVegetableSortBlock &gt;::allocate()</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableSortBlock &gt;::append()</a>, and <a class="el" href="a05622.html#l00290">nlassert</a>.
+<p>
+Referenced by <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>.
+<p>
+<div class="fragment"><pre>00638 {
+00639 <a class="code" href="a04199.html#a6">nlassert</a>(clipBlock);
+00640
+00641 <span class="comment">// create a clipblock</span>
+00642 CVegetableSortBlock *ret;
+00643 ret= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a>();
+00644 ret-&gt;_Owner= clipBlock;
+00645 ret-&gt;_Center= center;
+00646 ret-&gt;_Radius= radius;
+00647
+00648 <span class="comment">// append to list.</span>
+00649 clipBlock-&gt;_SortBlockList.append(ret);
+00650
+00651 <span class="keywordflow">return</span> ret;
+00652 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagera0" doxytag="NL3D::CVegetableManager::createVegetableBlendLayersModels" ></a><p>
+<table class="mdTable" 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::CVegetableManager::createVegetableBlendLayersModels </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03348.html">CScene</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>scene</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>
+Before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_3">render()</a>, you must call this method (else nlassert). It creates the necessary models in the scene, to manage AlphaBlending correctly. Those models are deleted in the object dtor.
+<p>
+Definition at line <a class="el" href="a06698.html#l00156">156</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06699.html#l00394">_ZSortScene</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06689.html#l00044">NL3D::VegetableBlendLayerModelId</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03225">NL3D::CLandscape::createVegetableBlendLayersModels()</a>.
+<p>
+<div class="fragment"><pre>00157 {
+00158 <span class="comment">// setup scene</span>
+00159 <a class="code" href="a04199.html#a6">nlassert</a>(scene);
+00160 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">_ZSortScene</a>= scene;
+00161
+00162 <span class="comment">// create the layers models.</span>
+00163 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>; i++)
+00164 {
+00165 <span class="comment">// assert not already done.</span>
+00166 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayers[i]==NULL);
+00167 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayersUW[i]==NULL);
+00168
+00169 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a>*)scene-&gt;createModel(VegetableBlendLayerModelId);
+00170 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagern0">CVegetableBlendLayerModel</a>*)scene-&gt;createModel(VegetableBlendLayerModelId);
+00171 <span class="comment">// init owner.</span>
+00172 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]-&gt;VegetableManager= <span class="keyword">this</span>;
+00173 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;VegetableManager= <span class="keyword">this</span>;
+00174
+00175 <span class="comment">// Set UnderWater layer for _ZSortModelLayersUW</span>
+00176 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;setOrderingLayer(2);
+00177 }
+00178 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_3" doxytag="NL3D::CVegetableManager::deleteClipBlock" ></a><p>
+<table class="mdTable" 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::CVegetableManager::deleteClipBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03673.html">CVegetableClipBlock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>clipBlock</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>
+delete such a clipBlock. all sortBlocks and so all ig must be deleted before.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00620">620</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00289">_ClipBlockMemory</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableClipBlock &gt;::free()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CVegetableSortBlock &gt;::size()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00669">NL3D::CPatch::clearTessBlocks()</a>.
+<p>
+<div class="fragment"><pre>00621 {
+00622 <span class="keywordflow">if</span>(!clipBlock)
+00623 <span class="keywordflow">return</span>;
+00624
+00625 <span class="comment">// verify no more sortBlocks in this clipblock</span>
+00626 <a class="code" href="a04199.html#a6">nlassert</a>(clipBlock-&gt;_SortBlockList.size() == 0);
+00627
+00628 <span class="comment">// unlink from _EmptyClipBlockList, because _InstanceGroupList.size() == 0 ...</span>
+00629 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.remove(clipBlock);
+00630
+00631 <span class="comment">// delete</span>
+00632 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr1">_ClipBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(clipBlock);
+00633 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_4" doxytag="NL3D::CVegetableManager::deleteIg" ></a><p>
+<table class="mdTable" 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::CVegetableManager::deleteIg </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>ig</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>
+delete such an ig. After doing this, you must call igSortBlockOwner-&gt;updateSortBlock() If the sortBlock has many Igs, you can do it after deleting all your igs.
+<p>
+Definition at line <a class="el" href="a06698.html#l00706">706</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06695.html#l00083">NL3D::CVegetableInstanceGroup::_ClipOwner</a>, <a class="el" href="a06705.html#l00088">NL3D::CVegetableSortBlock::_Dirty</a>, <a class="el" href="a06699.html#l00296">_EmptyClipBlockList</a>, <a class="el" href="a06695.html#l00146">NL3D::CVegetableInstanceGroup::_HasZSortPassInstances</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00291">_InstanceGroupMemory</a>, <a class="el" href="a06691.html#l00089">NL3D::CVegetableClipBlock::_NumIgs</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00084">NL3D::CVegetableInstanceGroup::_SortOwner</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06695.html#l00154">NL3D::CVegetableInstanceGroup::_ULNext</a>, <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06695.html#l00156">NL3D::CVegetableInstanceGroup::_ULNumVertices</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06496.html#l00073">NL3D::CTessList&lt; CVegetableClipBlock &gt;::append()</a>, <a class="el" href="a06116.html#l00124">NLMISC::CObjectVector&lt; uint32, false &gt;::clear()</a>, <a class="el" href="a06708.html#l00234">NL3D::CVegetableVBAllocator::deleteVertex()</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableInstanceGroup &gt;::free()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableClipBlock &gt;::remove()</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::remove()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06694.html#l00072">NL3D::CVegetableInstanceGroup::unlinkUL()</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a05876.html#l00227">NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType()</a>, <a class="el" href="a05876.html#l00124">NL3D::CLandscapeVegetableBlock::release()</a>, and <a class="el" href="a05876.html#l00155">NL3D::CLandscapeVegetableBlock::update()</a>.
+<p>
+<div class="fragment"><pre>00707 {
+00708 <span class="keywordflow">if</span>(!ig)
+00709 <span class="keywordflow">return</span>;
+00710
+00711 <span class="comment">// update lighting mgt: no more vertices.</span>
+00712 <span class="comment">// -----------</span>
+00713 <span class="comment">// If I delete the ig which is the current root</span>
+00714 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a> == ig)
+00715 {
+00716 <span class="comment">// switch to next</span>
+00717 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= ig-&gt;_ULNext;
+00718 <span class="comment">// if still the same, it means that the circular list is now empty</span>
+00719 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a> == ig)
+00720 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= NULL;
+00721 <span class="comment">// Reset UL instance info.</span>
+00722 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
+00723 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+00724 }
+00725 <span class="comment">// remove UL vertex count of the deleted ig</span>
+00726 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>-= ig-&gt;_ULNumVertices;
+00727 <span class="comment">// unlink the ig for lighting update.</span>
+00728 ig-&gt;unlinkUL();
+00729
+00730
+00731 <span class="comment">// For all render pass of this instance, delete his vertices</span>
+00732 <span class="comment">// -----------</span>
+00733 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> rdrPass=0; rdrPass &lt; <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
+00734 {
+00735 <span class="comment">// rdrPass</span>
+00736 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
+00737 <span class="comment">// which allocator?</span>
+00738 CVegetableVBAllocator &amp;vbAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vegetRdrPass.HardMode);
+00739
+00740 <span class="comment">// For all vertices of this rdrPass, delete it</span>
+00741 <a class="code" href="a04558.html#a14">sint</a> numVertices;
+00742 numVertices= vegetRdrPass.Vertices.size();
+00743 <span class="comment">// all vertices must have been setuped.</span>
+00744 <a class="code" href="a04199.html#a6">nlassert</a>((<a class="code" href="a04558.html#a15">uint</a>)numVertices == vegetRdrPass.NVertices);
+00745 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;numVertices;i++)
+00746 {
+00747 vbAllocator.deleteVertex(vegetRdrPass.Vertices[i]);
+00748 }
+00749 vegetRdrPass.Vertices.clear();
+00750 }
+00751
+00752 CVegetableClipBlock *clipBlock= ig-&gt;_ClipOwner;
+00753 CVegetableSortBlock *sortBlock= ig-&gt;_SortOwner;
+00754
+00755 <span class="comment">// If I have got some faces in ZSort rdrPass</span>
+00756 <span class="keywordflow">if</span>(ig-&gt;_HasZSortPassInstances)
+00757 <span class="comment">// after my deletion, the sortBlock must be updated.</span>
+00758 sortBlock-&gt;_Dirty= <span class="keyword">true</span>;
+00759
+00760
+00761 <span class="comment">// unlink from sortBlock, and delete.</span>
+00762 sortBlock-&gt;_InstanceGroupList.remove(ig);
+00763 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr6">_InstanceGroupMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(ig);
+00764
+00765
+00766 <span class="comment">// decRef the clipBlock</span>
+00767 clipBlock-&gt;_NumIgs--;
+00768 <span class="comment">// if the clipBlock is now empty, change list</span>
+00769 <span class="keywordflow">if</span>(clipBlock-&gt;_NumIgs==0)
+00770 {
+00771 <span class="comment">// remove from normal list</span>
+00772 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.remove(clipBlock);
+00773 <span class="comment">// and append to empty list.</span>
+00774 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr3">_EmptyClipBlockList</a>.append(clipBlock);
+00775 }
+00776
+00777 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1110_5" doxytag="NL3D::CVegetableManager::deleteSortBlock" ></a><p>
+<table class="mdTable" 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::CVegetableManager::deleteSortBlock </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03684.html">CVegetableSortBlock</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>sortBlock</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>
+delete such a SortBlock. all ig must be deleted before.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00655">655</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06705.html#l00084">NL3D::CVegetableSortBlock::_Owner</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06699.html#l00290">_SortBlockMemory</a>, <a class="el" href="a05490.html#l00147">NLMISC::CBlockMemory&lt; CVegetableSortBlock &gt;::free()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06496.html#l00087">NL3D::CTessList&lt; CVegetableSortBlock &gt;::remove()</a>, and <a class="el" href="a06496.html#l00070">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::size()</a>.
+<p>
+Referenced by <a class="el" href="a05876.html#l00124">NL3D::CLandscapeVegetableBlock::release()</a>.
+<p>
+<div class="fragment"><pre>00656 {
+00657 <span class="keywordflow">if</span>(!sortBlock)
+00658 <span class="keywordflow">return</span>;
+00659
+00660 <span class="comment">// verify no more IGs in this sortblock</span>
+00661 <a class="code" href="a04199.html#a6">nlassert</a>(sortBlock-&gt;_InstanceGroupList.size() == 0);
+00662
+00663 <span class="comment">// unlink from clipBlock</span>
+00664 sortBlock-&gt;_Owner-&gt;_SortBlockList.remove(sortBlock);
+00665
+00666 <span class="comment">// delete</span>
+00667 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr10">_SortBlockMemory</a>.<a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a>(sortBlock);
+00668 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerh0" doxytag="NL3D::CVegetableManager::doubleSidedRdrPass" ></a><p>
+<table class="mdTable" 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::CVegetableManager::doubleSidedRdrPass </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>rdrPass</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><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="a06698.html#l01560">1560</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.
+<p>
+<div class="fragment"><pre>01561 {
+01562 <a class="code" href="a04199.html#a6">nlassert</a>(rdrPass&lt;NL3D_VEGETABLE_NRDRPASS);
+01563 <span class="keywordflow">return</span> (rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>) ||
+01564 (rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>) ||
+01565 (rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>);
+01566 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_0" doxytag="NL3D::CVegetableManager::doUpdateLighting" ></a><p>
+<table class="mdTable" 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::CVegetableManager::doUpdateLighting </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>
+update lighting according to _ULNVerticesToUpdate
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02262">2262</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06695.html#l00154">NL3D::CVegetableInstanceGroup::_ULNext</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l02228">updateLighting()</a>, and <a class="el" href="a06698.html#l02251">updateLightingAll()</a>.
+<p>
+<div class="fragment"><pre>02263 {
+02264 <span class="comment">// while there is still some vertices to update.</span>
+02265 <span class="keywordflow">while</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a> &gt; 0 &amp;&amp; <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>)
+02266 {
+02267 <span class="comment">// update the current ig. if all updated, skip to next one.</span>
+02268 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_2">updateLightingIGPart</a>())
+02269 {
+02270 <span class="comment">// next</span>
+02271 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;_ULNext;
+02272 }
+02273 }
+02274
+02275 <span class="comment">// Now, _ULNVerticesToUpdate should be &lt;=0. (most of the time &lt; 0)</span>
+02276 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_0" doxytag="NL3D::CVegetableManager::exitRenderStateForBlendLayerModel" ></a><p>
+<table class="mdTable" 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::CVegetableManager::exitRenderStateForBlendLayerModel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>driver</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02180">2180</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00380">_BkupFog</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, and <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>.
+<p>
+Referenced by <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>.
+<p>
+<div class="fragment"><pre>02181 {
+02182 <span class="comment">// disable VertexProgram.</span>
+02183 driver-&gt;activeVertexProgram(NULL);
+02184
+02185 <span class="comment">// restore Fog.</span>
+02186 driver-&gt;enableFog(_BkupFog);
+02187 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1120_0" doxytag="NL3D::CVegetableManager::getNumVegetableFaceRendered" ></a><p>
+<table class="mdTable" 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::CVegetableManager::getNumVegetableFaceRendered </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+get the number of faces rendered by the vegetable manager
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02173">2173</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03211">NL3D::CLandscape::getNumVegetableFaceRendered()</a>.
+<p>
+<div class="fragment"><pre>02174 {
+02175 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>;
+02176 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerd0" doxytag="NL3D::CVegetableManager::getRdrPassInfoForShape" ></a><p>
+<table class="mdTable" 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::CVegetableManager::getRdrPassInfoForShape </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>shape</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetWaterState</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>instanceLighted</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>instanceDoubleSided</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>instanceZSort</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>destLighted</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>precomputeLighting</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+get the rdrPass and other info for a given shape.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00817">817</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06703.html#l00132">NL3D::CVegetableShape::AlphaBlend</a>, <a class="el" href="a06703.html#l00130">NL3D::CVegetableShape::DoubleSided</a>, <a class="el" href="a06703.html#l00129">NL3D::CVegetableShape::Lighted</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06703.html#l00131">NL3D::CVegetableShape::PreComputeLighting</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, and <a class="el" href="a06698.html#l00856">reserveIgAddInstances()</a>.
+<p>
+<div class="fragment"><pre>00820 {
+00821 instanceLighted= shape-&gt;Lighted;
+00822 instanceDoubleSided= shape-&gt;DoubleSided;
+00823 <span class="comment">// Disable ZSorting when we intersect water.</span>
+00824 instanceZSort= shape-&gt;AlphaBlend &amp;&amp; vegetWaterState!=<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerw2NL3D_1_1CVegetableManagerw1">IntersectWater</a>;
+00825 destLighted= instanceLighted &amp;&amp; !shape-&gt;PreComputeLighting;
+00826 precomputeLighting= instanceLighted &amp;&amp; shape-&gt;PreComputeLighting;
+00827
+00828 <span class="comment">// get correct rdrPass</span>
+00829 <a class="code" href="a04558.html#a15">uint</a> rdrPass;
+00830 <span class="comment">// get according to lighted / doubleSided state</span>
+00831 <span class="keywordflow">if</span>(destLighted)
+00832 {
+00833 <span class="keywordflow">if</span>(instanceDoubleSided)
+00834 rdrPass= <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>;
+00835 <span class="keywordflow">else</span>
+00836 rdrPass= <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>;
+00837 }
+00838 <span class="keywordflow">else</span>
+00839 {
+00840 <span class="keywordflow">if</span>(instanceDoubleSided)
+00841 {
+00842 <span class="keywordflow">if</span>(instanceZSort)
+00843 rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
+00844 <span class="keywordflow">else</span>
+00845 rdrPass= <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>;
+00846 }
+00847 <span class="keywordflow">else</span>
+00848 rdrPass= <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>;
+00849 }
+00850
+00851 <span class="keywordflow">return</span> rdrPass;
+00852 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerd1" doxytag="NL3D::CVegetableManager::getVBAllocatorForRdrPassAndVBHardMode" ></a><p>
+<table class="mdTable" 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="a03686.html">CVegetableVBAllocator</a> &amp; NL3D::CVegetableManager::getVBAllocatorForRdrPassAndVBHardMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>rdrPass</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>vbHardMode</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get the good allocator for the appropriate rdr pass.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00182">182</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>, <a class="el" href="a06698.html#l01496">swapIgRdrPassHardMode()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>.
+<p>
+<div class="fragment"><pre>00183 {
+00184 <span class="comment">// If software VB</span>
+00185 <span class="keywordflow">if</span>(vbHardMode==0)
+00186 {
+00187 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>)
+00188 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
+00189 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>)
+00190 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
+00191 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>)
+00192 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00193 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>)
+00194 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00195 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+00196 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00197 }
+00198 <span class="comment">// If hard VB</span>
+00199 <span class="keywordflow">else</span>
+00200 {
+00201 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>)
+00202 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
+00203 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>)
+00204 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeLighted];
+00205 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>)
+00206 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00207 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>)
+00208 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00209 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+00210 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeUnlit];
+00211 }
+00212
+00213 <span class="comment">// abnormal case</span>
+00214 <a class="code" href="a04199.html#a12">nlstop</a>;
+00215 <span class="comment">// To avoid warning;</span>
+00216 <span class="keywordflow">return</span> <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[0];
+00217 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1108_0" doxytag="NL3D::CVegetableManager::getVegetableShape" ></a><p>
+<table class="mdTable" 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="a03682.html">CVegetableShape</a> * NL3D::CVegetableManager::getVegetableShape </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>shape</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>
+Load a shape if necessary, and return a shapeId for this shape.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00781">781</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00301">ItShapeMap</a>, <a class="el" href="a06702.html#l00177">NL3D::CVegetableShape::loadShape()</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+Referenced by <a class="el" href="a06686.html#l00123">NL3D::CVegetable::registerToManager()</a>.
+<p>
+<div class="fragment"><pre>00782 {
+00783 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagery0">ItShapeMap</a> it= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.find(shape);
+00784 <span class="comment">// if found</span>
+00785 <span class="keywordflow">if</span>(it != <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.end())
+00786 <span class="keywordflow">return</span> &amp;it-&gt;second;
+00787 <span class="comment">// else insert</span>
+00788 {
+00789 <span class="comment">// insert.</span>
+00790 CVegetableShape *ret;
+00791 it= ( <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.insert(make_pair(shape, CVegetableShape()) ) ).first;
+00792 ret= &amp;it-&gt;second;
+00793
+00794 <span class="comment">// fill.</span>
+00795 <span class="keywordflow">try</span>
+00796 {
+00797 ret-&gt;loadShape(shape);
+00798 }
+00799 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &amp;e)
+00800 {
+00801 <span class="comment">// Warning</span>
+00802 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"CVegetableManager::getVegetableShape error while loading shape file '%s' : '%s'"</span>, shape.c_str (), e.what ());
+00803
+00804 <span class="comment">// Remove from map</span>
+00805 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr9">_ShapeMap</a>.erase (shape);
+00806
+00807 <span class="comment">// Return NULL</span>
+00808 ret = NULL;
+00809 }
+00810
+00811 <span class="keywordflow">return</span> ret;
+00812 }
+00813 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerd2" doxytag="NL3D::CVegetableManager::initVertexProgram" ></a><p>
+<table class="mdTable" 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::CVegetableManager::initVertexProgram </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>vpType</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+init the ith vertexProgram.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00562">562</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00448">_LastDriver</a>, <a class="el" href="a06698.html#l00460">NL3D::NL3D_BendProgram</a>, <a class="el" href="a06698.html#l00529">NL3D::NL3D_CommonEndVegetableProgram</a>, <a class="el" href="a06698.html#l00316">NL3D::NL3D_FastBendProgram</a>, <a class="el" href="a06698.html#l00471">NL3D::NL3D_LightedStartVegetableProgram</a>, <a class="el" href="a06698.html#l00513">NL3D::NL3D_UnlitAlphaBlendVegetableProgram</a>, <a class="el" href="a06698.html#l00506">NL3D::NL3D_UnlitStartVegetableProgram</a>, <a class="el" href="a06693.html#l00038">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>, <a class="el" href="a06693.html#l00039">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>, <a class="el" href="a06693.html#l00040">NL3D_VEGETABLE_RDRPASS_UNLIT</a>, <a class="el" href="a06693.html#l00041">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01569">updateDriver()</a>.
+<p>
+<div class="fragment"><pre>00563 {
+00564 <a class="code" href="a04199.html#a6">nlassert</a>(_LastDriver); <span class="comment">// update driver should have been called at least once !</span>
+00565 <span class="comment">// Init the Vertex Program.</span>
+00566 string vpgram;
+00567 <span class="comment">// start always with Bend.</span>
+00568 <span class="keywordflow">if</span>( vpType==<a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a> || vpType==<a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a> )
+00569 vpgram= <a class="code" href="a05363.html#a335">NL3D_BendProgram</a>;
+00570 <span class="keywordflow">else</span>
+00571 vpgram= <a class="code" href="a05363.html#a332">NL3D_FastBendProgram</a>;
+00572
+00573 <span class="comment">// combine the VP according to Type</span>
+00574 <span class="keywordflow">switch</span>(vpType)
+00575 {
+00576 <span class="keywordflow">case</span> <a class="code" href="a05270.html#a1">NL3D_VEGETABLE_RDRPASS_LIGHTED</a>:
+00577 <span class="keywordflow">case</span> <a class="code" href="a05270.html#a2">NL3D_VEGETABLE_RDRPASS_LIGHTED_2SIDED</a>:
+00578 vpgram+= string(NL3D_LightedStartVegetableProgram);
+00579 <span class="keywordflow">break</span>;
+00580 <span class="keywordflow">case</span> <a class="code" href="a05270.html#a3">NL3D_VEGETABLE_RDRPASS_UNLIT</a>:
+00581 <span class="keywordflow">case</span> <a class="code" href="a05270.html#a4">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED</a>:
+00582 vpgram+= string(NL3D_UnlitStartVegetableProgram);
+00583 <span class="keywordflow">break</span>;
+00584 <span class="keywordflow">case</span> <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>:
+00585 vpgram+= string(NL3D_UnlitStartVegetableProgram);
+00586 vpgram+= string(NL3D_UnlitAlphaBlendVegetableProgram);
+00587 <span class="keywordflow">break</span>;
+00588 }
+00589
+00590 <span class="comment">// common end of VP</span>
+00591 vpgram+= string(NL3D_CommonEndVegetableProgram);
+00592
+00593 <span class="comment">// create VP.</span>
+00594 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr14">_VertexProgram</a>[vpType]= <span class="keyword">new</span> CVertexProgram(vpgram.c_str());
+00595
+00596 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_0" doxytag="NL3D::CVegetableManager::loadTexture" ></a><p>
+<table class="mdTable" 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::CVegetableManager::loadTexture </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>itex</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>
+setup a global texture used for all vegetables (smartPtr-ized).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01604">1604</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, and <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>.
+<p>
+<div class="fragment"><pre>01605 {
+01606 <span class="comment">// setup a ITexture (smartPtr-ized).</span>
+01607 <span class="comment">// Store in stage1, for dynamicLightmaping</span>
+01608 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(1, itex);
+01609 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_1" doxytag="NL3D::CVegetableManager::loadTexture" ></a><p>
+<table class="mdTable" 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::CVegetableManager::loadTexture </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>texName</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>
+load a global texture used for all vegetables (lookup into CPath).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01592">1592</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06505.html#l00100">NL3D::ITexture::setFilterMode()</a>, <a class="el" href="a06506.html#l00202">NL3D::ITexture::setWrapS()</a>, and <a class="el" href="a06506.html#l00203">NL3D::ITexture::setWrapT()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03174">NL3D::CLandscape::loadVegetableTexture()</a>.
+<p>
+<div class="fragment"><pre>01593 {
+01594 <span class="comment">// setup a CTextureFile (smartPtr-ized).</span>
+01595 ITexture *tex= <span class="keyword">new</span> CTextureFile(texName);
+01596 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1114_1">loadTexture</a>(tex);
+01597 <span class="comment">// setup good params.</span>
+01598 tex-&gt;setFilterMode(ITexture::Linear, ITexture::LinearMipMapLinear);
+01599 tex-&gt;setWrapS(ITexture::Clamp);
+01600 tex-&gt;setWrapT(ITexture::Clamp);
+01601 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_2" doxytag="NL3D::CVegetableManager::lockBuffers" ></a><p>
+<table class="mdTable" 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::CVegetableManager::lockBuffers </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>
+lock any AGP vertex buffers. Do it wisely (just one time before refine as example). You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a> (and so <a class="el" href="a03671.html#NL3D_1_1CVegetablez1100_1">CVegetable::generateInstance()</a>) with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
+<p>
+Definition at line <a class="el" href="a06698.html#l01622">1622</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06708.html#l00144">NL3D::CVegetableVBAllocator::lockBuffer()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00862">NL3D::CLandscape::lockBuffers()</a>.
+<p>
+<div class="fragment"><pre>01623 {
+01624 <span class="comment">// lock all buffers</span>
+01625 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
+01626 {
+01627 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].lockBuffer();
+01628 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].lockBuffer();
+01629 }
+01630 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_3" doxytag="NL3D::CVegetableManager::render" ></a><p>
+<table class="mdTable" 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::CVegetableManager::render </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewCenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>frontVector</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03082.html">CPlane</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>pyramid</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03487.html">ITexture</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="a02434.html">IDriver</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</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>
+render the manager into a driver, with current viewMatrix/frustum/fog setuped Buffers should be unlocked. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>textureDLM</em>&nbsp;</td><td>is the dynamic lightmap to use. can be NULL if don't want DLM</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01713">1713</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00378">_AngleAxis</a>, <a class="el" href="a06705.html#l00096">NL3D::CVegetableSortBlock::_Center</a>, <a class="el" href="a06699.html#l00294">_ClipBlockList</a>, <a class="el" href="a06705.html#l00118">NL3D::CVegetableSortBlock::_InstanceGroupList</a>, <a class="el" href="a06699.html#l00382">_ManagerMatrix</a>, <a class="el" href="a06705.html#l00111">NL3D::CVegetableSortBlock::_NTriangles</a>, <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>, <a class="el" href="a06699.html#l00392">_NumZSortBlendLayers</a>, <a class="el" href="a06705.html#l00103">NL3D::CVegetableSortBlock::_QuadrantId</a>, <a class="el" href="a06705.html#l00098">NL3D::CVegetableSortBlock::_Radius</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06691.html#l00092">NL3D::CVegetableClipBlock::_RenderNext</a>, <a class="el" href="a06691.html#l00086">NL3D::CVegetableClipBlock::_SortBlockList</a>, <a class="el" href="a06705.html#l00101">NL3D::CVegetableSortBlock::_SortKey</a>, <a class="el" href="a06705.html#l00091">NL3D::CVegetableSortBlock::_UnderWater</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a06699.html#l00379">_ViewCenter</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00369">_WindDeltaTable</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00361">_WindPrecRenderTime</a>, <a class="el" href="a06699.html#l00368">_WindTable</a>, <a class="el" href="a06699.html#l00393">_ZSortLayerDistMax</a>, <a class="el" href="a06699.html#l00395">_ZSortModelLayers</a>, <a class="el" href="a06699.html#l00397">_ZSortModelLayersUW</a>, <a class="el" href="a06708.html#l00266">NL3D::CVegetableVBAllocator::activate()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableInstanceGroup &gt;::begin()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableSortBlock &gt;::begin()</a>, <a class="el" href="a06496.html#l00071">NL3D::CTessList&lt; CVegetableClipBlock &gt;::begin()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06690.html#l00082">NL3D::CVegetableClipBlock::clip()</a>, <a class="el" href="a06698.html#l01560">doubleSidedRdrPass()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_1">NL3D::IDriver::fogEnabled()</a>, <a class="el" href="a06708.html#l00171">NL3D::CVegetableVBAllocator::getNumUserVerticesAllocated()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a06496.html#l00044">NL3D::CTessNodeList::Next</a>, <a class="el" href="a06693.html#l00061">NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06206.html#l00048">NL3D::CPrimitiveProfile::NTriangles</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz141_4">NL3D::IDriver::profileRenderedPrimitives()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera55">NL3D::IDriver::renderSimpleTriangles()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00071">NL3D::CMaterial::setDoubleSided()</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera67">NL3D::IDriver::setupMaterial()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05641.html#l00247">NL3D::CMaterial::texEnvArg0Alpha()</a>, <a class="el" href="a05641.html#l00221">NL3D::CMaterial::texEnvArg0RGB()</a>, <a class="el" href="a05641.html#l00256">NL3D::CMaterial::texEnvArg1Alpha()</a>, <a class="el" href="a05641.html#l00229">NL3D::CMaterial::texEnvArg1RGB()</a>, <a class="el" href="a05641.html#l00240">NL3D::CMaterial::texEnvOpAlpha()</a>, <a class="el" href="a05641.html#l00214">NL3D::CMaterial::texEnvOpRGB()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06698.html#l01569">updateDriver()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a05646.html#l00236">z</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>01715 {
+01716 <a class="code" href="a04365.html#a4">H_AUTO</a>( NL3D_Vegetable_Render );
+01717
+01718 CVegetableClipBlock *rootToRender= NULL;
+01719
+01720 <span class="comment">// get normalized front vector.</span>
+01721 CVector frontVectorNormed= frontVector.normed();
+01722
+01723 <span class="comment">// For Speed debug only.</span>
+01724 <span class="comment">/*extern bool YOYO_ATTest;</span>
+01725 <span class="comment"> if(YOYO_ATTest)</span>
+01726 <span class="comment"> return;</span>
+01727 <span class="comment"> */</span>
+01728
+01729 <span class="comment">// Clip.</span>
+01730 <span class="comment">//--------------------</span>
+01731 <span class="comment">// For all current not empty clipBlocks, clip against pyramid, and insert visibles in list.</span>
+01732 CVegetableClipBlock *ptrClipBlock= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr0">_ClipBlockList</a>.begin();
+01733 <span class="keywordflow">while</span>(ptrClipBlock)
+01734 {
+01735 <span class="comment">// if the clipBlock is visible and not empty</span>
+01736 <span class="keywordflow">if</span>(ptrClipBlock-&gt;clip(pyramid))
+01737 {
+01738 <span class="comment">// insert into visible list.</span>
+01739 ptrClipBlock-&gt;_RenderNext= rootToRender;
+01740 rootToRender= ptrClipBlock;
+01741 }
+01742
+01743 <span class="comment">// next</span>
+01744 ptrClipBlock= (CVegetableClipBlock*)ptrClipBlock-&gt;Next;
+01745 }
+01746
+01747
+01748 <span class="comment">// If no clip block visible, just skip!!</span>
+01749 <span class="keywordflow">if</span>(rootToRender==NULL)
+01750 <span class="keywordflow">return</span>;
+01751
+01752
+01753 <span class="comment">// Prepare Render</span>
+01754 <span class="comment">//--------------------</span>
+01755
+01756 <span class="comment">// profile.</span>
+01757 CPrimitiveProfile ppIn, ppOut;
+01758 driver-&gt;profileRenderedPrimitives(ppIn, ppOut);
+01759 <a class="code" href="a04558.html#a15">uint</a> precNTriRdr= ppOut.NTriangles;
+01760
+01761
+01762 <span class="comment">// Disable Fog.</span>
+01763 <span class="keywordtype">bool</span> bkupFog;
+01764 bkupFog= driver-&gt;fogEnabled();
+01765 driver-&gt;enableFog(<span class="keyword">false</span>);
+01766
+01767
+01768 <span class="comment">// Used by setupVertexProgramConstants(). The center of camera.</span>
+01769 <span class="comment">// Used for AlphaBlending, and for ZBuffer precision problems.</span>
+01770 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">_ViewCenter</a>= viewCenter;
+01771
+01772
+01773 <span class="comment">// The manager is identity in essence. But for ZBuffer improvements, must set it as close</span>
+01774 <span class="comment">// to the camera. In the VertexProgram, _ViewCenter is substracted from bent vertex pos. So take it as position.</span>
+01775 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a>.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_0">identity</a>();
+01776 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">_ManagerMatrix</a>.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_4">setPos</a>(_ViewCenter);
+01777
+01778
+01779 <span class="comment">// set model matrix to the manager matrix.</span>
+01780 driver-&gt;setupModelMatrix(_ManagerMatrix);
+01781
+01782
+01783 <span class="comment">// set the driver for all allocators</span>
+01784 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1114_6">updateDriver</a>(driver);
+01785
+01786
+01787 <span class="comment">// Compute Bend Anim.</span>
+01788
+01789 <span class="comment">// AnimFrequency factor.</span>
+01790 <span class="comment">// Doing it incrementaly allow change of of frequency each frame with good results.</span>
+01791 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>+= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a> - <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>)*<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>;
+01792 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">_WindAnimTime</a>= fmod(_WindAnimTime, (<span class="keywordtype">float</span>)NL3D_VEGETABLE_FREQUENCY_FACTOR_PREC);
+01793 <span class="comment">// NB: Leave timeBend (_WindAnimTime) as a time (ie [0..1]), because VP do a "EXP time".</span>
+01794 <span class="comment">// For incremental computing.</span>
+01795 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">_WindPrecRenderTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>;
+01796
+01797
+01798 <span class="comment">// compute the angleAxis corresponding to direction</span>
+01799 <span class="comment">// perform a 90deg rotation to get correct angleAxis</span>
+01800 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.set(-<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.y,<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.x,0);
+01801
+01802
+01803 <span class="comment">// Fill LUT WindTable.</span>
+01804 <a class="code" href="a04558.html#a15">uint</a> i;
+01805 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
+01806 {
+01807 <span class="comment">/* NB: this formula works quite well, because vertex BendFactor is expressed in Radian/2.</span>
+01808 <span class="comment"> And since animFactor==(_CosTable[i] + 1) E [0..2], we have here an arc-cirle computing:</span>
+01809 <span class="comment"> dmove= Radius * AngleRadian/2 * animFactor. So at max of animFactor (ie 2), we have:</span>
+01810 <span class="comment"> dmove= Radius * AngleRadian, which is by definition an arc-cirle computing...</span>
+01811 <span class="comment"> And so this approximate the Bend-quaternion Vertex Program.</span>
+01812 <span class="comment"> */</span>
+01813 <span class="keywordtype">float</span> windForce= (<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_0">_CosTable</a>[(i+32)%64] + 1);
+01814 <span class="comment">// Modify with _WindPower / _WindBendMin.</span>
+01815 windForce= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>*2 + windForce * (1-<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>);
+01816 windForce*= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>;
+01817 <span class="comment">// Compute direction of the wind, and multiply by windForce.</span>
+01818 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i]= <a class="code" href="a03660.html">CVector2f</a>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.x, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.y) * windForce;
+01819 }
+01820 <span class="comment">// compute delta</span>
+01821 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
+01822 {
+01823 <a class="code" href="a03660.html">CVector2f</a> cur= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i];
+01824 <a class="code" href="a03660.html">CVector2f</a> delta= _WindTable[ (i+1)%<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a> ] - cur;
+01825 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a>[i]= delta;
+01826 }
+01827
+01828
+01829 <span class="comment">// setup VP constants.</span>
+01830 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a>(driver);
+01831
+01832
+01833 <span class="comment">// Setup TexEnvs for Dynamic lightmapping</span>
+01834 <span class="comment">//--------------------</span>
+01835 <span class="comment">// if the dynamic lightmap is provided</span>
+01836 <span class="keywordflow">if</span>(textureDLM)
+01837 {
+01838 <span class="comment">// stage0 RGB is Diffuse + DLM.</span>
+01839 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(0, textureDLM);
+01840 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(0, CMaterial::Add);
+01841 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(0, CMaterial::Texture, CMaterial::SrcColor);
+01842 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(0, CMaterial::Diffuse, CMaterial::SrcColor);
+01843 <span class="comment">// stage1 RGB is Previous * Texture</span>
+01844 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(1, CMaterial::Modulate);
+01845 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(1, CMaterial::Texture, CMaterial::SrcColor);
+01846 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(1, CMaterial::Previous, CMaterial::SrcColor);
+01847 }
+01848 <span class="keywordflow">else</span>
+01849 {
+01850 <span class="comment">// reset stage0 (to skip it)</span>
+01851 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setTexture(0, NULL);
+01852 <span class="comment">// stage1 RGB is Diffuse * Texture</span>
+01853 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpRGB(1, CMaterial::Modulate);
+01854 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0RGB(1, CMaterial::Texture, CMaterial::SrcColor);
+01855 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1RGB(1, CMaterial::Diffuse, CMaterial::SrcColor);
+01856 }
+01857 <span class="comment">// stage1 Alpha is always "Modulate texture with diffuse Alpha"</span>
+01858 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvOpAlpha(1, CMaterial::Modulate);
+01859 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg0Alpha(1, CMaterial::Texture, CMaterial::SrcAlpha);
+01860 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.texEnvArg1Alpha(1, CMaterial::Diffuse, CMaterial::SrcAlpha);
+01861
+01862
+01863
+01864 <span class="comment">// Render !ZSORT pass</span>
+01865 <span class="comment">//--------------------</span>
+01866
+01867 <span class="comment">// setup material (may have change because of ZSORT / alphaBlend pass)</span>
+01868 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlend(<span class="keyword">false</span>);
+01869 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setZWrite(<span class="keyword">true</span>);
+01870 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTestThreshold(0.5f);
+01871
+01872
+01873 <span class="comment">/*</span>
+01874 <span class="comment"> Prefer sort with Soft / Hard first.</span>
+01875 <span class="comment"> Also, Prefer do VBsoft last, for better GPU //ism with Landscape.</span>
+01876 <span class="comment"> */</span>
+01877 <span class="comment">// For both allocators: Hard(1) then Soft(0)</span>
+01878 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> vbHardMode= 1; vbHardMode&gt;=0; vbHardMode--)
+01879 {
+01880 <span class="comment">// For all renderPass.</span>
+01881 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> rdrPass=0; rdrPass &lt; <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
+01882 {
+01883 <span class="comment">// skip ZSORT rdrPass, done after.</span>
+01884 <span class="keywordflow">if</span>(rdrPass == <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>)
+01885 <span class="keywordflow">continue</span>;
+01886
+01887 <span class="comment">// which allocator?</span>
+01888 CVegetableVBAllocator &amp;vbAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vbHardMode);
+01889
+01890 <span class="comment">// Do the pass only if there is some vertices to draw.</span>
+01891 <span class="keywordflow">if</span>(vbAllocator.getNumUserVerticesAllocated()&gt;0)
+01892 {
+01893 <span class="comment">// additional setup to the material</span>
+01894 <span class="keywordtype">bool</span> doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
+01895 <span class="comment">// set the 2Sided flag in the material</span>
+01896 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setDoubleSided( doubleSided );
+01897
+01898
+01899 <span class="comment">// Activate the unique material.</span>
+01900 driver-&gt;setupMaterial(_VegetableMaterial);
+01901
+01902 <span class="comment">// activate Vertex program first.</span>
+01903 <span class="comment">//nlinfo("\nSTARTVP\n%s\nENDVP\n", _VertexProgram[rdrPass]-&gt;getProgram().c_str());</span>
+01904 <a class="code" href="a04199.html#a9">nlverify</a>(driver-&gt;activeVertexProgram(_VertexProgram[rdrPass]));
+01905
+01906 <span class="comment">// Activate the good VBuffer</span>
+01907 vbAllocator.activate();
+01908
+01909 <span class="comment">// For all visibles clipBlock, render their instance groups.</span>
+01910 ptrClipBlock= rootToRender;
+01911 <span class="keywordflow">while</span>(ptrClipBlock)
+01912 {
+01913 <span class="comment">// For all sortBlock of the clipBlock</span>
+01914 CVegetableSortBlock *ptrSortBlock= ptrClipBlock-&gt;_SortBlockList.begin();
+01915 <span class="keywordflow">while</span>(ptrSortBlock)
+01916 {
+01917 <span class="comment">// For all igs of the sortBlock</span>
+01918 CVegetableInstanceGroup *ptrIg= ptrSortBlock-&gt;_InstanceGroupList.begin();
+01919 <span class="keywordflow">while</span>(ptrIg)
+01920 {
+01921 <span class="comment">// rdrPass</span>
+01922 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ptrIg-&gt;_RdrPass[rdrPass];
+01923
+01924 <span class="comment">// if this rdrPass is in same HardMode as we process now.</span>
+01925 <span class="keywordflow">if</span>( (vegetRdrPass.HardMode &amp;&amp; vbHardMode==1) || (!vegetRdrPass.HardMode &amp;&amp; vbHardMode==0) )
+01926 {
+01927 <span class="comment">// Ok, Render the faces.</span>
+01928 <span class="keywordflow">if</span>(vegetRdrPass.NTriangles)
+01929 {
+01930 driver-&gt;renderSimpleTriangles(&amp;vegetRdrPass.TriangleIndices[0],
+01931 vegetRdrPass.NTriangles);
+01932 }
+01933 }
+01934
+01935 <span class="comment">// next ig.</span>
+01936 ptrIg= (CVegetableInstanceGroup*)ptrIg-&gt;Next;
+01937 }
+01938
+01939 <span class="comment">// next sortBlock</span>
+01940 ptrSortBlock= (CVegetableSortBlock *)(ptrSortBlock-&gt;Next);
+01941 }
+01942
+01943 <span class="comment">// next clipBlock to render </span>
+01944 ptrClipBlock= ptrClipBlock-&gt;_RenderNext;
+01945 }
+01946 }
+01947
+01948 }
+01949
+01950 }
+01951
+01952 <span class="comment">// Render ZSort pass.</span>
+01953 <span class="comment">//--------------------</span>
+01954
+01955 <span class="comment">// Debug Quadrants.</span>
+01956 <span class="comment">/*static vector&lt;CVector&gt; p0DebugLines;</span>
+01957 <span class="comment"> static vector&lt;CVector&gt; p1DebugLines;</span>
+01958 <span class="comment"> p0DebugLines.clear();</span>
+01959 <span class="comment"> p1DebugLines.clear();*/</span>
+01960
+01961 <span class="comment">// For all Blend model Layers, clear Sort Block list and setup.</span>
+01962 <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_2">_NumZSortBlendLayers</a>;i++)
+01963 {
+01964 <span class="comment">// must have been created.</span>
+01965 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayers[i]);
+01966 <a class="code" href="a04199.html#a6">nlassert</a>(_ZSortModelLayersUW[i]);
+01967 <span class="comment">// NB: don't refresh list, it is done in CVegetableBlendLayerModel.</span>
+01968 <span class="comment">// We must do it here, because if vegetableManger::render() is no more called (eg: disabled),</span>
+01969 <span class="comment">// then the models must do nothing.</span>
+01970
+01971 <span class="comment">// To get layers correclty sorted from fornt to back, must init their pos</span>
+01972 <span class="comment">// because it is the renderTraversal which sort them.</span>
+01973 <span class="comment">// compute distance to camera of this layer.</span>
+01974 <span class="keywordtype">float</span> layerZ= i * <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a> / _NumZSortBlendLayers;
+01975 <span class="comment">// compute position of this layer.</span>
+01976 CVector pos= viewCenter + frontVector * layerZ;
+01977 <span class="comment">// special setup in the layer.</span>
+01978 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[i]-&gt;setWorldPos(pos);
+01979 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[i]-&gt;setWorldPos(pos);
+01980 }
+01981
+01982 <span class="comment">// If some vertices in arrays for ZSort rdrPass</span>
+01983 <span class="keywordflow">if</span>( <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT, 0).getNumUserVerticesAllocated()&gt;0 ||
+01984 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT, 1).getNumUserVerticesAllocated()&gt;0 )
+01985 {
+01986 <a class="code" href="a04558.html#a15">uint</a> rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
+01987
+01988 <span class="comment">// sort</span>
+01989 <span class="comment">//-------------</span>
+01990 <span class="comment">// Array for sorting. (static to avoid reallocation)</span>
+01991 <span class="keyword">static</span> vector&lt;CSortVSB&gt; sortVegetSbs;
+01992 sortVegetSbs.clear();
+01993
+01994 <span class="comment">// For all visibles clipBlock</span>
+01995 ptrClipBlock= rootToRender;
+01996 <span class="keywordflow">while</span>(ptrClipBlock)
+01997 {
+01998 <span class="comment">// For all sortBlock, prepare to sort them</span>
+01999 CVegetableSortBlock *ptrSortBlock= ptrClipBlock-&gt;_SortBlockList.begin();
+02000 <span class="keywordflow">while</span>(ptrSortBlock)
+02001 {
+02002 <span class="comment">// if the sortBlock has some sorted faces to render</span>
+02003 <span class="keywordflow">if</span>(ptrSortBlock-&gt;_NTriangles != 0)
+02004 {
+02005 <span class="comment">// Compute Distance to Viewer.</span>
+02006 <span class="comment">/* NB: compute radial distance (with norm()) instead of linear distance </span>
+02007 <span class="comment"> (DotProduct with front vector) get less "ZSort poping".</span>
+02008 <span class="comment"> */</span>
+02009 CVector dirToSb= ptrSortBlock-&gt;_Center - viewCenter;
+02010 <span class="keywordtype">float</span> distToViewer= dirToSb.norm();
+02011 <span class="comment">// SortKey change if the center is behind the camera.</span>
+02012 <span class="keywordflow">if</span>(dirToSb * frontVectorNormed&lt;0)
+02013 {
+02014 ptrSortBlock-&gt;_SortKey= - distToViewer;
+02015 }
+02016 <span class="keywordflow">else</span>
+02017 {
+02018 ptrSortBlock-&gt;_SortKey= distToViewer;
+02019 }
+02020
+02021 <span class="comment">// Choose the quadrant for this sortBlock</span>
+02022 <a class="code" href="a04558.html#a14">sint</a> bestDirIdx= 0;
+02023 <span class="keywordtype">float</span> bestDirVal= -FLT_MAX;
+02024 <span class="comment">// If too near, must take the frontVector as key, to get better sort.</span>
+02025 <span class="comment">// use ptrSortBlock-&gt;_SortKey to get correct negative values.</span>
+02026 <span class="keywordflow">if</span>(ptrSortBlock-&gt;_SortKey &lt; ptrSortBlock-&gt;_Radius)
+02027 {
+02028 dirToSb= frontVectorNormed;
+02029 }
+02030
+02031 <span class="comment">// NB: no need to normalize dirToSb, because need only to sort with DP</span>
+02032 <span class="comment">// choose the good list of triangles according to quadrant.</span>
+02033 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> dirIdx=0; dirIdx&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; dirIdx++)
+02034 {
+02035 <span class="keywordtype">float</span> dirVal= CVegetableQuadrant::Dirs[dirIdx] * dirToSb;
+02036 <span class="keywordflow">if</span>(dirVal&gt;bestDirVal)
+02037 {
+02038 bestDirVal= dirVal;
+02039 bestDirIdx= dirIdx;
+02040 }
+02041 }
+02042
+02043 <span class="comment">// set the result.</span>
+02044 ptrSortBlock-&gt;_QuadrantId= bestDirIdx;
+02045
+02046 <span class="comment">// insert in list to sort.</span>
+02047 sortVegetSbs.push_back(CSortVSB(ptrSortBlock));
+02048
+02049 <span class="comment">// Debug Quadrants</span>
+02050 <span class="comment">/*p0DebugLines.push_back(ptrSortBlock-&gt;_Center);</span>
+02051 <span class="comment"> p1DebugLines.push_back(ptrSortBlock-&gt;_Center + CVegetableQuadrant::Dirs[bestDirIdx]);*/</span>
+02052 }
+02053
+02054 <span class="comment">// next sortBlock</span>
+02055 ptrSortBlock= (CVegetableSortBlock *)(ptrSortBlock-&gt;Next);
+02056 }
+02057
+02058 <span class="comment">// next clipBlock to render </span>
+02059 ptrClipBlock= ptrClipBlock-&gt;_RenderNext;
+02060 }
+02061
+02062 <span class="comment">// sort!</span>
+02063 <span class="comment">// QSort. (I tried, better than radix sort, guckk!!)</span>
+02064 sort(sortVegetSbs.begin(), sortVegetSbs.end());
+02065
+02066
+02067 <span class="comment">// setup material for this rdrPass. NB: rendered after (in LayerModels).</span>
+02068 <span class="comment">//-------------</span>
+02069 <span class="keywordtype">bool</span> doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
+02070 <span class="comment">// set the 2Sided flag in the material</span>
+02071 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setDoubleSided( doubleSided );
+02072
+02073 <span class="comment">// setup the unique material.</span>
+02074 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setBlend(<span class="keyword">true</span>);
+02075 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setZWrite(<span class="keyword">false</span>);
+02076 <span class="comment">// leave AlphaTest but still kick low alpha values (for fillRate performance)</span>
+02077 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr13">_VegetableMaterial</a>.setAlphaTestThreshold(0.1f);
+02078
+02079
+02080
+02081 <span class="comment">// order them in Layers.</span>
+02082 <span class="comment">//-------------</span>
+02083
+02084 <span class="comment">// render from back to front, to keep correct Z order in a single layer.</span>
+02085 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;sortVegetSbs.size();i++)
+02086 {
+02087 CVegetableSortBlock *ptrSortBlock= sortVegetSbs[i].Sb;
+02088
+02089 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a574">z</a>= ptrSortBlock-&gt;_SortKey;
+02090 <span class="comment">// compute in which layer must store this SB.</span>
+02091 <a class="code" href="a04223.html#a574">z</a>= <a class="code" href="a04223.html#a574">z</a>*_NumZSortBlendLayers / <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_3">_ZSortLayerDistMax</a>;
+02092 <span class="comment">// Avoid a floor(), using an OptFastFloor, but without the OptFastFloorBegin() End() group.</span>
+02093 <span class="comment">// =&gt; avoid the imprecision with such a trick; *256, then divide the integer by 256.</span>
+02094 <a class="code" href="a04558.html#a14">sint</a> layer= <a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(z*256) &gt;&gt; 8;
+02095 <a class="code" href="a05378.html#a374">clamp</a>(layer, 0, (<a class="code" href="a04558.html#a14">sint</a>)_NumZSortBlendLayers-1);
+02096
+02097 <span class="comment">// Range in correct layer, according to water ordering</span>
+02098 <span class="keywordflow">if</span>(ptrSortBlock-&gt;_UnderWater)
+02099 <span class="comment">// range in the correct layermodel (NB: keep the same layer internal order).</span>
+02100 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">_ZSortModelLayersUW</a>[layer]-&gt;SortBlocks.push_back(ptrSortBlock);
+02101 <span class="keywordflow">else</span>
+02102 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">_ZSortModelLayers</a>[layer]-&gt;SortBlocks.push_back(ptrSortBlock);
+02103 }
+02104
+02105 }
+02106
+02107
+02108 <span class="comment">// Quit</span>
+02109 <span class="comment">//--------------------</span>
+02110
+02111 <span class="comment">// disable VertexProgram.</span>
+02112 driver-&gt;activeVertexProgram(NULL);
+02113
+02114
+02115 <span class="comment">// restore Fog.</span>
+02116 driver-&gt;enableFog(bkupFog);
+02117
+02118
+02119 <span class="comment">// Debug Quadrants</span>
+02120 <span class="comment">/*for(uint l=0; l&lt;p0DebugLines.size();l++)</span>
+02121 <span class="comment"> {</span>
+02122 <span class="comment"> CVector dv= CVector::K;</span>
+02123 <span class="comment"> CDRU::drawLine(p0DebugLines[l]+dv, p1DebugLines[l]+dv, CRGBA(255,0,0), *driver);</span>
+02124 <span class="comment"> }*/</span>
+02125
+02126 <span class="comment">// profile: compute number of triangles rendered with vegetable manager.</span>
+02127 driver-&gt;profileRenderedPrimitives(ppIn, ppOut);
+02128 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= ppOut.NTriangles-precNTriRdr;
+02129
+02130 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_1" doxytag="NL3D::CVegetableManager::reserveIgAddInstances" ></a><p>
+<table class="mdTable" 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::CVegetableManager::reserveIgAddInstances </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetIgReserve</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03682.html">CVegetableShape</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>shape</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerw2">TVegetableWater</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetWaterState</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>numInstances</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>
+reserve some instance space in an Ig. nothing is really done here, after doing this for all shapes of your ig, you must call <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_2">reserveIgCompile()</a> <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>vegetIgReserve</em>&nbsp;</td><td>the object where space required for the ig is added</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00856">856</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06695.html#l00206">NL3D::CVegetableInstanceGroupReserve::_RdrPass</a>, <a class="el" href="a06711.html#l00453">NL3D::CVertexBuffer::getNumVertices()</a>, <a class="el" href="a06698.html#l00817">getRdrPassInfoForShape()</a>, <a class="el" href="a06695.html#l00195">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NLightedInstances</a>, <a class="el" href="a06695.html#l00193">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06695.html#l00194">NL3D::CVegetableInstanceGroupReserve::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06703.html#l00140">NL3D::CVegetableShape::TriangleIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>.
+<p>
+Referenced by <a class="el" href="a06686.html#l00296">NL3D::CVegetable::reserveIgAddInstances()</a>.
+<p>
+<div class="fragment"><pre>00857 {
+00858 <span class="keywordtype">bool</span> instanceLighted;
+00859 <span class="keywordtype">bool</span> instanceDoubleSided;
+00860 <span class="keywordtype">bool</span> instanceZSort;
+00861 <span class="keywordtype">bool</span> destLighted;
+00862 <span class="keywordtype">bool</span> precomputeLighting;
+00863
+00864 <span class="comment">// get correct rdrPass / info</span>
+00865 <a class="code" href="a04558.html#a15">uint</a> rdrPass;
+00866 rdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd0">getRdrPassInfoForShape</a>(shape, vegetWaterState, instanceLighted, instanceDoubleSided,
+00867 instanceZSort, destLighted, precomputeLighting);
+00868
+00869 <span class="comment">// veget rdrPass</span>
+00870 CVegetableInstanceGroupReserve::CVegetableRdrPass &amp;vegetRdrPass= vegetIgReserve._RdrPass[rdrPass];
+00871
+00872 <span class="comment">// Reserve space in the rdrPass.</span>
+00873 vegetRdrPass.NVertices+= numInstances * shape-&gt;VB.getNumVertices();
+00874 vegetRdrPass.NTriangles+= numInstances * shape-&gt;TriangleIndices.size()/3;
+00875 <span class="comment">// if the instances are lighted, reserve space for lighting updates</span>
+00876 <span class="keywordflow">if</span>(instanceLighted)
+00877 vegetRdrPass.NLightedInstances+= numInstances;
+00878 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1112_2" doxytag="NL3D::CVegetableManager::reserveIgCompile" ></a><p>
+<table class="mdTable" 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::CVegetableManager::reserveIgCompile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ig</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03677.html">CVegetableInstanceGroupReserve</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vegetIgReserve</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>
+reserve the space in the ig. <a class="el" href="a04199.html#a6">nlassert()</a> if the ig is not empty. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_1">reserveIgAddInstances()</a></dd></dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l00882">882</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06695.html#l00206">NL3D::CVegetableInstanceGroupReserve::_RdrPass</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06695.html#l00142">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderArray</a>, <a class="el" href="a06695.html#l00143">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderNumTriangles</a>, <a class="el" href="a06695.html#l00144">NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrders</a>, <a class="el" href="a06116.html#l00195">NLMISC::CObjectVector&lt; sint16, false &gt;::getPtr()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06693.html#l00057">NL3D_VEGETABLE_NUM_QUADRANT</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; sint16, false &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::resize()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector&lt; uint32, false &gt;::resize()</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; sint16, false &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>.
+<p>
+<div class="fragment"><pre>00883 {
+00884 <a class="code" href="a04558.html#a15">uint</a> rdrPass;
+00885
+00886
+00887 <span class="comment">// Check.</span>
+00888 <span class="comment">//===========</span>
+00889 <span class="comment">// For all rdrPass of the ig, check empty</span>
+00890 <span class="keywordflow">for</span>(rdrPass= 0; rdrPass&lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
+00891 {
+00892 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
+00893 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleIndices.size()==0);
+00894 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleLocalIndices.size()==0);
+00895 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.Vertices.size()==0);
+00896 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.LightedInstances.size()==0);
+00897 }
+00898 <span class="comment">// Do the same for all quadrants of the zsort rdrPass.</span>
+00899 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderArray.size()==0);
+00900 <a class="code" href="a04199.html#a6">nlassert</a>(ig-&gt;_TriangleQuadrantOrderNumTriangles==0);
+00901
+00902
+00903 <span class="comment">// Reserve.</span>
+00904 <span class="comment">//===========</span>
+00905 <span class="comment">// For all rdrPass of the ig, reserve.</span>
+00906 <span class="keywordflow">for</span>(rdrPass= 0; rdrPass&lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; rdrPass++)
+00907 {
+00908 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
+00909 <a class="code" href="a04558.html#a15">uint</a> numVertices= vegetIgReserve._RdrPass[rdrPass].NVertices;
+00910 <a class="code" href="a04558.html#a15">uint</a> numTris= vegetIgReserve._RdrPass[rdrPass].NTriangles;
+00911 <a class="code" href="a04558.html#a15">uint</a> numLightedInstances= vegetIgReserve._RdrPass[rdrPass].NLightedInstances;
+00912 <span class="comment">// reserve triangles indices and vertices for this rdrPass.</span>
+00913 vegetRdrPass.TriangleIndices.resize(numTris*3);
+00914 vegetRdrPass.TriangleLocalIndices.resize(numTris*3);
+00915 vegetRdrPass.Vertices.resize(numVertices);
+00916 <span class="comment">// reserve ligthedinstances space.</span>
+00917 vegetRdrPass.LightedInstances.resize(numLightedInstances);
+00918 }
+00919
+00920 <span class="comment">// Reserve space for the zsort rdrPass sorting.</span>
+00921 <a class="code" href="a04558.html#a15">uint</a> numZSortTris= vegetIgReserve._RdrPass[<a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>].NTriangles;
+00922 <span class="comment">// allocate sufficient space for all quadrants (1 alloc for all quadrants).</span>
+00923 ig-&gt;_TriangleQuadrantOrderArray.resize(numZSortTris * NL3D_VEGETABLE_NUM_QUADRANT);
+00924
+00925 <span class="comment">// And init ptrs.</span>
+00926 <span class="keywordflow">if</span>(numZSortTris&gt;0)
+00927 {
+00928 <a class="code" href="a04558.html#a8">sint16</a> *start= ig-&gt;_TriangleQuadrantOrderArray.getPtr();
+00929 <span class="comment">// init ptr to each qaudrant</span>
+00930 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05270.html#a10">NL3D_VEGETABLE_NUM_QUADRANT</a>; i++)
+00931 {
+00932 ig-&gt;_TriangleQuadrantOrders[i]= start + i*numZSortTris;
+00933 }
+00934 }
+00935 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1120_1" doxytag="NL3D::CVegetableManager::resetNumVegetableFaceRendered" ></a><p>
+<table class="mdTable" 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::CVegetableManager::resetNumVegetableFaceRendered </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>
+set to 0 the number of faces rendered
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02166">2166</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00322">_NumVegetableFaceRendered</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>.
+<p>
+<div class="fragment"><pre>02167 {
+02168 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr8">_NumVegetableFaceRendered</a>= 0;
+02169 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_4" doxytag="NL3D::CVegetableManager::setDirectionalLight" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setDirectionalLight </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03337.html">CRGBA</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ambient</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> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>diffuse</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>light</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+setup the directional light
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01612">1612</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, and <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03181">NL3D::CLandscape::setupVegetableLighting()</a>.
+<p>
+<div class="fragment"><pre>01613 {
+01614 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>= light;
+01615 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr2">_DirectionalLight</a>.normalize();
+01616 <span class="comment">// Setup ambient/Diffuse.</span>
+01617 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr4">_GlobalAmbient</a>= ambient;
+01618 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr5">_GlobalDiffuse</a>= diffuse;
+01619 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1116_0" doxytag="NL3D::CVegetableManager::setTime" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setTime </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>time</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+set the current Time (in seconds). For Wind animation
+<p>
+Definition at line <a class="el" href="a06698.html#l02206">2206</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03196">NL3D::CLandscape::setVegetableTime()</a>.
+<p>
+<div class="fragment"><pre>02207 {
+02208 <span class="comment">// copy time</span>
+02209 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">_Time</a>= time;
+02210 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_0" doxytag="NL3D::CVegetableManager::setUpdateLightingFrequency" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setUpdateLightingFrequency </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>freq</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+set the frequency of lighting update. If freq==1, ALL lighted igs are updated each second. e.g: if 1/20, then every 20 seconds, all Igs are updated. If you set 0, no update will be done at all (this is the default setup!!).
+<p>
+Definition at line <a class="el" href="a06698.html#l02280">2280</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03232">NL3D::CLandscape::setVegetableUpdateLightingFrequency()</a>.
+<p>
+<div class="fragment"><pre>02281 {
+02282 freq= max(freq, 0.f);
+02283 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a>= freq;
+02284 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_1" doxytag="NL3D::CVegetableManager::setUpdateLightingTime" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setUpdateLightingTime </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>time</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+set the vegetable manager System Time (in seconds) This time is used for lighting update, and is independent of <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1116_0">setTime()</a>
+<p>
+Definition at line <a class="el" href="a06698.html#l02221">2221</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03203">NL3D::CLandscape::setVegetableUpdateLightingTime()</a>.
+<p>
+<div class="fragment"><pre>02222 {
+02223 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>= time;
+02224 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_1" doxytag="NL3D::CVegetableManager::setupRenderStateForBlendLayerModel" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setupRenderStateForBlendLayerModel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>driver</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+called by <a class="el" href="a03672.html">CVegetableBlendLayerModel</a>.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02134">2134</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00380">_BkupFog</a>, <a class="el" href="a06699.html#l00382">_ManagerMatrix</a>, <a class="el" href="a06699.html#l00314">_VegetableMaterial</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_2">NL3D::IDriver::activeVertexProgram()</a>, <a class="el" href="a06698.html#l01560">doubleSidedRdrPass()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_0">NL3D::IDriver::enableFog()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz143_1">NL3D::IDriver::fogEnabled()</a>, <a class="el" href="a06693.html#l00042">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera67">NL3D::IDriver::setupMaterial()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>.
+<p>
+<div class="fragment"><pre>02135 {
+02136 <span class="comment">// Setup Global.</span>
+02137 <span class="comment">//=============</span>
+02138 <span class="comment">// disable fog, for faster VP.</span>
+02139 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_1">_BkupFog</a>= driver-&gt;fogEnabled();
+02140 driver-&gt;enableFog(<span class="keyword">false</span>);
+02141
+02142 <span class="comment">// set model matrix to the manager matrix.</span>
+02143 driver-&gt;setupModelMatrix(_ManagerMatrix);
+02144
+02145 <span class="comment">// setup VP constants.</span>
+02146 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd3">setupVertexProgramConstants</a>(driver);
+02147
+02148 <span class="comment">// Setup RdrPass.</span>
+02149 <span class="comment">//=============</span>
+02150 <a class="code" href="a04558.html#a15">uint</a> rdrPass= <a class="code" href="a05270.html#a5">NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT</a>;
+02151
+02152 <span class="comment">// setup doubleSidedmaterial for this rdrPass.</span>
+02153 <span class="keywordtype">bool</span> doubleSided= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerh0">doubleSidedRdrPass</a>(rdrPass);
+02154
+02155 <span class="comment">// Activate the unique material (correclty setuped for AlphaBlend in render()).</span>
+02156 driver-&gt;setupMaterial(_VegetableMaterial);
+02157
+02158 <span class="comment">// activate Vertex program first.</span>
+02159 <span class="comment">//nlinfo("\nSTARTVP\n%s\nENDVP\n", _VertexProgram[rdrPass]-&gt;getProgram().c_str());</span>
+02160 <a class="code" href="a04199.html#a9">nlverify</a>(driver-&gt;activeVertexProgram(_VertexProgram[rdrPass]));
+02161
+02162 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerd3" doxytag="NL3D::CVegetableManager::setupVertexProgramConstants" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setupVertexProgramConstants </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>driver</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+setup the vertexProgram constants.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01664">1664</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00378">_AngleAxis</a>, <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00379">_ViewCenter</a>, <a class="el" href="a06699.html#l00363">_WindAnimTime</a>, <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00369">_WindDeltaTable</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a06699.html#l00368">_WindTable</a>, <a class="el" href="a06693.html#l00053">NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST</a>, <a class="el" href="a06693.html#l00046">NL3D_VEGETABLE_VP_LUT_SIZE</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_11">NL3D::IDriver::setConstant()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz147_12">NL3D::IDriver::setConstantMatrix()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>.
+<p>
+<div class="fragment"><pre>01665 {
+01666 <span class="comment">// Standard</span>
+01667 <span class="comment">// setup VertexProgram constants.</span>
+01668 <span class="comment">// c[0..3] take the ModelViewProjection Matrix. After setupModelMatrix();</span>
+01669 driver-&gt;setConstantMatrix(0, IDriver::ModelViewProjection, IDriver::Identity);
+01670 <span class="comment">// c[4..7] take the ModelView Matrix. After setupModelMatrix();</span>
+01671 driver-&gt;setConstantMatrix(4, IDriver::ModelView, IDriver::Identity);
+01672 <span class="comment">// c[8] take usefull constants.</span>
+01673 driver-&gt;setConstant(8, 0, 1, 0.5f, 2);
+01674 <span class="comment">// c[9] take normalized directional light</span>
+01675 driver-&gt;setConstant(9, _DirectionalLight);
+01676 <span class="comment">// c[10] take pos of camera</span>
+01677 driver-&gt;setConstant(10, _ViewCenter);
+01678 <span class="comment">// c[11] take factor for Blend formula</span>
+01679 driver-&gt;setConstant(11, -1.f/NL3D_VEGETABLE_BLOCK_BLEND_TRANSITION_DIST, 0, 0, 0);
+01680
+01681
+01682
+01683 <span class="comment">// Bend.</span>
+01684 <span class="comment">// c[16]= quaternion axis. w==1, and z must be 0</span>
+01685 driver-&gt;setConstant( 16, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.x, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.y, <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">_AngleAxis</a>.z, 1);
+01686 <span class="comment">// c[17]= {timeAnim, WindPower, WindPower*(1-WindBendMin)/2, 0)}</span>
+01687 driver-&gt;setConstant( 17, (<span class="keywordtype">float</span>)_WindAnimTime, _WindPower, _WindPower*(1-_WindBendMin)/2, 0 );
+01688 <span class="comment">// c[18]= High order Taylor cos coefficient: { -1/2, 1/24, -1/720, 1/40320 }</span>
+01689 driver-&gt;setConstant( 18, -1/2.f, 1/24.f, -1/720.f, 1/40320.f );
+01690 <span class="comment">// c[19]= Low order Taylor cos coefficient: { 1, -1/2, 1/24, -1/720 }</span>
+01691 driver-&gt;setConstant( 19, 1, -1/2.f, 1/24.f, -1/720.f );
+01692 <span class="comment">// c[20]= Low order Taylor sin coefficient: { 1, -1/6, 1/120, -1/5040 }</span>
+01693 driver-&gt;setConstant( 20, 1, -1/6.f, 1/120.f, -1/5040.f );
+01694 <span class="comment">// c[21]= Special constant vector for quatToMatrix: { 0, 1, -1, 0 }</span>
+01695 driver-&gt;setConstant( 21, 0.f, 1.f, -1.f, 0.f);
+01696 <span class="comment">// c[22]= {0.5f, Pi, 2*Pi, 1/(2*Pi)}</span>
+01697 driver-&gt;setConstant( 22, 0.5f, (<span class="keywordtype">float</span>)Pi, (<span class="keywordtype">float</span>)(2*Pi), (<span class="keywordtype">float</span>)(1/(2*Pi)) );
+01698 <span class="comment">// c[23]= {NL3D_VEGETABLE_VP_LUT_SIZE, 0, 0, 0}. NL3D_VEGETABLE_VP_LUT_SIZE==64.</span>
+01699 driver-&gt;setConstant( 23, NL3D_VEGETABLE_VP_LUT_SIZE, 0.f, 0.f, 0.f );
+01700
+01701
+01702 <span class="comment">// Fill constant. Start at 32.</span>
+01703 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05270.html#a6">NL3D_VEGETABLE_VP_LUT_SIZE</a>; i++)
+01704 {
+01705 <a class="code" href="a03660.html">CVector2f</a> cur= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">_WindTable</a>[i];
+01706 <a class="code" href="a03660.html">CVector2f</a> delta= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">_WindDeltaTable</a>[i];
+01707 driver-&gt;setConstant( 32+i, cur.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, cur.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>, delta.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>, delta.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a> );
+01708 }
+01709 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1116_1" doxytag="NL3D::CVegetableManager::setWind" ></a><p>
+<table class="mdTable" 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::CVegetableManager::setWind </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>windDir</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>windFreq</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>windPower</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>windBendMin</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>
+set the Wind for animation. All thoses variables may be modified each frame without penalty.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>windDir</em>&nbsp;</td><td>is the direction of the wind. NB: only XY direction is kept. </td></tr>
+ <tr><td valign=top><em>windFreq</em>&nbsp;</td><td>is the frequency for the animation (speed) </td></tr>
+ <tr><td valign=top><em>windPower</em>&nbsp;</td><td>is the power of the wind, and is a factor (0..1) of Bend </td></tr>
+ <tr><td valign=top><em>windBendMin</em>&nbsp;</td><td>is a value in (0..1) which indicate how much the vegetables are bended at minimum (for very powerfull wind)</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l02192">2192</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00358">_WindBendMin</a>, <a class="el" href="a06699.html#l00355">_WindDirection</a>, <a class="el" href="a06699.html#l00356">_WindFrequency</a>, <a class="el" href="a06699.html#l00357">_WindPower</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03188">NL3D::CLandscape::setVegetableWind()</a>.
+<p>
+<div class="fragment"><pre>02193 {
+02194 <span class="comment">// Keep only XY component of the Wind direction (because VP only support z==0 quaternions).</span>
+02195 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>= windDir;
+02196 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.z= 0;
+02197 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">_WindDirection</a>.normalize();
+02198 <span class="comment">// copy setup</span>
+02199 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_6">_WindFrequency</a>= windFreq;
+02200 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_7">_WindPower</a>= windPower;
+02201 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1122_3">_WindBendMin</a>= windBendMin;
+02202 <a class="code" href="a05378.html#a374">clamp</a>(_WindBendMin, 0, 1);
+02203 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerd4" doxytag="NL3D::CVegetableManager::swapIgRdrPassHardMode" ></a><p>
+<table class="mdTable" 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::CVegetableManager::swapIgRdrPassHardMode </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname" nowrap>, </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>rdrPass</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+swap the RdrPass type (hard or soft) of the rdrPass of an instance group. vertices are allocated in other VBallocator, copied and freed in the old VBallocator.
+<p>
+Definition at line <a class="el" href="a06698.html#l01496">1496</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06708.html#l00185">NL3D::CVegetableVBAllocator::allocateVertex()</a>, <a class="el" href="a06708.html#l00234">NL3D::CVegetableVBAllocator::deleteVertex()</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06711.html#l00473">NL3D::CVertexBuffer::getVertexSize()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06695.html#l00120">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles</a>, <a class="el" href="a06695.html#l00122">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NVertices</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; uint32, false &gt;::size()</a>, <a class="el" href="a06695.html#l00114">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleIndices</a>, <a class="el" href="a06695.html#l00116">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::TriangleLocalIndices</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>.
+<p>
+<div class="fragment"><pre>01497 {
+01498 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPass];
+01499
+01500 <span class="comment">// the allocator where vertices come from</span>
+01501 CVegetableVBAllocator &amp;srcAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, vegetRdrPass.HardMode);
+01502 <span class="comment">// the allocator where vertices will go</span>
+01503 CVegetableVBAllocator &amp;dstAllocator= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPass, !vegetRdrPass.HardMode);
+01504
+01505 <span class="comment">// vertex size</span>
+01506 <a class="code" href="a04558.html#a15">uint</a> vbSize= srcAllocator.getSoftwareVertexBuffer().getVertexSize();
+01507 <a class="code" href="a04199.html#a6">nlassert</a>(vbSize == dstAllocator.getSoftwareVertexBuffer().getVertexSize());
+01508
+01509 <span class="comment">// for all vertices of the IG, change of VBAllocator</span>
+01510 <a class="code" href="a04558.html#a15">uint</a> i;
+01511 <span class="comment">// Do it only for current Vertices setuped!!! because a swapIgRdrPassHardMode awlays arise when the ig is </span>
+01512 <span class="comment">// in construcion.</span>
+01513 <span class="comment">// Hence here, we may have vegetRdrPass.NVertices &lt; vegetRdrPass.Vertices.size() !!!</span>
+01514 <span class="keywordflow">for</span>(i=0;i&lt;vegetRdrPass.NVertices;i++)
+01515 {
+01516 <span class="comment">// get idx in src allocator.</span>
+01517 <a class="code" href="a04558.html#a15">uint</a> srcId= vegetRdrPass.Vertices[i];
+01518 <span class="comment">// allocate a verex in the dst allocator.</span>
+01519 <a class="code" href="a04558.html#a15">uint</a> dstId= dstAllocator.allocateVertex();
+01520
+01521 <span class="comment">// copy from VBsoft of src to dst.</span>
+01522 <span class="keywordtype">void</span> *vbSrc= srcAllocator.getVertexPointer(srcId);
+01523 <span class="keywordtype">void</span> *vbDst= dstAllocator.getVertexPointer(dstId);
+01524 memcpy(vbDst, vbSrc, vbSize);
+01525 <span class="comment">// release src vertex.</span>
+01526 srcAllocator.deleteVertex(srcId);
+01527
+01528 <span class="comment">// and copy new dest id in Vertices array.</span>
+01529 vegetRdrPass.Vertices[i]= dstId;
+01530
+01531 <span class="comment">// and flush this vertex into VBHard (if dst is aVBHard).</span>
+01532 dstAllocator.flushVertex(dstId);
+01533 }
+01534
+01535 <span class="comment">// For all triangles, bind correct triangles.</span>
+01536 <a class="code" href="a04199.html#a6">nlassert</a>(vegetRdrPass.TriangleIndices.size() == vegetRdrPass.TriangleLocalIndices.size());
+01537 <span class="comment">// Do it only for current Triangles setuped!!! same reason as vertices</span>
+01538 <span class="comment">// For all setuped triangles indices</span>
+01539 <span class="keywordflow">for</span>(i=0;i&lt;vegetRdrPass.NTriangles*3;i++)
+01540 {
+01541 <span class="comment">// get the index in Vertices.</span>
+01542 <a class="code" href="a04558.html#a15">uint</a> localVid= vegetRdrPass.TriangleLocalIndices[i];
+01543 <span class="comment">// get the index in new VBufffer (dstAllocator), and copy to TriangleIndices</span>
+01544 vegetRdrPass.TriangleIndices[i]= vegetRdrPass.Vertices[localVid];
+01545 }
+01546
+01547 <span class="comment">// Since change is made, flag the IG rdrpass</span>
+01548 vegetRdrPass.HardMode= !vegetRdrPass.HardMode;
+01549 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_5" doxytag="NL3D::CVegetableManager::unlockBuffers" ></a><p>
+<table class="mdTable" 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::CVegetableManager::unlockBuffers </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>
+unlock any AGP vertex buffers
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01633">1633</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06708.html#l00158">NL3D::CVegetableVBAllocator::unlockBuffer()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00877">NL3D::CLandscape::unlockBuffers()</a>.
+<p>
+<div class="fragment"><pre>01634 {
+01635 <span class="comment">// unlock all buffers</span>
+01636 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
+01637 {
+01638 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].unlockBuffer();
+01639 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].unlockBuffer();
+01640 }
+01641 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1114_6" doxytag="NL3D::CVegetableManager::updateDriver" ></a><p>
+<table class="mdTable" 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::CVegetableManager::updateDriver </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>driver</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>
+must give a driver to the vegetableManager, before any <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1112_0">addInstance()</a>.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06698.html#l01569">1569</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00448">_LastDriver</a>, <a class="el" href="a06699.html#l00306">_VBHardAllocator</a>, <a class="el" href="a06699.html#l00308">_VBSoftAllocator</a>, <a class="el" href="a06698.html#l00562">initVertexProgram()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06708.html#l00089">NL3D::CVegetableVBAllocator::updateDriver()</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a05862.html#l00799">NL3D::CLandscape::updateGlobalsAndLockBuffers()</a>.
+<p>
+<div class="fragment"><pre>01570 {
+01571 <span class="comment">// update all driver</span>
+01572 <a class="code" href="a04558.html#a15">uint</a> i;
+01573 <span class="keywordflow">for</span>(i=0; i &lt;CVegetableVBAllocator::VBTypeCount; i++)
+01574 {
+01575 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr11">_VBHardAllocator</a>[i].updateDriver(driver);
+01576 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr12">_VBSoftAllocator</a>[i].updateDriver(driver);
+01577 }
+01578
+01579 <span class="comment">// if driver changed, recreate vertex programs</span>
+01580 <span class="keywordflow">if</span> (driver != <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</a>)
+01581 {
+01582 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerr7">_LastDriver</a> = driver;
+01583 <span class="keywordflow">for</span>(i=0; i &lt;<a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>; i++)
+01584 {
+01585 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd2">initVertexProgram</a>(i);
+01586 }
+01587 }
+01588 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_1" doxytag="NL3D::CVegetableManager::updateInstanceLighting" ></a><p>
+<table class="mdTable" 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::CVegetableManager::updateInstanceLighting </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03674.html">CVegetableInstanceGroup</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ig</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>rdrPassId</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>instanceId</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+update part of an ig. Do not use/modify _UL* return number of vertices processed (nb vertices of the shape)
+<p>
+Definition at line <a class="el" href="a06698.html#l02354">2354</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00316">_DirectionalLight</a>, <a class="el" href="a06699.html#l00317">_GlobalAmbient</a>, <a class="el" href="a06699.html#l00318">_GlobalDiffuse</a>, <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06703.html#l00133">NL3D::CVegetableShape::BestSidedPreComputeLighting</a>, <a class="el" href="a06697.html#l00065">NL3D::CVegetableLightEx::Color</a>, <a class="el" href="a06698.html#l00939">NL3D::computeVegetVertexLighting()</a>, <a class="el" href="a06698.html#l00986">NL3D::computeVegetVertexLightingForceBestSided()</a>, <a class="el" href="a06695.html#l00100">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::DlmUV</a>, <a class="el" href="a06703.html#l00130">NL3D::CVegetableShape::DoubleSided</a>, <a class="el" href="a06708.html#l00253">NL3D::CVegetableVBAllocator::flushVertex()</a>, <a class="el" href="a06711.html#l00338">NL3D::CVertexBuffer::getNormalOff()</a>, <a class="el" href="a06116.html#l00195">NLMISC::CObjectVector&lt; uint32, false &gt;::getPtr()</a>, <a class="el" href="a06709.html#l00112">NL3D::CVegetableVBAllocator::getSoftwareVertexBuffer()</a>, <a class="el" href="a06711.html#l00441">NL3D::CVertexBuffer::getValueOffEx()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06710.html#l00438">NL3D::CVertexBuffer::getVertexCoordPointer()</a>, <a class="el" href="a06708.html#l00247">NL3D::CVegetableVBAllocator::getVertexPointer()</a>, <a class="el" href="a06695.html#l00110">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::HardMode</a>, <a class="el" href="a06703.html#l00147">NL3D::CVegetableShape::InstanceVertices</a>, <a class="el" href="a06703.html#l00129">NL3D::CVegetableShape::Lighted</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06695.html#l00097">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatAmbient</a>, <a class="el" href="a06695.html#l00098">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::MatDiffuse</a>, <a class="el" href="a06340.html#l00243">NLMISC::CRGBA::modulateFromColorRGBOnly()</a>, <a class="el" href="a05972.html#l01244">NLMISC::CMatrix::mulVector()</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a06709.html#l00041">NL3D_VEGETABLE_VPPOS_COLOR0</a>, <a class="el" href="a06709.html#l00042">NL3D_VEGETABLE_VPPOS_COLOR1</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a06695.html#l00095">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::NormalMat</a>, <a class="el" href="a06697.html#l00056">NL3D::CVegetableLightEx::NumLights</a>, <a class="el" href="a06703.html#l00131">NL3D::CVegetableShape::PreComputeLighting</a>, <a class="el" href="a06695.html#l00093">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::Shape</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06695.html#l00102">NL3D::CVegetableInstanceGroup::CVegetableLightedInstance::StartIdInRdrPass</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a06707.html#l00046">NL3D::CVegetableUV8::V</a>, <a class="el" href="a06703.html#l00138">NL3D::CVegetableShape::VB</a>, <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>, and <a class="el" href="a06695.html#l00112">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>.
+<p>
+<div class="fragment"><pre>02355 {
+02356 <a class="code" href="a04199.html#a6">nlassert</a>(ig);
+02357 <span class="comment">// get the rdrPass.</span>
+02358 <a class="code" href="a04199.html#a6">nlassert</a>(rdrPassId&lt;NL3D_VEGETABLE_NRDRPASS);
+02359 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= ig-&gt;_RdrPass[rdrPassId];
+02360 <span class="comment">// get the lighted instance.</span>
+02361 <a class="code" href="a04199.html#a6">nlassert</a>(instanceId&lt;vegetRdrPass.LightedInstances.size());
+02362 CVegetableInstanceGroup::CVegetableLightedInstance &amp;vegetLI= vegetRdrPass.LightedInstances[instanceId];
+02363
+02364 <span class="comment">// get the shape</span>
+02365 CVegetableShape *shape= vegetLI.Shape;
+02366 <span class="comment">// it must be lighted.</span>
+02367 <a class="code" href="a04199.html#a6">nlassert</a>(shape-&gt;Lighted);
+02368 <span class="keywordtype">bool</span> instanceLighted= <span class="keyword">true</span>;
+02369
+02370
+02371 <span class="comment">// get ref on the vegetLex.</span>
+02372 CVegetableLightEx &amp;vegetLex= ig-&gt;VegetableLightEx;
+02373 <span class="comment">// Color of pointLights modulated by diffuse.</span>
+02374 <a class="code" href="a03337.html">CRGBA</a> diffusePL[2];
+02375 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=1)
+02376 {
+02377 diffusePL[0].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, vegetLex.Color[0]);
+02378 <span class="keywordflow">if</span>(vegetLex.NumLights&gt;=2)
+02379 {
+02380 diffusePL[1].<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, vegetLex.Color[1]);
+02381 }
+02382 }
+02383
+02384 <span class="comment">// Recompute lighting</span>
+02385 <span class="comment">//===========</span>
+02386
+02387 <span class="comment">// setup for this instance.</span>
+02388 <span class="comment">//---------</span>
+02389 <span class="comment">// 2Sided</span>
+02390 <span class="keywordtype">bool</span> instanceDoubleSided= shape-&gt;DoubleSided;
+02391 <span class="comment">// Precompute lighting or not??</span>
+02392 <span class="keywordtype">bool</span> precomputeLighting= instanceLighted &amp;&amp; shape-&gt;PreComputeLighting;
+02393 <span class="comment">// bestSided Precompute lighting or not??</span>
+02394 <span class="keywordtype">bool</span> bestSidedPrecomputeLighting= precomputeLighting &amp;&amp; shape-&gt;BestSidedPreComputeLighting;
+02395 <span class="comment">// destLighted?</span>
+02396 <span class="keywordtype">bool</span> destLighted= instanceLighted &amp;&amp; !shape-&gt;PreComputeLighting;
+02397 <span class="comment">// Diffuse and ambient, modulated by current GlobalAmbient and GlobalDiffuse.</span>
+02398 <a class="code" href="a03337.html">CRGBA</a> primaryRGBA, secondaryRGBA;
+02399 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatDiffuse, _GlobalDiffuse);
+02400 secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAz2022_4">modulateFromColorRGBOnly</a>(vegetLI.MatAmbient, _GlobalAmbient);
+02401 <span class="comment">// get normal matrix</span>
+02402 <a class="code" href="a02851.html">CMatrix</a> &amp;normalMat= vegetLI.NormalMat;
+02403 <span class="comment">// array of vertex id to update</span>
+02404 <a class="code" href="a04558.html#a11">uint32</a> *ptrVid= vegetRdrPass.Vertices.getPtr() + vegetLI.StartIdInRdrPass;
+02405 <a class="code" href="a04558.html#a15">uint</a> numVertices= shape-&gt;InstanceVertices.size();
+02406
+02407 <span class="comment">// Copy Dynamic Lightmap UV in Alpha part (save memory for an extra cost of 1 VP instruction)</span>
+02408 primaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= vegetLI.DlmUV.U;
+02409 secondaryRGBA.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= vegetLI.DlmUV.V;
+02410
+02411
+02412 <span class="comment">// get VertexBuffer info.</span>
+02413 CVegetableVBAllocator *allocator;
+02414 allocator= &amp;<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerd1">getVBAllocatorForRdrPassAndVBHardMode</a>(rdrPassId, vegetRdrPass.HardMode);
+02415 <span class="keyword">const</span> CVertexBuffer &amp;dstVBInfo= allocator-&gt;getSoftwareVertexBuffer();
+02416
+02417 <a class="code" href="a04558.html#a15">uint</a> srcNormalOff= (instanceLighted? shape-&gt;VB.getNormalOff() : 0);
+02418 <a class="code" href="a04558.html#a15">uint</a> dstColor0Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR0);
+02419 <a class="code" href="a04558.html#a15">uint</a> dstColor1Off= dstVBInfo.getValueOffEx(NL3D_VEGETABLE_VPPOS_COLOR1);
+02420
+02421
+02422
+02423 <span class="comment">// For all vertices, recompute lighting.</span>
+02424 <span class="comment">//---------</span>
+02425 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;(<a class="code" href="a04558.html#a14">sint</a>)numVertices;i++)
+02426 {
+02427 <span class="comment">// get the Vertex in the VB.</span>
+02428 <a class="code" href="a04558.html#a15">uint</a> vid= ptrVid[i];
+02429 <span class="comment">// store in tmp shape.</span>
+02430 shape-&gt;InstanceVertices[i]= vid;
+02431
+02432 <span class="comment">// Fill this vertex.</span>
+02433 <a class="code" href="a04558.html#a7">uint8</a> *srcPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)shape-&gt;VB.getVertexCoordPointer(i);
+02434 <a class="code" href="a04558.html#a7">uint8</a> *dstPtr= (<a class="code" href="a04558.html#a7">uint8</a>*)allocator-&gt;getVertexPointer(vid);
+02435
+02436
+02437 <span class="comment">// if !precomputeLighting (means destLighted...)</span>
+02438 <span class="keywordflow">if</span>(!precomputeLighting)
+02439 {
+02440 <span class="comment">// just copy the primary and secondary color</span>
+02441 *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off)= primaryRGBA;
+02442 *(<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor1Off)= secondaryRGBA;
+02443 }
+02444 <span class="keywordflow">else</span>
+02445 {
+02446 <a class="code" href="a04199.html#a6">nlassert</a>(!destLighted);
+02447
+02448 <span class="comment">// compute normal.</span>
+02449 CVector rotNormal= normalMat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1968_1">mulVector</a>( *(CVector*)(srcPtr + srcNormalOff) );
+02450 <span class="comment">// must normalize() because scale is possible.</span>
+02451 rotNormal.normalize();
+02452
+02453 <span class="comment">// Do the compute.</span>
+02454 <span class="keywordflow">if</span>(!bestSidedPrecomputeLighting)
+02455 {
+02456 <a class="code" href="a05363.html#a543">computeVegetVertexLighting</a>(rotNormal,
+02457 _DirectionalLight, primaryRGBA, secondaryRGBA,
+02458 vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
+02459 }
+02460 <span class="keywordflow">else</span>
+02461 {
+02462 <a class="code" href="a05363.html#a544">computeVegetVertexLightingForceBestSided</a>(rotNormal,
+02463 _DirectionalLight, primaryRGBA, secondaryRGBA,
+02464 vegetLex, diffusePL, (<a class="code" href="a03337.html">CRGBA</a>*)(dstPtr + dstColor0Off) );
+02465 }
+02466
+02467 }
+02468
+02469 <span class="comment">// flust the vertex in AGP.</span>
+02470 allocator-&gt;flushVertex(vid);
+02471 }
+02472
+02473
+02474 <span class="comment">// numVertices vertices are updated</span>
+02475 <span class="keywordflow">return</span> numVertices;
+02476 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_2" doxytag="NL3D::CVegetableManager::updateLighting" ></a><p>
+<table class="mdTable" 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::CVegetableManager::updateLighting </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>
+update the lighting of Igs, within a certain amount of time. You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a> with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
+<p>
+Definition at line <a class="el" href="a06698.html#l02228">2228</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, and <a class="el" href="a05484.html#l00038">min</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
+<p>
+<div class="fragment"><pre>02229 {
+02230 <span class="comment">// first time in this method??</span>
+02231 <span class="keywordflow">if</span>(!<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>)
+02232 {
+02233 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_9">_ULPrecTimeInit</a>= <span class="keyword">true</span>;
+02234 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>;
+02235 }
+02236 <span class="comment">// compute delta time from last update.</span>
+02237 <span class="keywordtype">float</span> dt= float(_ULTime - _ULPrecTime);
+02238 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">_ULPrecTime</a>= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">_ULTime</a>;
+02239
+02240 <span class="comment">// compute number of vertices to update.</span>
+02241 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>+= dt*<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_5">_ULFrequency</a> * <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>;
+02242 <span class="comment">// maximize, so at max, it computes all Igs, just one time.</span>
+02243 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>= <a class="code" href="a04061.html#a0">min</a>(_ULNVerticesToUpdate, (<span class="keywordtype">float</span>)_ULNTotalVertices);
+02244
+02245 <span class="comment">// go.</span>
+02246 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a>();
+02247 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1118_3" doxytag="NL3D::CVegetableManager::updateLightingAll" ></a><p>
+<table class="mdTable" 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::CVegetableManager::updateLightingAll </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>
+like <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a>, but update ALL vegetable You MUST enclose calls to <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1118_2">updateLighting()</a> with <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_2">lockBuffers()</a> / <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1114_5">unlockBuffers()</a>.
+<p>
+Definition at line <a class="el" href="a06698.html#l02251">2251</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06699.html#l00423">_ULNTotalVertices</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, and <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03357">NL3D::CLandscape::updateLightingAll()</a>.
+<p>
+<div class="fragment"><pre>02252 {
+02253 <span class="comment">// maximize, so at max, it computes all Igs</span>
+02254 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>= (<span class="keywordtype">float</span>)<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_6">_ULNTotalVertices</a>;
+02255
+02256 <span class="comment">// go.</span>
+02257 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_0">doUpdateLighting</a>();
+02258 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_2" doxytag="NL3D::CVegetableManager::updateLightingIGPart" ></a><p>
+<table class="mdTable" 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::CVegetableManager::updateLightingIGPart </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>
+update part of the RootIg, according to _ULNVerticesToUpdate (while &gt; 0) if all Ig is updated, return true and _ULCurrentIgRdrPass and _ULCurrentIgInstance is updated.
+<p>
+Definition at line <a class="el" href="a06698.html#l02288">2288</a> of file <a class="el" href="a06698.html">vegetable_manager.cpp</a>.
+<p>
+References <a class="el" href="a06695.html#l00138">NL3D::CVegetableInstanceGroup::_RdrPass</a>, <a class="el" href="a06699.html#l00428">_ULCurrentIgInstance</a>, <a class="el" href="a06699.html#l00427">_ULCurrentIgRdrPass</a>, <a class="el" href="a06699.html#l00421">_ULNVerticesToUpdate</a>, <a class="el" href="a06699.html#l00425">_ULRootIg</a>, <a class="el" href="a06696.html#l00037">NL3D::CVegetableLightEx::computeCurrentColors()</a>, <a class="el" href="a06695.html#l00118">NL3D::CVegetableInstanceGroup::CVegetableRdrPass::LightedInstances</a>, <a class="el" href="a06693.html#l00037">NL3D_VEGETABLE_NRDRPASS</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06116.html#l00184">NLMISC::CObjectVector&lt; CVegetableLightedInstance &gt;::size()</a>, <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>, and <a class="el" href="a06695.html#l00073">NL3D::CVegetableInstanceGroup::VegetableLightEx</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>.
+<p>
+<div class="fragment"><pre>02289 {
+02290 <a class="code" href="a04199.html#a6">nlassert</a>(_ULRootIg);
+02291
+02292
+02293 <span class="comment">// First, update lighting info global to the ig, ie update current </span>
+02294 <span class="comment">// colros of the PointLights which influence the ig.</span>
+02295 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;VegetableLightEx.computeCurrentColors();
+02296
+02297 <span class="comment">// while there is some vertices to update</span>
+02298 <span class="keywordflow">while</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>&gt;0)
+02299 {
+02300 <span class="comment">// if all rdrPass of the ig are processed.</span>
+02301 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>&gt;= <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>)
+02302 {
+02303 <span class="comment">// All this Ig is updated.</span>
+02304 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
+02305 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+02306 <span class="comment">// skip to next Ig.</span>
+02307 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02308 }
+02309 CVegetableInstanceGroup::CVegetableRdrPass &amp;vegetRdrPass= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">_ULRootIg</a>-&gt;_RdrPass[<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>];
+02310
+02311 <span class="comment">// if all instances are processed for this pass (especially if size()==0 !!)</span>
+02312 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>&gt;= vegetRdrPass.LightedInstances.size())
+02313 {
+02314 <span class="comment">// skip to the next rdrPass.</span>
+02315 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>++;
+02316 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+02317 <span class="keywordflow">continue</span>;
+02318 }
+02319
+02320 <span class="comment">// Process this instance.</span>
+02321 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_7">_ULNVerticesToUpdate</a>-= <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_1">updateInstanceLighting</a>(_ULRootIg, _ULCurrentIgRdrPass, _ULCurrentIgInstance);
+02322
+02323 <span class="comment">// next instance.</span>
+02324 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>++;
+02325
+02326 <span class="comment">// if all instances are processed for this pass</span>
+02327 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>&gt;= vegetRdrPass.LightedInstances.size())
+02328 {
+02329 <span class="comment">// skip to the next rdrPass.</span>
+02330 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>++;
+02331 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+02332 }
+02333 }
+02334
+02335 <span class="comment">// If all rdrPass of the ig are processed.</span>
+02336 <span class="keywordflow">if</span>(<a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>&gt;= <a class="code" href="a05270.html#a0">NL3D_VEGETABLE_NRDRPASS</a>)
+02337 {
+02338 <span class="comment">// All this Ig is updated.</span>
+02339 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_4">_ULCurrentIgRdrPass</a>= 0;
+02340 <a class="code" href="a03680.html#NL3D_1_1CVegetableManagerz1128_3">_ULCurrentIgInstance</a>= 0;
+02341 <span class="comment">// skip to next Ig.</span>
+02342 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02343 }
+02344 <span class="keywordflow">else</span>
+02345 {
+02346 <span class="comment">// The Ig is not entirely updated.</span>
+02347 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+02348 }
+02349
+02350 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagern0" doxytag="NL3D::CVegetableManager::CVegetableBlendLayerModel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> friend class <a class="el" href="a03672.html">CVegetableBlendLayerModel</a><code> [friend]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00287">287</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_0" doxytag="NL3D::CVegetableManager::_AngleAxis" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_0">NL3D::CVegetableManager::_AngleAxis</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="a06699.html#l00378">378</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_1" doxytag="NL3D::CVegetableManager::_BkupFog" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1124_1">NL3D::CVegetableManager::_BkupFog</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="a06699.html#l00380">380</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l02180">exitRenderStateForBlendLayerModel()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr0" doxytag="NL3D::CVegetableManager::_ClipBlockList" ></a><p>
+<table class="mdTable" 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="a03064.html">CTessList</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr0">NL3D::CVegetableManager::_ClipBlockList</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="a06699.html#l00294">294</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00672">createIg()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l01713">render()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr1" doxytag="NL3D::CVegetableManager::_ClipBlockMemory" ></a><p>
+<table class="mdTable" 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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr1">NL3D::CVegetableManager::_ClipBlockMemory</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="a06699.html#l00289">289</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00607">createClipBlock()</a>, and <a class="el" href="a06698.html#l00620">deleteClipBlock()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_0" doxytag="NL3D::CVegetableManager::_CosTable" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1122_0">NL3D::CVegetableManager::_CosTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00366">366</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr2" doxytag="NL3D::CVegetableManager::_DirectionalLight" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr2">NL3D::CVegetableManager::_DirectionalLight</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="a06699.html#l00316">316</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr3" doxytag="NL3D::CVegetableManager::_EmptyClipBlockList" ></a><p>
+<table class="mdTable" 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="a03064.html">CTessList</a>&lt;<a class="el" href="a03673.html">CVegetableClipBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr3">NL3D::CVegetableManager::_EmptyClipBlockList</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="a06699.html#l00296">296</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00607">createClipBlock()</a>, <a class="el" href="a06698.html#l00672">createIg()</a>, <a class="el" href="a06698.html#l00620">deleteClipBlock()</a>, and <a class="el" href="a06698.html#l00706">deleteIg()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr4" doxytag="NL3D::CVegetableManager::_GlobalAmbient" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03337.html">NLMISC::CRGBA</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr4">NL3D::CVegetableManager::_GlobalAmbient</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="a06699.html#l00317">317</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr5" doxytag="NL3D::CVegetableManager::_GlobalDiffuse" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03337.html">NLMISC::CRGBA</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr5">NL3D::CVegetableManager::_GlobalDiffuse</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="a06699.html#l00318">318</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01612">setDirectionalLight()</a>, and <a class="el" href="a06698.html#l02354">updateInstanceLighting()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr6" doxytag="NL3D::CVegetableManager::_InstanceGroupMemory" ></a><p>
+<table class="mdTable" 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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03674.html">CVegetableInstanceGroup</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr6">NL3D::CVegetableManager::_InstanceGroupMemory</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="a06699.html#l00291">291</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00672">createIg()</a>, and <a class="el" href="a06698.html#l00706">deleteIg()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr7" doxytag="NL3D::CVegetableManager::_LastDriver" ></a><p>
+<table class="mdTable" 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="a03321.html">NLMISC::CRefPtr</a>&lt;<a class="el" href="a02434.html">IDriver</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr7">NL3D::CVegetableManager::_LastDriver</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="a06699.html#l00448">448</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00562">initVertexProgram()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_2" doxytag="NL3D::CVegetableManager::_ManagerMatrix" ></a><p>
+<table class="mdTable" 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="a02851.html">NLMISC::CMatrix</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_2">NL3D::CVegetableManager::_ManagerMatrix</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="a06699.html#l00382">382</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr8" doxytag="NL3D::CVegetableManager::_NumVegetableFaceRendered" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerr8">NL3D::CVegetableManager::_NumVegetableFaceRendered</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+profile
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00322">322</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l02173">getNumVegetableFaceRendered()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06688.html#l00077">NL3D::CVegetableBlendLayerModel::render()</a>, and <a class="el" href="a06698.html#l02166">resetNumVegetableFaceRendered()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_2" doxytag="NL3D::CVegetableManager::_NumZSortBlendLayers" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1126_2">NL3D::CVegetableManager::_NumZSortBlendLayers</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+For Alpha Blend rdrPass, ordering into layers.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00392">392</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr9" doxytag="NL3D::CVegetableManager::_ShapeMap" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagery1">TShapeMap</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr9">NL3D::CVegetableManager::_ShapeMap</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="a06699.html#l00302">302</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr10" doxytag="NL3D::CVegetableManager::_SortBlockMemory" ></a><p>
+<table class="mdTable" 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="a02274.html">NLMISC::CBlockMemory</a>&lt;<a class="el" href="a03684.html">CVegetableSortBlock</a>&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr10">NL3D::CVegetableManager::_SortBlockMemory</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="a06699.html#l00290">290</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00637">createSortBlock()</a>, and <a class="el" href="a06698.html#l00655">deleteSortBlock()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_1" doxytag="NL3D::CVegetableManager::_Time" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_1">NL3D::CVegetableManager::_Time</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="a06699.html#l00360">360</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_3" doxytag="NL3D::CVegetableManager::_ULCurrentIgInstance" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_3">NL3D::CVegetableManager::_ULCurrentIgInstance</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+update lighting according to _ULNVerticesToUpdate
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00428">428</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_4" doxytag="NL3D::CVegetableManager::_ULCurrentIgRdrPass" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_4">NL3D::CVegetableManager::_ULCurrentIgRdrPass</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Current instance to render in the first ig to update: rdrpass/instanceId.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00427">427</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_5" doxytag="NL3D::CVegetableManager::_ULFrequency" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_5">NL3D::CVegetableManager::_ULFrequency</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Frequency of update.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00419">419</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_6" doxytag="NL3D::CVegetableManager::_ULNTotalVertices" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_6">NL3D::CVegetableManager::_ULNTotalVertices</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sum of all ig vertices to update.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00423">423</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l02228">updateLighting()</a>, and <a class="el" href="a06698.html#l02251">updateLightingAll()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_7" doxytag="NL3D::CVegetableManager::_ULNVerticesToUpdate" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_7">NL3D::CVegetableManager::_ULNVerticesToUpdate</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Current number of vertices to update. If negative, I have some advance.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00421">421</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, <a class="el" href="a06698.html#l02228">updateLighting()</a>, <a class="el" href="a06698.html#l02251">updateLightingAll()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_8" doxytag="NL3D::CVegetableManager::_ULPrecTime" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_8">NL3D::CVegetableManager::_ULPrecTime</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+NB: we update at the precision of a shape (a dozen of vertices).
+<p>
+Definition at line <a class="el" href="a06699.html#l00414">414</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_9" doxytag="NL3D::CVegetableManager::_ULPrecTimeInit" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1128_9">NL3D::CVegetableManager::_ULPrecTimeInit</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+update lighting according to _ULNVerticesToUpdate
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00415">415</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_10" doxytag="NL3D::CVegetableManager::_ULRootIg" ></a><p>
+<table class="mdTable" 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="a03674.html">CVegetableInstanceGroup</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_10">NL3D::CVegetableManager::_ULRootIg</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+the priority list of ig to update
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00425">425</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">addInstance()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00706">deleteIg()</a>, <a class="el" href="a06698.html#l02262">doUpdateLighting()</a>, and <a class="el" href="a06698.html#l02288">updateLightingIGPart()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1128_11" doxytag="NL3D::CVegetableManager::_ULTime" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1128_11">NL3D::CVegetableManager::_ULTime</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+update lighting according to _ULNVerticesToUpdate
+<p>
+
+<p>
+Definition at line <a class="el" href="a06699.html#l00416">416</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr11" doxytag="NL3D::CVegetableManager::_VBHardAllocator" ></a><p>
+<table class="mdTable" 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="a03686.html">CVegetableVBAllocator</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr11">NL3D::CVegetableManager::_VBHardAllocator</a>[CVegetableVBAllocator::VBTypeCount]<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="a06699.html#l00306">306</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06698.html#l01622">lockBuffers()</a>, <a class="el" href="a06698.html#l01633">unlockBuffers()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr12" doxytag="NL3D::CVegetableManager::_VBSoftAllocator" ></a><p>
+<table class="mdTable" 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="a03686.html">CVegetableVBAllocator</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr12">NL3D::CVegetableManager::_VBSoftAllocator</a>[CVegetableVBAllocator::VBTypeCount]<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="a06699.html#l00308">308</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l00182">getVBAllocatorForRdrPassAndVBHardMode()</a>, <a class="el" href="a06698.html#l01622">lockBuffers()</a>, <a class="el" href="a06698.html#l01633">unlockBuffers()</a>, and <a class="el" href="a06698.html#l01569">updateDriver()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr13" doxytag="NL3D::CVegetableManager::_VegetableMaterial" ></a><p>
+<table class="mdTable" 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="a02839.html">CMaterial</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr13">NL3D::CVegetableManager::_VegetableMaterial</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="a06699.html#l00314">314</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01604">loadTexture()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02134">setupRenderStateForBlendLayerModel()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerr14" doxytag="NL3D::CVegetableManager::_VertexProgram" ></a><p>
+<table class="mdTable" 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="a03702.html">CVertexProgram</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerr14">NL3D::CVegetableManager::_VertexProgram</a>[NL3D_VEGETABLE_NRDRPASS]<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="a06699.html#l00310">310</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1124_3" doxytag="NL3D::CVegetableManager::_ViewCenter" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1124_3">NL3D::CVegetableManager::_ViewCenter</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="a06699.html#l00379">379</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_2" doxytag="NL3D::CVegetableManager::_WindAnimTime" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_2">NL3D::CVegetableManager::_WindAnimTime</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="a06699.html#l00363">363</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_3" doxytag="NL3D::CVegetableManager::_WindBendMin" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1122_3">NL3D::CVegetableManager::_WindBendMin</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="a06699.html#l00358">358</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_4" doxytag="NL3D::CVegetableManager::_WindDeltaTable" ></a><p>
+<table class="mdTable" 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="a03660.html">NLMISC::CVector2f</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_4">NL3D::CVegetableManager::_WindDeltaTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00369">369</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_5" doxytag="NL3D::CVegetableManager::_WindDirection" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">CVector</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_5">NL3D::CVegetableManager::_WindDirection</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="a06699.html#l00355">355</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_6" doxytag="NL3D::CVegetableManager::_WindFrequency" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1122_6">NL3D::CVegetableManager::_WindFrequency</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="a06699.html#l00356">356</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_7" doxytag="NL3D::CVegetableManager::_WindPower" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1122_7">NL3D::CVegetableManager::_WindPower</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="a06699.html#l00357">357</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>, and <a class="el" href="a06698.html#l02192">setWind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_8" doxytag="NL3D::CVegetableManager::_WindPrecRenderTime" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> double <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_8">NL3D::CVegetableManager::_WindPrecRenderTime</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="a06699.html#l00361">361</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, and <a class="el" href="a06698.html#l01713">render()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1122_9" doxytag="NL3D::CVegetableManager::_WindTable" ></a><p>
+<table class="mdTable" 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="a03660.html">NLMISC::CVector2f</a> <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1122_9">NL3D::CVegetableManager::_WindTable</a>[NL3D_VEGETABLE_VP_LUT_SIZE]<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="a06699.html#l00368">368</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l01664">setupVertexProgramConstants()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_3" doxytag="NL3D::CVegetableManager::_ZSortLayerDistMax" ></a><p>
+<table class="mdTable" 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="a03680.html#NL3D_1_1CVegetableManagerz1126_3">NL3D::CVegetableManager::_ZSortLayerDistMax</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="a06699.html#l00393">393</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01713">render()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_4" doxytag="NL3D::CVegetableManager::_ZSortModelLayers" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03672.html">CVegetableBlendLayerModel</a>*&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_4">NL3D::CVegetableManager::_ZSortModelLayers</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="a06699.html#l00395">395</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_5" doxytag="NL3D::CVegetableManager::_ZSortModelLayersUW" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03672.html">CVegetableBlendLayerModel</a>*&gt; <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_5">NL3D::CVegetableManager::_ZSortModelLayersUW</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="a06699.html#l00397">397</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, <a class="el" href="a06698.html#l00058">CVegetableManager()</a>, <a class="el" href="a06698.html#l01713">render()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableManagerz1126_6" doxytag="NL3D::CVegetableManager::_ZSortScene" ></a><p>
+<table class="mdTable" 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="a03348.html">CScene</a>* <a class="el" href="a03680.html#NL3D_1_1CVegetableManagerz1126_6">NL3D::CVegetableManager::_ZSortScene</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="a06699.html#l00394">394</a> of file <a class="el" href="a06699.html">vegetable_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l00156">createVegetableBlendLayersModels()</a>, and <a class="el" href="a06698.html#l00129">~CVegetableManager()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06699.html">vegetable_manager.h</a><li><a class="el" href="a06698.html">vegetable_manager.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:22:15 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>