aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a06760.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a06760.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a06760.html')
-rw-r--r--docs/doxygen/nel/a06760.html378
1 files changed, 378 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a06760.html b/docs/doxygen/nel/a06760.html
new file mode 100644
index 00000000..84ca439f
--- /dev/null
+++ b/docs/doxygen/nel/a06760.html
@@ -0,0 +1,378 @@
+<!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: zone.h Source File</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>zone.h</h1><a href="a05337.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00007 <span class="comment">/* Copyright, 2000 Nevrax Ltd.</span>
+00008 <span class="comment"> *</span>
+00009 <span class="comment"> * This file is part of NEVRAX NEL.</span>
+00010 <span class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</span>
+00011 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
+00012 <span class="comment"> * the Free Software Foundation; either version 2, or (at your option)</span>
+00013 <span class="comment"> * any later version.</span>
+00014 <span class="comment"></span>
+00015 <span class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</span>
+00016 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+00017 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+00018 <span class="comment"> * General Public License for more details.</span>
+00019 <span class="comment"></span>
+00020 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
+00021 <span class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</span>
+00022 <span class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</span>
+00023 <span class="comment"> * MA 02111-1307, USA.</span>
+00024 <span class="comment"> */</span>
+00025
+00026 <span class="preprocessor">#ifndef NL_ZONE_H</span>
+00027 <span class="preprocessor"></span><span class="preprocessor">#define NL_ZONE_H</span>
+00028 <span class="preprocessor"></span>
+00029 <span class="preprocessor">#include "<a class="code" href="a05167.html">nel/misc/types_nl.h</a>"</span>
+00030 <span class="preprocessor">#include "<a class="code" href="a04979.html">nel/misc/smart_ptr.h</a>"</span>
+00031 <span class="preprocessor">#include "<a class="code" href="a05039.html">nel/misc/stream.h</a>"</span>
+00032 <span class="preprocessor">#include "<a class="code" href="a04199.html">nel/misc/debug.h</a>"</span>
+00033 <span class="preprocessor">#include "<a class="code" href="a04062.html">nel/misc/bit_set.h</a>"</span>
+00034 <span class="preprocessor">#include "<a class="code" href="a05075.html">3d/tessellation.h</a>"</span>
+00035 <span class="preprocessor">#include "<a class="code" href="a04733.html">3d/patch.h</a>"</span>
+00036 <span class="preprocessor">#include "<a class="code" href="a04056.html">3d/bezier_patch.h</a>"</span>
+00037 <span class="preprocessor">#include "<a class="code" href="a04762.html">3d/point_light_named.h</a>"</span>
+00038 <span class="preprocessor">#include "<a class="code" href="a04764.html">3d/point_light_named_array.h</a>"</span>
+00039 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
+00040 <span class="preprocessor">#include &lt;vector&gt;</span>
+00041 <span class="preprocessor">#include &lt;map&gt;</span>
+00042
+00043
+00044 <span class="keyword">namespace </span>NL3D
+00045 {
+00046
+00047
+00048 <span class="keyword">class </span>CZone;
+00049 <span class="keyword">class </span>CLandscape;
+00050 <span class="keyword">class </span>CZoneSymmetrisation;
+00051 <span class="keyword">class </span>CTileBank;
+00052
+00053 <span class="keyword">using</span> <a class="code" href="a02157.html">NLMISC::CAABBoxExt</a>;
+00054
+00055
+00056 <span class="comment">// ***************************************************************************</span>
+<a name="l00057"></a><a class="code" href="a05363.html#a362">00057</a> <span class="keyword">typedef</span> std::map&lt;uint16, CZone*&gt; <a class="code" href="a05363.html#a362">TZoneMap</a>;
+<a name="l00058"></a><a class="code" href="a05363.html#a363">00058</a> <span class="keyword">typedef</span> std::map&lt;uint16, CZone*&gt;::iterator <a class="code" href="a05363.html#a363">ItZoneMap</a>;
+00059
+00060
+00061 <span class="comment">// ***************************************************************************</span>
+<a name="l00065"></a><a class="code" href="a02290.html">00065</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="a02290.html">CBorderVertex</a>
+00066 {
+00067 <span class="comment">// The index of vertex in the current zone to bind.</span>
+<a name="l00068"></a><a class="code" href="a02290.html#NL3D_1_1CBorderVertexo0">00068</a> <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a02290.html#NL3D_1_1CBorderVertexo0">CurrentVertex</a>;
+00069 <span class="comment">// The neighbor zone Id.</span>
+<a name="l00070"></a><a class="code" href="a02290.html#NL3D_1_1CBorderVertexo2">00070</a> <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a02290.html#NL3D_1_1CBorderVertexo2">NeighborZoneId</a>;
+00071 <span class="comment">// The index of vertex in the neighbor zone to bind to CurrentVertex.</span>
+<a name="l00072"></a><a class="code" href="a02290.html#NL3D_1_1CBorderVertexo1">00072</a> <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a02290.html#NL3D_1_1CBorderVertexo1">NeighborVertex</a>;
+00073
+00074 <span class="keywordtype">void</span> <a class="code" href="a02290.html#NL3D_1_1CBorderVertexa0">serial</a>(<a class="code" href="a02270.html">NLMISC::IStream</a> &amp;f);
+00075 };
+00076
+00077
+00078 <span class="comment">// ***************************************************************************</span>
+<a name="l00086"></a><a class="code" href="a03066.html">00086</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="a03066.html">CPatchInfo</a>
+00087 {
+00088 <span class="keyword">public</span>:
+00089
+<a name="l00095"></a><a class="code" href="a03067.html">00095</a> <span class="keyword">struct </span><a class="code" href="a03067.html">CBindInfo</a>
+00096 {
+<a name="l00101"></a><a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoo2">00101</a> <a class="code" href="a04558.html#a7">uint8</a> NPatchs;
+00102
+<a name="l00104"></a><a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoo3">00104</a> <a class="code" href="a04558.html#a9">uint16</a> ZoneId;
+<a name="l00106"></a><a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoo1">00106</a> <a class="code" href="a04558.html#a9">uint16</a> Next[4];
+<a name="l00108"></a><a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoo0">00108</a> <a class="code" href="a04558.html#a7">uint8</a> Edge[4];
+00109
+00110 <span class="keyword">public</span>:
+00111 <span class="keywordtype">void</span> <a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoa1">serial</a>(<a class="code" href="a02270.html">NLMISC::IStream</a> &amp;f);
+<a name="l00112"></a><a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoa0">00112</a> <a class="code" href="a03067.html#NL3D_1_1CPatchInfo_1_1CBindInfoa0">CBindInfo</a>() {NPatchs=0;}
+00113 };
+00114
+00115
+00116 <span class="keyword">public</span>:
+00118 <span class="comment">// @{</span>
+<a name="l00120"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_8">00120</a> <span class="comment"></span> <a class="code" href="a02258.html">CBezierPatch</a> Patch;
+<a name="l00122"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_7">00122</a> <a class="code" href="a04558.html#a7">uint8</a> OrderS, OrderT;
+<a name="l00124"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_3">00124</a> <span class="keywordtype">float</span> ErrorSize;
+<a name="l00126"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_2">00126</a> <a class="code" href="a04558.html#a9">uint16</a> BaseVertices[4];
+00127
+<a name="l00130"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_4">00130</a> <a class="code" href="a04558.html#a7">uint8</a> Flags;
+00131
+00132
+<a name="l00134"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_5">00134</a> <a class="code" href="a04558.html#a7">uint8</a> NoiseRotation;
+00135
+00137 <span class="keywordtype">void</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_1">setCornerSmoothFlag</a>(<a class="code" href="a04558.html#a15">uint</a> corner, <span class="keywordtype">bool</span> smooth);
+00138 <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1194_0">getCornerSmoothFlag</a>(<a class="code" href="a04558.html#a15">uint</a> corner) <span class="keyword">const</span>;
+00139
+00140 <span class="comment">// @}</span>
+00141
+00142
+00144 <span class="comment">// @{</span>
+00145
+<a name="l00149"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1196_3">00149</a> std::vector&lt;CTileElement&gt; Tiles;
+00150
+<a name="l00155"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1196_1">00155</a> std::vector&lt;CTileColor&gt; TileColors;
+00156
+<a name="l00161"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1196_0">00161</a> std::vector&lt;uint8&gt; <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1196_0">Lumels</a>;
+00162
+<a name="l00171"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1196_2">00171</a> std::vector&lt;CTileLightInfluence&gt; TileLightInfluences;
+00172
+00173 <span class="comment">// @}</span>
+00174
+00176
+<a name="l00180"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_2">00180</a> <span class="keywordtype">void</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_2">setSmoothFlag</a> (<a class="code" href="a04558.html#a15">uint</a> edge, <span class="keywordtype">bool</span> flag)
+00181 {
+00182 <span class="comment">// Erase it</span>
+00183 Flags&amp;=~(1&lt;&lt;edge);
+00184
+00185 <span class="comment">// Set it</span>
+00186 Flags|=(((<a class="code" href="a04558.html#a15">uint</a>)flag)&lt;&lt;edge);
+00187 }
+00188
+<a name="l00192"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_1">00192</a> <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_1">getSmoothFlag</a> (<a class="code" href="a04558.html#a15">uint</a> edge)
+00193 {
+00194 <span class="comment">// Test it</span>
+00195 <span class="keywordflow">return</span> ((Flags&amp;(1&lt;&lt;edge))!=0);
+00196 }
+00197
+00213 <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_0">getNeighborTile</a> (<a class="code" href="a04558.html#a15">uint</a> patchId, <a class="code" href="a04558.html#a15">uint</a> edge, <a class="code" href="a04558.html#a14">sint</a> position, <a class="code" href="a04558.html#a15">uint</a> &amp;patchOut, <a class="code" href="a04558.html#a14">sint</a> &amp;sOut, <a class="code" href="a04558.html#a14">sint</a> &amp;tOut, <span class="keyword">const</span> std::vector&lt;CPatchInfo&gt; &amp;patchInfos) <span class="keyword">const</span>;
+00214
+00227 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_4">transform</a> (std::vector&lt;CPatchInfo&gt; &amp;patchInfo, <a class="code" href="a03762.html">NL3D::CZoneSymmetrisation</a> &amp;zoneSymmetry, <span class="keyword">const</span> <a class="code" href="a03517.html">NL3D::CTileBank</a> &amp;bank, <span class="keywordtype">bool</span> symmetry, <a class="code" href="a04558.html#a15">uint</a> rotate, <span class="keywordtype">float</span> snapCell, <span class="keywordtype">float</span> weldThreshold, <span class="keyword">const</span> <a class="code" href="a02851.html">NLMISC::CMatrix</a> &amp;toOriginalSpace);
+00228
+00229 <span class="comment">// Transform tile and 256 case with rotation and symmetry parameters</span>
+00230 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_3">getTileSymmetryRotate</a> (<span class="keyword">const</span> <a class="code" href="a03517.html">NL3D::CTileBank</a> &amp;bank, <a class="code" href="a04558.html#a15">uint</a> tile, <span class="keywordtype">bool</span> &amp;symmetry, <a class="code" href="a04558.html#a15">uint</a> &amp;rotate);
+00231 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_6">transformTile</a> (<span class="keyword">const</span> <a class="code" href="a03517.html">NL3D::CTileBank</a> &amp;bank, <a class="code" href="a04558.html#a15">uint</a> &amp;tile, <a class="code" href="a04558.html#a15">uint</a> &amp;tileRotation, <span class="keywordtype">bool</span> symmetry, <a class="code" href="a04558.html#a15">uint</a> rotate, <span class="keywordtype">bool</span> goofy);
+00232 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1197_5">transform256Case</a> (<span class="keyword">const</span> <a class="code" href="a03517.html">NL3D::CTileBank</a> &amp;bank, <a class="code" href="a04558.html#a7">uint8</a> &amp;case256, <a class="code" href="a04558.html#a15">uint</a> tileRotation, <span class="keywordtype">bool</span> symmetry, <a class="code" href="a04558.html#a15">uint</a> rotate, <span class="keywordtype">bool</span> goofy);
+00233
+00235 <span class="comment">// @{</span>
+<a name="l00236"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1199_0">00236</a> <a class="code" href="a03067.html">CBindInfo</a> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoz1199_0">BindEdges</a>[4];
+00237 <span class="comment">// @}</span>
+00238
+00239
+00240 <span class="keyword">public</span>:
+<a name="l00241"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfoa0">00241</a> <a class="code" href="a03066.html#NL3D_1_1CPatchInfoa0">CPatchInfo</a>()
+00242 {
+00243 ErrorSize= 0;
+00244 <span class="comment">// No Rotation / not smooth by default.</span>
+00245 NoiseRotation= 0;
+00246 _CornerSmoothFlag= 0;
+00247 }
+00248
+00249 <span class="keyword">private</span>:
+00250 <span class="comment">// Noise Smooth flags.</span>
+<a name="l00251"></a><a class="code" href="a03066.html#NL3D_1_1CPatchInfor0">00251</a> <a class="code" href="a04558.html#a7">uint8</a> _CornerSmoothFlag;
+00252
+00253 };
+00254
+00255
+00256 <span class="comment">// ***************************************************************************</span>
+<a name="l00264"></a><a class="code" href="a03738.html">00264</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="a03738.html">CZoneInfo</a>
+00265 {
+<a name="l00267"></a><a class="code" href="a03738.html#NL3D_1_1CZoneInfoo3">00267</a> <a class="code" href="a04558.html#a9">uint16</a> ZoneId;
+<a name="l00269"></a><a class="code" href="a03738.html#NL3D_1_1CZoneInfoo1">00269</a> std::vector&lt;CPatchInfo&gt; Patchs;
+<a name="l00274"></a><a class="code" href="a03738.html#NL3D_1_1CZoneInfoo0">00274</a> std::vector&lt;CBorderVertex&gt; <a class="code" href="a03738.html#NL3D_1_1CZoneInfoo0">BorderVertices</a>;
+00275
+<a name="l00279"></a><a class="code" href="a03738.html#NL3D_1_1CZoneInfoo2">00279</a> std::vector&lt;CPointLightNamed&gt; <a class="code" href="a03738.html#NL3D_1_1CZoneInfoo2">PointLights</a>;
+00280 };
+00281
+00282
+00283 <span class="comment">// ***************************************************************************</span>
+<a name="l00297"></a><a class="code" href="a03730.html">00297</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="a03730.html">CZone</a>
+00298 {
+00299 <span class="keyword">public</span>:
+00300 <span class="comment">// The stored patch structure for compile() - ation.</span>
+<a name="l00301"></a><a class="code" href="a03731.html">00301</a> <span class="keyword">struct </span><a class="code" href="a03731.html">CPatchConnect</a>
+00302 {
+00303 <span class="comment">// NB: same meanings than in CPatchInfo.</span>
+<a name="l00304"></a><a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto4">00304</a> <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto3">OldOrderS</a>, <a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto4">OldOrderT</a>;
+<a name="l00305"></a><a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto2">00305</a> <span class="keywordtype">float</span> ErrorSize;
+<a name="l00306"></a><a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto0">00306</a> <a class="code" href="a04558.html#a9">uint16</a> BaseVertices[4];
+<a name="l00307"></a><a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecto1">00307</a> <a class="code" href="a03067.html">CPatchInfo::CBindInfo</a> BindEdges[4];
+00308
+00309 <span class="keyword">public</span>:
+00310 <span class="keywordtype">void</span> <a class="code" href="a03731.html#NL3D_1_1CZone_1_1CPatchConnecta0">serial</a>(<a class="code" href="a02270.html">NLMISC::IStream</a> &amp;f);
+00311 };
+00312
+00313 <span class="keyword">public</span>:
+00314
+00316 <a class="code" href="a03730.html#NL3D_1_1CZonea10">CZone</a>();
+00318 <a class="code" href="a03730.html#NL3D_1_1CZonea36">~CZone</a>();
+00319
+00320
+00332 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea4">build</a>(<span class="keyword">const</span> <a class="code" href="a03738.html">CZoneInfo</a> &amp;zoneInfo, <a class="code" href="a04558.html#a11">uint32</a> numVertices=0);
+00333
+00334
+00338 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea4">build</a>(<a class="code" href="a04558.html#a9">uint16</a> zoneId, <span class="keyword">const</span> std::vector&lt;CPatchInfo&gt; &amp;patchs, <span class="keyword">const</span> std::vector&lt;CBorderVertex&gt; &amp;borderVertices, <a class="code" href="a04558.html#a11">uint32</a> numVertices=0);
+00339
+00340
+00346 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea4">build</a>(<span class="keyword">const</span> <a class="code" href="a03730.html">CZone</a> &amp;zone);
+00347
+00348
+00355 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea32">retrieve</a>(<a class="code" href="a03738.html">CZoneInfo</a> &amp;zoneInfo);
+00356
+00357
+00361 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea32">retrieve</a>(std::vector&lt;CPatchInfo&gt; &amp;patchs, std::vector&lt;CBorderVertex&gt; &amp;borderVertices);
+00362
+00363
+00364
+00368 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea11">debugBinds</a>(FILE *f= stdout);
+00369
+00370
+00383 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea7">compile</a>(<a class="code" href="a02702.html">CLandscape</a> *landscape, <a class="code" href="a05363.html#a362">TZoneMap</a> &amp;loadedZones);
+00384
+00395 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea29">release</a>(<a class="code" href="a05363.html#a362">TZoneMap</a> &amp;loadedZones);
+00396
+00397
+00401 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea33">serial</a>(<a class="code" href="a02270.html">NLMISC::IStream</a> &amp;f);
+00402
+00403
+00411 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea5">changePatchTextureAndColor</a> (<a class="code" href="a04558.html#a14">sint</a> numPatch, <span class="keyword">const</span> std::vector&lt;CTileElement&gt; *tiles, <span class="keyword">const</span> std::vector&lt;CTileColor&gt; *colors);
+00412
+00413
+00425 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea28">refreshTesselationGeometry</a>(<a class="code" href="a04558.html#a14">sint</a> numPatch);
+00426
+00427
+00436 <span class="keyword">const</span> std::vector&lt;CTileElement&gt; &amp;<a class="code" href="a03730.html#NL3D_1_1CZonea22">getPatchTexture</a>(<a class="code" href="a04558.html#a14">sint</a> numPatch) <span class="keyword">const</span>;
+00437
+00446 <span class="keyword">const</span> std::vector&lt;CTileColor&gt; &amp;<a class="code" href="a03730.html#NL3D_1_1CZonea19">getPatchColor</a>(<a class="code" href="a04558.html#a14">sint</a> numPatch) <span class="keyword">const</span>;
+00447
+00454 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea34">setTileColor</a>(<span class="keywordtype">bool</span> monochrome, <span class="keywordtype">float</span> factor);
+00455
+<a name="l00461"></a><a class="code" href="a03730.html#NL3D_1_1CZonea14">00461</a> <a class="code" href="a02702.html">CLandscape</a>* <a class="code" href="a03730.html#NL3D_1_1CZonea14">getLandscape</a> ()<span class="keyword"> const</span>
+00462 <span class="keyword"> </span>{
+00463 <span class="keywordflow">return</span> Landscape;
+00464 }
+00465
+00466 <span class="comment">// NB: for all those function, CTessFace static rendering context must be setup.</span>
+00468 <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea6">clip</a>(<span class="keyword">const</span> std::vector&lt;CPlane&gt; &amp;pyramid);
+00470 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea26">preRender</a>();
+00471 <span class="comment">// release Far render pass/reset Tile/Far render. Delete also VB, and FaceVectors</span>
+00472 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea30">resetRenderFarAndDeleteVBFV</a>();
+00474 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea13">forceMergeAtTileLevel</a>();
+00475
+00477 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea27">refineAll</a>();
+00479 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea12">excludePatchFromRefineAll</a>(<a class="code" href="a04558.html#a15">uint</a> patch, <span class="keywordtype">bool</span> exclude);
+00482 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea1">averageTesselationVertices</a>();
+00483
+00484 <span class="comment">// Accessors.</span>
+<a name="l00485"></a><a class="code" href="a03730.html#NL3D_1_1CZonea17">00485</a> <span class="keyword">const</span> <a class="code" href="a03128.html">CVector</a> &amp;<a class="code" href="a03730.html#NL3D_1_1CZonea17">getPatchBias</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a>;}
+<a name="l00486"></a><a class="code" href="a03730.html#NL3D_1_1CZonea21">00486</a> <span class="keywordtype">float</span> <a class="code" href="a03730.html#NL3D_1_1CZonea21">getPatchScale</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a>;}
+<a name="l00487"></a><a class="code" href="a03730.html#NL3D_1_1CZonea8">00487</a> <span class="keywordtype">bool</span> <a class="code" href="a03730.html#NL3D_1_1CZonea8">compiled</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>;}
+<a name="l00488"></a><a class="code" href="a03730.html#NL3D_1_1CZonea24">00488</a> <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a03730.html#NL3D_1_1CZonea24">getZoneId</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ZoneId;}
+<a name="l00489"></a><a class="code" href="a03730.html#NL3D_1_1CZonea15">00489</a> <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a03730.html#NL3D_1_1CZonea15">getNumPatchs</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> Patchs.size();}
+00490 <span class="comment">// Return the Bounding Box of the zone.</span>
+<a name="l00491"></a><a class="code" href="a03730.html#NL3D_1_1CZonea23">00491</a> <span class="keyword">const</span> <a class="code" href="a02157.html">CAABBoxExt</a> &amp;<a class="code" href="a03730.html#NL3D_1_1CZonea23">getZoneBB</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>;}
+00492
+<a name="l00499"></a><a class="code" href="a03730.html#NL3D_1_1CZonea16">00499</a> <span class="keyword">const</span> <a class="code" href="a03057.html">CPatch</a> *<a class="code" href="a03730.html#NL3D_1_1CZonea16">getPatch</a>(<a class="code" href="a04558.html#a14">sint</a> patch)<span class="keyword"> const </span>{<a class="code" href="a04199.html#a6">nlassert</a>(patch&gt;=0 &amp;&amp; patch&lt;(<a class="code" href="a04558.html#a14">sint</a>)Patchs.size()); <span class="keywordflow">return</span> &amp;(Patchs[patch]);}
+00500
+<a name="l00507"></a><a class="code" href="a03730.html#NL3D_1_1CZonea20">00507</a> <span class="keyword">const</span> <a class="code" href="a03731.html">CPatchConnect</a> *<a class="code" href="a03730.html#NL3D_1_1CZonea20">getPatchConnect</a>(<a class="code" href="a04558.html#a14">sint</a> patch)<span class="keyword"> const </span>
+00508 <span class="keyword"> </span>{<a class="code" href="a04199.html#a6">nlassert</a>(patch&gt;=0 &amp;&amp; patch&lt;(<a class="code" href="a04558.html#a14">sint</a>)Patchs.size()); <span class="keywordflow">return</span> &amp;(<a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>[patch]);}
+00509
+00510
+00515 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea0">applyHeightField</a>(<span class="keyword">const</span> <a class="code" href="a02702.html">CLandscape</a> &amp;landScape);
+00516
+00525 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea35">setupColorsFromTileFlags</a>(<span class="keyword">const</span> <a class="code" href="a03337.html">NLMISC::CRGBA</a> colors[4]);
+00526
+00530 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZonea9">copyTilesFlags</a>(<a class="code" href="a04558.html#a14">sint</a> destPatchId, <span class="keyword">const</span> <a class="code" href="a03057.html">CPatch</a> *srcPatch);
+00531
+00536 <span class="keyword">const</span> <a class="code" href="a02291.html">CBSphere</a> &amp;<a class="code" href="a03730.html#NL3D_1_1CZonea18">getPatchBSphere</a>(<a class="code" href="a04558.html#a15">uint</a> patch) <span class="keyword">const</span>;
+00537
+<a name="l00539"></a><a class="code" href="a03730.html#NL3D_1_1CZonea25">00539</a> <span class="keywordtype">bool</span> <a class="code" href="a03730.html#NL3D_1_1CZonea25">isPatchRenderClipped</a>(<a class="code" href="a04558.html#a15">uint</a> patch)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>.<a class="code" href="a02272.html#NLMISC_1_1CBitSetz1920_3">get</a>(patch);}
+00540
+00541 <span class="comment">// Private part.</span>
+00542 <span class="keyword">private</span>:
+00543 <span class="comment">/*********************************/</span>
+00544 <span class="comment">// A smartptrisable vertex.</span>
+<a name="l00545"></a><a class="code" href="a03732.html">00545</a> <span class="keyword">struct </span><a class="code" href="a03732.html">CTessBaseVertex</a> : <span class="keyword">public</span> NLMISC::<a class="code" href="a02209.html">CRefCount</a>
+00546 {
+<a name="l00547"></a><a class="code" href="a03732.html#NL3D_1_1CZone_1_1CTessBaseVertexo2">00547</a> <a class="code" href="a03482.html">CTessVertex</a> <a class="code" href="a03732.html#NL3D_1_1CZone_1_1CTessBaseVertexo2">Vert</a>;
+00548 };
+00549
+00550 <span class="comment">// Zone vertices.</span>
+<a name="l00551"></a><a class="code" href="a03730.html#NL3D_1_1CZoney3">00551</a> <span class="keyword">typedef</span> <a class="code" href="a03408.html">NLMISC::CSmartPtr&lt;CTessBaseVertex&gt;</a> <a class="code" href="a03408.html">PBaseVertex</a>;
+<a name="l00552"></a><a class="code" href="a03730.html#NL3D_1_1CZoney4">00552</a> <span class="keyword">typedef</span> std::vector&lt;PBaseVertex&gt; <a class="code" href="a03730.html#NL3D_1_1CZoney4">TBaseVerticesVec</a>;
+00553
+00554
+00555 <span class="keyword">private</span>:
+00556 <span class="comment">// The lanscape which own this zone. Usefull for texture management.</span>
+00557 <span class="comment">// Filled at compilation only.</span>
+<a name="l00558"></a><a class="code" href="a03730.html#NL3D_1_1CZoner8">00558</a> <a class="code" href="a02702.html">CLandscape</a> *Landscape;
+00559
+00560 <span class="comment">// Misc.</span>
+<a name="l00561"></a><a class="code" href="a03730.html#NL3D_1_1CZoner15">00561</a> <a class="code" href="a04558.html#a9">uint16</a> ZoneId;
+<a name="l00562"></a><a class="code" href="a03730.html#NL3D_1_1CZoner7">00562</a> <span class="keywordtype">bool</span> <a class="code" href="a03730.html#NL3D_1_1CZoner7">Compiled</a>;
+<a name="l00563"></a><a class="code" href="a03730.html#NL3D_1_1CZoner14">00563</a> <a class="code" href="a02157.html">CAABBoxExt</a> <a class="code" href="a03730.html#NL3D_1_1CZoner14">ZoneBB</a>;
+<a name="l00564"></a><a class="code" href="a03730.html#NL3D_1_1CZoner10">00564</a> <a class="code" href="a03128.html">CVector</a> <a class="code" href="a03730.html#NL3D_1_1CZoner10">PatchBias</a>;
+<a name="l00565"></a><a class="code" href="a03730.html#NL3D_1_1CZoner13">00565</a> <span class="keywordtype">float</span> <a class="code" href="a03730.html#NL3D_1_1CZoner13">PatchScale</a>;
+00566
+00567 <span class="comment">// The number of vertices she access (maybe on border).</span>
+<a name="l00568"></a><a class="code" href="a03730.html#NL3D_1_1CZoner9">00568</a> <a class="code" href="a04558.html#a10">sint32</a> NumVertices;
+00569 <span class="comment">// The smartptr on zone vertices.</span>
+<a name="l00570"></a><a class="code" href="a03730.html#NL3D_1_1CZoner4">00570</a> <a class="code" href="a03730.html#NL3D_1_1CZoney4">TBaseVerticesVec</a> BaseVertices;
+00571 <span class="comment">// The list of border vertices.</span>
+<a name="l00572"></a><a class="code" href="a03730.html#NL3D_1_1CZoner5">00572</a> std::vector&lt;CBorderVertex&gt; BorderVertices;
+00573 <span class="comment">// NB: No problem on corners, since zones are compile()-ed with knowledge of neighbors.</span>
+00574
+00575 <span class="comment">// The patchs.</span>
+<a name="l00576"></a><a class="code" href="a03730.html#NL3D_1_1CZoner12">00576</a> std::vector&lt;CPatch&gt; Patchs;
+<a name="l00577"></a><a class="code" href="a03730.html#NL3D_1_1CZoner11">00577</a> std::vector&lt;CPatchConnect&gt; <a class="code" href="a03730.html#NL3D_1_1CZoner11">PatchConnects</a>;
+00578 <span class="comment">// Clipped States and BSphere stored here and not in CPatch for faster memory access during clip</span>
+<a name="l00579"></a><a class="code" href="a03730.html#NL3D_1_1CZoner0">00579</a> std::vector&lt;CBSphere&gt; <a class="code" href="a03730.html#NL3D_1_1CZoner0">_PatchBSpheres</a>;
+<a name="l00580"></a><a class="code" href="a03730.html#NL3D_1_1CZoner2">00580</a> <a class="code" href="a02272.html">NLMISC::CBitSet</a> <a class="code" href="a03730.html#NL3D_1_1CZoner2">_PatchRenderClipped</a>;
+<a name="l00581"></a><a class="code" href="a03730.html#NL3D_1_1CZoner1">00581</a> <a class="code" href="a02272.html">NLMISC::CBitSet</a> <a class="code" href="a03730.html#NL3D_1_1CZoner1">_PatchOldRenderClipped</a>;
+00582
+00583
+<a name="l00586"></a><a class="code" href="a03730.html#NL3D_1_1CZoner3">00586</a> <a class="code" href="a03095.html">CPointLightNamedArray</a> _PointLightArray;
+00587
+00588
+00589 <span class="keyword">private</span>:
+<a name="l00590"></a><a class="code" href="a03730.html#NL3D_1_1CZonen0">00590</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a02702.html">CLandscape</a>;
+<a name="l00591"></a><a class="code" href="a03730.html#NL3D_1_1CZonen2">00591</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a03476.html">CTessFace</a>;
+00592 <span class="comment">// Should do this, for texture mgt.</span>
+<a name="l00593"></a><a class="code" href="a03730.html#NL3D_1_1CZonen1">00593</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a03057.html">CPatch</a>;
+00594
+<a name="l00595"></a><a class="code" href="a03730.html#NL3D_1_1CZoner6">00595</a> <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a03730.html#NL3D_1_1CZoner6">ClipResult</a>;
+<a name="l00596"></a><a class="code" href="a03730.html#NL3D_1_1CZoney5">00596</a> <span class="keyword">enum</span> <a class="code" href="a03730.html#NL3D_1_1CZoney5">TClipResult</a> {<a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney0">ClipIn</a>= 0, <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney1">ClipOut</a>= 1, <a class="code" href="a03730.html#NL3D_1_1CZoney5NL3D_1_1CZoney2">ClipSide</a>= 2};
+00597
+00598
+00599 <span class="keyword">private</span>:
+00604 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoned6">rebindBorder</a>(<a class="code" href="a05363.html#a362">TZoneMap</a> &amp;loadedZones);
+00605
+<a name="l00606"></a><a class="code" href="a03730.html#NL3D_1_1CZoned3">00606</a> <a class="code" href="a03408.html">PBaseVertex</a> <a class="code" href="a03730.html#NL3D_1_1CZoned3">getBaseVertex</a>(<a class="code" href="a04558.html#a14">sint</a> vert)<span class="keyword"> const </span>{<span class="keywordflow">return</span> BaseVertices[vert];}
+<a name="l00607"></a><a class="code" href="a03730.html#NL3D_1_1CZoned4">00607</a> <a class="code" href="a03057.html">CPatch</a> *<a class="code" href="a03730.html#NL3D_1_1CZonea16">getPatch</a>(<a class="code" href="a04558.html#a14">sint</a> patch) {<a class="code" href="a04199.html#a6">nlassert</a>(patch&gt;=0 &amp;&amp; patch&lt;(<a class="code" href="a04558.html#a14">sint</a>)Patchs.size()); <span class="keywordflow">return</span> &amp;(Patchs[patch]);}
+00608 <span class="keyword">static</span> <a class="code" href="a03057.html">CPatch</a> *<a class="code" href="a03730.html#NL3D_1_1CZoneh1">getZonePatch</a>(<a class="code" href="a05363.html#a362">TZoneMap</a> &amp;loadedZones, <a class="code" href="a04558.html#a14">sint</a> zoneId, <a class="code" href="a04558.html#a14">sint</a> patch);
+00609 <span class="comment">// Bind the patch with ones which are loaded...</span>
+00610 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoneh2">unbindPatch</a>(<a class="code" href="a03057.html">CPatch</a> &amp;pa);
+00611 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoneh0">bindPatch</a>(<a class="code" href="a05363.html#a362">TZoneMap</a> &amp;loadedZones, <a class="code" href="a03057.html">CPatch</a> &amp;pa, CPatchConnect &amp;pc, <span class="keywordtype">bool</span> rebind);
+00612 <span class="comment">// Is the patch on a border of this zone???</span>
+00613 <span class="keywordtype">bool</span> <a class="code" href="a03730.html#NL3D_1_1CZoned5">patchOnBorder</a>(<span class="keyword">const</span> CPatchConnect &amp;pc) <span class="keyword">const</span>;
+00614
+00615 <span class="comment">// compute AABBox, PatchBias and PatchScale, from a bbox.</span>
+00616 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoned2">computeBBScaleBias</a>(<span class="keyword">const</span> <a class="code" href="a02156.html">CAABBox</a> &amp;bb);
+00617
+00618
+00619 <span class="comment">// For CPatch: build a bindInfo.</span>
+00620 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoned0">buildBindInfo</a>(<a class="code" href="a04558.html#a15">uint</a> patchId, <a class="code" href="a04558.html#a15">uint</a> edge, <a class="code" href="a03730.html">CZone</a> *neighborZone, <a class="code" href="a03058.html">CPatch::CBindInfo</a> &amp;paBind);
+00621
+00622 <span class="comment">// Patch Array Clip</span>
+00623 <span class="keywordtype">void</span> <a class="code" href="a03730.html#NL3D_1_1CZoned1">clipPatchs</a>(<span class="keyword">const</span> std::vector&lt;CPlane&gt; &amp;pyramid);
+00624 };
+00625
+00626
+00627 } <span class="comment">// NL3D</span>
+00628
+00629
+00630 <span class="preprocessor">#endif // NL_ZONE_H</span>
+00631 <span class="preprocessor"></span>
+00632 <span class="comment">/* End of zone.h */</span>
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:41:55 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>