aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/tess__block_8cpp-source.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/tess__block_8cpp-source.html')
-rw-r--r--docs/doxygen/nel/tess__block_8cpp-source.html458
1 files changed, 458 insertions, 0 deletions
diff --git a/docs/doxygen/nel/tess__block_8cpp-source.html b/docs/doxygen/nel/tess__block_8cpp-source.html
new file mode 100644
index 00000000..be62cb86
--- /dev/null
+++ b/docs/doxygen/nel/tess__block_8cpp-source.html
@@ -0,0 +1,458 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><h1>tess_block.cpp</h1><a href="tess__block_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
+00008 <font class="comment"> *</font>
+00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
+00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
+00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
+00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
+00013 <font class="comment"> * any later version.</font>
+00014 <font class="comment"></font>
+00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
+00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
+00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
+00018 <font class="comment"> * General Public License for more details.</font>
+00019 <font class="comment"></font>
+00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
+00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
+00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
+00023 <font class="comment"> * MA 02111-1307, USA.</font>
+00024 <font class="comment"> */</font>
+00025
+00026 <font class="preprocessor">#include "<a class="code" href="std3d_8h.html">std3d.h</a>"</font>
+00027
+00028 <font class="preprocessor">#include "<a class="code" href="tess__block_8h.html">3d/tess_block.h</a>"</font>
+00029 <font class="preprocessor">#include "<a class="code" href="patch__rdr__pass_8h.html">3d/patch_rdr_pass.h</a>"</font>
+00030 <font class="preprocessor">#include "<a class="code" href="landscape__face__vector__manager_8h.html">3d/landscape_face_vector_manager.h</a>"</font>
+00031
+00032
+00033 <font class="keyword">namespace </font>NL3D
+00034 {
+00035
+00036
+<a name="l00037"></a><a class="code" href="classNL3D_1_1CTessBlock.html#p0">00037</a> CPlane CTessBlock::CurrentPyramid[<a class="code" href="tess__block_8h.html#a0">NL3D_TESSBLOCK_NUM_CLIP_PLANE</a>];
+00038
+00039
+00040
+00041 <font class="comment">// ***************************************************************************</font>
+<a name="l00042"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a0">00042</a> CTessBlock::CTessBlock()
+00043 {
+00044 <a class="code" href="classNL3D_1_1CTessBlock.html#o6">_Patch</a>= NULL;
+00045
+00046 <font class="comment">// init bounding info.</font>
+00047 <a class="code" href="classNL3D_1_1CTessBlock.html#o2">Empty</a>= <font class="keyword">true</font>;
+00048 <font class="comment">// By default, the tessBlock is clipped.</font>
+00049 <a class="code" href="classNL3D_1_1CTessBlock.html#o3">Clipped</a>= <font class="keyword">true</font>;
+00050 <a class="code" href="classNL3D_1_1CTessBlock.html#o4">FullFar1</a>= <font class="keyword">false</font>;
+00051 <a class="code" href="classNL3D_1_1CTessBlock.html#o5">EmptyFar1</a>= <font class="keyword">false</font>;
+00052
+00053 <font class="comment">// init vert/face list.</font>
+00054 <font class="keywordflow">for</font>(sint i=0;i&lt;<a class="code" href="tess__block_8h.html#a1">NL3D_TESSBLOCK_TILESIZE</a>;i++)
+00055 {
+00056 <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[i]=NULL;
+00057 }
+00058
+00059 <font class="comment">// init LightMap.</font>
+00060 <a class="code" href="classNL3D_1_1CTessBlock.html#m9">LightMapRefCount</a>= 0;
+00061
+00062 <a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>= NULL;
+00063 <a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>= NULL;
+00064
+00065 <a class="code" href="classNL3D_1_1CTessBlock.html#o7">_PrecToModify</a>= NULL;
+00066 <a class="code" href="classNL3D_1_1CTessBlock.html#o8">_NextToModify</a>= NULL;
+00067
+00068 <a class="code" href="classNL3D_1_1CTessBlock.html#m4">FaceTileMaterialRefCount</a>= 0;
+00069 <a class="code" href="classNL3D_1_1CTessBlock.html#m5">TileMaterialRefCount</a>= 0;
+00070
+00071 <font class="comment">// Micro-vegetation.</font>
+00072 <a class="code" href="classNL3D_1_1CTessBlock.html#m11">VegetableBlock</a>= NULL;
+00073 }
+00074
+00075
+00076 <font class="comment">// ***************************************************************************</font>
+<a name="l00077"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a1">00077</a> CTessBlock::~CTessBlock()
+00078 {
+00079 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#a24">isInModifyList</a>())
+00080 {
+00081 <a class="code" href="classNL3D_1_1CTessBlock.html#a26">removeFromModifyList</a>();
+00082 }
+00083
+00084 <font class="comment">// LightMap should be released</font>
+00085 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CTessBlock.html#m9">LightMapRefCount</a>==0);
+00086 }
+00087
+00088 <font class="comment">// ***************************************************************************</font>
+<a name="l00089"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a2">00089</a> <font class="keywordtype">void</font> CTessBlock::init(CPatch *patch)
+00090 {
+00091 <a class="code" href="classNL3D_1_1CTessBlock.html#o6">_Patch</a>= patch;
+00092 }
+00093 <font class="comment">// ***************************************************************************</font>
+<a name="l00094"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a3">00094</a> CPatch *CTessBlock::getPatch()
+00095 {
+00096 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CTessBlock.html#o6">_Patch</a>;
+00097 }
+00098
+00099
+00100
+00101 <font class="comment">// ***************************************************************************</font>
+<a name="l00102"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a4">00102</a> <font class="keywordtype">void</font> CTessBlock::extendSphereFirst(<font class="keyword">const</font> CVector &amp;vec)
+00103 {
+00104 <font class="keywordflow">if</font>(Empty)
+00105 {
+00106 <a class="code" href="classNL3D_1_1CTessBlock.html#o2">Empty</a>= <font class="keyword">false</font>;
+00107 <a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z263_0">setCenter</a>(vec);
+00108 <a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z263_1">setHalfSize</a>(CVector::Null);
+00109 }
+00110 <font class="keywordflow">else</font>
+00111 <a class="code" href="classNL3D_1_1CTessBlock.html#a5">extendSphereAdd</a>(vec);
+00112 }
+00113
+00114 <font class="comment">// ***************************************************************************</font>
+<a name="l00115"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a5">00115</a> <font class="keywordtype">void</font> CTessBlock::extendSphereAdd(<font class="keyword">const</font> CVector &amp;vec)
+00116 {
+00117 <font class="keywordflow">if</font>( !<a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z265_2">include</a>(vec) )
+00118 <a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z263_4">extend</a>(vec);
+00119 }
+00120
+00121 <font class="comment">// ***************************************************************************</font>
+<a name="l00122"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a6">00122</a> <font class="keywordtype">void</font> CTessBlock::extendSphereCompile()
+00123 {
+00124 <a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#m0">Center</a>= <a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z264_4">getCenter</a>();
+00125 <a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#m1">Radius</a>= <a class="code" href="classNL3D_1_1CTessBlock.html#o0">BBox</a>.<a class="code" href="classNLMISC_1_1CAABBox.html#z264_8">getRadius</a>();
+00126 }
+00127
+00128
+00129 <font class="comment">// ***************************************************************************</font>
+<a name="l00130"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a7">00130</a> <font class="keywordtype">void</font> CTessBlock::resetClip()
+00131 {
+00132 <a class="code" href="classNL3D_1_1CTessBlock.html#o3">Clipped</a>= <font class="keyword">false</font>;
+00133 <a class="code" href="classNL3D_1_1CTessBlock.html#o4">FullFar1</a>= <font class="keyword">false</font>;
+00134 <a class="code" href="classNL3D_1_1CTessBlock.html#o5">EmptyFar1</a>= <font class="keyword">false</font>;
+00135 }
+00136
+00137
+00138 <font class="comment">// ***************************************************************************</font>
+<a name="l00139"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a8">00139</a> <font class="keywordtype">void</font> CTessBlock::forceClip()
+00140 {
+00141 <a class="code" href="classNL3D_1_1CTessBlock.html#o3">Clipped</a>= <font class="keyword">true</font>;
+00142 }
+00143
+00144
+00145 <font class="comment">// ***************************************************************************</font>
+<a name="l00146"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a9">00146</a> <font class="keywordtype">void</font> CTessBlock::clip()
+00147 {
+00148 <a class="code" href="classNL3D_1_1CTessBlock.html#o3">Clipped</a>= <font class="keyword">false</font>;
+00149 <font class="keywordflow">for</font>(sint i=0;i&lt;<a class="code" href="tess__block_8h.html#a0">NL3D_TESSBLOCK_NUM_CLIP_PLANE</a>;i++)
+00150 {
+00151 <font class="comment">// If entirely out.</font>
+00152 <font class="keywordflow">if</font>(!<a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#z279_1">clipBack</a>( CTessBlock::CurrentPyramid[i] ))
+00153 {
+00154 <a class="code" href="classNL3D_1_1CTessBlock.html#o3">Clipped</a>= <font class="keyword">true</font>;
+00155 <font class="keywordflow">break</font>;
+00156 }
+00157 }
+00158 }
+00159 <font class="comment">// ***************************************************************************</font>
+<a name="l00160"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a10">00160</a> <font class="keywordtype">void</font> CTessBlock::clipFar(<font class="keyword">const</font> CVector &amp;refineCenter, <font class="keywordtype">float</font> tileDistNear, <font class="keywordtype">float</font> farTransition)
+00161 {
+00162 <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>= (refineCenter-<a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#m0">Center</a>).norm();
+00163 <font class="keywordflow">if</font>( (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>-<a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#m1">Radius</a>) &gt; tileDistNear)
+00164 {
+00165 <a class="code" href="classNL3D_1_1CTessBlock.html#o4">FullFar1</a>= <font class="keyword">true</font>;
+00166 }
+00167 <font class="keywordflow">else</font>
+00168 {
+00169 <font class="keywordflow">if</font>( (<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>+<a class="code" href="classNL3D_1_1CTessBlock.html#o1">BSphere</a>.<a class="code" href="classNLMISC_1_1CBSphere.html#m1">Radius</a>) &lt; (tileDistNear-farTransition) )
+00170 <a class="code" href="classNL3D_1_1CTessBlock.html#o5">EmptyFar1</a>= <font class="keyword">true</font>;
+00171 }
+00172 }
+00173
+00174
+00175
+00176 <font class="comment">// ***************************************************************************</font>
+<a name="l00177"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a21">00177</a> <font class="keywordtype">void</font> CTessBlock::refillFaceVectorFar0()
+00178 {
+00179 <font class="comment">// If size is not 0.</font>
+00180 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size()&gt;0)
+00181 {
+00182 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>!=NULL);
+00183
+00184 <font class="comment">// Fill this faceVector, with FarFaceList</font>
+00185 CTessFace *pFace;
+00186 uint32 *dest= <a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>-&gt;TriPtr;
+00187 <font class="keywordflow">for</font>(pFace= <a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.begin(); pFace; pFace= (CTessFace*)pFace-&gt;Next)
+00188 {
+00189 *(dest++)= pFace-&gt;FVBase-&gt;Index0;
+00190 *(dest++)= pFace-&gt;FVLeft-&gt;Index0;
+00191 *(dest++)= pFace-&gt;FVRight-&gt;Index0;
+00192 }
+00193 }
+00194 }
+00195
+00196
+00197 <font class="comment">// ***************************************************************************</font>
+<a name="l00198"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a15">00198</a> <font class="keywordtype">void</font> CTessBlock::createFaceVectorFar0(CLandscapeFaceVectorManager &amp;mgr)
+00199 {
+00200 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>==NULL);
+00201 <font class="comment">// If size is not 0.</font>
+00202 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size()&gt;0)
+00203 {
+00204 <font class="comment">// Create a faceVector of the wanted triangles size.</font>
+00205 <a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>= mgr.createFaceVector(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size());
+00206
+00207 <font class="comment">// init.</font>
+00208 <a class="code" href="classNL3D_1_1CTessBlock.html#a21">refillFaceVectorFar0</a>();
+00209 }
+00210
+00211 }
+00212 <font class="comment">// ***************************************************************************</font>
+<a name="l00213"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a16">00213</a> <font class="keywordtype">void</font> CTessBlock::deleteFaceVectorFar0(CLandscapeFaceVectorManager &amp;mgr)
+00214 {
+00215 <font class="keywordflow">if</font>(Far0FaceVector)
+00216 {
+00217 mgr.deleteFaceVector(<a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>);
+00218 <a class="code" href="classNL3D_1_1CTessBlock.html#m6">Far0FaceVector</a>= NULL;
+00219 }
+00220 }
+00221
+00222 <font class="comment">// ***************************************************************************</font>
+<a name="l00223"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a22">00223</a> <font class="keywordtype">void</font> CTessBlock::refillFaceVectorFar1()
+00224 {
+00225 <font class="comment">// If size is not 0.</font>
+00226 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size()&gt;0)
+00227 {
+00228 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>!=NULL);
+00229 <font class="comment">// Fill this faceVector, with FarFaceList</font>
+00230 CTessFace *pFace;
+00231 uint32 *dest= <a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>-&gt;TriPtr;
+00232 <font class="keywordflow">for</font>(pFace= <a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.begin(); pFace; pFace= (CTessFace*)pFace-&gt;Next)
+00233 {
+00234 *(dest++)= pFace-&gt;FVBase-&gt;Index1;
+00235 *(dest++)= pFace-&gt;FVLeft-&gt;Index1;
+00236 *(dest++)= pFace-&gt;FVRight-&gt;Index1;
+00237 }
+00238 }
+00239 }
+00240
+00241 <font class="comment">// ***************************************************************************</font>
+<a name="l00242"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a17">00242</a> <font class="keywordtype">void</font> CTessBlock::createFaceVectorFar1(CLandscapeFaceVectorManager &amp;mgr)
+00243 {
+00244 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>==NULL);
+00245 <font class="comment">// If size is not 0.</font>
+00246 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size()&gt;0)
+00247 {
+00248 <font class="comment">// Create a faceVector of the wanted triangles size.</font>
+00249 <a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>= mgr.createFaceVector(<a class="code" href="classNL3D_1_1CTessBlock.html#m2">FarFaceList</a>.size());
+00250
+00251 <font class="comment">// init.</font>
+00252 <a class="code" href="classNL3D_1_1CTessBlock.html#a22">refillFaceVectorFar1</a>();
+00253 }
+00254 }
+00255 <font class="comment">// ***************************************************************************</font>
+<a name="l00256"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a18">00256</a> <font class="keywordtype">void</font> CTessBlock::deleteFaceVectorFar1(CLandscapeFaceVectorManager &amp;mgr)
+00257 {
+00258 <font class="keywordflow">if</font>(Far1FaceVector)
+00259 {
+00260 mgr.deleteFaceVector(<a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>);
+00261 <a class="code" href="classNL3D_1_1CTessBlock.html#m7">Far1FaceVector</a>= NULL;
+00262 }
+00263 }
+00264
+00265
+00266 <font class="comment">// ***************************************************************************</font>
+<a name="l00267"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a23">00267</a> <font class="keywordtype">void</font> CTessBlock::refillFaceVectorTile()
+00268 {
+00269 <font class="comment">// For all tiles existing, and for all facePass existing, fill the faceVector.</font>
+00270 <font class="keywordflow">for</font>(uint tileId=0; tileId&lt;<a class="code" href="tess__block_8h.html#a1">NL3D_TESSBLOCK_TILESIZE</a>; tileId++)
+00271 {
+00272 <font class="comment">// if tile exist.</font>
+00273 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId])
+00274 {
+00275 <font class="comment">// For all Pass faces of the tile.</font>
+00276 <font class="keywordflow">for</font>(uint facePass=0; facePass&lt;<a class="code" href="landscape__def_8h.html#a1">NL3D_MAX_TILE_FACE</a>; facePass++)
+00277 {
+00278 CTessList&lt;CTileFace&gt; &amp;faceList= <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId]-&gt;TileFaceList[facePass];
+00279 CLandscapeFaceVector *faceVector= <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId]-&gt;TileFaceVectors[facePass];
+00280 <font class="comment">// If some triangles create them.</font>
+00281 <font class="keywordflow">if</font>(faceList.size()&gt;0)
+00282 {
+00283 <a class="code" href="debug_8h.html#a6">nlassert</a>( faceVector!=NULL );
+00284
+00285 <font class="comment">// Fill this faceVector, with the TileFaceList</font>
+00286 CTileFace *pFace;
+00287 uint32 *dest= faceVector-&gt;TriPtr;
+00288 <font class="keywordflow">for</font>(pFace= faceList.begin(); pFace; pFace= (CTileFace*)pFace-&gt;Next)
+00289 {
+00290 *(dest++)= pFace-&gt;V[CTessFace::IdUvBase]-&gt;Index;
+00291 *(dest++)= pFace-&gt;V[CTessFace::IdUvLeft]-&gt;Index;
+00292 *(dest++)= pFace-&gt;V[CTessFace::IdUvRight]-&gt;Index;
+00293 }
+00294 }
+00295 }
+00296 }
+00297 }
+00298 }
+00299
+00300
+00301 <font class="comment">// ***************************************************************************</font>
+<a name="l00302"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a19">00302</a> <font class="keywordtype">void</font> CTessBlock::createFaceVectorTile(CLandscapeFaceVectorManager &amp;mgr)
+00303 {
+00304 <font class="comment">// For all tiles existing, and for all facePass existing, create the faceVector.</font>
+00305 <font class="keywordflow">for</font>(uint tileId=0; tileId&lt;<a class="code" href="tess__block_8h.html#a1">NL3D_TESSBLOCK_TILESIZE</a>; tileId++)
+00306 {
+00307 <font class="comment">// if tile exist.</font>
+00308 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId])
+00309 {
+00310 <font class="comment">// For all Pass faces of the tile.</font>
+00311 <font class="keywordflow">for</font>(uint facePass=0; facePass&lt;<a class="code" href="landscape__def_8h.html#a1">NL3D_MAX_TILE_FACE</a>; facePass++)
+00312 {
+00313 CTessList&lt;CTileFace&gt; &amp;faceList= <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId]-&gt;TileFaceList[facePass];
+00314 CLandscapeFaceVector *&amp;faceVector= <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId]-&gt;TileFaceVectors[facePass];
+00315 <font class="comment">// If some triangles create them.</font>
+00316 <font class="keywordflow">if</font>(faceList.size()&gt;0)
+00317 {
+00318 <font class="comment">// Create a faceVector of the wanted triangles size.</font>
+00319 faceVector= mgr.createFaceVector(faceList.size());
+00320 }
+00321 }
+00322 }
+00323 }
+00324
+00325 <font class="comment">// init.</font>
+00326 <a class="code" href="classNL3D_1_1CTessBlock.html#a23">refillFaceVectorTile</a>();
+00327 }
+00328 <font class="comment">// ***************************************************************************</font>
+<a name="l00329"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a20">00329</a> <font class="keywordtype">void</font> CTessBlock::deleteFaceVectorTile(CLandscapeFaceVectorManager &amp;mgr)
+00330 {
+00331 <font class="comment">// For all tiles existing, and for all facePass existing, delete the faceVector.</font>
+00332 <font class="keywordflow">for</font>(uint tileId=0; tileId&lt;<a class="code" href="tess__block_8h.html#a1">NL3D_TESSBLOCK_TILESIZE</a>; tileId++)
+00333 {
+00334 <font class="comment">// if tile exist.</font>
+00335 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId])
+00336 {
+00337 <font class="comment">// For all Pass faces of the tile.</font>
+00338 <font class="keywordflow">for</font>(uint facePass=0; facePass&lt;<a class="code" href="landscape__def_8h.html#a1">NL3D_MAX_TILE_FACE</a>; facePass++)
+00339 {
+00340 CLandscapeFaceVector *&amp;faceVector= <a class="code" href="classNL3D_1_1CTessBlock.html#m3">RdrTileRoot</a>[tileId]-&gt;TileFaceVectors[facePass];
+00341 <font class="comment">// If the faceVector exist, delete it.</font>
+00342 <font class="keywordflow">if</font>(faceVector)
+00343 {
+00344 mgr.deleteFaceVector(faceVector);
+00345 faceVector= NULL;
+00346 }
+00347 }
+00348 }
+00349 }
+00350 }
+00351
+00352
+00353 <font class="comment">// ***************************************************************************</font>
+<a name="l00354"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a25">00354</a> <font class="keywordtype">void</font> CTessBlock::appendToModifyListAndDeleteFaceVector(CTessBlock &amp;root, CLandscapeFaceVectorManager &amp;mgr)
+00355 {
+00356 <font class="comment">// If already appened, return.</font>
+00357 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CTessBlock.html#a24">isInModifyList</a>())
+00358 <font class="keywordflow">return</font>;
+00359
+00360 <font class="comment">// append to root.</font>
+00361 <a class="code" href="classNL3D_1_1CTessBlock.html#o7">_PrecToModify</a>= &amp;root;
+00362 <a class="code" href="classNL3D_1_1CTessBlock.html#o8">_NextToModify</a>= root._NextToModify;
+00363 <font class="keywordflow">if</font>(root._NextToModify)
+00364 root._NextToModify-&gt;_PrecToModify= <font class="keyword">this</font>;
+00365 root._NextToModify= <font class="keyword">this</font>;
+00366
+00367 <font class="comment">// Then delete All faceVector that may exist.</font>
+00368 <a class="code" href="classNL3D_1_1CTessBlock.html#a16">deleteFaceVectorFar0</a>(mgr);
+00369 <a class="code" href="classNL3D_1_1CTessBlock.html#a18">deleteFaceVectorFar1</a>(mgr);
+00370 <a class="code" href="classNL3D_1_1CTessBlock.html#a20">deleteFaceVectorTile</a>(mgr);
+00371 }
+00372 <font class="comment">// ***************************************************************************</font>
+<a name="l00373"></a><a class="code" href="classNL3D_1_1CTessBlock.html#a26">00373</a> <font class="keywordtype">void</font> CTessBlock::removeFromModifyList()
+00374 {
+00375 <font class="comment">// If already removed, return.</font>
+00376 <font class="comment">// _PrecToModify must be !NULL</font>
+00377 <font class="keywordflow">if</font>(!<a class="code" href="classNL3D_1_1CTessBlock.html#a24">isInModifyList</a>())
+00378 <font class="keywordflow">return</font>;
+00379
+00380 <font class="comment">// unlink.</font>
+00381 <a class="code" href="classNL3D_1_1CTessBlock.html#o7">_PrecToModify</a>-&gt;_NextToModify= <a class="code" href="classNL3D_1_1CTessBlock.html#o8">_NextToModify</a>;
+00382 <font class="keywordflow">if</font>(_NextToModify)
+00383 <a class="code" href="classNL3D_1_1CTessBlock.html#o8">_NextToModify</a>-&gt;_PrecToModify= <a class="code" href="classNL3D_1_1CTessBlock.html#o7">_PrecToModify</a>;
+00384 <a class="code" href="classNL3D_1_1CTessBlock.html#o7">_PrecToModify</a>= NULL;
+00385 <a class="code" href="classNL3D_1_1CTessBlock.html#o8">_NextToModify</a>= NULL;
+00386 }
+00387
+00388
+00389 } <font class="comment">// NL3D</font>
+</pre></div>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>