aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03476.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/a03476.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03476.html')
-rw-r--r--docs/doxygen/nel/a03476.html6167
1 files changed, 6167 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03476.html b/docs/doxygen/nel/a03476.html
new file mode 100644
index 00000000..bf8ced51
--- /dev/null
+++ b/docs/doxygen/nel/a03476.html
@@ -0,0 +1,6167 @@
+<!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::CTessFace 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::CTessFace Class Reference</h1><code>#include &lt;<a class="el" href="a06498.html">tessellation.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NL3D::CTessFace:
+<p><center><img src="a03476.png" usemap="#NL3D::CTessFace_map" border="0" alt=""></center>
+<map name="NL3D::CTessFace_map">
+<area href="a02718.html" alt="NL3D::CTessNodeList" shape="rect" coords="0,0,171,24">
+<area href="a03477.html" alt="NL3D::CTessFacePListNode" shape="rect" coords="181,0,352,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A Landscape Triangle. MemSize: 28*4 octets. =&gt; for 100K faces, it takes 11.2 Mo. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00233">233</a> of file <a class="el" href="a06498.html">tessellation.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Tile Material Infos (uvs...).</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> { <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a> = 0,
+<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>,
+<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03523.html">CTileFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a> [NL3D_MAX_TILE_FACE]</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_2">TileId</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03530.html">CTileMaterial</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a></td></tr>
+
+<tr><td colspan=2><br><h2>Public Types</h2></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="a03477.html#NL3D_1_1CTessFacePListNodea0">appendPList</a> (<a class="el" href="a03477.html">CTessFacePListNode</a> &amp;root)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea1">appendTessellationLeaves</a> (std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;leaves) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea2">averageTesselationVertices</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea3">changeNeighbor</a> (<a class="el" href="a03476.html">CTessFace</a> *<a class="el" href="a04113.html#a70">from</a>, <a class="el" href="a03476.html">CTessFace</a> *to)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea5">computeSplitPoint</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea6">computeTileMaterial</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea8">deleteTileUvs</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea9">forceMerge</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea10">forceMergeAtTileLevel</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea11">getTesselatedPos</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv, bool verifInclusion, <a class="el" href="a03128.html">CVector</a> &amp;ret)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea12">hasEdge</a> (<a class="el" href="a03482.html">CTessVertex</a> *v0, <a class="el" href="a03482.html">CTessVertex</a> *v1) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea13">hasVertex</a> (<a class="el" href="a03482.html">CTessVertex</a> *<a class="el" href="a04223.html#a576">v</a>) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03477.html#NL3D_1_1CTessFacePListNodea3">linkInPList</a> (<a class="el" href="a03477.html">CTessFacePListNode</a> &amp;root)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">unlinkInPList, then link this node to the root of a list. <a href="#NL3D_1_1CTessFacePListNodea3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea17">linkTessFaceWithEdge</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv0, const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uv1, <a class="el" href="a03476.html">CTessFace</a> *linkTo)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea18">merge</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03477.html">CTessFacePListNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03477.html#NL3D_1_1CTessFacePListNodea4">nextInPList</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03477.html">CTessFacePListNode</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03477.html#NL3D_1_1CTessFacePListNodea6">precInPList</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get next ptr. next==this if list empty. <a href="#NL3D_1_1CTessFacePListNodea6"></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="a03476.html#NL3D_1_1CTessFacea21">recreateTileUvs</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea22">refineAll</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">refine the node, and his sons. Refine all nodes. <a href="#NL3D_1_1CTessFacea22"></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="a03476.html#NL3D_1_1CTessFacea23">refreshTesselationGeometry</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea24">releaseTileMaterial</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea25">split</a> (bool propagateSplit=true)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea26">unbind</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03477.html#NL3D_1_1CTessFacePListNodea7">unlinkInPList</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">if linked, unlink this node from his list. <a href="#NL3D_1_1CTessFacePListNodea7"></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="a03476.html#NL3D_1_1CTessFacea28">updateBind</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea29">updateBindAndSplit</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a> (<a class="el" href="a03476.html">CTessFace</a> *&amp;edgeFace, bool &amp;splitWanted)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea31">updateErrorMetric</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea32">updateRefineMerge</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea33">updateRefineSplit</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacea34">~CTessFace</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaceo0">FVBase</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaceo1">FVLeft</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03480.html">CTessFarVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaceo2">FVRight</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02718.html">CTessNodeList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko0">Next</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02718.html">CTessNodeList</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko1">Prec</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaceo5">ShadowMapTriId</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">Error metric.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez972_1">ErrorMetricDate</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez972_2">MaxDistToSplitPoint</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</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="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a></td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">geometric tesselation.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_9">RecursMarkCanMerge</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_10">RecursMarkForceMerge</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a></td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaces0">MultipleBindFace</a></td></tr>
+
+<tr><td colspan=2><br><h2>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="a03476.html#NL3D_1_1CTessFaced0">canMerge</a> (bool testEm)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced1">computeTesselatedPos</a> (const <a class="el" href="a03640.html">CUV</a> &amp;uv, <a class="el" href="a03128.html">CVector</a> &amp;ret)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced2">computeTileEMForUpdateRefine</a> (float distSplitPoint, float distMinFace, float nearLimit)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced3">computeTileErrorMetric</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced4">doMerge</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced5">heritTileMaterial</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced6">initTileUvDLM</a> (<a class="el" href="a03040.html">CParamCoord</a> pointCoord, <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced7">initTileUvLightmap</a> (<a class="el" href="a03040.html">CParamCoord</a> pointCoord, <a class="el" href="a03040.html">CParamCoord</a> middleCoord, <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a> (<a class="el" href="a04558.html#a14">sint</a> pass, bool <a class="el" href="a04223.html#a663">alpha</a>, <a class="el" href="a03040.html">CParamCoord</a> pointCoord, <a class="el" href="a03040.html">CParamCoord</a> middleCoord, <a class="el" href="a03640.html">CUV</a> &amp;uv)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced9">splitRectangular</a> (bool propagateSplit)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFaced10">updateNearFarVertices</a> ()</td></tr>
+
+<tr><td colspan="2"><div class="groupHeader">UV mgt.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_0">allocTileUv</a> (<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_1">buildTileFaces</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_2">checkCreateFillTileVB</a> (<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_3">checkFillTileVB</a> (<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_4">copyTileUv</a> (<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> <a class="el" href="a04223.html#a564">id</a>, <a class="el" href="a03476.html">CTessFace</a> *srcFace, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> srcId)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_5">deleteTileFaces</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_6">deleteTileUv</a> (<a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_7">emptyTileFaces</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacez974_8">heritTileUv</a> (<a class="el" href="a03476.html">CTessFace</a> *baseFace)</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="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a> (const <a class="el" href="a03476.html">CTessFace</a> *a, const <a class="el" href="a03476.html">CTessFace</a> *b)</td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03476.html">CTessFace</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a></td></tr>
+
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NL3D_1_1CTessFacez970_0" doxytag="NL3D::CTessFace::TTileUvId" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez970_0">NL3D::CTessFace::TTileUvId</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0" doxytag="IdUvBase" ></a>IdUvBase</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1" doxytag="IdUvLeft" ></a>IdUvLeft</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2" doxytag="IdUvRight" ></a>IdUvRight</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00264">264</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+<div class="fragment"><pre>00264 {<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>=0, <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>};
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CTessFacea7" doxytag="NL3D::CTessFace::CTessFace" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NL3D::CTessFace::CTessFace </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="a06497.html#l00161">161</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00273">ErrorMetricDate</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05872.html#l00036">NL3D::ProfNTessFace</a>, <a class="el" href="a06498.html#l00249">RecursMarkCanMerge</a>, <a class="el" href="a06498.html#l00250">RecursMarkForceMerge</a>, <a class="el" href="a06498.html#l00286">ShadowMapTriId</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+<div class="fragment"><pre>00162 {
+00163 <span class="comment">// Don't modify any of it!!</span>
+00164 <span class="comment">// Patch, SonLeft and SonRight nullity are very usefull for MultiplePatch faces, and CantMergeFace.</span>
+00165
+00166 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>= NULL;
+00167 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>= NULL;
+00168 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= NULL;
+00169 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>= NULL;
+00170 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>=0;
+00171 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_1">ErrorMetricDate</a>= 0;
+00172 <span class="comment">// Size, Center, paramcoord undetermined.</span>
+00173
+00174 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>= NULL;
+00175 <span class="comment">// Very important (for split reasons). Init Tilefaces to NULL.</span>
+00176 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00177 {
+00178 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]=NULL;
+00179 }
+00180
+00181 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_9">RecursMarkCanMerge</a>=<span class="keyword">false</span>;
+00182 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_10">RecursMarkForceMerge</a>=<span class="keyword">false</span>;
+00183
+00184
+00185 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNTessFace, 1);
+00186
+00187 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo5">ShadowMapTriId</a>= -1;
+00188 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea34" doxytag="NL3D::CTessFace::~CTessFace" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NL3D::CTessFace::~<a class="el" href="a03476.html">CTessFace</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="a06497.html#l00192">192</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00036">NL3D::ProfNTessFace</a>, and <a class="el" href="a06498.html#l00286">ShadowMapTriId</a>.
+<p>
+<div class="fragment"><pre>00193 {
+00194 <span class="comment">// Old Code. This is not sufficient to clear the CTessFace.</span>
+00195 <span class="comment">// Vertices and Uvs must be correctly cleared too (but difficult because of sharing).</span>
+00196 <span class="comment">/*</span>
+00197 <span class="comment"> Patch-&gt;getLandscape()-&gt;deleteTessFace(SonLeft);</span>
+00198 <span class="comment"> Patch-&gt;getLandscape()-&gt;deleteTessFace(SonRight);</span>
+00199 <span class="comment"></span>
+00200 <span class="comment"> // update neighbors.</span>
+00201 <span class="comment"> if(FBase) FBase-&gt;changeNeighbor(this, NULL);</span>
+00202 <span class="comment"> if(FLeft) FLeft-&gt;changeNeighbor(this, NULL);</span>
+00203 <span class="comment"> if(FRight) FRight-&gt;changeNeighbor(this, NULL);</span>
+00204 <span class="comment"></span>
+00205 <span class="comment"> FBase=FLeft=FRight= NULL;</span>
+00206 <span class="comment"> */</span>
+00207
+00208 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNTessFace, -1);
+00209
+00210 <span class="comment">// Ensure correclty removed from landscape ShadowMap.</span>
+00211 <a class="code" href="a04199.html#a6">nlassert</a>(ShadowMapTriId== -1);
+00212 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CTessFacez974_0" doxytag="NL3D::CTessFace::allocTileUv" ></a><p>
+<table class="mdTable" 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::CTessFace::allocTileUv </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</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="a06497.html#l00372">372</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l01086">NL3D::CPatch::appendNearVertexToRenderList()</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a05862.html#l03028">NL3D::CLandscape::newTessNearVertex()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, and <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00373 {
+00374 <span class="comment">// TileFaces must have been build.</span>
+00375 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00376
+00377 <span class="comment">// what src??</span>
+00378 CTessVertex *vertexSrc;
+00379 <span class="keywordflow">switch</span>(<span class="keywordtype">id</span>)
+00380 {
+00381 <span class="keywordflow">case</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>: vertexSrc= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>; <span class="keywordflow">break</span>;
+00382 <span class="keywordflow">case</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>: vertexSrc= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>; <span class="keywordflow">break</span>;
+00383 <span class="keywordflow">case</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>: vertexSrc= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>; <span class="keywordflow">break</span>;
+00384 <span class="keywordflow">default</span>: <a class="code" href="a04199.html#a12">nlstop</a>;
+00385 };
+00386
+00387 <span class="comment">// Do it for all possible pass</span>
+00388 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00389 {
+00390 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00391 {
+00392 CTessNearVertex *newNear= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessNearVertex();
+00393 newNear-&gt;Src= vertexSrc;
+00394 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<span class="keywordtype">id</span>]= newNear;
+00395 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendNearVertexToRenderList(TileMaterial, newNear);
+00396
+00397 <span class="comment">// May Allocate/Fill VB. Do it after allocTileUv, because UVs are not comuted yet.</span>
+00398 }
+00399 }
+00400 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacePListNodea0" doxytag="NL3D::CTessFace::appendPList" ></a><p>
+<table class="mdTable" 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::CTessFacePListNode::appendPList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03477.html">CTessFacePListNode</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>root</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+append a list just after this node. root is the root of the list. It is not inserted in the result. After this, the list pointed by "root" is empty.
+<p>
+Definition at line <a class="el" href="a06493.html#l00088">88</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
+<p>
+References <a class="el" href="a06494.html#l00088">NL3D::CTessFacePListNode::_NextTessFaceInPList</a>, and <a class="el" href="a06494.html#l00087">NL3D::CTessFacePListNode::_PrecTessFaceInPList</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>, <a class="el" href="a06493.html#l00314">NL3D::CTessFacePriorityList::shift()</a>, and <a class="el" href="a06493.html#l00477">NL3D::CTessFacePriorityList::CRollingTable::shiftEntries()</a>.
+<p>
+<div class="fragment"><pre>00089 {
+00090 <span class="comment">// If list to append is not empty.</span>
+00091 <span class="keywordflow">if</span>( root._NextTessFaceInPList != &amp;root )
+00092 {
+00093 <span class="comment">// If we are empty.</span>
+00094 <span class="keywordflow">if</span>( _NextTessFaceInPList==<span class="keyword">this</span> )
+00095 {
+00096 <span class="comment">// link the appendList to the root.</span>
+00097 _PrecTessFaceInPList= root._PrecTessFaceInPList;
+00098 _NextTessFaceInPList= root._NextTessFaceInPList;
+00099 <span class="comment">// link the root to the appendList.</span>
+00100 _PrecTessFaceInPList-&gt;_NextTessFaceInPList= <span class="keyword">this</span>;
+00101 _NextTessFaceInPList-&gt;_PrecTessFaceInPList= <span class="keyword">this</span>;
+00102 }
+00103 <span class="comment">// else bind first-last in the interval prec-next.</span>
+00104 <span class="keywordflow">else</span>
+00105 {
+00106 <a class="code" href="a03477.html#NL3D_1_1CTessFacePListNodea2">CTessFacePListNode</a> *first= root._NextTessFaceInPList;
+00107 <a class="code" href="a03477.html#NL3D_1_1CTessFacePListNodea2">CTessFacePListNode</a> *last= root._PrecTessFaceInPList;
+00108 <a class="code" href="a03477.html#NL3D_1_1CTessFacePListNodea2">CTessFacePListNode</a> *prec= <span class="keyword">this</span>;
+00109 <a class="code" href="a03477.html#NL3D_1_1CTessFacePListNodea2">CTessFacePListNode</a> *next= _NextTessFaceInPList;
+00110 <span class="comment">// insert the appendList in our list.</span>
+00111 next-&gt;_PrecTessFaceInPList= last;
+00112 prec-&gt;_NextTessFaceInPList= first;
+00113 <span class="comment">// insert our list in the appendList.</span>
+00114 last-&gt;_NextTessFaceInPList= next;
+00115 first-&gt;_PrecTessFaceInPList= prec;
+00116 }
+00117
+00118 <span class="comment">// clear input list.</span>
+00119 root._PrecTessFaceInPList= &amp;root;
+00120 root._NextTessFaceInPList= &amp;root;
+00121 }
+00122 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea1" doxytag="NL3D::CTessFace::appendTessellationLeaves" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::appendTessellationLeaves </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::vector&lt; const <a class="el" href="a03476.html">CTessFace</a> * &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>leaves</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l03194">3194</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, and <a class="el" href="a06498.html#l00243">SonRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02176">NL3D::CPatch::appendTessellationLeaves()</a>.
+<p>
+<div class="fragment"><pre>03195 {
+03196 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+03197 leaves.push_back(<span class="keyword">this</span>);
+03198 <span class="keywordflow">else</span>
+03199 {
+03200 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;appendTessellationLeaves(leaves);
+03201 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;appendTessellationLeaves(leaves);
+03202 }
+03203 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea2" doxytag="NL3D::CTessFace::averageTesselationVertices" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::averageTesselationVertices </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02468">2468</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00156">CantMergeFace</a>, <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, and <a class="el" href="a06498.html#l00241">VBase</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01505">NL3D::CPatch::averageTesselationVertices()</a>.
+<p>
+<div class="fragment"><pre>02469 {
+02470 <span class="comment">// If we are not splitted, no-op.</span>
+02471 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02472 <span class="keywordflow">return</span>;
+02473
+02474
+02475 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *neighbor;
+02476 <span class="comment">// Normal square case.</span>
+02477 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02478 {
+02479 neighbor= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>;
+02480 }
+02481 <span class="comment">// Special Rectangular case.</span>
+02482 <span class="keywordflow">else</span>
+02483 {
+02484 <span class="comment">// NB: here, just need to compute average of myself with FLeft, because my neighbor FBase </span>
+02485 <span class="comment">// is on same patch (see splitRectangular()), and is average with its FLeft neighbor is done </span>
+02486 <span class="comment">// on an other branch of the recurs call.</span>
+02487 neighbor= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>;
+02488 }
+02489
+02490
+02491 <span class="comment">/* Try to average with neighbor.</span>
+02492 <span class="comment"> - if no neighbor, no-op :).</span>
+02493 <span class="comment"> - if neighbor is bind 1/N (CantMergeFace), no-op too, because the vertex is a BaseVertex, so don't modify.</span>
+02494 <span class="comment"> - if my patch is same than my neighbor, then we are on a same patch :), and so no need to average.</span>
+02495 <span class="comment"> */</span>
+02496 <span class="keywordflow">if</span>(neighbor!=NULL &amp;&amp; neighbor!=&amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>!= neighbor-&gt;Patch)
+02497 {
+02498 <a class="code" href="a04199.html#a6">nlassert</a>(neighbor-&gt;Patch);
+02499 <a class="code" href="a04199.html#a6">nlassert</a>(!neighbor-&gt;isLeaf());
+02500 <span class="comment">// must compute average beetween me and my neighbor.</span>
+02501 <span class="comment">// NB: this work with both rectangular and square triangles (see split*()).</span>
+02502 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase == neighbor-&gt;SonLeft-&gt;VBase);
+02503
+02504 CVector v0= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;computeVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getT());
+02505 CVector v1= neighbor-&gt;Patch-&gt;computeVertex(neighbor-&gt;SonLeft-&gt;PVBase.getS(), neighbor-&gt;SonLeft-&gt;PVBase.getT());
+02506
+02507 <span class="comment">// And so set the average.</span>
+02508 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;EndPos= (v0+v1)/2;
+02509 }
+02510
+02511
+02512 <span class="comment">// Do same thing for sons. NB: see above, we are not a leaf.</span>
+02513 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;averageTesselationVertices();
+02514 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;averageTesselationVertices();
+02515 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_1" doxytag="NL3D::CTessFace::buildTileFaces" ></a><p>
+<table class="mdTable" 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::CTessFace::buildTileFaces </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00511">511</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a05862.html#l03046">NL3D::CLandscape::newTileFace()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, and <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00512 {
+00513 <a class="code" href="a04199.html#a6">nlassert</a>(TileMaterial);
+00514
+00515 <span class="comment">// Do nothgin for lightmap pass, of course.</span>
+00516 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00517 {
+00518 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].PatchRdrPass)
+00519 {
+00520 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTileFace();
+00521 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>]= NULL;
+00522 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>]= NULL;
+00523 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>]= NULL;
+00524 }
+00525 }
+00526 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced0" doxytag="NL3D::CTessFace::canMerge" ></a><p>
+<table class="mdTable" 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::CTessFace::canMerge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>testEm</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="a06497.html#l01549">1549</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00156">CantMergeFace</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00249">RecursMarkCanMerge</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, and <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01762">merge()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, and <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>.
+<p>
+<div class="fragment"><pre>01550 {
+01551 <span class="keywordflow">if</span>(<span class="keyword">this</span>== &amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a>)
+01552 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01553
+01554 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+01555
+01556 <span class="comment">// Test diamond config (sons must be leaves).</span>
+01557 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;isLeaf())
+01558 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01559 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;isLeaf())
+01560 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01561 <span class="comment">// If Errormetric must be considered for this test.</span>
+01562 <span class="keywordflow">if</span>(testEm)
+01563 {
+01564 <a class="code" href="a03476.html#NL3D_1_1CTessFacea31">updateErrorMetric</a>();
+01565 <span class="keywordtype">float</span> ps2= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>;
+01566 ps2*= CLandscapeGlobals::OORefineThreshold;
+01567 <span class="keywordflow">if</span>(ps2&gt;=1.0f)
+01568 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01569 }
+01570
+01571 <span class="comment">// Then test neighbors.</span>
+01572 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_9">RecursMarkCanMerge</a>= <span class="keyword">true</span>;
+01573 <span class="keywordtype">bool</span> ok= <span class="keyword">true</span>;
+01574 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+01575 {
+01576 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;RecursMarkCanMerge)
+01577 {
+01578 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;canMerge(testEm))
+01579 ok= <span class="keyword">false</span>;
+01580 }
+01581 }
+01582 <span class="keywordflow">else</span>
+01583 {
+01584 <span class="comment">// Rectangular case. May have a longer propagation...</span>
+01585 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;RecursMarkCanMerge)
+01586 {
+01587 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;canMerge(testEm))
+01588 ok= <span class="keyword">false</span>;
+01589 }
+01590 <span class="keywordflow">if</span>(ok &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;RecursMarkCanMerge)
+01591 {
+01592 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;canMerge(testEm))
+01593 ok= <span class="keyword">false</span>;
+01594 }
+01595 }
+01596 <span class="comment">// Must not return false in preceding tests, because must set RecursMarkCanMerge to false.</span>
+01597 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_9">RecursMarkCanMerge</a>= <span class="keyword">false</span>;
+01598
+01599 <span class="keywordflow">return</span> ok;
+01600 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea3" doxytag="NL3D::CTessFace::changeNeighbor" ></a><p>
+<table class="mdTable" 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::CTessFace::changeNeighbor </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>from</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>to</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00298">298</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+References <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, and <a class="el" href="a06756.html#l00873">from</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, and <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>.
+<p>
+<div class="fragment"><pre>00299 {
+00300 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>==<a class="code" href="a05333.html#a132">from</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>=to;
+00301 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>==<a class="code" href="a05333.html#a132">from</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>=to;
+00302 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>==<a class="code" href="a05333.html#a132">from</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>=to;
+00303 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_2" doxytag="NL3D::CTessFace::checkCreateFillTileVB" ></a><p>
+<table class="mdTable" 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::CTessFace::checkCreateFillTileVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</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="a06497.html#l00403">403</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01543">NL3D::CPatch::checkCreateVertexVBNear()</a>, <a class="el" href="a06161.html#l01556">NL3D::CPatch::checkFillVertexVBNear()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, and <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00404 {
+00405 <span class="comment">// TileFaces must have been build.</span>
+00406 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00407
+00408 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00409 {
+00410 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00411 {
+00412 CTessNearVertex *vertNear;
+00413 vertNear= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<span class="keywordtype">id</span>];
+00414
+00415 <span class="comment">// May Allocate/Fill VB.</span>
+00416 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkCreateVertexVBNear(vertNear);
+00417 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBNear(vertNear);
+00418 }
+00419 }
+00420 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_3" doxytag="NL3D::CTessFace::checkFillTileVB" ></a><p>
+<table class="mdTable" 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::CTessFace::checkFillTileVB </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</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="a06497.html#l00424">424</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01556">NL3D::CPatch::checkFillVertexVBNear()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01283">split()</a>, and <a class="el" href="a06497.html#l00911">splitRectangular()</a>.
+<p>
+<div class="fragment"><pre>00425 {
+00426 <span class="comment">// TileFaces must have been build.</span>
+00427 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00428
+00429 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00430 {
+00431 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00432 {
+00433 CTessNearVertex *vertNear;
+00434 vertNear= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<span class="keywordtype">id</span>];
+00435
+00436 <span class="comment">// May Fill VB.</span>
+00437 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBNear(vertNear);
+00438 }
+00439 }
+00440 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea4" doxytag="NL3D::CTessFace::computeNearLimit" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CTessFace::computeNearLimit </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="a06497.html#l00216">216</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>00217 {
+00218 <span class="comment">// General formula for Level, function of Size, treshold etc...:</span>
+00219 <span class="comment">// WantedLevel= log2(BaseSize / sqrdist / RefineThreshold);</span>
+00220 <span class="comment">// &lt;=&gt; WantedLevel= log2( CurSize*2^Level / sqrdist / RefineThreshold).</span>
+00221 <span class="comment">// &lt;=&gt; WantedLevel= log2( ProjectedSize* 2^Level / RefineThreshold).</span>
+00222 <span class="comment">// &lt;=&gt; 2^WantedLevel= ProjectedSize* 2^Level / RefineThreshold.</span>
+00223 <span class="comment">// &lt;=&gt; ProjectedSize= (2^WantedLevel) * RefineThreshold / (2^Level);</span>
+00224 <span class="comment">// &lt;=&gt; ProjectedSize= (1&lt;&lt;WantedLevel) * RefineThreshold / (1&lt;&lt;Level);</span>
+00225 <span class="comment">// UnOptimised formula: limit= (1&lt;&lt;Patch-&gt;TileLimitLevel) / (1&lt;&lt;Level);</span>
+00226 <a class="code" href="a04199.html#a6">nlassert</a>(Level&lt;=20);
+00227 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> BigValue= 1&lt;&lt;20;
+00228 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> OOBigValue= 1.0f / BigValue;
+00229 <span class="keywordflow">return</span> (1&lt;&lt;<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel) * (OOBigValue*(BigValue&gt;&gt;<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>));
+00230 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea5" doxytag="NL3D::CTessFace::computeSplitPoint" ></a><p>
+<table class="mdTable" 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::CTessFace::computeSplitPoint </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>
+compute the SplitPoint. VBase / VLeft and VRight must be valid. Also compute MaxDistToSplitPoint.
+<p>
+Definition at line <a class="el" href="a06497.html#l00345">345</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00277">MaxDistToSplitPoint</a>, <a class="el" href="a06498.html#l00275">SplitPoint</a>, <a class="el" href="a06682.html#l00111">NLMISC::CVector::sqrnorm()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>.
+<p>
+<div class="fragment"><pre>00346 {
+00347 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+00348 {
+00349 <span class="comment">// If it is a rectangular triangle, it will be splitted on the middle of VBase/VLeft.</span>
+00350 <span class="comment">// see splitRectangular() conventions.</span>
+00351 <span class="comment">// So for good geomorph compute per vertex, we must have this SplitPoint on this middle.</span>
+00352 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a>= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos + <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;EndPos)/2;
+00353 }
+00354 <span class="keywordflow">else</span>
+00355 {
+00356 <span class="comment">// If it is a square triangle, it will be splitted on middle of VLeft/VRight. </span>
+00357 <span class="comment">// So for good geomorph compute per vertex, we must have this SplitPoint on this middle.</span>
+00358 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a>= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos + <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos)/2;
+00359 }
+00360
+00361 <span class="comment">// compute MaxDistToSplitPoint</span>
+00362 <span class="keywordtype">float</span> d0= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;EndPos - <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a>).sqrnorm();
+00363 <span class="keywordtype">float</span> d1= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos - <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a>).sqrnorm();
+00364 <span class="keywordtype">float</span> d2= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos - <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a>).sqrnorm();
+00365 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_2">MaxDistToSplitPoint</a>= max(d0, d1);
+00366 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_2">MaxDistToSplitPoint</a>= max(MaxDistToSplitPoint, d2);
+00367 <span class="comment">// Get the distance.</span>
+00368 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_2">MaxDistToSplitPoint</a>= sqrtf(MaxDistToSplitPoint);
+00369 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced1" doxytag="NL3D::CTessFace::computeTesselatedPos" ></a><p>
+<table class="mdTable" 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::CTessFace::computeTesselatedPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ret</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><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="a06497.html#l03156">3156</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00113">NL3D::CTessVertex::computeGeomPos()</a>, <a class="el" href="a06584.html#l00067">NLMISC::CTriangle::computeGradient()</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V0</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V1</a>, <a class="el" href="a06585.html#l00051">NLMISC::CTriangle::V2</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, <a class="el" href="a06498.html#l00241">VRight</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>.
+<p>
+<div class="fragment"><pre>03157 {
+03158 CVector uvPos(uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>, uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>, 0);
+03159
+03160 <span class="comment">// compute the UV triangle of this face.</span>
+03161 <a class="code" href="a03616.html">CTriangle</a> uvTri;
+03162 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVo3">V0</a>.set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getT(), 0);
+03163 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVo4">V1</a>.set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getT(), 0);
+03164 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVo5">V2</a>.set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getT(), 0);
+03165
+03166 <span class="comment">// must interpolate the position with given UV, so compute XYZ gradients.</span>
+03167 CVector Gx;
+03168 CVector Gy;
+03169 CVector Gz;
+03170 <span class="comment">// If VertexProgram activated</span>
+03171 <span class="keywordflow">if</span>( CLandscapeGlobals::VertexProgramEnabled )
+03172 {
+03173 <span class="comment">// then Must update geomorphed position because not done !!</span>
+03174 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;computeGeomPos();
+03175 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;computeGeomPos();
+03176 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;computeGeomPos();
+03177 }
+03178 <span class="comment">// NB: take geomorphed position.</span>
+03179 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVa0">computeGradient</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;Pos.x, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;Pos.x, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;Pos.x, Gx);
+03180 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVa0">computeGradient</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;Pos.y, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;Pos.y, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;Pos.y, Gy);
+03181 uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVa0">computeGradient</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;Pos.z, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;Pos.z, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;Pos.z, Gz);
+03182
+03183 <span class="comment">// Compute interpolated position.</span>
+03184 ret= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;Pos;
+03185 uvPos-= uvTri.<a class="code" href="a03616.html#NLMISC_1_1CTriangleUVo3">V0</a>;
+03186 ret.x+= Gx*uvPos;
+03187 ret.y+= Gy*uvPos;
+03188 ret.z+= Gz*uvPos;
+03189
+03190 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced2" doxytag="NL3D::CTessFace::computeTileEMForUpdateRefine" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NL3D::CTessFace::computeTileEMForUpdateRefine </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>distSplitPoint</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>distMinFace</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>nearLimit</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00312">312</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>00313 {
+00314 <span class="keywordtype">float</span> ema;
+00315 <span class="comment">// Normal ErrorMetric simulation.</span>
+00316 ema= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a> / <a class="code" href="a05378.html#a373">sqr</a>(distSplitPoint);
+00317
+00318 <span class="comment">// TileErrorMetric simulation.</span>
+00319 <span class="keywordflow">if</span>(distMinFace &lt; CLandscapeGlobals::TileDistFar)
+00320 {
+00321 <span class="comment">// If we are not so subdivided.</span>
+00322 <span class="keywordflow">if</span>( ema&lt;nearLimit )
+00323 {
+00324 <span class="keywordflow">if</span>( distMinFace&lt; CLandscapeGlobals::TileDistNear)
+00325 {
+00326 ema= nearLimit;
+00327 }
+00328 <span class="keywordflow">else</span>
+00329 {
+00330 <span class="comment">// Smooth transition to the nearLimit of tesselation.</span>
+00331 <span class="keywordtype">float</span> f= ( CLandscapeGlobals::TileDistFarSqr - <a class="code" href="a05378.html#a373">sqr</a>(distMinFace) ) * CLandscapeGlobals::OOTileDistDeltaSqr;
+00332 <span class="comment">// sqr gives better result, by smoothing more the start of transition.</span>
+00333 f= <a class="code" href="a05378.html#a373">sqr</a>(f);
+00334 f= <a class="code" href="a05378.html#a373">sqr</a>(f);
+00335 ema= ema + (nearLimit-ema)*f;
+00336 }
+00337 }
+00338 }
+00339
+00340 <span class="keywordflow">return</span> ema * CLandscapeGlobals::OORefineThreshold;
+00341 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced3" doxytag="NL3D::CTessFace::computeTileErrorMetric" ></a><p>
+<table class="mdTable" 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::CTessFace::computeTileErrorMetric </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00234">234</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>.
+<p>
+<div class="fragment"><pre>00235 {
+00236 <span class="comment">// We must take a more correct errometric here: We must have sons face which have</span>
+00237 <span class="comment">// lower projectedsize than father. This is not the case if Center of face is taken (but when not in</span>
+00238 <span class="comment">// tile mode this is nearly the case). So take the min dist from 3 points.</span>
+00239 <span class="keywordtype">float</span> s0= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+00240 <span class="keywordtype">float</span> s1= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+00241 <span class="keywordtype">float</span> s2= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+00242 <span class="keywordtype">float</span> sqrdist= <a class="code" href="a05378.html#a375">minof</a>(s0, s1, s2);
+00243 <span class="comment">// It is also VERY important to take the min of 3, to ensure the split in TileMode when Far1 vertex begin</span>
+00244 <span class="comment">// to blend (see Patch::renderFar1() render).</span>
+00245
+00246 <span class="comment">// NB: VertexProgram geomorph take sqrdist= (SplitPoint - RefineCenter).sqrnorm();</span>
+00247 <span class="comment">// It's OK because geomorph will start "far" after the split.</span>
+00248
+00249 <span class="keywordflow">if</span>(sqrdist&lt; CLandscapeGlobals::TileDistFarSqr)
+00250 {
+00251 <span class="keywordtype">float</span> nearLimit;
+00252 nearLimit= CLandscapeGlobals::RefineThreshold * <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+00253 <span class="comment">// If we are not so subdivided.</span>
+00254 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>&lt;nearLimit)
+00255 {
+00256 <span class="keywordflow">if</span>(sqrdist&lt; CLandscapeGlobals::TileDistNearSqr)
+00257 {
+00258 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>=nearLimit;
+00259 }
+00260 <span class="keywordflow">else</span>
+00261 {
+00262 <span class="comment">// Smooth transition to the nearLimit of tesselation.</span>
+00263 <span class="keywordtype">float</span> f= ( CLandscapeGlobals::TileDistFarSqr - sqrdist ) * CLandscapeGlobals::OOTileDistDeltaSqr;
+00264 <span class="comment">// sqr gives better result, by smoothing more the start of transition.</span>
+00265 f= <a class="code" href="a05378.html#a373">sqr</a>(f);
+00266 f= <a class="code" href="a05378.html#a373">sqr</a>(f);
+00267 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a> + (nearLimit-<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>)*f;
+00268
+00269 <span class="comment">// If threshold is big like 0.5, transition is still hard, and pops occurs. But The goal is </span>
+00270 <span class="comment">// 0.005 and less, so don't bother. </span>
+00271 }
+00272 }
+00273 }
+00274 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea6" doxytag="NL3D::CTessFace::computeTileMaterial" ></a><p>
+<table class="mdTable" 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::CTessFace::computeTileMaterial </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="a06497.html#l00675">675</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06497.html#l00511">buildTileFaces()</a>, <a class="el" href="a06497.html#l00403">checkCreateFillTileVB()</a>, <a class="el" href="a06497.html#l00466">copyTileUv()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a06497.html#l00655">initTileUvDLM()</a>, <a class="el" href="a06497.html#l00636">initTileUvLightmap()</a>, <a class="el" href="a06497.html#l00565">initTileUvRGBA()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00046">NL3D_MAX_TILE_PASS</a>, <a class="el" href="a05867.html#l00053">NL3D_TILE_PASS_ADD</a>, <a class="el" href="a05867.html#l00054">NL3D_TILE_PASS_LIGHTMAP</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05867.html#l00051">NL3D_TILE_PASS_RGB1</a>, <a class="el" href="a05867.html#l00052">NL3D_TILE_PASS_RGB2</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderS</a>, <a class="el" href="a06156.html#l00804">NL3D::CPatch::OrderT</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, <a class="el" href="a06498.html#l00257">TileId</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a06498.html#l00158">NL3D::CRdrTileId::TileMaterial</a>, <a class="el" href="a06498.html#l00259">TileMaterial</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, and <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, and <a class="el" href="a06497.html#l01283">split()</a>.
+<p>
+<div class="fragment"><pre>00676 {
+00677 <span class="comment">// 0. Compute TileId.</span>
+00678 <span class="comment">//-------------------</span>
+00679 <span class="comment">// Square Order Patch assumption: assume that when a CTessFace become a tile, his base can ONLY be diagonal...</span>
+00680 <span class="comment">/* a Patch:</span>
+00681 <span class="comment"> A ________</span>
+00682 <span class="comment"> |\ /|</span>
+00683 <span class="comment"> | \ / |</span>
+00684 <span class="comment"> C|__\B_/ |</span>
+00685 <span class="comment"> | / \ |</span>
+00686 <span class="comment"> | / \ |</span>
+00687 <span class="comment"> |/______\|</span>
+00688 <span class="comment"></span>
+00689 <span class="comment"> Here, if OrderS*OrderT=2*2, ABC is a new CTessFace of a Tile, and AB is the diagonal of the tile.</span>
+00690 <span class="comment"> Hence the middle of the tile is the middle of AB.</span>
+00691 <span class="comment"></span>
+00692 <span class="comment"> C must be created, but A and B may be created or copied from neighbor.</span>
+00693 <span class="comment"> */</span>
+00694 CParamCoord middle(PVLeft,PVRight);
+00695 <a class="code" href="a04558.html#a14">sint</a> ts= ((<a class="code" href="a04558.html#a14">sint</a>)middle.S * (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;OrderS) / 0x8000;
+00696 <a class="code" href="a04558.html#a14">sint</a> tt= ((<a class="code" href="a04558.html#a14">sint</a>)middle.T * (<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;OrderT) / 0x8000;
+00697 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_2">TileId</a>= tt*<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;OrderS + ts;
+00698
+00699
+00700 <span class="comment">// 1. Compute Tile Material.</span>
+00701 <span class="comment">//--------------------------</span>
+00702 <span class="comment">// if base neighbor is already at TileLimitLevel just ptr-copy, else create the TileMaterial...</span>
+00703 <a class="code" href="a04199.html#a6">nlassert</a>(!FBase || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch!=Patch || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Level&lt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel);
+00704 <span class="keywordtype">bool</span> copyFromBase;
+00705 copyFromBase= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>);
+00706 copyFromBase= copyFromBase &amp;&amp; (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Level==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;TileMaterial!=NULL);
+00707 <span class="comment">// NB: because of delete/recreateTileUvs(), FBase-&gt;TileMaterial may be NULL, even if face is at good TileLimitLevel.</span>
+00708 <span class="keywordflow">if</span>(copyFromBase)
+00709 {
+00710 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;TileMaterial;
+00711 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;TileId== TileId);
+00712 }
+00713 <span class="keywordflow">else</span>
+00714 {
+00715 <a class="code" href="a04558.html#a14">sint</a> i;
+00716 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTileMaterial();
+00717 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileS= ts;
+00718 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileT= tt;
+00719
+00720 <span class="comment">// Add this new material to the render list.</span>
+00721 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendTileMaterialToRenderList(TileMaterial);
+00722
+00723 <span class="comment">// First, get a lightmap for this tile. NB: important to do this after appendTileMaterialToRenderList(), </span>
+00724 <span class="comment">// because use TessBlocks.</span>
+00725 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getTileLightMap(ts, tt, <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[NL3D_TILE_PASS_LIGHTMAP].PatchRdrPass);
+00726
+00727 <span class="comment">// Fill pass of multi pass material.</span>
+00728 <span class="keywordflow">for</span>(i=0;i&lt;<a class="code" href="a04444.html#a0">NL3D_MAX_TILE_PASS</a>;i++)
+00729 {
+00730 <span class="comment">// Get the correct render pass, according to the tile number, and the pass.</span>
+00731 <span class="keywordflow">if</span>(i!=<a class="code" href="a04444.html#a6">NL3D_TILE_PASS_LIGHTMAP</a>)
+00732 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].PatchRdrPass= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getTileRenderPass(TileId, i);
+00733 }
+00734
+00735 <span class="comment">// Fill Pass Info.</span>
+00736 <span class="keywordflow">for</span>(i=0;i&lt;<a class="code" href="a04444.html#a0">NL3D_MAX_TILE_PASS</a>;i++)
+00737 {
+00738 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].TileMaterial= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>;
+00739 }
+00740
+00741 <span class="comment">// Do not append this tile to each RenderPass, done in preRender().</span>
+00742 }
+00743
+00744
+00745 <span class="comment">// 2. Compute Uvs.</span>
+00746 <span class="comment">//----------------</span>
+00747 <span class="comment">// NB: TileMaterial is already setup. Usefull for initTileUvLightmap() and initTileUvRGBA().</span>
+00748
+00749 <span class="comment">// First, must create The TileFaces, according to the TileMaterial passes.</span>
+00750 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_1">buildTileFaces</a>();
+00751
+00752 <span class="comment">// Must allocate the Base, and insert into list.</span>
+00753 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_0">allocTileUv</a>(IdUvBase);
+00754
+00755
+00756 <span class="comment">// Init LightMap UV, in RGB0 pass, UV1..</span>
+00757 <a class="code" href="a03476.html#NL3D_1_1CTessFaced7">initTileUvLightmap</a>(PVBase, middle, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvBase]-&gt;PUv1);
+00758 <span class="comment">// Init DLM Uv, in RGB0 pass, UV2.</span>
+00759 <a class="code" href="a03476.html#NL3D_1_1CTessFaced6">initTileUvDLM</a>(PVBase, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvBase]-&gt;PUv2);
+00760
+00761 <span class="comment">// Init UV RGBA, for all pass (but lightmap).</span>
+00762 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00763 {
+00764 <a class="code" href="a04199.html#a6">nlassert</a>(i!=NL3D_TILE_PASS_LIGHTMAP);
+00765 <span class="comment">// If pass is valid</span>
+00766 <span class="keywordflow">if</span>( <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].PatchRdrPass)
+00767 {
+00768 <span class="comment">// Face must exist.</span>
+00769 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[i]);
+00770 <span class="comment">// Compute RGB UV in UV0.</span>
+00771 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">false</span>, PVBase, middle, TileFaces[i]-&gt;V[IdUvBase]-&gt;PUv0);
+00772 <span class="comment">// If transition tile, compute alpha UV in UV1. </span>
+00773 <span class="comment">// Do it also for Additive, because may have Transition</span>
+00774 <span class="keywordflow">if</span>(i== <a class="code" href="a04444.html#a3">NL3D_TILE_PASS_RGB1</a> || i==<a class="code" href="a04444.html#a4">NL3D_TILE_PASS_RGB2</a> || i==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>)
+00775 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">true</span>, PVBase, middle, TileFaces[i]-&gt;V[IdUvBase]-&gt;PUv1);
+00776 }
+00777 }
+00778
+00779 <span class="comment">// UVs are computed, may create and fill VB.</span>
+00780 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_2">checkCreateFillTileVB</a>(IdUvBase);
+00781
+00782
+00783 <span class="comment">// if base neighbor is already at TileLimitLevel just ptr-copy, else create the left/right TileUvs...</span>
+00784 <span class="keywordflow">if</span>(copyFromBase)
+00785 {
+00786 <span class="comment">// Just cross-copy the pointers.</span>
+00787 <span class="comment">// Make Left near vertices be the Right vertices of FBase</span>
+00788 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_4">copyTileUv</a>(IdUvLeft, FBase, IdUvRight);
+00789 <span class="comment">// Make Right near vertices be the Left vertices of FBase</span>
+00790 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_4">copyTileUv</a>(IdUvRight, FBase, IdUvLeft);
+00791 }
+00792 <span class="keywordflow">else</span>
+00793 {
+00794 <span class="comment">// Must allocate the left/right uv (and insert into list).</span>
+00795 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_0">allocTileUv</a>(IdUvLeft);
+00796 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_0">allocTileUv</a>(IdUvRight);
+00797
+00798
+00799 <span class="comment">// Init LightMap UV, in UvPass 0, UV1..</span>
+00800 <a class="code" href="a03476.html#NL3D_1_1CTessFaced7">initTileUvLightmap</a>(PVLeft, middle, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvLeft]-&gt;PUv1);
+00801 <a class="code" href="a03476.html#NL3D_1_1CTessFaced7">initTileUvLightmap</a>(PVRight, middle, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvRight]-&gt;PUv1);
+00802 <span class="comment">// Init DLM Uv, in RGB0 pass, UV2.</span>
+00803 <a class="code" href="a03476.html#NL3D_1_1CTessFaced6">initTileUvDLM</a>(PVLeft, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvLeft]-&gt;PUv2);
+00804 <a class="code" href="a03476.html#NL3D_1_1CTessFaced6">initTileUvDLM</a>(PVRight, TileFaces[NL3D_TILE_PASS_RGB0]-&gt;V[IdUvRight]-&gt;PUv2);
+00805
+00806 <span class="comment">// Init UV RGBA!</span>
+00807 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00808 {
+00809 <a class="code" href="a04199.html#a6">nlassert</a>(i!=NL3D_TILE_PASS_LIGHTMAP);
+00810 <span class="comment">// If pass is valid</span>
+00811 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].PatchRdrPass)
+00812 {
+00813 <span class="comment">// Face must exist.</span>
+00814 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[i]);
+00815 <span class="comment">// Compute RGB UV in UV0.</span>
+00816 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">false</span>, PVLeft, middle, TileFaces[i]-&gt;V[IdUvLeft]-&gt;PUv0);
+00817 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">false</span>, PVRight, middle, TileFaces[i]-&gt;V[IdUvRight]-&gt;PUv0);
+00818 <span class="comment">// If transition tile, compute alpha UV in UV1.</span>
+00819 <span class="comment">// Do it also for Additive, because may have Transition</span>
+00820 <span class="keywordflow">if</span>(i== <a class="code" href="a04444.html#a3">NL3D_TILE_PASS_RGB1</a> || i==<a class="code" href="a04444.html#a4">NL3D_TILE_PASS_RGB2</a> || i==<a class="code" href="a04444.html#a5">NL3D_TILE_PASS_ADD</a>)
+00821 {
+00822 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">true</span>, PVLeft, middle, TileFaces[i]-&gt;V[IdUvLeft]-&gt;PUv1);
+00823 <a class="code" href="a03476.html#NL3D_1_1CTessFaced8">initTileUvRGBA</a>(i, <span class="keyword">true</span>, PVRight, middle, TileFaces[i]-&gt;V[IdUvRight]-&gt;PUv1);
+00824 }
+00825 }
+00826 }
+00827
+00828 <span class="comment">// UVs are computed, may create and fill VB.</span>
+00829 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_2">checkCreateFillTileVB</a>(IdUvLeft);
+00830 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_2">checkCreateFillTileVB</a>(IdUvRight);
+00831 }
+00832
+00833 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_4" doxytag="NL3D::CTessFace::copyTileUv" ></a><p>
+<table class="mdTable" 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::CTessFace::copyTileUv </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcFace</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>srcId</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00466">466</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, and <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00467 {
+00468 <span class="comment">// TileFaces must have been build.</span>
+00469 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00470
+00471 <span class="comment">// Since this a ptr-copy, no need to add/remove the renderlist of near vertices.</span>
+00472
+00473 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00474 {
+00475 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00476 {
+00477 <span class="comment">// The srcface should have the same tileFaces enabled.</span>
+00478 <a class="code" href="a04199.html#a6">nlassert</a>(srcFace-&gt;TileFaces[i]);
+00479
+00480 <span class="comment">// copy from src.</span>
+00481 CTessNearVertex *copyNear;
+00482 copyNear= srcFace-&gt;TileFaces[i]-&gt;V[srcId];
+00483
+00484 <span class="comment">// copy to dst.</span>
+00485 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[dstId]= copyNear;
+00486 }
+00487 }
+00488 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_5" doxytag="NL3D::CTessFace::deleteTileFaces" ></a><p>
+<table class="mdTable" 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::CTessFace::deleteTileFaces </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00528">528</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05862.html#l03085">NL3D::CLandscape::deleteTileFace()</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00187">NL3D::CTileMaterial::Pass</a>, <a class="el" href="a06498.html#l00157">NL3D::CRdrTileId::PatchRdrPass</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06498.html#l00261">TileFaces</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, and <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00529 {
+00530 <a class="code" href="a04199.html#a6">nlassert</a>(TileMaterial);
+00531
+00532 <span class="comment">// Do nothgin for lightmap pass, of course.</span>
+00533 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00534 {
+00535 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;Pass[i].PatchRdrPass)
+00536 {
+00537 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[i]);
+00538 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTileFace(TileFaces[i]);
+00539 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]= NULL;
+00540 }
+00541 <span class="keywordflow">else</span>
+00542 {
+00543 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[i]==NULL);
+00544 }
+00545 }
+00546 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_6" doxytag="NL3D::CTessFace::deleteTileUv" ></a><p>
+<table class="mdTable" 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::CTessFace::deleteTileUv </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0">TTileUvId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>id</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="a06497.html#l00444">444</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01589">NL3D::CPatch::checkDeleteVertexVBNear()</a>, <a class="el" href="a05862.html#l03067">NL3D::CLandscape::deleteTessNearVertex()</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06155.html#l01099">NL3D::CPatch::removeNearVertexFromRenderList()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, and <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00445 {
+00446 <span class="comment">// TileFaces must still exist.</span>
+00447 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00448
+00449 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00450 {
+00451 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00452 {
+00453 CTessNearVertex *oldNear;
+00454 oldNear= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<span class="keywordtype">id</span>];
+00455 TileFaces[i]-&gt;V[<span class="keywordtype">id</span>]=NULL;
+00456
+00457 <span class="comment">// May delete this vertex from VB.</span>
+00458 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkDeleteVertexVBNear(oldNear);
+00459
+00460 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeNearVertexFromRenderList(TileMaterial, oldNear);
+00461 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessNearVertex(oldNear);
+00462 }
+00463 }
+00464 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea8" doxytag="NL3D::CTessFace::deleteTileUvs" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::deleteTileUvs </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02969">2969</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00528">deleteTileFaces()</a>, <a class="el" href="a06497.html#l00444">deleteTileUv()</a>, <a class="el" href="a06497.html#l00549">emptyTileFaces()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>, <a class="el" href="a06155.html#l00913">NL3D::CPatch::removeFaceFromTileRenderList()</a>, <a class="el" href="a06498.html#l00368">sameTile()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, and <a class="el" href="a06498.html#l00259">TileMaterial</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02142">NL3D::CPatch::deleteTileUvs()</a>.
+<p>
+<div class="fragment"><pre>02970 {
+02971 <span class="comment">// NB: NearVertices are removed from renderlist with deleteTileUv (called in releaseTileMaterial()).</span>
+02972
+02973 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02974 {
+02975 <span class="comment">// Must delete the materials of leaves first.</span>
+02976 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;deleteTileUvs();
+02977 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;deleteTileUvs();
+02978 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level== <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+02979 {
+02980 <span class="comment">// Square patch assumption: the sons are not of the same TileId/Patch.</span>
+02981 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a>(SonLeft, SonRight));
+02982 <span class="comment">// release tiles.</span>
+02983 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;releaseTileMaterial();
+02984 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;releaseTileMaterial();
+02985 }
+02986 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level &gt; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+02987 {
+02988 <a class="code" href="a04199.html#a6">nlassert</a>(!FBase || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf());
+02989
+02990 <span class="comment">// Delete Uv, only if not already done by the neighbor (ie neighbor has yet TileFaces!!).</span>
+02991 <span class="comment">// But Always delete if neighbor exist and has not same tile as me.</span>
+02992 <span class="comment">// NB: this work with rectangular neigbor patch, since sameTile() will return false if different patch.</span>
+02993 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;emptyTileFaces() || !<a class="code" href="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a>(<span class="keyword">this</span>, FBase))
+02994 {
+02995 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;deleteTileUv(IdUvBase);
+02996 }
+02997 <span class="comment">// In all case, must delete the tilefaces of those face.</span>
+02998 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;deleteTileFaces();
+02999 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;deleteTileFaces();
+03000 <span class="comment">// For createTileUvs, it is important to mark those faces as NO TileMaterial.</span>
+03001 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;TileMaterial= NULL;
+03002 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;TileMaterial= NULL;
+03003 }
+03004 }
+03005 <span class="keywordflow">else</span>
+03006 {
+03007 <span class="comment">// NB: this is done always BELOW tile creation (see above).</span>
+03008 <span class="comment">// Do this only for tiles.</span>
+03009 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>)
+03010 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromTileRenderList(<span class="keyword">this</span>);
+03011 }
+03012
+03013 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced4" doxytag="NL3D::CTessFace::doMerge" ></a><p>
+<table class="mdTable" 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::CTessFace::doMerge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l01604">1604</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00896">NL3D::CLandscape::_MergePriorityList</a>, <a class="el" href="a05863.html#l00894">NL3D::CLandscape::_SplitPriorityList</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06161.html#l01571">NL3D::CPatch::checkDeleteVertexVBFar()</a>, <a class="el" href="a05862.html#l03052">NL3D::CLandscape::deleteTessFace()</a>, <a class="el" href="a05862.html#l03073">NL3D::CLandscape::deleteTessFarVertex()</a>, <a class="el" href="a05862.html#l03061">NL3D::CLandscape::deleteTessVertex()</a>, <a class="el" href="a06497.html#l00528">deleteTileFaces()</a>, <a class="el" href="a06497.html#l00444">deleteTileUv()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00282">FVBase</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a06493.html#l00273">NL3D::CTessFacePriorityList::insert()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>, <a class="el" href="a06155.html#l00848">NL3D::CPatch::removeFaceFromRenderList()</a>, <a class="el" href="a06155.html#l01062">NL3D::CPatch::removeFarVertexFromRenderList()</a>, <a class="el" href="a06498.html#l00368">sameTile()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, and <a class="el" href="a06498.html#l00241">VBase</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01762">merge()</a>.
+<p>
+<div class="fragment"><pre>01605 {
+01606 <span class="comment">// Assume that canMerge() return true.</span>
+01607 <span class="comment">// And Assume that !isLeaf().</span>
+01608 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+01609
+01610 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+01611 {
+01612 <span class="comment">// 1. Let's merge vertex.</span>
+01613 <span class="comment">//-----------------------</span>
+01614 <span class="comment">// Delete vertex, only if not already done by the neighbor (ie neighbor not already merged to a leaf).</span>
+01615 <span class="comment">// NB: this work even if neigbor is rectnagular.</span>
+01616 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01617 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase);
+01618
+01619 <span class="comment">// Delete Far Vertex. Idem, but test too if != patch...</span>
+01620 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf() || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+01621 {
+01622 <span class="comment">// May delete this vertex from VB.</span>
+01623 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkDeleteVertexVBFar(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01624
+01625 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFarVertexFromRenderList(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01626 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFarVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01627 }
+01628
+01629
+01630 <span class="comment">// 2. Must remove sons from rdr list, and insert father.</span>
+01631 <span class="comment">//------------------------------------------------------</span>
+01632 <span class="comment">// Must do it BEFORE the TileFaces are released.</span>
+01633 <span class="comment">// UGLY REFCOUNT SIDE EFFECT: do the append first.</span>
+01634 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(<span class="keyword">this</span>);
+01635 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(SonLeft);
+01636 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(SonRight);
+01637
+01638
+01639 <span class="comment">// 3. Let's merge Uv.</span>
+01640 <span class="comment">//-------------------</span>
+01641 <span class="comment">// Delete Uv.</span>
+01642 <span class="comment">// Must do it for this and FBase separately, since they may not have same tile level (if != patch).</span>
+01643 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level== <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+01644 {
+01645 <span class="comment">// Square patch assumption: the sons are not of the same TileId/Patch.</span>
+01646 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a>(SonLeft, SonRight));
+01647 <span class="comment">// release tiles: NearVertices, TileFaces, and TileMaterial.</span>
+01648 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;releaseTileMaterial();
+01649 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;releaseTileMaterial();
+01650 }
+01651 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level &gt; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+01652 {
+01653 <span class="comment">// Delete Uv, only if not already done by the neighbor (ie neighbor not already merged to a leaf).</span>
+01654 <span class="comment">// But Always delete if neighbor exist and has not same tile as me.</span>
+01655 <span class="comment">// NB: this work with rectangular neigbor patch, since sameTile() will return false if different patch.</span>
+01656 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf() || !<a class="code" href="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a>(<span class="keyword">this</span>, FBase))
+01657 {
+01658 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;deleteTileUv(IdUvBase);
+01659 }
+01660 <span class="comment">// In all case, must delete the tilefaces of those face.</span>
+01661 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;deleteTileFaces();
+01662 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;deleteTileFaces();
+01663 }
+01664
+01665
+01666 <span class="comment">// 4. Let's merge Face.</span>
+01667 <span class="comment">//-------------------</span>
+01668 <span class="comment">// Change father 's neighbor pointers.</span>
+01669 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FBase;
+01670 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;changeNeighbor(SonLeft, <span class="keyword">this</span>);
+01671 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FBase;
+01672 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;changeNeighbor(SonRight, <span class="keyword">this</span>);
+01673 <span class="comment">// delete sons.</span>
+01674 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFace(SonLeft);
+01675 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFace(SonRight);
+01676 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>=NULL;
+01677 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>=NULL;
+01678
+01679 <span class="comment">// If not already done, merge the neighbor.</span>
+01680 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>!=NULL &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01681 {
+01682 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;doMerge();
+01683 }
+01684
+01685 }
+01686 <span class="keywordflow">else</span>
+01687 {
+01688 <span class="comment">// Rectangular case.</span>
+01689 <span class="comment">// Since minimum Order is 2, Sons of rectangular face are NEVER at TileLimitLevel. =&gt; no Uv merge to do.</span>
+01690 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level&lt; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel);
+01691 <a class="code" href="a04199.html#a6">nlassert</a>(FBase);
+01692
+01693 <span class="comment">// 1. Let's merge vertex.</span>
+01694 <span class="comment">//-----------------------</span>
+01695 <span class="comment">// Delete vertex, only if not already done by the neighbor (ie neighbor not already merged to a leaf).</span>
+01696 <span class="comment">// NB: this work even if neigbor is rectangular (see tesselation rules in splitRectangular()).</span>
+01697 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a> || !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;isLeaf())
+01698 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase);
+01699
+01700 <span class="comment">// Delete Far Vertex. Rect patch: neightb must be of a != pathc as me =&gt; must delete FarVertex.</span>
+01701 <a class="code" href="a04199.html#a6">nlassert</a>(!FLeft || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;Patch!=Patch);
+01702 <span class="comment">// May delete this vertex from VB.</span>
+01703 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkDeleteVertexVBFar(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01704
+01705 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFarVertexFromRenderList(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01706 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFarVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase);
+01707
+01708
+01709 <span class="comment">// 2. Must remove sons from rdr list, and insert father.</span>
+01710 <span class="comment">//------------------------------------------------------</span>
+01711 <span class="comment">// UGLY REFCOUNT SIDE EFFECT: do the append first.</span>
+01712 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(<span class="keyword">this</span>);
+01713 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(SonLeft);
+01714 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(SonRight);
+01715
+01716
+01717 <span class="comment">// 3. Let's merge Face.</span>
+01718 <span class="comment">//-------------------</span>
+01719 <span class="comment">// Change father 's neighbor pointers (see splitRectangular()).</span>
+01720 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FRight;
+01721 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;changeNeighbor(SonRight, <span class="keyword">this</span>);
+01722 <span class="comment">// delete sons.</span>
+01723 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFace(SonLeft);
+01724 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessFace(SonRight);
+01725 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>=NULL;
+01726 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>=NULL;
+01727
+01728 <span class="comment">// First, do it for my rectangular co-worker FBase (if not already done).</span>
+01729 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01730 {
+01731 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;doMerge();
+01732 }
+01733 <span class="comment">// If not already done, merge the neighbor.</span>
+01734 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>!=NULL &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;isLeaf())
+01735 {
+01736 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;doMerge();
+01737 }
+01738 }
+01739
+01740
+01741 <span class="comment">// Update priority list.</span>
+01742 <span class="comment">//------------------------------------------------------</span>
+01743 <span class="comment">// Since we are freshly merged, unlink from any list, and link to the SplitPriorityList, because must look </span>
+01744 <span class="comment">// now when we should split again.</span>
+01745 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.insert(0, 0, <span class="keyword">this</span>);
+01746
+01747 <span class="comment">// since we are now merged maybe re-insert father in priority list.</span>
+01748 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>)
+01749 {
+01750 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>-&gt;isLeaf());
+01751 <span class="comment">// If sons of father are both leaves (ie this, and the other (complexe case if rectangle) )</span>
+01752 <span class="keywordflow">if</span>( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>-&gt;SonLeft-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>-&gt;SonRight-&gt;isLeaf() )
+01753 {
+01754 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_MergePriorityList.insert(0, 0, Father);
+01755 }
+01756 }
+01757
+01758 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_7" doxytag="NL3D::CTessFace::emptyTileFaces" ></a><p>
+<table class="mdTable" 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::CTessFace::emptyTileFaces </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00549">549</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a06498.html#l00261">TileFaces</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>.
+<p>
+<div class="fragment"><pre>00550 {
+00551 <span class="comment">// Do nothgin for lightmap pass, of course.</span>
+00552 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00553 {
+00554 <span class="comment">// Some TileFace exist??</span>
+00555 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00556 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00557 }
+00558
+00559 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00560 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea9" doxytag="NL3D::CTessFace::forceMerge" ></a><p>
+<table class="mdTable" 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::CTessFace::forceMerge </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="a06497.html#l02412">2412</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00156">CantMergeFace</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06497.html#l01762">merge()</a>, <a class="el" href="a06498.html#l00250">RecursMarkForceMerge</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, and <a class="el" href="a06498.html#l00243">SonRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02448">forceMergeAtTileLevel()</a>, and <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>.
+<p>
+<div class="fragment"><pre>02413 {
+02414 <span class="keywordflow">if</span>(<span class="keyword">this</span>== &amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a>)
+02415 <span class="keywordflow">return</span>;
+02416
+02417 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02418 {
+02419 <span class="comment">// First, force merge of Sons and neighbor sons, to have a diamond configuration.</span>
+02420 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;forceMerge();
+02421 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;forceMerge();
+02422
+02423 <span class="comment">// forceMerge of necessary neighbors.</span>
+02424 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_10">RecursMarkForceMerge</a>=<span class="keyword">true</span>;
+02425 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02426 {
+02427 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;RecursMarkForceMerge)
+02428 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;forceMerge();
+02429 }
+02430 <span class="keywordflow">else</span>
+02431 {
+02432 <span class="comment">// Rectangular case. May have a longer propagation...</span>
+02433 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;RecursMarkForceMerge)
+02434 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;forceMerge();
+02435 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a> &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;RecursMarkForceMerge)
+02436 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;forceMerge();
+02437 }
+02438 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_10">RecursMarkForceMerge</a>=<span class="keyword">false</span>;
+02439
+02440 <span class="comment">// If still a parent, merge.</span>
+02441 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02442 <a class="code" href="a03476.html#NL3D_1_1CTessFacea18">merge</a>();
+02443 }
+02444 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea10" doxytag="NL3D::CTessFace::forceMergeAtTileLevel" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::forceMergeAtTileLevel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02448">2448</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00156">CantMergeFace</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, and <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02022">NL3D::CPatch::forceMergeAtTileLevel()</a>.
+<p>
+<div class="fragment"><pre>02449 {
+02450 <span class="keywordflow">if</span>(<span class="keyword">this</span>== &amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a>)
+02451 <span class="keywordflow">return</span>;
+02452
+02453 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02454 {
+02455 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;forceMergeAtTileLevel();
+02456 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;forceMergeAtTileLevel();
+02457 }
+02458 <span class="keywordflow">else</span>
+02459 {
+02460 <span class="comment">// If we are at tile subdivision, we must force our sons to merge.</span>
+02461 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+02462 <a class="code" href="a03476.html#NL3D_1_1CTessFacea9">forceMerge</a>();
+02463 }
+02464 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea11" doxytag="NL3D::CTessFace::getTesselatedPos" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::getTesselatedPos </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>verifInclusion</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>ret</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>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l03101">3101</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00579">NL3D::CPatch::getTesselatedPos()</a>.
+<p>
+<div class="fragment"><pre>03102 {
+03103 CVector uvPos(uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>, uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>, 0);
+03104
+03105 <span class="comment">// may verif if uv is In this triangle. supposed true if rectangular branch.</span>
+03106 <span class="keywordflow">if</span>(verifInclusion &amp;&amp; !(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>() &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>()) )
+03107 {
+03108 CVector uvs[3];
+03109 uvs[0].set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getT(), 0);
+03110 uvs[1].set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getT(), 0);
+03111 uvs[2].set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getT(), 0);
+03112 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;3; i++)
+03113 {
+03114 CVector dUv= uvs[(i+1)%3] - uvs[i];
+03115 CVector normalUv(dUv.y, -dUv.x, 0);
+03116 <span class="comment">// if out this 2D plane, uv is out this triangle</span>
+03117 <span class="keywordflow">if</span>(normalUv * (uvPos-uvs[i]) &lt;0)
+03118 <span class="keywordflow">return</span>;
+03119 }
+03120 }
+03121
+03122 <span class="comment">// compute tesselated pos in this face.</span>
+03123 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+03124 <span class="comment">// ok, no more sons, let's do it.</span>
+03125 <a class="code" href="a03476.html#NL3D_1_1CTessFaced1">computeTesselatedPos</a>(uv, ret);
+03126 <span class="keywordflow">else</span>
+03127 {
+03128 <span class="comment">// must subdivide.</span>
+03129 <span class="comment">// if we are rectangular (strange tesselation), must test in both leaves, else, choose only one.</span>
+03130 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+03131 {
+03132 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
+03133 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;getTesselatedPos(uv, <span class="keyword">true</span>, ret);
+03134 }
+03135 <span class="keywordflow">else</span>
+03136 {
+03137 <span class="comment">// Compute the uv plane which separate the 2 leaves.</span>
+03138 CVector uvBase, uvMiddle;
+03139 uvBase.set ( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getT(), 0);
+03140 uvMiddle.set( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getT(), 0);
+03141 CVector dUv= uvMiddle - uvBase;
+03142 CVector normalUv(dUv.y, -dUv.x, 0);
+03143 <span class="comment">// choose what leaf to recurs.</span>
+03144 <span class="keywordflow">if</span>(normalUv * (uvPos - uvBase) &lt;0)
+03145 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;getTesselatedPos(uv, <span class="keyword">false</span>, ret);
+03146 <span class="keywordflow">else</span>
+03147 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;getTesselatedPos(uv, <span class="keyword">false</span>, ret);
+03148
+03149 }
+03150 }
+03151
+03152 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea12" doxytag="NL3D::CTessFace::hasEdge" ></a><p>
+<table class="mdTable" 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::CTessFace::hasEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>v0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>v1</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00297">297</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+References <a class="el" href="a06498.html#l00296">hasVertex()</a>.
+<p>
+<div class="fragment"><pre>00297 {<span class="keywordflow">return</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacea13">hasVertex</a>(v0) &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacea13">hasVertex</a>(v1);}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea13" doxytag="NL3D::CTessFace::hasVertex" ></a><p>
+<table class="mdTable" 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::CTessFace::hasVertex </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03482.html">CTessVertex</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>v</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00296">296</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+References <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06498.html#l00297">hasEdge()</a>.
+<p>
+<div class="fragment"><pre>00296 {<span class="keywordflow">return</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>==<a class="code" href="a04223.html#a576">v</a> || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>==<a class="code" href="a04223.html#a576">v</a> || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>==<a class="code" href="a04223.html#a576">v</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced5" doxytag="NL3D::CTessFace::heritTileMaterial" ></a><p>
+<table class="mdTable" 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::CTessFace::heritTileMaterial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l03053">3053</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06497.html#l00511">buildTileFaces()</a>, <a class="el" href="a06497.html#l00403">checkCreateFillTileVB()</a>, <a class="el" href="a06497.html#l00466">copyTileUv()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06497.html#l00490">heritTileUv()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00368">sameTile()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06498.html#l00257">TileId</a>, and <a class="el" href="a06498.html#l00259">TileMaterial</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, and <a class="el" href="a06497.html#l01283">split()</a>.
+<p>
+<div class="fragment"><pre>03054 {
+03055 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;TileMaterial= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>;
+03056 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;TileId= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_2">TileId</a>;
+03057 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;buildTileFaces();
+03058 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;copyTileUv(IdUvLeft, <span class="keyword">this</span>, IdUvBase);
+03059 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;copyTileUv(IdUvRight, <span class="keyword">this</span>, IdUvLeft);
+03060
+03061 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;TileMaterial= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>;
+03062 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;TileId= <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_2">TileId</a>;
+03063 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;buildTileFaces();
+03064 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;copyTileUv(IdUvLeft, <span class="keyword">this</span>, IdUvRight);
+03065 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;copyTileUv(IdUvRight, <span class="keyword">this</span>, IdUvBase);
+03066
+03067 <span class="comment">// Create, or link to the tileUv.</span>
+03068 <span class="comment">// Try to link to a neighbor TileUv.</span>
+03069 <span class="comment">// Can only work iff exist, and iff FBase is same patch, and same TileId.</span>
+03070 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>!=NULL &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;TileMaterial!=NULL &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFaceh0">sameTile</a>(<span class="keyword">this</span>, FBase) )
+03071 {
+03072 <span class="comment">// Ok!! link to the (existing) TileUv.</span>
+03073 <span class="comment">// FBase-&gt;SonLeft!=NULL since FBase-&gt;isLeaf()==false.</span>
+03074 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;copyTileUv(IdUvBase, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft, IdUvBase);
+03075 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;copyTileUv(IdUvBase, <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft, IdUvBase);
+03076 }
+03077 <span class="keywordflow">else</span>
+03078 {
+03079 <span class="comment">// Allocate a new vertex, and copy it to SonLeft and SonRight.</span>
+03080 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;allocTileUv(IdUvBase);
+03081 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;copyTileUv(IdUvBase, SonLeft, IdUvBase);
+03082
+03083 <span class="comment">// Fill the new near vertex, with middle of Left/Right father.</span>
+03084 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;heritTileUv(<span class="keyword">this</span>);
+03085
+03086 <span class="comment">// UVs are computed, may create and fill VB.</span>
+03087 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;checkCreateFillTileVB(IdUvBase);
+03088 }
+03089
+03090 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez974_8" doxytag="NL3D::CTessFace::heritTileUv" ></a><p>
+<table class="mdTable" 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::CTessFace::heritTileUv </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>baseFace</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="a06497.html#l00490">490</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a06498.html#l00144">NL3D::CTessNearVertex::initMiddleUv()</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05867.html#l00050">NL3D_TILE_PASS_RGB0</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, and <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00491 {
+00492 <span class="comment">// TileFaces must have been build.</span>
+00493 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[NL3D_TILE_PASS_RGB0]);
+00494
+00495 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>;i++)
+00496 {
+00497 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00498 {
+00499 <span class="comment">// The baseface should have the same tileFaces enabled.</span>
+00500 <a class="code" href="a04199.html#a6">nlassert</a>(baseFace-&gt;TileFaces[i]);
+00501 <span class="comment">// VBase should be allocated.</span>
+00502 <a class="code" href="a04199.html#a6">nlassert</a>(TileFaces[i]-&gt;V[IdUvBase]);
+00503 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>]-&gt;initMiddleUv(
+00504 *baseFace-&gt;TileFaces[i]-&gt;V[IdUvLeft], *baseFace-&gt;TileFaces[i]-&gt;V[IdUvRight]);
+00505 }
+00506 }
+00507 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced6" doxytag="NL3D::CTessFace::initTileUvDLM" ></a><p>
+<table class="mdTable" 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::CTessFace::initTileUvDLM </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pointCoord</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00655">655</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l01214">NL3D::CPatch::_DLMContext</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMUScale</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVBias</a>, <a class="el" href="a06164.html#l00119">NL3D::CPatchDLMContext::DLMVScale</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, and <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00656 {
+00657 <span class="comment">// get the dlm context from the patch.</span>
+00658 CPatchDLMContext *dlmCtx= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;_DLMContext;
+00659 <span class="comment">// mmust exist at creation of the tile.</span>
+00660 <a class="code" href="a04199.html#a6">nlassert</a>(dlmCtx);
+00661
+00662 <span class="comment">// get coord in 0..1 range, along the patch.</span>
+00663 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= pointCoord.getS();
+00664 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= pointCoord.getT();
+00665
+00666 <span class="comment">// ScaleBias according to the context.</span>
+00667 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>*= dlmCtx-&gt;DLMUScale;
+00668 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>*= dlmCtx-&gt;DLMVScale;
+00669 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>+= dlmCtx-&gt;DLMUBias;
+00670 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>+= dlmCtx-&gt;DLMVBias;
+00671 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced7" doxytag="NL3D::CTessFace::initTileUvLightmap" ></a><p>
+<table class="mdTable" 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::CTessFace::initTileUvLightmap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pointCoord</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>middleCoord</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00636">636</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06157.html#l01225">NL3D::CPatch::getTileLightMapUvInfo()</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00637 {
+00638 <span class="comment">// Get good coordinate according to patch orientation.</span>
+00639 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= pointCoord.S&lt;=middle.S? 0.0f: 1.0f;
+00640 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= pointCoord.T&lt;=middle.T? 0.0f: 1.0f;
+00641
+00642 <span class="comment">// Get Tile Lightmap Uv info: bias and scale.</span>
+00643 CVector uvScaleBias;
+00644 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getTileLightMapUvInfo(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileS, <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileT, uvScaleBias);
+00645
+00646 <span class="comment">// Scale the UV.</span>
+00647 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>*= uvScaleBias.z;
+00648 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>*= uvScaleBias.z;
+00649 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>+= uvScaleBias.x;
+00650 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>+= uvScaleBias.y;
+00651 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced8" doxytag="NL3D::CTessFace::initTileUvRGBA" ></a><p>
+<table class="mdTable" 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::CTessFace::initTileUvRGBA </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pass</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>alpha</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>pointCoord</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03040.html">CParamCoord</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>middleCoord</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03640.html">CUV</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00565">565</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l01173">alpha</a>, <a class="el" href="a06155.html#l02080">NL3D::CPatch::getTileUvInfo()</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::S</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00068">NL3D::CParamCoord::T</a>, <a class="el" href="a06498.html#l00257">TileId</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::U</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06655.html#l00049">NLMISC::CUV::V</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00566 {
+00567 <span class="comment">// Get good coordinate according to patch orientation.</span>
+00568 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= pointCoord.S&lt;=middle.S? 0.0f: 1.0f;
+00569 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= pointCoord.T&lt;=middle.T? 0.0f: 1.0f;
+00570
+00571 <span class="comment">// Get Tile Uv info: orientation and scale.</span>
+00572 <a class="code" href="a04558.html#a7">uint8</a> orient;
+00573 CVector uvScaleBias;
+00574 <span class="keywordtype">bool</span> is256;
+00575 <a class="code" href="a04558.html#a7">uint8</a> uvOff;
+00576 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getTileUvInfo(TileId, pass, alpha, orient, uvScaleBias, is256, uvOff);
+00577
+00578 <span class="comment">// Orient the UV.</span>
+00579 <span class="keywordtype">float</span> u= uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>;
+00580 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a576">v</a>= uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>;
+00581 <span class="comment">// Speed rotation.</span>
+00582 <span class="keywordflow">switch</span>(orient)
+00583 {
+00584 <span class="keywordflow">case</span> 0:
+00585 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= u;
+00586 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= <a class="code" href="a04223.html#a576">v</a>;
+00587 <span class="keywordflow">break</span>;
+00588 <span class="keywordflow">case</span> 1:
+00589 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= 1-<a class="code" href="a04223.html#a576">v</a>;
+00590 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= u;
+00591 <span class="keywordflow">break</span>;
+00592 <span class="keywordflow">case</span> 2:
+00593 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= 1-u;
+00594 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= 1-<a class="code" href="a04223.html#a576">v</a>;
+00595 <span class="keywordflow">break</span>;
+00596 <span class="keywordflow">case</span> 3:
+00597 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>= <a class="code" href="a04223.html#a576">v</a>;
+00598 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>= 1-u;
+00599 <span class="keywordflow">break</span>;
+00600 }
+00601
+00602 <span class="comment">// Do the 256x256.</span>
+00603 <span class="keywordflow">if</span>(is256)
+00604 {
+00605 uv*= 0.5;
+00606 <span class="keywordflow">if</span>(uvOff==2 || uvOff==3)
+00607 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>+= 0.5;
+00608 <span class="keywordflow">if</span>(uvOff==1 || uvOff==2)
+00609 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>+= 0.5;
+00610 }
+00611
+00612
+00613 <span class="comment">// Do the HalfPixel scale bias.</span>
+00614 <span class="keywordtype">float</span> hBiasXY, hBiasZ;
+00615 <span class="keywordflow">if</span>(is256)
+00616 {
+00617 hBiasXY= CLandscapeGlobals::TilePixelBias256;
+00618 hBiasZ = CLandscapeGlobals::TilePixelScale256;
+00619 }
+00620 <span class="keywordflow">else</span>
+00621 {
+00622 hBiasXY= CLandscapeGlobals::TilePixelBias128;
+00623 hBiasZ = CLandscapeGlobals::TilePixelScale128;
+00624 }
+00625
+00626
+00627 <span class="comment">// Scale the UV.</span>
+00628 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>*= uvScaleBias.z*hBiasZ;
+00629 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>*= uvScaleBias.z*hBiasZ;
+00630 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo0">U</a>+= uvScaleBias.x+hBiasXY;
+00631 uv.<a class="code" href="a03640.html#NLMISC_1_1CUVo1">V</a>+= uvScaleBias.y+hBiasXY;
+00632 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea14" doxytag="NL3D::CTessFace::isLeaf" ></a><p>
+<table class="mdTable" 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::CTessFace::isLeaf </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00294">294</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+References <a class="el" href="a06498.html#l00243">SonLeft</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03194">appendTessellationLeaves()</a>, <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l02448">forceMergeAtTileLevel()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06497.html#l01762">merge()</a>, <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l02519">refreshTesselationGeometry()</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, <a class="el" href="a06497.html#l02544">updateBindEdge()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>00294 {<span class="keywordflow">return</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>==NULL;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea15" doxytag="NL3D::CTessFace::isRectangular" ></a><p>
+<table class="mdTable" 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::CTessFace::isRectangular </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02954">2954</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06156.html#l00814">NL3D::CPatch::SquareLimitLevel</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>.
+<p>
+<div class="fragment"><pre>02955 {
+02956 <span class="keywordflow">return</span> <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&lt;<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;SquareLimitLevel;
+02957 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacePListNodea3" doxytag="NL3D::CTessFace::linkInPList" ></a><p>
+<table class="mdTable" 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::CTessFacePListNode::linkInPList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03477.html">CTessFacePListNode</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>root</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+unlinkInPList, then link this node to the root of a list.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06493.html#l00049">49</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
+<p>
+References <a class="el" href="a06494.html#l00088">NL3D::CTessFacePListNode::_NextTessFaceInPList</a>, and <a class="el" href="a06494.html#l00087">NL3D::CTessFacePListNode::_PrecTessFaceInPList</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03010">NL3D::CLandscape::newTessFace()</a>.
+<p>
+<div class="fragment"><pre>00050 {
+00051 <span class="comment">// unlink old list from me.</span>
+00052 _PrecTessFaceInPList-&gt;_NextTessFaceInPList= _NextTessFaceInPList;
+00053 _NextTessFaceInPList-&gt;_PrecTessFaceInPList= _PrecTessFaceInPList;
+00054
+00055 <span class="comment">// link me to the list.</span>
+00056 _PrecTessFaceInPList= &amp;root;
+00057 _NextTessFaceInPList= root._NextTessFaceInPList;
+00058 <span class="comment">// link the list to me.</span>
+00059 root._NextTessFaceInPList-&gt;_PrecTessFaceInPList= <span class="keyword">this</span>;
+00060 root._NextTessFaceInPList= <span class="keyword">this</span>;
+00061 <span class="comment">/*</span>
+00062 <span class="comment"> NB if list was empty (this, this), then</span>
+00063 <span class="comment"> _PrecTessFaceInPList= &amp;root</span>
+00064 <span class="comment"> _NextTessFaceInPList= root._NextTessFaceInPList= &amp;root !</span>
+00065 <span class="comment"> root._NextTessFaceInPList-&gt;_PrecTessFaceInPList= this; =&gt; root._PrecTessFaceInPList= this</span>
+00066 <span class="comment"> root._NextTessFaceInPList= this</span>
+00067 <span class="comment"> */</span>
+00068 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea17" doxytag="NL3D::CTessFace::linkTessFaceWithEdge" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> * NL3D::CTessFace::linkTessFaceWithEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uv1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>linkTo</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></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="a06497.html#l02904">2904</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02894">NL3D::matchEdge()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, and <a class="el" href="a06498.html#l00243">SonRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01834">NL3D::CPatch::linkTessFaceWithEdge()</a>.
+<p>
+<div class="fragment"><pre>02905 {
+02906 <span class="comment">// Compute 0,1 coords of 3 patch coords.</span>
+02907 <a class="code" href="a03660.html">CVector2f</a> vb( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>.getT() );
+02908 <a class="code" href="a03660.html">CVector2f</a> vl( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>.getT() );
+02909 <a class="code" href="a03660.html">CVector2f</a> vr( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>.getT() );
+02910
+02911 <span class="comment">// Search if one of the 3 edges of this triangle match the wanted edge.</span>
+02912 <span class="comment">// Base Edge</span>
+02913 <span class="keywordflow">if</span>(<a class="code" href="a05363.html#a530">matchEdge</a>(uv0, uv1, vl, vr))
+02914 {
+02915 <span class="comment">// If leaf, check if unbound (else ptr is invalid)</span>
+02916 <a class="code" href="a04199.html#a6">nlassert</a>(FBase==NULL || !<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02917 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>= linkTo;
+02918 <span class="keywordflow">return</span> <span class="keyword">this</span>;
+02919 }
+02920 <span class="comment">// Left Edge</span>
+02921 <span class="keywordflow">if</span>(<a class="code" href="a05363.html#a530">matchEdge</a>(uv0, uv1, vb, vl))
+02922 {
+02923 <span class="comment">// If leaf, check if unbound (else ptr is invalid)</span>
+02924 <a class="code" href="a04199.html#a6">nlassert</a>(FLeft==NULL || !<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02925 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>= linkTo;
+02926 <span class="keywordflow">return</span> <span class="keyword">this</span>;
+02927 }
+02928 <span class="comment">// Right Edge</span>
+02929 <span class="keywordflow">if</span>(<a class="code" href="a05363.html#a530">matchEdge</a>(uv0, uv1, vb, vr))
+02930 {
+02931 <span class="comment">// If leaf, check if unbound (else ptr is invalid)</span>
+02932 <a class="code" href="a04199.html#a6">nlassert</a>(FRight==NULL || !<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02933 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= linkTo;
+02934 <span class="keywordflow">return</span> <span class="keyword">this</span>;
+02935 }
+02936
+02937
+02938 <span class="comment">// If not found here, recurs to children</span>
+02939 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *ret= NULL;
+02940 <span class="keywordflow">if</span>( !<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>() )
+02941 {
+02942 ret= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
+02943 <span class="comment">// if no found in this branch, recusr right branch.</span>
+02944 <span class="keywordflow">if</span>(!ret)
+02945 ret= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;linkTessFaceWithEdge(uv0, uv1, linkTo);
+02946 }
+02947
+02948 <span class="comment">// return the result from subBranchs</span>
+02949 <span class="keywordflow">return</span> ret;
+02950 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea18" doxytag="NL3D::CTessFace::merge" ></a><p>
+<table class="mdTable" 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::CTessFace::merge </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="a06497.html#l01762">1762</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05872.html#l00044">NL3D::ProfNMerges</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, and <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>.
+<p>
+<div class="fragment"><pre>01763 {
+01764 <span class="comment">// Must not be a leaf.</span>
+01765 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+01766
+01767 <span class="comment">// 0. Verify if merge is posible.</span>
+01768 <span class="comment">//----------------------------</span>
+01769 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFaced0">canMerge</a>(<span class="keyword">false</span>))
+01770 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+01771
+01772 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNMerges, 1);
+01773
+01774 <span class="comment">// 1. Let's merge the face.</span>
+01775 <span class="comment">//-----------------------</span>
+01776 <span class="comment">// Propagation is done in doMerge().</span>
+01777 <a class="code" href="a03476.html#NL3D_1_1CTessFaced4">doMerge</a>();
+01778
+01779 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+01780 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacePListNodea4" doxytag="NL3D::CTessFace::nextInPList" ></a><p>
+<table class="mdTable" 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="a03477.html">CTessFacePListNode</a>* NL3D::CTessFacePListNode::nextInPList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</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="a06494.html#l00084">84</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
+<p>
+References <a class="el" href="a06494.html#l00088">NL3D::CTessFacePListNode::_NextTessFaceInPList</a>.
+<p>
+Referenced by <a class="el" href="a06493.html#l00438">NL3D::CTessFacePriorityList::CRollingTable::clearRollTableEntry()</a>, and <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
+<p>
+<div class="fragment"><pre>00084 {<span class="keywordflow">return</span> _NextTessFaceInPList;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacePListNodea6" doxytag="NL3D::CTessFace::precInPList" ></a><p>
+<table class="mdTable" 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="a03477.html">CTessFacePListNode</a>* NL3D::CTessFacePListNode::precInPList </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+get next ptr. next==this if list empty.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06494.html#l00083">83</a> of file <a class="el" href="a06494.html">tess_face_priority_list.h</a>.
+<p>
+References <a class="el" href="a06494.html#l00087">NL3D::CTessFacePListNode::_PrecTessFaceInPList</a>.
+<p>
+<div class="fragment"><pre>00083 {<span class="keywordflow">return</span> _PrecTessFaceInPList;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea21" doxytag="NL3D::CTessFace::recreateTileUvs" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::recreateTileUvs </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l03017">3017</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l00884">NL3D::CPatch::appendFaceToTileRenderList()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, and <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l02150">NL3D::CPatch::recreateTileUvs()</a>.
+<p>
+<div class="fragment"><pre>03018 {
+03019 <span class="comment">// NB: NearVertices are append to renderlist with allocTileUv (called in computeTileMaterial()/heritTileMaterial()).</span>
+03020
+03021 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+03022 {
+03023 <span class="comment">// Must recreate the materials of parent first.</span>
+03024
+03025 <span class="comment">// There is no problem with rectangular patch, since tiles are always squares.</span>
+03026 <span class="comment">// If new tile ....</span>
+03027 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+03028 {
+03029 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;computeTileMaterial();
+03030 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;computeTileMaterial();
+03031 }
+03032 <span class="comment">// else Tile herit.</span>
+03033 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level &gt; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+03034 {
+03035 <a class="code" href="a03476.html#NL3D_1_1CTessFaced5">heritTileMaterial</a>();
+03036 }
+03037
+03038 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;recreateTileUvs();
+03039 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;recreateTileUvs();
+03040 }
+03041 <span class="keywordflow">else</span>
+03042 {
+03043 <span class="comment">// NB: this is done always AFTER tile creation (see above).</span>
+03044 <span class="comment">// Do this only for tiles.</span>
+03045 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>)
+03046 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToTileRenderList(<span class="keyword">this</span>);
+03047 }
+03048 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea22" doxytag="NL3D::CTessFace::refineAll" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::refineAll </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+refine the node, and his sons. Refine all nodes.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l01783">1783</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l01762">merge()</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05872.html#l00041">NL3D::ProfNRefineComputeFaces</a>, <a class="el" href="a05872.html#l00040">NL3D::ProfNRefineFaces</a>, <a class="el" href="a05872.html#l00042">NL3D::ProfNRefineLeaves</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, and <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01493">NL3D::CPatch::refineAll()</a>.
+<p>
+<div class="fragment"><pre>01784 {
+01785 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineFaces, 1);
+01786 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineLeaves, <a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>()?1:0);
+01787
+01788 <span class="comment">/*</span>
+01789 <span class="comment"> if(ps&lt;RefineThreshold), the face must be merged (ie have no leaves).</span>
+01790 <span class="comment"> if(ps E [RefineThreshold, RefineTreshold*2]), the face must be splitted (ave leaves), and is geomorphed.</span>
+01791 <span class="comment"> if(ps&gt;RefineThreshold*2), the face is fully splitted/geomoprhed (tests reported on sons...).</span>
+01792 <span class="comment"> */</span>
+01793
+01794 <span class="comment">// Test for Split or merge.</span>
+01795 <span class="comment">//-----------------------</span>
+01796 {
+01797 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineComputeFaces, 1);
+01798
+01799 <a class="code" href="a03476.html#NL3D_1_1CTessFacea31">updateErrorMetric</a>();
+01800 <span class="keywordtype">float</span> ps=<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>;
+01801 ps*= CLandscapeGlobals::OORefineThreshold;
+01802 <span class="comment">// 1.0f is the point of split().</span>
+01803 <span class="comment">// 2.0f is the end of geomorph.</span>
+01804
+01805
+01806 <span class="comment">// Test split/merge.</span>
+01807 <span class="comment">//---------------------</span>
+01808 <span class="comment">// If wanted, not already done, and limit not reached, split().</span>
+01809 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+01810 {
+01811 <span class="keywordflow">if</span>(ps&gt;1.0f &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&lt; (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel + CLandscapeGlobals::TileMaxSubdivision) )
+01812 <a class="code" href="a03476.html#NL3D_1_1CTessFacea25">split</a>();
+01813 }
+01814 <span class="keywordflow">else</span>
+01815 {
+01816 <span class="comment">// Else, if splitted, must merge (if not already the case).</span>
+01817 <span class="keywordflow">if</span>(ps&lt;1.0f)
+01818 {
+01819 <span class="comment">// Merge only if agree, and neighbors agree.</span>
+01820 <span class="comment">// canMerge() test all the good thing: FBase==CantMergeFace, or this is rectangular etc...</span>
+01821 <span class="comment">// The test is propagated to neighbors.</span>
+01822 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFaced0">canMerge</a>(<span class="keyword">true</span>))
+01823 {
+01824 <a class="code" href="a03476.html#NL3D_1_1CTessFacea18">merge</a>();
+01825 }
+01826 }
+01827 }
+01828 }
+01829
+01830 <span class="comment">// Recurs.</span>
+01831 <span class="comment">//-----------------------</span>
+01832 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>)
+01833 {
+01834 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;refineAll();
+01835 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;refineAll();
+01836 }
+01837
+01838 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea23" doxytag="NL3D::CTessFace::refreshTesselationGeometry" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::refreshTesselationGeometry </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02519">2519</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06155.html#l00766">NL3D::CPatch::extendTessBlockWithEndPos()</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, and <a class="el" href="a06498.html#l00241">VBase</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01531">NL3D::CPatch::refreshTesselationGeometry()</a>.
+<p>
+<div class="fragment"><pre>02520 {
+02521 <span class="comment">// must enlarge the little tessBlock (if any), for clipping.</span>
+02522 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;extendTessBlockWithEndPos(<span class="keyword">this</span>);
+02523
+02524 <span class="comment">// If we are not splitted, no-op.</span>
+02525 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02526 <span class="keywordflow">return</span>;
+02527
+02528
+02529 <span class="comment">/* NB: rectangular case: just need to take SonLeft-&gt;VBase, because my neighbor on FBase will compute his son</span>
+02530 <span class="comment"> on an other branch of the recurs call.</span>
+02531 <span class="comment"> */</span>
+02532 <span class="comment">// re-compute this position (maybe with new noise geometry in Tile Edition).</span>
+02533 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;EndPos= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;computeVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getT());
+02534 <span class="comment">// overwrite cur Pos (NB: specialy hardcoded for Tile edition).</span>
+02535 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;Pos= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;EndPos;
+02536
+02537 <span class="comment">// Do same thing for sons. NB: see above, we are not a leaf.</span>
+02538 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;refreshTesselationGeometry();
+02539 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;refreshTesselationGeometry();
+02540 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea24" doxytag="NL3D::CTessFace::releaseTileMaterial" ></a><p>
+<table class="mdTable" 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::CTessFace::releaseTileMaterial </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="a06497.html#l00835">835</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00528">deleteTileFaces()</a>, <a class="el" href="a05862.html#l03079">NL3D::CLandscape::deleteTileMaterial()</a>, <a class="el" href="a06497.html#l00444">deleteTileUv()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06157.html#l01247">NL3D::CPatch::releaseTileLightMap()</a>, <a class="el" href="a06155.html#l01002">NL3D::CPatch::removeTileMaterialFromRenderList()</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a06498.html#l00259">TileMaterial</a>, <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileS</a>, and <a class="el" href="a06498.html#l00185">NL3D::CTileMaterial::TileT</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, and <a class="el" href="a06497.html#l01604">doMerge()</a>.
+<p>
+<div class="fragment"><pre>00836 {
+00837 <span class="comment">// Hence, must release the tile. TileUvBase is differnet for each of leaves.</span>
+00838 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_6">deleteTileUv</a>(IdUvBase);
+00839
+00840 <a class="code" href="a04199.html#a6">nlassert</a>(!FBase || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Level&lt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel);
+00841 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Level==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;TileMaterial!=NULL)
+00842 {
+00843 <span class="comment">// Do not release Uvs, since neighbor need it...</span>
+00844 <span class="comment">// But release faces.</span>
+00845 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_5">deleteTileFaces</a>();
+00846 <span class="comment">// Do not release TileMaterial, since neighbor need it...</span>
+00847 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>= NULL;
+00848 }
+00849 <span class="keywordflow">else</span>
+00850 {
+00851 <span class="comment">// release Uvs.</span>
+00852 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_6">deleteTileUv</a>(IdUvLeft);
+00853 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_6">deleteTileUv</a>(IdUvRight);
+00854
+00855 <span class="comment">// After, release Tile faces.</span>
+00856 <a class="code" href="a03476.html#NL3D_1_1CTessFacez974_5">deleteTileFaces</a>();
+00857
+00858 <span class="comment">// Release the tile lightmap part. Do it before removeTileMaterialFromRenderList().</span>
+00859 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;releaseTileLightMap(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileS, <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>-&gt;TileT);
+00860
+00861 <span class="comment">// Remove this material from the render list. DO it before deletion of course :).</span>
+00862 <span class="comment">// NB: TileS/TileT still valid.</span>
+00863 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeTileMaterialFromRenderList(TileMaterial);
+00864
+00865 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTileMaterial(TileMaterial);
+00866 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_3">TileMaterial</a>= NULL;
+00867 }
+00868 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaceh0" doxytag="NL3D::CTessFace::sameTile" ></a><p>
+<table class="mdTable" 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::CTessFace::sameTile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>a</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03476.html">CTessFace</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>b</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, 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="a06498.html#l00368">368</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+References <a class="el" href="a06498.html#l00240">Patch</a>, and <a class="el" href="a06498.html#l00257">TileId</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, and <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>.
+<p>
+<div class="fragment"><pre>00369 {
+00370 <span class="comment">// WE CANNOT do this test, testing TileMaterial, because this one may be releleased by releaseMaterial() !!</span>
+00371 <span class="keywordflow">return</span> (a-&gt;Patch==b-&gt;Patch &amp;&amp; a-&gt;TileId==b-&gt;TileId);
+00372 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea25" doxytag="NL3D::CTessFace::split" ></a><p>
+<table class="mdTable" 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::CTessFace::split </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>propagateSplit</em> = true </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="a06497.html#l01283">1283</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00896">NL3D::CLandscape::_MergePriorityList</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">NL3D::CPatch::appendFarVertexToRenderList()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06161.html#l01502">NL3D::CPatch::checkCreateVertexVBFar()</a>, <a class="el" href="a06497.html#l00424">checkFillTileVB()</a>, <a class="el" href="a06161.html#l01522">NL3D::CPatch::checkFillVertexVBFar()</a>, <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00243">Father</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00282">FVBase</a>, <a class="el" href="a06498.html#l00282">FVLeft</a>, <a class="el" href="a06498.html#l00282">FVRight</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a06493.html#l00273">NL3D::CTessFacePriorityList::insert()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05862.html#l03010">NL3D::CLandscape::newTessFace()</a>, <a class="el" href="a05862.html#l03034">NL3D::CLandscape::newTessFarVertex()</a>, <a class="el" href="a05862.html#l03022">NL3D::CLandscape::newTessVertex()</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a05872.html#l00043">NL3D::ProfNSplits</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06155.html#l00848">NL3D::CPatch::removeFaceFromRenderList()</a>, <a class="el" href="a06498.html#l00274">Size</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a06493.html#l00071">NL3D::CTessFacePListNode::unlinkInPList()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>01284 {
+01285
+01286 <span class="comment">// 0. Some easy ending.</span>
+01287 <span class="comment">//---------------------</span>
+01288 <span class="comment">// Already splitted??</span>
+01289 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+01290 <span class="keywordflow">return</span>;
+01291 <span class="comment">// Don't do this!!!</span>
+01292 <span class="comment">//if(Level&gt;=LS_MAXLEVEL)</span>
+01293 <span class="comment">// return;</span>
+01294 <span class="comment">// since split() may reach LS_MAXLEVEL, but enforce splits which outpass this stage!!</span>
+01295
+01296 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNSplits, 1);
+01297
+01298
+01299 <span class="comment">// Special Rectangular case.</span>
+01300 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+01301 {
+01302 <a class="code" href="a03476.html#NL3D_1_1CTessFaced9">splitRectangular</a>(propagateSplit);
+01303 <span class="keywordflow">return</span>;
+01304 }
+01305
+01306 <span class="comment">// 1. Create sons, and update links.</span>
+01307 <span class="comment">//----------------------------------</span>
+01308
+01309 <span class="comment">// create and bind Sons.</span>
+01310 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01311 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01312
+01313 <span class="comment">// subdivision left.</span>
+01314 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Patch= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>;
+01315 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Father= <span class="keyword">this</span>;
+01316 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>+1;
+01317 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Size= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>*0.5f;
+01318 <span class="comment">// subdivision right.</span>
+01319 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;Patch= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>;
+01320 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;Father= <span class="keyword">this</span>;
+01321 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;Level= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>+1;
+01322 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;Size= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>*0.5f;
+01323
+01324
+01325 <span class="comment">// link Left Son.</span>
+01326 <span class="comment">// link neighbor face.</span>
+01327 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>;
+01328 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;changeNeighbor(<span class="keyword">this</span>, SonLeft);
+01329 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>;
+01330 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FRight= NULL; <span class="comment">// Temporary. updated later.</span>
+01331 <span class="comment">// link neighbor vertex.</span>
+01332 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+01333 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>;
+01334 <span class="comment">// link neighbor Far vertex.</span>
+01335 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFaceo0">FVBase</a>;
+01336 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVRight= <a class="code" href="a03476.html#NL3D_1_1CTessFaceo1">FVLeft</a>;
+01337 <span class="comment">// Patch coordinates.</span>
+01338 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase= CParamCoord(PVLeft, PVRight);
+01339 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>;
+01340 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>;
+01341
+01342 <span class="comment">// linkRight Son.</span>
+01343 <span class="comment">// link neighbor face.</span>
+01344 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>;
+01345 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>) <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;changeNeighbor(<span class="keyword">this</span>, SonRight);
+01346 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FLeft= NULL; <span class="comment">// Temporary. updated later.</span>
+01347 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>;
+01348 <span class="comment">// link neighbor vertex.</span>
+01349 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>;
+01350 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+01351 <span class="comment">// link neighbor Far vertex.</span>
+01352 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FVLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFaceo2">FVRight</a>;
+01353 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FVRight= <a class="code" href="a03476.html#NL3D_1_1CTessFaceo0">FVBase</a>;
+01354 <span class="comment">// Patch coordinates.</span>
+01355 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;PVBase= CParamCoord(PVLeft, PVRight);
+01356 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;PVLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>;
+01357 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;PVRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>;
+01358
+01359
+01360 <span class="comment">// FBase-&gt;FBase==this. Must Doesn't change this. Used and Updated in section 5. ...</span>
+01361
+01362
+01363 <span class="comment">// 2. Update/Create Vertex infos.</span>
+01364 <span class="comment">//-------------------------------</span>
+01365
+01366 <span class="comment">// Must create/link *-&gt;VBase.</span>
+01367 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>==NULL || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01368 {
+01369 <span class="comment">// The base neighbor is a leaf or NULL. So must create the new vertex.</span>
+01370 CTessVertex *newVertex= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessVertex();
+01371 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VBase= newVertex;
+01372 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase= newVertex;
+01373
+01374 <span class="comment">// Compute pos.</span>
+01375 newVertex-&gt;StartPos= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos + <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos)/2;
+01376 newVertex-&gt;EndPos= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;computeVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getS(), <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase.getT());
+01377
+01378 <span class="comment">// Init Pos= InitialPos. Important in the case of enforced split.</span>
+01379 newVertex-&gt;Pos= newVertex-&gt;StartPos;
+01380
+01381 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+01382 newVertex-&gt;MaxFaceSize= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>;
+01383 newVertex-&gt;MaxNearLimit= <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+01384 }
+01385 <span class="keywordflow">else</span>
+01386 {
+01387 <span class="comment">// Else, get from neighbor.</span>
+01388 <span class="comment">// NB: since *FBase is not a leaf, FBase-&gt;SonLeft!=NULL...</span>
+01389 <span class="comment">// NB: this work with both rectangular and square triangles (see splitRectangular()).</span>
+01390 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;VBase;
+01391 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;VBase;
+01392
+01393 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+01394 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxFaceSize= max( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxFaceSize, Size);
+01395 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxNearLimit= max( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxNearLimit, <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>());
+01396 }
+01397
+01398
+01399 <span class="comment">// Must create/link *-&gt;FVBase.</span>
+01400 <span class="comment">// HERE, we must create a FarVertex too if the neighbor is not of the same patch as me.</span>
+01401 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>==NULL || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf() || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+01402 {
+01403 <span class="comment">// The base neighbor is a leaf or NULL. So must create the new far vertex.</span>
+01404 CTessFarVertex *newFar= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFarVertex();
+01405 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FVBase= newFar;
+01406 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase= newFar;
+01407
+01408 <span class="comment">// Compute.</span>
+01409 newFar-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+01410 newFar-&gt;PCoord= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;PVBase;
+01411
+01412 <span class="comment">// Append.</span>
+01413 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFarVertexToRenderList(newFar);
+01414
+01415 <span class="comment">// May Allocate/Fill VB.</span>
+01416 <span class="comment">// NB: SonLeft-&gt;VBase-&gt;Pos is well computed and ready for the fill in VB.</span>
+01417 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkCreateVertexVBFar(newFar);
+01418 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(newFar);
+01419
+01420 <span class="comment">// For VertexProgram only, must refill the Far vertex of neighbor, </span>
+01421 <span class="comment">// because MaxFaceSize, and MaxNearLimit may have change.</span>
+01422 <span class="keywordflow">if</span>( CLandscapeGlobals::VertexProgramEnabled &amp;&amp; ! (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>==NULL || <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf()) )
+01423 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch-&gt;checkFillVertexVBFar(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;FVBase);
+01424 }
+01425 <span class="keywordflow">else</span>
+01426 {
+01427 <span class="comment">// Else, get from neighbor.</span>
+01428 <span class="comment">// NB: since *FBase is not a leaf, FBase-&gt;SonLeft!=NULL...</span>
+01429 <span class="comment">// NB: this work with both rectangular and square triangles (see splitRectangular()).</span>
+01430 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FVBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;FVBase;
+01431 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FVBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;FVBase;
+01432
+01433 <span class="comment">// NB For VertexProgram only: no need to refill the Far vertex of neighbor, because neighbor is of same Patch</span>
+01434 <span class="comment">// So MaxNearLimit and MaxFaceSize should be the same.</span>
+01435 }
+01436
+01437
+01438 <span class="comment">// 3. Update Tile infos.</span>
+01439 <span class="comment">//----------------------</span>
+01440 <span class="comment">// NB: must do it before appendFaceToRenderList().</span>
+01441 <span class="comment">// NB: must do it after compute of SonLeft-&gt;VBase-&gt;Pos for good filling in VBuffer.</span>
+01442 <span class="comment">// There is no problem with rectangular patch, since tiles are always squares.</span>
+01443 <span class="comment">// If new tile ....</span>
+01444 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level==<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+01445 {
+01446 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;computeTileMaterial();
+01447 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;computeTileMaterial();
+01448 }
+01449 <span class="comment">// else Tile herit.</span>
+01450 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;Level &gt; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+01451 {
+01452 <a class="code" href="a03476.html#NL3D_1_1CTessFaced5">heritTileMaterial</a>();
+01453 }
+01454
+01455 <span class="comment">// For Vertex program only</span>
+01456 <span class="keywordflow">if</span>( CLandscapeGlobals::VertexProgramEnabled )
+01457 {
+01458 <span class="comment">// if neighbor face splitted, and if 2 different patchs, we must update the Tile vertices</span>
+01459 <span class="comment">// because MaxFaceSize and MaxNearLimit may have changed.</span>
+01460 <span class="keywordflow">if</span>( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>!=NULL &amp;&amp; !<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a> )
+01461 {
+01462 <span class="comment">// If neighbors sons at tile level, must update their Tile vertices.</span>
+01463 <span class="keywordflow">if</span>( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;Level &gt;= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch-&gt;TileLimitLevel )
+01464 {
+01465 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;checkFillTileVB(IdUvBase);
+01466 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonRight-&gt;checkFillTileVB(IdUvBase);
+01467 }
+01468 }
+01469 }
+01470
+01471
+01472 <span class="comment">// 4. Compute centers.</span>
+01473 <span class="comment">//--------------------</span>
+01474 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;computeSplitPoint();
+01475 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;computeSplitPoint();
+01476
+01477
+01478 <span class="comment">// 5. Propagate, or link sons of base.</span>
+01479 <span class="comment">//------------------------------------</span>
+01480 <span class="comment">// If current face and FBase has sons, just links.</span>
+01481 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>==NULL)
+01482 {
+01483 <span class="comment">// Just update sons neighbors.</span>
+01484 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FRight= NULL;
+01485 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FLeft= NULL;
+01486 }
+01487 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01488 {
+01489 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *toLeft, *toRight;
+01490 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *fl, *fr;
+01491 fl= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>;
+01492 fr= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>;
+01493 toLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft;
+01494 toRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonRight;
+01495 <span class="comment">// Cross connection of sons.</span>
+01496 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isRectangular())
+01497 {
+01498 <span class="comment">// Case neigbhor is square.</span>
+01499 fl-&gt;FRight= toRight;
+01500 fr-&gt;FLeft= toLeft;
+01501 toLeft-&gt;FRight= fr;
+01502 toRight-&gt;FLeft= fl;
+01503 }
+01504 <span class="keywordflow">else</span>
+01505 {
+01506 <span class="comment">// Case neigbhor is rectangular.</span>
+01507 fl-&gt;FRight= toLeft;
+01508 fr-&gt;FLeft= toRight;
+01509 toLeft-&gt;FLeft= fl;
+01510 toRight-&gt;FLeft= fr;
+01511 }
+01512 }
+01513 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (propagateSplit)
+01514 {
+01515 <span class="comment">// Warning: at each iteration, the pointer of FBase may change (because of split() which can change the neighbor </span>
+01516 <span class="comment">// and so "this").</span>
+01517 <span class="keywordflow">while</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+01518 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;split();
+01519
+01520 <span class="comment">// There is a possible bug here (maybe easily patched). Sons may have be propagated splitted.</span>
+01521 <span class="comment">// And problems may arise because this face hasn't yet good connectivity.</span>
+01522 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;isLeaf());
+01523 }
+01524
+01525
+01526 <span class="comment">// 6. Must remove father from rdr list, and insert sons.</span>
+01527 <span class="comment">//------------------------------------------------------</span>
+01528 <span class="comment">// UGLY REFCOUNT SIDE EFFECT: do the append first.</span>
+01529 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(SonLeft);
+01530 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(SonRight);
+01531 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(<span class="keyword">this</span>);
+01532
+01533
+01534 <span class="comment">// 7. Update priority list.</span>
+01535 <span class="comment">//------------------------------------------------------</span>
+01536 <span class="comment">// Since we are freshly splitted, unlink from any list, and link to the MergePriorityList, because must look </span>
+01537 <span class="comment">// now when should merge.</span>
+01538 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_MergePriorityList.insert(0, 0, <span class="keyword">this</span>);
+01539
+01540 <span class="comment">// Since we are split, no need to test father for merge, because it cannot!</span>
+01541 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>)
+01542 {
+01543 <span class="comment">// remove father from any priority list.</span>
+01544 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_0">Father</a>-&gt;unlinkInPList();
+01545 }
+01546 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced9" doxytag="NL3D::CTessFace::splitRectangular" ></a><p>
+<table class="mdTable" 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::CTessFace::splitRectangular </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>propagateSplit</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="a06497.html#l00911">911</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00896">NL3D::CLandscape::_MergePriorityList</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a06155.html#l01040">NL3D::CPatch::appendFarVertexToRenderList()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06161.html#l01502">NL3D::CPatch::checkCreateVertexVBFar()</a>, <a class="el" href="a06497.html#l00424">checkFillTileVB()</a>, <a class="el" href="a06161.html#l01522">NL3D::CPatch::checkFillVertexVBFar()</a>, <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00243">Father</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00282">FVBase</a>, <a class="el" href="a06498.html#l00282">FVLeft</a>, <a class="el" href="a06498.html#l00282">FVRight</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06498.html#l00080">NL3D::CParamCoord::getS()</a>, <a class="el" href="a06498.html#l00081">NL3D::CParamCoord::getT()</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a06493.html#l00273">NL3D::CTessFacePriorityList::insert()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00247">Level</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05862.html#l03010">NL3D::CLandscape::newTessFace()</a>, <a class="el" href="a05862.html#l03034">NL3D::CLandscape::newTessFarVertex()</a>, <a class="el" href="a05862.html#l03022">NL3D::CLandscape::newTessVertex()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00127">NL3D::CTessFarVertex::PCoord</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a06155.html#l00848">NL3D::CPatch::removeFaceFromRenderList()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00274">Size</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06498.html#l00126">NL3D::CTessFarVertex::Src</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a06493.html#l00071">NL3D::CTessFacePListNode::unlinkInPList()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01283">split()</a>.
+<p>
+<div class="fragment"><pre>00912 {
+00913 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f0= <span class="keyword">this</span>;
+00914 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f1= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>;
+00915 <span class="comment">// Rectangular case: FBase must exist.</span>
+00916 <a class="code" href="a04199.html#a6">nlassert</a>(f1);
+00917
+00918 <span class="comment">// In rectangular case, we split at the same time this and FBase (f0 and f1).</span>
+00919
+00920
+00921 <span class="comment">/*</span>
+00922 <span class="comment"> Tesselation is:</span>
+00923 <span class="comment"> </span>
+00924 <span class="comment"> lt rt lt top rt</span>
+00925 <span class="comment"> --------------------- ---------------------</span>
+00926 <span class="comment"> |---- | |\ |\ |</span>
+00927 <span class="comment"> | ---- f1 | | \ f1l | \ f1r |</span>
+00928 <span class="comment"> | ---- | --&gt; | \ | \ |</span>
+00929 <span class="comment"> | f0 ---- | | f0r \ | f0l \ |</span>
+00930 <span class="comment"> | ---| | \| \|</span>
+00931 <span class="comment"> --------------------- ---------------------</span>
+00932 <span class="comment"> lb rb lb bot rb</span>
+00933 <span class="comment"></span>
+00934 <span class="comment"> Why? For symetry and bind/split reasons: FBase-&gt;SonLeft-&gt;VBase is always the good vertex to take </span>
+00935 <span class="comment"> (see vertex binding).</span>
+00936 <span class="comment"> */</span>
+00937 CParamCoord pclt= f1-&gt;PVLeft;
+00938 CParamCoord pclb= f0-&gt;PVBase;
+00939 CParamCoord pcrt= f1-&gt;PVBase;
+00940 CParamCoord pcrb= f1-&gt;PVRight;
+00941 CTessVertex *vlt= f1-&gt;VLeft;
+00942 CTessVertex *vlb= f0-&gt;VBase;
+00943 CTessVertex *vrt= f1-&gt;VBase;
+00944 CTessVertex *vrb= f1-&gt;VRight;
+00945
+00946 CTessFarVertex *farvlt= f1-&gt;FVLeft;
+00947 CTessFarVertex *farvlb= f0-&gt;FVBase;
+00948 CTessFarVertex *farvrt= f1-&gt;FVBase;
+00949 CTessFarVertex *farvrb= f1-&gt;FVRight;
+00950
+00951
+00952 <span class="comment">// 1. create new vertices.</span>
+00953 <span class="comment">//------------------------</span>
+00954
+00955 <span class="comment">// Create splitted vertices.</span>
+00956 CParamCoord pctop(f1-&gt;PVBase, f1-&gt;PVLeft);
+00957 CParamCoord pcbot(f0-&gt;PVBase, f0-&gt;PVLeft);
+00958 CTessVertex *vtop= NULL;
+00959 CTessVertex *vbot= NULL;
+00960 <span class="comment">// Compute top.</span>
+00961 <span class="keywordflow">if</span>(f1-&gt;FLeft==NULL || f1-&gt;FLeft-&gt;isLeaf())
+00962 {
+00963 <span class="comment">// The base neighbor is a leaf or NULL. So must create the new vertex.</span>
+00964 vtop= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessVertex();
+00965
+00966 <span class="comment">// Compute pos.</span>
+00967 vtop-&gt;StartPos= (f1-&gt;VLeft-&gt;EndPos + f1-&gt;VBase-&gt;EndPos)/2;
+00968 vtop-&gt;EndPos= f1-&gt;Patch-&gt;computeVertex(pctop.getS(), pctop.getT());
+00969 <span class="comment">// Init Pos= InitialPos. Important in the case of enforced split.</span>
+00970 vtop-&gt;Pos= vtop-&gt;StartPos;
+00971
+00972 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+00973 vtop-&gt;MaxFaceSize= f1-&gt;Size;
+00974 vtop-&gt;MaxNearLimit= f1-&gt;computeNearLimit();
+00975 }
+00976 <span class="keywordflow">else</span>
+00977 {
+00978 <span class="comment">// Else, get from neighbor.</span>
+00979 <span class="comment">// NB: since *FLeft is not a leaf, FBase-&gt;SonLeft!=NULL...</span>
+00980 <span class="comment">// NB: this work with both rectangular and square triangles.</span>
+00981 vtop= f1-&gt;FLeft-&gt;SonLeft-&gt;VBase;
+00982
+00983 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+00984 vtop-&gt;MaxFaceSize= max( vtop-&gt;MaxFaceSize, f1-&gt;Size);
+00985 vtop-&gt;MaxNearLimit= max( vtop-&gt;MaxNearLimit, f1-&gt;computeNearLimit());
+00986 }
+00987 <span class="comment">// Compute bot.</span>
+00988 <span class="keywordflow">if</span>(f0-&gt;FLeft==NULL || f0-&gt;FLeft-&gt;isLeaf())
+00989 {
+00990 <span class="comment">// The base neighbor is a leaf or NULL. So must create the new vertex.</span>
+00991 vbot= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessVertex();
+00992
+00993 <span class="comment">// Compute pos.</span>
+00994 vbot-&gt;StartPos= (f0-&gt;VLeft-&gt;EndPos + f0-&gt;VBase-&gt;EndPos)/2;
+00995 vbot-&gt;EndPos= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;computeVertex(pcbot.getS(), pcbot.getT());
+00996 <span class="comment">// Init Pos= InitialPos. Important in the case of enforced split.</span>
+00997 vbot-&gt;Pos= vbot-&gt;StartPos;
+00998
+00999 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+01000 vbot-&gt;MaxFaceSize= f0-&gt;Size;
+01001 vbot-&gt;MaxNearLimit= f0-&gt;computeNearLimit();
+01002 }
+01003 <span class="keywordflow">else</span>
+01004 {
+01005 <span class="comment">// Else, get from neighbor.</span>
+01006 <span class="comment">// NB: since *FLeft is not a leaf, FBase-&gt;SonLeft!=NULL...</span>
+01007 <span class="comment">// NB: this work with both rectangular and square triangles.</span>
+01008 vbot= f0-&gt;FLeft-&gt;SonLeft-&gt;VBase;
+01009
+01010 <span class="comment">// For geomorph (VertexProgram or soft), compute MaxFaceSize and MaxNearLimit.</span>
+01011 vbot-&gt;MaxFaceSize= max( vbot-&gt;MaxFaceSize, f0-&gt;Size);
+01012 vbot-&gt;MaxNearLimit= max( vbot-&gt;MaxNearLimit, f0-&gt;computeNearLimit());
+01013 }
+01014
+01015 <span class="comment">// In all case, must create new FarVertices, since rect split occurs on border!!</span>
+01016 CTessFarVertex *farvtop= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFarVertex();
+01017 CTessFarVertex *farvbot= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFarVertex();
+01018 farvtop-&gt;Src= vtop;
+01019 farvbot-&gt;Src= vbot;
+01020 farvtop-&gt;PCoord= pctop;
+01021 farvbot-&gt;PCoord= pcbot;
+01022 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFarVertexToRenderList(farvtop);
+01023 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFarVertexToRenderList(farvbot);
+01024 <span class="comment">// May Allocate/Fill VB.</span>
+01025 <span class="comment">// NB: vtop / vbot are well computed and ready for the fill in VB.</span>
+01026 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkCreateVertexVBFar(farvtop);
+01027 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(farvtop);
+01028 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkCreateVertexVBFar(farvbot);
+01029 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(farvbot);
+01030
+01031 <span class="comment">// For VertexProgram only, must refill the Far vertex of neighbor(s), </span>
+01032 <span class="comment">// because MaxFaceSize, and MaxNearLimit may have change.</span>
+01033 <span class="keywordflow">if</span>( CLandscapeGlobals::VertexProgramEnabled )
+01034 {
+01035 <span class="comment">// f0</span>
+01036 <span class="keywordflow">if</span>( ! (f0-&gt;FLeft==NULL || f0-&gt;FLeft-&gt;isLeaf()) )
+01037 f0-&gt;FLeft-&gt;Patch-&gt;checkFillVertexVBFar(f0-&gt;FLeft-&gt;SonLeft-&gt;FVBase);
+01038 <span class="comment">// f1</span>
+01039 <span class="keywordflow">if</span>( ! (f1-&gt;FLeft==NULL || f1-&gt;FLeft-&gt;isLeaf()) )
+01040 f1-&gt;FLeft-&gt;Patch-&gt;checkFillVertexVBFar(f1-&gt;FLeft-&gt;SonLeft-&gt;FVBase);
+01041 }
+01042
+01043
+01044 <span class="comment">// 2. Create sons, and update links.</span>
+01045 <span class="comment">//----------------------------------</span>
+01046
+01047 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f0l, *f0r;
+01048 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f1l, *f1r;
+01049
+01050 <span class="comment">// create and bind Sons.</span>
+01051 f0l= f0-&gt;SonLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01052 f0r= f0-&gt;SonRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01053 f1l= f1-&gt;SonLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01054 f1r= f1-&gt;SonRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessFace();
+01055
+01056 <span class="comment">// subdivision left.</span>
+01057 f0l-&gt;Patch= f0-&gt;Patch;
+01058 f0l-&gt;Father= f0;
+01059 f0l-&gt;Level= f0-&gt;Level+1;
+01060 f0l-&gt;Size= f0-&gt;Size*0.5f;
+01061 <span class="comment">// subdivision right.</span>
+01062 f0r-&gt;Patch= f0-&gt;Patch;
+01063 f0r-&gt;Father= f0;
+01064 f0r-&gt;Level= f0-&gt;Level+1;
+01065 f0r-&gt;Size= f0-&gt;Size*0.5f;
+01066 <span class="comment">// subdivision left.</span>
+01067 f1l-&gt;Patch= f1-&gt;Patch;
+01068 f1l-&gt;Father= f1;
+01069 f1l-&gt;Level= f1-&gt;Level+1;
+01070 f1l-&gt;Size= f1-&gt;Size*0.5f;
+01071 <span class="comment">// subdivision right.</span>
+01072 f1r-&gt;Patch= f1-&gt;Patch;
+01073 f1r-&gt;Father= f1;
+01074 f1r-&gt;Level= f1-&gt;Level+1;
+01075 f1r-&gt;Size= f1-&gt;Size*0.5f;
+01076
+01077 <span class="comment">// Patch coordinates.</span>
+01078 f0r-&gt;PVRight= pclt;
+01079 f0r-&gt;PVBase= pclb;
+01080 f0r-&gt;PVLeft= pcbot;
+01081 f1l-&gt;PVBase= pctop;
+01082 f1l-&gt;PVLeft= f0r-&gt;PVRight;
+01083 f1l-&gt;PVRight= f0r-&gt;PVLeft;
+01084
+01085 f0l-&gt;PVRight= pctop;
+01086 f0l-&gt;PVBase= pcbot;
+01087 f0l-&gt;PVLeft= pcrb;
+01088 f1r-&gt;PVBase= pcrt;
+01089 f1r-&gt;PVLeft= f0l-&gt;PVRight;
+01090 f1r-&gt;PVRight= f0l-&gt;PVLeft;
+01091
+01092 <span class="comment">// link existing vertex.</span>
+01093 f0r-&gt;VRight= vlt;
+01094 f0r-&gt;VBase= vlb;
+01095 f0r-&gt;VLeft= vbot;
+01096 f1l-&gt;VBase= vtop;
+01097 f1l-&gt;VLeft= f0r-&gt;VRight;
+01098 f1l-&gt;VRight= f0r-&gt;VLeft;
+01099
+01100 f0l-&gt;VRight= vtop;
+01101 f0l-&gt;VBase= vbot;
+01102 f0l-&gt;VLeft= vrb;
+01103 f1r-&gt;VBase= vrt;
+01104 f1r-&gt;VLeft= f0l-&gt;VRight;
+01105 f1r-&gt;VRight= f0l-&gt;VLeft;
+01106
+01107 <span class="comment">// link Far vertices.</span>
+01108 f0r-&gt;FVRight= farvlt;
+01109 f0r-&gt;FVBase= farvlb;
+01110 f0r-&gt;FVLeft= farvbot;
+01111 f1l-&gt;FVBase= farvtop;
+01112 f1l-&gt;FVLeft= f0r-&gt;FVRight;
+01113 f1l-&gt;FVRight= f0r-&gt;FVLeft;
+01114
+01115 f0l-&gt;FVRight= farvtop;
+01116 f0l-&gt;FVBase= farvbot;
+01117 f0l-&gt;FVLeft= farvrb;
+01118 f1r-&gt;FVBase= farvrt;
+01119 f1r-&gt;FVLeft= f0l-&gt;FVRight;
+01120 f1r-&gt;FVRight= f0l-&gt;FVLeft;
+01121
+01122 <span class="comment">// link neigbhor faces.</span>
+01123 f0r-&gt;FBase= f1l;
+01124 f1l-&gt;FBase= f0r;
+01125 f0l-&gt;FBase= f1r;
+01126 f1r-&gt;FBase= f0l;
+01127 f1l-&gt;FRight= f0l;
+01128 f0l-&gt;FRight= f1l;
+01129 f0r-&gt;FRight= f0-&gt;FRight;
+01130 <span class="keywordflow">if</span>(f0-&gt;FRight)
+01131 f0-&gt;FRight-&gt;changeNeighbor(f0, f0r);
+01132 f1r-&gt;FRight= f1-&gt;FRight;
+01133 <span class="keywordflow">if</span>(f1-&gt;FRight)
+01134 f1-&gt;FRight-&gt;changeNeighbor(f1, f1r);
+01135 <span class="comment">// 4 links (all FLeft sons ) are stil invalid here.</span>
+01136 f0l-&gt;FLeft= NULL;
+01137 f0r-&gt;FLeft= NULL;
+01138 f1l-&gt;FLeft= NULL;
+01139 f1r-&gt;FLeft= NULL;
+01140
+01141 <span class="comment">// Neigbors pointers of undetermined splitted face are not changed. Must Doesn't change this. </span>
+01142 <span class="comment">// Used and Updated in section 5. ...</span>
+01143
+01144
+01145 <span class="comment">// 3. Update Tile infos.</span>
+01146 <span class="comment">//----------------------</span>
+01147 <span class="comment">// There is no update tileinfo with rectangular patch, since tiles are always squares. (TileLimitLevel&gt;SquareLimitLevel).</span>
+01148
+01149 <span class="comment">// NB: but must test update of tile info for neighboring, ie 2 faces around the splits.</span>
+01150 <span class="comment">// For Vertex program only</span>
+01151 <span class="keywordflow">if</span>( CLandscapeGlobals::VertexProgramEnabled )
+01152 {
+01153 <span class="comment">// if neighbor face splitted, and if 2 different patchs, we must update the Tile vertices</span>
+01154 <span class="comment">// because MaxFaceSize and MaxNearLimit may have changed.</span>
+01155 <span class="keywordflow">if</span>( f0-&gt;FLeft!=NULL &amp;&amp; !f0-&gt;FLeft-&gt;isLeaf() &amp;&amp; f0-&gt;FLeft-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a> )
+01156 {
+01157 <span class="comment">// If neighbors sons at tile level, must update their Tile vertices.</span>
+01158 <span class="keywordflow">if</span>( f0-&gt;FLeft-&gt;SonLeft-&gt;Level &gt;= f0-&gt;FLeft-&gt;Patch-&gt;TileLimitLevel )
+01159 {
+01160 f0-&gt;FLeft-&gt;SonLeft-&gt;checkFillTileVB(IdUvBase);
+01161 f0-&gt;FLeft-&gt;SonRight-&gt;checkFillTileVB(IdUvBase);
+01162 }
+01163 }
+01164 <span class="comment">// idem for f1.</span>
+01165 <span class="keywordflow">if</span>( f1-&gt;FLeft!=NULL &amp;&amp; !f1-&gt;FLeft-&gt;isLeaf() &amp;&amp; f1-&gt;FLeft-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a> )
+01166 {
+01167 <span class="comment">// If neighbors sons at tile level, must update their Tile vertices.</span>
+01168 <span class="keywordflow">if</span>( f1-&gt;FLeft-&gt;SonLeft-&gt;Level &gt;= f1-&gt;FLeft-&gt;Patch-&gt;TileLimitLevel )
+01169 {
+01170 f1-&gt;FLeft-&gt;SonLeft-&gt;checkFillTileVB(IdUvBase);
+01171 f1-&gt;FLeft-&gt;SonRight-&gt;checkFillTileVB(IdUvBase);
+01172 }
+01173 }
+01174 }
+01175
+01176
+01177 <span class="comment">// 4. Compute centers.</span>
+01178 <span class="comment">//--------------------</span>
+01179 f0r-&gt;computeSplitPoint();
+01180 f0l-&gt;computeSplitPoint();
+01181 f1r-&gt;computeSplitPoint();
+01182 f1l-&gt;computeSplitPoint();
+01183
+01184
+01185 <span class="comment">// 5. Propagate, or link sons of base.</span>
+01186 <span class="comment">//------------------------------------</span>
+01187 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;2;i++)
+01188 {
+01189 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f, *fl, *fr;
+01190 <span class="comment">// TOP face.</span>
+01191 <span class="keywordflow">if</span>(i==0)
+01192 {
+01193 f= f1;
+01194 fl= f1l;
+01195 fr= f1r;
+01196 }
+01197 <span class="comment">// then BOT face.</span>
+01198 <span class="keywordflow">else</span>
+01199 {
+01200 f= f0;
+01201 fl= f0l;
+01202 fr= f0r;
+01203 }
+01204
+01205 <span class="comment">// If current face and FBase has sons, just links.</span>
+01206 <span class="keywordflow">if</span>(f-&gt;FLeft==NULL)
+01207 {
+01208 <span class="comment">// Just update sons neighbors.</span>
+01209 fl-&gt;FLeft= NULL;
+01210 fr-&gt;FLeft= NULL;
+01211 }
+01212 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(!f-&gt;FLeft-&gt;isLeaf())
+01213 {
+01214 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *toLeft, *toRight;
+01215 toLeft= f-&gt;FLeft-&gt;SonLeft;
+01216 toRight= f-&gt;FLeft-&gt;SonRight;
+01217 <span class="comment">// Cross connection of sons.</span>
+01218 <span class="keywordflow">if</span>( !f-&gt;FLeft-&gt;isRectangular() )
+01219 {
+01220 <span class="comment">// Case neigbhor is square.</span>
+01221 fl-&gt;FLeft= toLeft;
+01222 fr-&gt;FLeft= toRight;
+01223 toLeft-&gt;FRight= fl;
+01224 toRight-&gt;FLeft= fr;
+01225 }
+01226 <span class="keywordflow">else</span>
+01227 {
+01228 <span class="comment">// Case neigbhor is rectangle.</span>
+01229 fl-&gt;FLeft= toRight;
+01230 fr-&gt;FLeft= toLeft;
+01231 toLeft-&gt;FLeft= fr;
+01232 toRight-&gt;FLeft= fl;
+01233 }
+01234 }
+01235 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (propagateSplit)
+01236 {
+01237 <span class="comment">// Warning: at each iteration, the pointer of FLeft may change (because of split() which can change the neighbor </span>
+01238 <span class="comment">// and so f).</span>
+01239 <span class="keywordflow">while</span>(f-&gt;FLeft-&gt;isLeaf())
+01240 f-&gt;FLeft-&gt;split();
+01241
+01242 <span class="comment">// There is a possible bug here (maybe easily patched). Sons may have be propagated splitted.</span>
+01243 <span class="comment">// And problems may arise because this face hasn't yet good connectivity (especially for rectangles!! :) ).</span>
+01244 <a class="code" href="a04199.html#a6">nlassert</a>(fl-&gt;isLeaf() &amp;&amp; fr-&gt;isLeaf());
+01245 }
+01246 }
+01247
+01248
+01249 <span class="comment">// 6. Must remove father from rdr list, and insert sons.</span>
+01250 <span class="comment">//------------------------------------------------------</span>
+01251 <span class="comment">// UGLY REFCOUNT SIDE EFFECT: do the append first.</span>
+01252 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(f0l);
+01253 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(f0r);
+01254 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(f1l);
+01255 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;appendFaceToRenderList(f1r);
+01256 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(f0);
+01257 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;removeFaceFromRenderList(f1);
+01258
+01259
+01260 <span class="comment">// 7. Update priority list.</span>
+01261 <span class="comment">//------------------------------------------------------</span>
+01262 <span class="comment">// Since we are freshly splitted, unlink from any list, and link to the MergePriorityList, because must look </span>
+01263 <span class="comment">// now when should merge.</span>
+01264 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_MergePriorityList.insert(0, 0, f0);
+01265 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_MergePriorityList.insert(0, 0, f1);
+01266
+01267 <span class="comment">// Since we are split, no need to test father for merge, because it cannot!</span>
+01268 <span class="keywordflow">if</span>(f0-&gt;Father)
+01269 {
+01270 <span class="comment">// remove father from any priority list.</span>
+01271 f0-&gt;Father-&gt;unlinkInPList();
+01272 }
+01273 <span class="keywordflow">if</span>(f1-&gt;Father)
+01274 {
+01275 <span class="comment">// remove father from any priority list.</span>
+01276 f1-&gt;Father-&gt;unlinkInPList();
+01277 }
+01278
+01279 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea26" doxytag="NL3D::CTessFace::unbind" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CTessFace::unbind </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02274">2274</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a06498.html#l00104">NL3D::CTessVertex::MaxFaceSize</a>, <a class="el" href="a06498.html#l00105">NL3D::CTessVertex::MaxNearLimit</a>, <a class="el" href="a05862.html#l03022">NL3D::CLandscape::newTessVertex()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00274">Size</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>.
+<p>
+<div class="fragment"><pre>02275 {
+02276 <span class="comment">// NB: since CantMergeFace has a NULL patch ptr, it is unbound too.</span>
+02277
+02278 <span class="comment">// Square case.</span>
+02279 <span class="comment">//=============</span>
+02280 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02281 {
+02282 <span class="comment">// Change Left/Right neighbors.</span>
+02283 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02284 {
+02285 <span class="comment">// FLeft and FRight pointers are only valid in Leaves nodes.</span>
+02286 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+02287 {
+02288 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;changeNeighbor(<span class="keyword">this</span>, NULL);
+02289 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>= NULL;
+02290 }
+02291 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+02292 {
+02293 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;changeNeighbor(<span class="keyword">this</span>, NULL);
+02294 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= NULL;
+02295 }
+02296 }
+02297 <span class="comment">// Change Base neighbors.</span>
+02298 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+02299 {
+02300 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *oldNeigbhorFace= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>;
+02301
+02302 FBase-&gt;changeNeighbor(<span class="keyword">this</span>, NULL);
+02303 FBase= NULL;
+02304 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02305 {
+02306 <span class="comment">// Duplicate the VBase of sons, so the unbind is correct and no vertices are shared.</span>
+02307 CTessVertex *old= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+02308 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessVertex();
+02309 *(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase)= *old;
+02310 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+02311
+02312 <span class="comment">// For geomorph (VertexProgram or soft), compute good MaxFaceSize and MaxNearLimit (change since unbinded)</span>
+02313 <span class="comment">// update us.</span>
+02314 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxFaceSize= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>;
+02315 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxNearLimit= <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+02316 <span class="comment">// update our neigbhor, only if not a multiple patch face.</span>
+02317 <span class="keywordflow">if</span>(oldNeigbhorFace-&gt;Patch)
+02318 {
+02319 old-&gt;MaxFaceSize= oldNeigbhorFace-&gt;Size;
+02320 old-&gt;MaxNearLimit= oldNeigbhorFace-&gt;computeNearLimit();
+02321 }
+02322 }
+02323 }
+02324 }
+02325 <span class="comment">// Rectangular case.</span>
+02326 <span class="comment">//==================</span>
+02327 <span class="keywordflow">else</span>
+02328 {
+02329 <span class="comment">// Doens't need to test FBase, since must be same patch.</span>
+02330 <span class="comment">// In rectangular, FLeft has the behavior of FBase in square case.</span>
+02331 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+02332 {
+02333 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *oldNeigbhorFace= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_2">FLeft</a>;
+02334
+02335 FLeft-&gt;changeNeighbor(<span class="keyword">this</span>, NULL);
+02336 FLeft= NULL;
+02337 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02338 {
+02339 <span class="comment">// Duplicate the VBase of sons, so the unbind is correct and no vertices are shared.</span>
+02340 <span class="comment">// NB: this code is a bit different from square case.</span>
+02341 CTessVertex *old= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+02342 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;newTessVertex();
+02343 *(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase)= *old;
+02344 <span class="comment">// This is the difference: (see rectangle tesselation rules).</span>
+02345 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+02346 <span class="comment">// Yoyo_patch_himself (12/02/2001): I forgot this one!!</span>
+02347 <a class="code" href="a04199.html#a6">nlassert</a>(FBase &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft);
+02348 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase;
+02349
+02350
+02351 <span class="comment">// For geomorph (VertexProgram or soft), compute good MaxFaceSize and MaxNearLimit (change since unbinded)</span>
+02352 <span class="comment">// update us.</span>
+02353 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxFaceSize= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>;
+02354 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;MaxNearLimit= <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+02355 <span class="comment">// update our neigbhor, only if not a multiple patch face.</span>
+02356 <span class="keywordflow">if</span>(oldNeigbhorFace-&gt;Patch)
+02357 {
+02358 old-&gt;MaxFaceSize= oldNeigbhorFace-&gt;Size;
+02359 old-&gt;MaxNearLimit= oldNeigbhorFace-&gt;computeNearLimit();
+02360 }
+02361 }
+02362 }
+02363 <span class="comment">// But FRight still valid in leaves nodes only.</span>
+02364 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02365 {
+02366 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;Patch!=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>)
+02367 {
+02368 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>-&gt;changeNeighbor(<span class="keyword">this</span>, NULL);
+02369 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_3">FRight</a>= NULL;
+02370 }
+02371 }
+02372 }
+02373
+02374 <span class="comment">// Propagate unbind.</span>
+02375 <span class="comment">//==================</span>
+02376 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02377 {
+02378 <span class="comment">// update sons vertex pointers (since they may have been updated by me or my grandfathers).</span>
+02379 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02380 {
+02381 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+02382 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>;
+02383 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>;
+02384 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+02385 }
+02386 <span class="keywordflow">else</span>
+02387 {
+02388 <span class="comment">// Rectangular case. Update only ptrs which may have changed.</span>
+02389 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VLeft= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>;
+02390 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VBase= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+02391 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VRight= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>;
+02392 }
+02393
+02394 <span class="comment">// Must re-create good Vertex links for Far and Near Vertices!!!</span>
+02395 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;updateNearFarVertices();
+02396 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;updateNearFarVertices();
+02397 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02398 {
+02399 <span class="comment">//NB: must do this for Base neighbor (see unbind() rectangular case...).</span>
+02400 <a class="code" href="a04199.html#a6">nlassert</a>(FBase &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonRight);
+02401 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonLeft-&gt;updateNearFarVertices();
+02402 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;SonRight-&gt;updateNearFarVertices();
+02403 }
+02404
+02405 <span class="comment">// unbind the sons.</span>
+02406 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;unbind();
+02407 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;unbind();
+02408 }
+02409
+02410 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacePListNodea7" doxytag="NL3D::CTessFace::unlinkInPList" ></a><p>
+<table class="mdTable" 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::CTessFacePListNode::unlinkInPList </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> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+if linked, unlink this node from his list.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06493.html#l00071">71</a> of file <a class="el" href="a06493.html">tess_face_priority_list.cpp</a>.
+<p>
+References <a class="el" href="a06494.html#l00088">NL3D::CTessFacePListNode::_NextTessFaceInPList</a>, and <a class="el" href="a06494.html#l00087">NL3D::CTessFacePListNode::_PrecTessFaceInPList</a>.
+<p>
+Referenced by <a class="el" href="a06493.html#l00438">NL3D::CTessFacePriorityList::CRollingTable::clearRollTableEntry()</a>, <a class="el" href="a05862.html#l03052">NL3D::CLandscape::deleteTessFace()</a>, <a class="el" href="a06493.html#l00314">NL3D::CTessFacePriorityList::shift()</a>, <a class="el" href="a06493.html#l00368">NL3D::CTessFacePriorityList::shiftAll()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>, and <a class="el" href="a06494.html#l00057">NL3D::CTessFacePListNode::~CTessFacePListNode()</a>.
+<p>
+<div class="fragment"><pre>00072 {
+00073 <span class="comment">/*</span>
+00074 <span class="comment"> NB: if this node was empty (this, this), this is a No-Op.</span>
+00075 <span class="comment"> If this node was the last of a list, then the root correctly get (&amp;root, &amp;root) after this.</span>
+00076 <span class="comment"> */</span>
+00077 <span class="comment">// unlink old list from me.</span>
+00078 _PrecTessFaceInPList-&gt;_NextTessFaceInPList= _NextTessFaceInPList;
+00079 _NextTessFaceInPList-&gt;_PrecTessFaceInPList= _PrecTessFaceInPList;
+00080
+00081 <span class="comment">// reset to empty node.</span>
+00082 _PrecTessFaceInPList= <span class="keyword">this</span>;
+00083 _NextTessFaceInPList= <span class="keyword">this</span>;
+00084 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea28" doxytag="NL3D::CTessFace::updateBind" ></a><p>
+<table class="mdTable" 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::CTessFace::updateBind </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="a06497.html#l02860">2860</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>.
+<p>
+<div class="fragment"><pre>02861 {
+02862 <span class="comment">/*</span>
+02863 <span class="comment"> Remind that updateBind() is called ONLY on the patch which is binded (not the neighbors).</span>
+02864 <span class="comment"> Since updateBind() is called on the bintree, and that precedent propagated split may have occur, we may not</span>
+02865 <span class="comment"> be a leaf here. So we are not sure that FLeft and FRight are good, and we doesn't need to update them (since we have</span>
+02866 <span class="comment"> sons).</span>
+02867 <span class="comment"> Also, since we are splitted, and correctly linked (this may not be the case in updateBindAndSplit()), FBase IS</span>
+02868 <span class="comment"> correct. His FBase neighbor and him form a diamond. So we don't need to update him.</span>
+02869 <span class="comment"></span>
+02870 <span class="comment"> Same remarks for rectangular patchs.</span>
+02871 <span class="comment"> */</span>
+02872 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02873 {
+02874 <span class="keywordtype">bool</span> splitWanted= <span class="keyword">false</span>;
+02875 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FBase, splitWanted));
+02876 <span class="comment">// FLeft and FRight pointers are only valid in Leaves nodes.</span>
+02877 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FLeft, splitWanted));
+02878 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FRight, splitWanted));
+02879 <span class="keywordflow">if</span>(splitWanted)
+02880 <a class="code" href="a03476.html#NL3D_1_1CTessFacea29">updateBindAndSplit</a>();
+02881 }
+02882
+02883
+02884 <span class="comment">// Recurse to sons.</span>
+02885 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02886 {
+02887 <span class="comment">// Update bind of sons.</span>
+02888 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;updateBind();
+02889 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;updateBind();
+02890 }
+02891 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea29" doxytag="NL3D::CTessFace::updateBindAndSplit" ></a><p>
+<table class="mdTable" 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::CTessFace::updateBindAndSplit </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="a06497.html#l02643">2643</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00156">CantMergeFace</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a05862.html#l03061">NL3D::CLandscape::deleteTessVertex()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00101">NL3D::CTessVertex::Pos</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, <a class="el" href="a06498.html#l00243">SonRight</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::StartPos</a>, <a class="el" href="a06497.html#l02544">updateBindEdge()</a>, <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02860">updateBind()</a>.
+<p>
+<div class="fragment"><pre>02644 {
+02645 <span class="keywordtype">bool</span> splitWanted= <span class="keyword">false</span>;
+02646 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f0= NULL;
+02647 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f1= NULL;
+02648 <span class="comment">/*</span>
+02649 <span class="comment"> Look at the callers, and you'll see that "this" is always a leaf.</span>
+02650 <span class="comment"> Therefore, FBase, FLeft and FRight are good pointers, and *FLeft and *FRight should be Ok too.</span>
+02651 <span class="comment"> */</span>
+02652 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02653 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FBase, splitWanted));
+02654 <span class="comment">// FLeft and FRight pointers are only valid in Leaves nodes.</span>
+02655 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FLeft, splitWanted));
+02656 <span class="keywordflow">while</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea30">updateBindEdge</a>(FRight, splitWanted));
+02657 <span class="comment">// In rectangular case, we MUST also update edges of FBase.</span>
+02658 <span class="comment">// Because splitRectangular() split those two faces at the same time.</span>
+02659 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02660 {
+02661 f0= <span class="keyword">this</span>;
+02662 f1= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>;
+02663 <a class="code" href="a04199.html#a6">nlassert</a>(FBase);
+02664 <a class="code" href="a04199.html#a6">nlassert</a>(FBase-&gt;isLeaf());
+02665 <span class="comment">// Doesn't need to update FBase-&gt;FBase, since it's me!</span>
+02666 <span class="comment">// FLeft and FRight pointers are only valid in Leaves nodes.</span>
+02667 <span class="keywordflow">while</span>(!FBase-&gt;updateBindEdge(FBase-&gt;FLeft, splitWanted));
+02668 <span class="keywordflow">while</span>(!FBase-&gt;updateBindEdge(FBase-&gt;FRight, splitWanted));
+02669 }
+02670
+02671
+02672
+02673 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *fmult= NULL;
+02674 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *fmult0= NULL;
+02675 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *fmult1= NULL;
+02676 <span class="comment">// If multipatch face case.</span>
+02677 <span class="comment">//=========================</span>
+02678 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02679 {
+02680 <span class="comment">// multipatch face case are detected when face-&gt;Patch==NULL !!!</span>
+02681 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a> &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;Patch==NULL)
+02682 {
+02683 fmult= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>;
+02684 <span class="comment">// First, trick: FBase is NULL, so during the split. =&gt; no ptr problem.</span>
+02685 FBase= NULL;
+02686 }
+02687 }
+02688 <span class="keywordflow">else</span>
+02689 {
+02690 <span class="comment">// multipatch face case are detected when face-&gt;Patch==NULL !!!</span>
+02691 <span class="keywordflow">if</span>(f0-&gt;FLeft &amp;&amp; f0-&gt;FLeft-&gt;Patch==NULL)
+02692 {
+02693 fmult0= f0-&gt;FLeft;
+02694 <span class="comment">// First, trick: neighbor is NULL, so during the split. =&gt; no ptr problem.</span>
+02695 f0-&gt;FLeft= NULL;
+02696 }
+02697 <span class="comment">// multipatch face case are detected when face-&gt;Patch==NULL !!!</span>
+02698 <span class="keywordflow">if</span>(f1-&gt;FLeft &amp;&amp; f1-&gt;FLeft-&gt;Patch==NULL)
+02699 {
+02700 fmult1= f1-&gt;FLeft;
+02701 <span class="comment">// First, trick: neighbor is NULL, so during the split. =&gt; no ptr problem.</span>
+02702 f1-&gt;FLeft= NULL;
+02703 }
+02704 }
+02705
+02706 <span class="comment">// Then split, and propagate.</span>
+02707 <span class="comment">//===========================</span>
+02708 <a class="code" href="a03476.html#NL3D_1_1CTessFacea25">split</a>(<span class="keyword">false</span>);
+02709 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>())
+02710 {
+02711 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>)
+02712 {
+02713 <span class="keywordflow">while</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;isLeaf())
+02714 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>-&gt;updateBindAndSplit();
+02715 }
+02716 <span class="comment">// There is a possible bug here (maybe easily patched). Sons may have be propagated splitted.</span>
+02717 <span class="comment">// And problems may arise because this face hasn't yet good connectivity.</span>
+02718 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;isLeaf());
+02719 }
+02720 <span class="keywordflow">else</span>
+02721 {
+02722 <span class="keywordflow">if</span>(f0-&gt;FLeft)
+02723 {
+02724 <span class="keywordflow">while</span>(f0-&gt;FLeft-&gt;isLeaf())
+02725 f0-&gt;FLeft-&gt;updateBindAndSplit();
+02726 }
+02727 <span class="keywordflow">if</span>(f1-&gt;FLeft)
+02728 {
+02729 <span class="keywordflow">while</span>(f1-&gt;FLeft-&gt;isLeaf())
+02730 f1-&gt;FLeft-&gt;updateBindAndSplit();
+02731 }
+02732 <span class="comment">// There is a possible bug here (maybe easily patched). Sons may have be propagated splitted.</span>
+02733 <span class="comment">// And problems may arise because this face hasn't yet good connectivity.</span>
+02734 <a class="code" href="a04199.html#a6">nlassert</a>(f0-&gt;SonLeft-&gt;isLeaf() &amp;&amp; f0-&gt;SonRight-&gt;isLeaf());
+02735 <a class="code" href="a04199.html#a6">nlassert</a>(f1-&gt;SonLeft-&gt;isLeaf() &amp;&amp; f1-&gt;SonRight-&gt;isLeaf());
+02736 }
+02737
+02738
+02739 <span class="comment">// If multipatch face case, update neighbors.</span>
+02740 <span class="comment">//===========================================</span>
+02741 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea15">isRectangular</a>() &amp;&amp; fmult)
+02742 {
+02743 <span class="comment">// Update good Face neighbors.</span>
+02744 <span class="comment">//============================</span>
+02745 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;FRight= fmult-&gt;SonRight;
+02746 fmult-&gt;SonRight-&gt;changeNeighbor(&amp;CTessFace::MultipleBindFace, SonLeft);
+02747
+02748 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;FLeft= fmult-&gt;SonLeft;
+02749 fmult-&gt;SonLeft-&gt;changeNeighbor(&amp;CTessFace::MultipleBindFace, SonRight);
+02750
+02751 <span class="comment">// NB: this work auto with 1/2 or 1/4. See CPatch::bind(), to understand.</span>
+02752 <span class="comment">// In 1/4 case, fmult-&gt;SonLeft and fmult-&gt;SonRight are themselves MultiPatch face. So it will recurse.</span>
+02753
+02754 <span class="comment">// Update good vertex pointer.</span>
+02755 <span class="comment">//============================</span>
+02756 CTessVertex *vert= fmult-&gt;VBase;
+02757
+02758 <span class="comment">// Copy the good coordinate: those splitted (because of noise).</span>
+02759 vert-&gt;Pos= vert-&gt;StartPos= vert-&gt;EndPos= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase-&gt;EndPos;
+02760 <span class="comment">// But delete the pointer.</span>
+02761 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessVertex(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase);
+02762 <span class="comment">// And update sons pointers, to good vertex.</span>
+02763 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;VBase= vert;
+02764 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;VBase= vert;
+02765 <span class="comment">// Compute correct centers.</span>
+02766 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;computeSplitPoint();
+02767 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;computeSplitPoint();
+02768
+02769
+02770 <span class="comment">// Update good Far vertex pointer.</span>
+02771 <span class="comment">//================================</span>
+02772 <span class="comment">// Because *-&gt;VBase may have been merged to the multiple bind face, Near/FarVertices which pointed on it must</span>
+02773 <span class="comment">// be setup.</span>
+02774 <span class="comment">// We do not have to propagate this vertex ptr change since sons are leaves!!</span>
+02775 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;isLeaf() &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;isLeaf());
+02776 <span class="comment">// update pointers on vertex.</span>
+02777 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_11">SonLeft</a>-&gt;updateNearFarVertices();
+02778 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_12">SonRight</a>-&gt;updateNearFarVertices();
+02779
+02780
+02781 <span class="comment">// Bind FBase to a false face which indicate a bind 1/N.</span>
+02782 <span class="comment">// This face prevent for "this" face to be merged...</span>
+02783 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_1">FBase</a>= &amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a>;
+02784
+02785 <span class="comment">// Therefore, the vertex will be never deleted (since face not merged).</span>
+02786 <span class="comment">// The only way to do this, is to unbind the patch from all (then the vertex is cloned), then the merge will be Ok.</span>
+02787 }
+02788 <span class="comment">// Else if rectangular.</span>
+02789 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(fmult0 || fmult1)
+02790 {
+02791 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *f;
+02792 <a class="code" href="a04558.html#a14">sint</a> i;
+02793
+02794 <span class="comment">// Same reasoning for rectangular patchs, as above.</span>
+02795 <span class="keywordflow">for</span>(i=0;i&lt;2;i++)
+02796 {
+02797 <span class="keywordflow">if</span>(i==0)
+02798 f= f0, fmult= fmult0;
+02799 <span class="keywordflow">else</span>
+02800 f= f1, fmult= fmult1;
+02801 <span class="keywordflow">if</span>(fmult)
+02802 {
+02803 <span class="comment">// Update good Face neighbors (when I am a rectangle).</span>
+02804 <span class="comment">//============================</span>
+02805 <span class="comment">// Consider the fmult face as a square face.</span>
+02806 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *toLeft, *toRight;
+02807 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *fl=f-&gt;SonLeft, *fr=f-&gt;SonRight;
+02808 toLeft= fmult-&gt;SonLeft;
+02809 toRight= fmult-&gt;SonRight;
+02810 <span class="comment">// Cross connection of sons.</span>
+02811 fl-&gt;FLeft= toLeft;
+02812 fr-&gt;FLeft= toRight;
+02813 toLeft-&gt;changeNeighbor(&amp;CTessFace::MultipleBindFace, fl);
+02814 toRight-&gt;changeNeighbor(&amp;CTessFace::MultipleBindFace, fr);
+02815
+02816 <span class="comment">// Update good vertex pointer.</span>
+02817 <span class="comment">//============================</span>
+02818 CTessVertex *vert= fmult-&gt;VBase;
+02819
+02820 <span class="comment">// Copy the good coordinate: those splitted (because of noise).</span>
+02821 <span class="comment">// NB: this work too with rectangular patch (see tesselation rules).</span>
+02822 vert-&gt;Pos= vert-&gt;StartPos= vert-&gt;EndPos= fl-&gt;VBase-&gt;EndPos;
+02823 <span class="comment">// But delete the pointer.</span>
+02824 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;deleteTessVertex(fl-&gt;VBase);
+02825 <span class="comment">// And update sons pointers, to good vertex (rectangular case, see tesselation rules).</span>
+02826 fl-&gt;VBase= vert;
+02827 fr-&gt;VLeft= vert;
+02828 f-&gt;FBase-&gt;SonLeft-&gt;VRight= vert;
+02829
+02830 <span class="comment">// Point to a bind 1/N indicator.</span>
+02831 f-&gt;FLeft= &amp;<a class="code" href="a03476.html#NL3D_1_1CTessFacev0">CantMergeFace</a>;
+02832 }
+02833 }
+02834 <span class="comment">// After all updates done. recompute centers of both sons 's faces, and update far vertices pointers.</span>
+02835 <span class="keywordflow">for</span>(i=0;i&lt;2;i++)
+02836 {
+02837 <span class="keywordflow">if</span>(i==0)
+02838 f= f0;
+02839 <span class="keywordflow">else</span>
+02840 f= f1;
+02841 <span class="comment">// Compute correct centers.</span>
+02842 f-&gt;SonRight-&gt;computeSplitPoint();
+02843 f-&gt;SonLeft-&gt;computeSplitPoint();
+02844
+02845 <span class="comment">// Update good Far vertex pointer.</span>
+02846 <span class="comment">//================================</span>
+02847 <span class="comment">// Because *-&gt;VBase may have been merged to the multiple bind face, Near/FarVertices which pointed on it must</span>
+02848 <span class="comment">// be setup.</span>
+02849 <span class="comment">// We do not have to propagate this vertex ptr change, since sons are leaves!!</span>
+02850 <a class="code" href="a04199.html#a6">nlassert</a>(f-&gt;SonLeft-&gt;isLeaf() &amp;&amp; f-&gt;SonRight-&gt;isLeaf());
+02851 <span class="comment">// update pointers on vertex.</span>
+02852 f-&gt;SonLeft-&gt;updateNearFarVertices();
+02853 f-&gt;SonRight-&gt;updateNearFarVertices();
+02854 }
+02855 }
+02856 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea30" doxytag="NL3D::CTessFace::updateBindEdge" ></a><p>
+<table class="mdTable" 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::CTessFace::updateBindEdge </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03476.html">CTessFace</a> *&amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>edgeFace</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>splitWanted</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>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l02544">2544</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06498.html#l00242">FBase</a>, <a class="el" href="a06498.html#l00242">FLeft</a>, <a class="el" href="a06498.html#l00242">FRight</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02954">isRectangular()</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a06498.html#l00240">Patch</a>, <a class="el" href="a06498.html#l00243">SonLeft</a>, and <a class="el" href="a06498.html#l00243">SonRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02860">updateBind()</a>, and <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>.
+<p>
+<div class="fragment"><pre>02545 {
+02546 <span class="comment">// Return true, when the bind should be Ok, or if a split has occured.</span>
+02547 <span class="comment">// Return false only if pointers are updated, without splits.</span>
+02548
+02549 <span class="keywordflow">if</span>(edgeFace==NULL)
+02550 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02551
+02552 <span class="keywordflow">if</span>(edgeFace-&gt;isLeaf())
+02553 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02554
+02555 <span class="comment">/*</span>
+02556 <span class="comment"> Look at the callers, and you'll see that "this" is always a leaf.</span>
+02557 <span class="comment"> Therefore, edgeFace is a valid pointer (either if it is FLeft, FRight or FBase).</span>
+02558 <span class="comment"> */</span>
+02559
+02560 <span class="comment">// MultiPatch face case.</span>
+02561 <span class="comment">//======================</span>
+02562 <span class="comment">// If neighbor is a multiple face.</span>
+02563 <span class="keywordflow">if</span>(edgeFace-&gt;Patch==NULL &amp;&amp; edgeFace-&gt;FBase==<span class="keyword">this</span>)
+02564 {
+02565 splitWanted= <span class="keyword">true</span>;
+02566 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02567 }
+02568
+02569
+02570 <span class="comment">// neighbor is a "Square face" case.</span>
+02571 <span class="comment">//==================================</span>
+02572 <span class="keywordflow">if</span>(!edgeFace-&gt;isRectangular())
+02573 {
+02574 <span class="comment">// NB: this code works either if I AM a rectangular face or a square face.</span>
+02575
+02576 <span class="comment">// If the neighbor is splitted on ourself, split...</span>
+02577 <span class="keywordflow">if</span>(edgeFace-&gt;FBase==<span class="keyword">this</span>)
+02578 {
+02579 splitWanted= <span class="keyword">true</span>;
+02580 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02581 }
+02582 <span class="keywordflow">else</span>
+02583 {
+02584 <span class="comment">// Just update pointers...</span>
+02585 <span class="keywordflow">if</span>(edgeFace-&gt;FLeft==<span class="keyword">this</span>)
+02586 {
+02587 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *sonLeft= edgeFace-&gt;SonLeft;
+02588 sonLeft-&gt;FBase= <span class="keyword">this</span>;
+02589 edgeFace= sonLeft;
+02590 }
+02591 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(edgeFace-&gt;FRight==<span class="keyword">this</span>)
+02592 {
+02593 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *sonRight= edgeFace-&gt;SonRight;
+02594 sonRight-&gt;FBase= <span class="keyword">this</span>;
+02595 edgeFace= sonRight;
+02596 }
+02597 <span class="keywordflow">else</span>
+02598 {
+02599 <span class="comment">// Look at the callers, and you'll see that "this" is always a leaf.</span>
+02600 <span class="comment">// Therefore, we should never be here.</span>
+02601 <a class="code" href="a04199.html#a12">nlstop</a>;
+02602 }
+02603 }
+02604 }
+02605 <span class="comment">// neighbor is a "Rectangle face" case.</span>
+02606 <span class="comment">//=====================================</span>
+02607 <span class="keywordflow">else</span>
+02608 {
+02609 <span class="comment">// NB: this code works either if I AM a rectangular face or a square face.</span>
+02610
+02611 <span class="comment">// If the neighbor is splitted on ourself, split...</span>
+02612 <span class="comment">// Test FLeft because of rectangular case... :)</span>
+02613 <span class="comment">// FBase should be tested too. If edgeFace-&gt;FBase==this, I should be myself a rectangular face.</span>
+02614 <span class="keywordflow">if</span>(edgeFace-&gt;FLeft==<span class="keyword">this</span> || edgeFace-&gt;FBase==<span class="keyword">this</span>)
+02615 {
+02616 splitWanted= <span class="keyword">true</span>;
+02617 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+02618 }
+02619 <span class="keywordflow">else</span>
+02620 {
+02621 <span class="keywordflow">if</span>(edgeFace-&gt;FRight==<span class="keyword">this</span>)
+02622 {
+02623 <span class="comment">// See rectangular tesselation rules, too know why we do this.</span>
+02624 <a class="code" href="a03476.html#NL3D_1_1CTessFacea7">CTessFace</a> *sonRight= edgeFace-&gt;SonRight;
+02625 sonRight-&gt;FRight= <span class="keyword">this</span>;
+02626 edgeFace= sonRight;
+02627 }
+02628 <span class="keywordflow">else</span>
+02629 {
+02630 <span class="comment">// Look at the callers, and you'll see that "this" is always a leaf.</span>
+02631 <span class="comment">// Therefore, we should never be here.</span>
+02632 <a class="code" href="a04199.html#a12">nlstop</a>;
+02633 }
+02634 }
+02635 }
+02636
+02637 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+02638 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea31" doxytag="NL3D::CTessFace::updateErrorMetric" ></a><p>
+<table class="mdTable" 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::CTessFace::updateErrorMetric </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="a06497.html#l00278">278</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a06498.html#l00273">ErrorMetricDate</a>, <a class="el" href="a06498.html#l00277">MaxDistToSplitPoint</a>, <a class="el" href="a06498.html#l00275">SplitPoint</a>, <a class="el" href="a05587.html#l00107">NLMISC::sqr()</a>, <a class="el" href="a06682.html#l00111">NLMISC::CVector::sqrnorm()</a>, and <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>.
+<p>
+<div class="fragment"><pre>00279 {
+00280 <span class="comment">// If already updated for this pass...</span>
+00281 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_1">ErrorMetricDate</a>&gt;= CLandscapeGlobals::CurrentDate)
+00282 <span class="keywordflow">return</span>;
+00283
+00284 CVector viewdir= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a> - CLandscapeGlobals::RefineCenter;
+00285 <span class="keywordtype">float</span> sqrdist= viewdir.sqrnorm();
+00286
+00287 <span class="comment">// trivial formula.</span>
+00288 <span class="comment">//-----------------</span>
+00289 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_3">Size</a>/ sqrdist;
+00290
+00291
+00292 <span class="comment">// Hoppe97 formula: k²= a² * ("v-e"² - ((v-e).n)²) / "v-e"^4.</span>
+00293 <span class="comment">//-----------------</span>
+00294 <span class="comment">// Can't do it because geomorph is made on Graphic card, so the simplier is the better.</span>
+00295
+00296
+00297 <span class="comment">// TileMode Impact.</span>
+00298 <span class="comment">//-----------------</span>
+00299 <span class="comment">/* TileMode Impact. We must split at least at TileLimitLevel, but only if the triangle</span>
+00300 <span class="comment"> has a chance to enter in the TileDistFar sphere.</span>
+00301 <span class="comment"> */</span>
+00302 <span class="keywordflow">if</span>( <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&lt;<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel &amp;&amp; sqrdist &lt; <a class="code" href="a05378.html#a373">sqr</a>(CLandscapeGlobals::TileDistFar+MaxDistToSplitPoint) )
+00303 {
+00304 <a class="code" href="a03476.html#NL3D_1_1CTessFaced3">computeTileErrorMetric</a>();
+00305 }
+00306
+00307 <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_1">ErrorMetricDate</a>= CLandscapeGlobals::CurrentDate;
+00308 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaced10" doxytag="NL3D::CTessFace::updateNearFarVertices" ></a><p>
+<table class="mdTable" 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::CTessFace::updateNearFarVertices </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00873">873</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a06161.html#l01522">NL3D::CPatch::checkFillVertexVBFar()</a>, <a class="el" href="a06161.html#l01556">NL3D::CPatch::checkFillVertexVBNear()</a>, <a class="el" href="a06498.html#l00282">FVBase</a>, <a class="el" href="a06498.html#l00282">FVLeft</a>, <a class="el" href="a06498.html#l00282">FVRight</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>, <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>, <a class="el" href="a05867.html#l00048">NL3D_MAX_TILE_FACE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06498.html#l00245">PVBase</a>, <a class="el" href="a06498.html#l00245">PVLeft</a>, <a class="el" href="a06498.html#l00245">PVRight</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06498.html#l00136">NL3D::CTessNearVertex::Src</a>, <a class="el" href="a06498.html#l00261">TileFaces</a>, <a class="el" href="a06498.html#l00177">NL3D::CTileFace::V</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02274">unbind()</a>, and <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>.
+<p>
+<div class="fragment"><pre>00874 {
+00875 <a class="code" href="a04199.html#a6">nlassert</a>(VBase &amp;&amp; FVBase);
+00876 <a class="code" href="a04199.html#a6">nlassert</a>(VLeft &amp;&amp; FVLeft);
+00877 <a class="code" href="a04199.html#a6">nlassert</a>(VRight &amp;&amp; FVRight);
+00878
+00879 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo0">FVBase</a>-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+00880 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo1">FVLeft</a>-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>;
+00881 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo2">FVRight</a>-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>;
+00882 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo0">FVBase</a>-&gt;PCoord= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_6">PVBase</a>;
+00883 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo1">FVLeft</a>-&gt;PCoord= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_7">PVLeft</a>;
+00884 <a class="code" href="a03476.html#NL3D_1_1CTessFaceo2">FVRight</a>-&gt;PCoord= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_8">PVRight</a>;
+00885
+00886 <span class="comment">// Update VB for far vertices (if needed)</span>
+00887 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(FVBase);
+00888 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(FVLeft);
+00889 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBFar(FVRight);
+00890
+00891 <span class="comment">// Near Vertices update (Src only).</span>
+00892 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;<a class="code" href="a04444.html#a1">NL3D_MAX_TILE_FACE</a>; i++)
+00893 {
+00894 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i])
+00895 {
+00896 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew0">IdUvBase</a>]-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>;
+00897 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew1">IdUvLeft</a>]-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>;
+00898 <a class="code" href="a03476.html#NL3D_1_1CTessFacez970_1">TileFaces</a>[i]-&gt;V[<a class="code" href="a03476.html#NL3D_1_1CTessFacez970_0NL3D_1_1CTessFacew2">IdUvRight</a>]-&gt;Src= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>;
+00899
+00900 <span class="comment">// Update VB for near vertices (if needed)</span>
+00901 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBNear(TileFaces[i]-&gt;V[IdUvBase]);
+00902 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBNear(TileFaces[i]-&gt;V[IdUvLeft]);
+00903 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;checkFillVertexVBNear(TileFaces[i]-&gt;V[IdUvRight]);
+00904 }
+00905 }
+00906
+00907 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea32" doxytag="NL3D::CTessFace::updateRefineMerge" ></a><p>
+<table class="mdTable" 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::CTessFace::updateRefineMerge </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>
+TileDistFar to +oo.<p>
+TileDistNear to TileDistFar.<p>
+0 to TileDistNear.
+<p>
+Definition at line <a class="el" href="a06497.html#l02108">2108</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00896">NL3D::CLandscape::_MergePriorityList</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06497.html#l00312">computeTileEMForUpdateRefine()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06493.html#l00273">NL3D::CTessFacePriorityList::insert()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l01762">merge()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a05867.html#l00060">NL3D_REFINE_MERGE_THRESHOLD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05872.html#l00040">NL3D::ProfNRefineFaces</a>, <a class="el" href="a05872.html#l00046">NL3D::ProfNRefineInTileTransition</a>, <a class="el" href="a06498.html#l00275">SplitPoint</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
+<p>
+<div class="fragment"><pre>02109 {
+02110 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineFaces, 1);
+02111
+02112 <a class="code" href="a04199.html#a6">nlassert</a>(Patch);
+02113 <span class="comment">// The face must be splitted, because tested for merge.</span>
+02114 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02115
+02116 <span class="comment">/*</span>
+02117 <span class="comment"> NB: see above for some updateRefine*** doc.</span>
+02118 <span class="comment"> */</span>
+02119
+02120 <span class="comment">// Test for merge.</span>
+02121 <span class="comment">//-----------------------</span>
+02122 <span class="keywordtype">bool</span> merged= <span class="keyword">false</span>;
+02123 {
+02124 <a class="code" href="a03476.html#NL3D_1_1CTessFacea31">updateErrorMetric</a>();
+02125 <span class="keywordtype">float</span> ps=<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>;
+02126 ps*= CLandscapeGlobals::OORefineThreshold;
+02127 <span class="comment">// 1.0f is the point of split().</span>
+02128 <span class="comment">// 2.0f is the end of geomorph.</span>
+02129
+02130
+02131 <span class="comment">// Test merge.</span>
+02132 <span class="comment">//---------------------</span>
+02133 <span class="comment">// Else, must merge ??</span>
+02134 <span class="keywordflow">if</span>(ps&lt;1.0f)
+02135 {
+02136 <span class="comment">// Merge only if agree, and neighbors agree.</span>
+02137 <span class="comment">// canMerge() test all the good thing: FBase==CantMergeFace, or this is rectangular etc...</span>
+02138 <span class="comment">// The test is propagated to neighbors.</span>
+02139 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFaced0">canMerge</a>(<span class="keyword">true</span>))
+02140 {
+02141 <a class="code" href="a03476.html#NL3D_1_1CTessFacea18">merge</a>();
+02142
+02143 <span class="comment">// NB: here, merge() is not propagated to fathers (supposed to be not very usefull).</span>
+02144
+02145 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+02146 {
+02147 merged= <span class="keyword">true</span>;
+02148 }
+02149 }
+02150 }
+02151 }
+02152
+02153
+02154 <span class="comment">// Insert the face in the priority list.</span>
+02155 <span class="comment">//-----------------------</span>
+02156 <span class="comment">// If merged, then insertion in Landscape-&gt;SplitPriorityList at 0 has been done. so nothing to update.</span>
+02157 <span class="comment">// Else, must compute when whe should re-test.</span>
+02158 <span class="keywordflow">if</span>(!merged)
+02159 {
+02160 <span class="comment">// the face is splitted here.</span>
+02161 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+02162
+02163 <span class="keywordtype">float</span> minDeltaDistToUpdate;
+02164
+02165
+02166 <span class="comment">// The distance of SplitPoint to center.</span>
+02167 <span class="keywordtype">float</span> distSplitPoint= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a> - CLandscapeGlobals::RefineCenter).norm();
+02168 <span class="comment">// Compute distance from refineCenter to normal split/merge (ie without tile transition).</span>
+02169 <span class="keywordtype">float</span> distNormalSplitMerge= (<span class="keywordtype">float</span>)sqrt(Size*CLandscapeGlobals::OORefineThreshold);
+02170
+02171
+02172 <span class="comment">// If the face is at its max subdivision</span>
+02173 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&gt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel+CLandscapeGlobals::TileMaxSubdivision)
+02174 {
+02175 <span class="comment">// since the face is splitted, then must test always this face, because we must merge it (as soon as it is possible).</span>
+02176 minDeltaDistToUpdate= 0;
+02177 }
+02178 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&gt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+02179 {
+02180 <span class="comment">// Always normal ErrorMetric. Because Faces at Tile level decide to split or merge their sons independently </span>
+02181 <span class="comment">// of "Tile ErrorMetric".</span>
+02182 <span class="comment">// since splitted, compute distance to merge.</span>
+02183 minDeltaDistToUpdate= distNormalSplitMerge - distSplitPoint;
+02184 <span class="comment">// NB: it is possible that minDeltaDistToUpdate&lt;0. A good example is when we are enforced split.</span>
+02185 <span class="comment">// Then, distSplitMerge may be &lt; distSplitPoint, meaning we should have not split, but a neigbhor has enforced us.</span>
+02186 <span class="comment">// So now, must test every frame if we can merge....</span>
+02187 minDeltaDistToUpdate= max( 0.f, minDeltaDistToUpdate );
+02188 }
+02189 <span class="keywordflow">else</span>
+02190 {
+02191 <span class="comment">// Compute Distance of the face from RefineCenter. It is the min of the 3 points, as in computeTileErrorMetric().</span>
+02192 <span class="keywordtype">float</span> s0= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+02193 <span class="keywordtype">float</span> s1= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+02194 <span class="keywordtype">float</span> s2= (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter).sqrnorm();
+02195 <span class="keywordtype">float</span> distMinFace= (<span class="keywordtype">float</span>)sqrt( <a class="code" href="a05378.html#a375">minof</a>(s0, s1, s2) );
+02196
+02197 <span class="comment">// compute the delta distance to the normal split point. See above for doc.</span>
+02198 <span class="keywordtype">float</span> normalEMDeltaDist;
+02199 normalEMDeltaDist= distNormalSplitMerge - distSplitPoint;
+02200 normalEMDeltaDist= max( 0.f, normalEMDeltaDist );
+02201
+02202
+02203 <span class="comment">/* </span>
+02204 <span class="comment"> There is 3 possibles cases, according to level, and the distances minFaceDist:</span>
+02205 <span class="comment"> */</span>
+02207 <span class="keywordflow">if</span>( distMinFace &gt; CLandscapeGlobals::TileDistFar )
+02208 {
+02209 <span class="comment">// normal geomorph. Any face compute the distance to the SplitPoint, and take min with distance to</span>
+02210 <span class="comment">// the TileDistFar sphere. </span>
+02211 minDeltaDistToUpdate= normalEMDeltaDist;
+02212
+02213 <span class="comment">// We must know when we enter in TileErrorMetric zone, because the computing is different.</span>
+02214 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(minDeltaDistToUpdate, distMinFace - CLandscapeGlobals::TileDistFar);
+02215 }
+02217 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( distMinFace &gt; CLandscapeGlobals::TileDistNear )
+02218 {
+02219 <span class="comment">// Profile</span>
+02220 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineInTileTransition, 1);
+02221
+02222
+02223 <span class="comment">// Compute distance to split/Merge in TileTransition</span>
+02224 <span class="keywordtype">float</span> distTileTransSplitMerge;
+02225 <span class="keywordtype">float</span> maxDeltaDist= 8;
+02226 <span class="keywordtype">float</span> minDeltaDist= 0;
+02227 <a class="code" href="a04558.html#a15">uint</a> nbRecurs= 6;
+02228 <span class="keywordtype">float</span> nearLimit;
+02229 nearLimit= CLandscapeGlobals::RefineThreshold * <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+02230 <span class="comment">// Since splitted, compute distance to merge.</span>
+02231 <span class="comment">// search the distance recursively.</span>
+02232 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt; nbRecurs; i++)
+02233 {
+02234 <span class="keywordtype">float</span> pivotDeltaDist= (maxDeltaDist-minDeltaDist)/2;
+02235 <span class="comment">// If the em computed with this distance is still &gt;1 (ie splitted), then we can move further.</span>
+02236 <span class="keywordflow">if</span> ( <a class="code" href="a03476.html#NL3D_1_1CTessFaced2">computeTileEMForUpdateRefine</a>(distSplitPoint+pivotDeltaDist, distMinFace+pivotDeltaDist, nearLimit ) &gt; 1)
+02237 minDeltaDist= pivotDeltaDist;
+02238 <span class="comment">// else we must move not as far</span>
+02239 <span class="keywordflow">else</span>
+02240 maxDeltaDist= pivotDeltaDist;
+02241 }
+02242 <span class="comment">// And so take the minimum resulting delta distance</span>
+02243 distTileTransSplitMerge= minDeltaDist;
+02244
+02245 <span class="comment">// take the min with distance of distMinFace to the TileDistNear and TileDistFar sphere, because formula change at</span>
+02246 <span class="comment">// those limits.</span>
+02247 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(distTileTransSplitMerge, CLandscapeGlobals::TileDistFar - distMinFace );
+02248 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(minDeltaDistToUpdate, distMinFace - CLandscapeGlobals::TileDistNear);
+02249 }
+02251 <span class="keywordflow">else</span>
+02252 {
+02253 <span class="comment">// because the face is not a Tile Level (ie Level&lt;Patch-&gt;TileLimitLevel), it should be splitted, </span>
+02254 <span class="comment">// and won't merge until reaching at least the TileDistNear sphere.</span>
+02255 <span class="comment">// Since splitted, Must enter in TileErrorMetric area to know when to merge.</span>
+02256 minDeltaDistToUpdate= CLandscapeGlobals::TileDistNear - distMinFace;
+02257 }
+02258
+02259 }
+02260
+02261 <span class="comment">// Merge Refine Threshold: because of enforced splits, we have lot of faces whit minDeltaDistToUpdate&lt;0, because</span>
+02262 <span class="comment">// they alwayas want to merge. To avoid this, add a delta, which delay the test for merge.</span>
+02263 <span class="comment">// The caveat is that faces which do not need this may merge later. But 2 meters won't add too many faces.</span>
+02264 minDeltaDistToUpdate+= <a class="code" href="a04444.html#a7">NL3D_REFINE_MERGE_THRESHOLD</a>;
+02265
+02266 <span class="comment">// insert in the Merge priority list.</span>
+02267 <span class="comment">// Until the RefineCenter move under minDeltaDistToUpdate, we don't need to test face.</span>
+02268 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_MergePriorityList.insert(0, minDeltaDistToUpdate, <span class="keyword">this</span>);
+02269 }
+02270 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacea33" doxytag="NL3D::CTessFace::updateRefineSplit" ></a><p>
+<table class="mdTable" 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::CTessFace::updateRefineSplit </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>
+TileDistFar to +oo.<p>
+TileDistNear to TileDistFar.<p>
+0 to TileDistNear.
+<p>
+Definition at line <a class="el" href="a06497.html#l01900">1900</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+References <a class="el" href="a05863.html#l00894">NL3D::CLandscape::_SplitPriorityList</a>, <a class="el" href="a06497.html#l00216">computeNearLimit()</a>, <a class="el" href="a06497.html#l00312">computeTileEMForUpdateRefine()</a>, <a class="el" href="a06498.html#l00102">NL3D::CTessVertex::EndPos</a>, <a class="el" href="a06498.html#l00276">ErrorMetric</a>, <a class="el" href="a06155.html#l02186">NL3D::CPatch::getLandscape()</a>, <a class="el" href="a06494.html#l00145">NL3D::CTessFacePriorityList::getQuadrantDirection()</a>, <a class="el" href="a06493.html#l00273">NL3D::CTessFacePriorityList::insert()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05873.html#l00042">NL3D_PROFILE_LAND_ADD</a>, <a class="el" href="a06497.html#l00045">NL3D_TESS_USE_QUADRANT_THRESHOLD</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a05872.html#l00040">NL3D::ProfNRefineFaces</a>, <a class="el" href="a05872.html#l00046">NL3D::ProfNRefineInTileTransition</a>, <a class="el" href="a05872.html#l00047">NL3D::ProfNRefineWithLowDistance</a>, <a class="el" href="a06493.html#l00209">NL3D::CTessFacePriorityList::selectQuadrant()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06498.html#l00275">SplitPoint</a>, <a class="el" href="a06682.html#l00111">NLMISC::CVector::sqrnorm()</a>, <a class="el" href="a06156.html#l00812">NL3D::CPatch::TileLimitLevel</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06493.html#l00071">NL3D::CTessFacePListNode::unlinkInPList()</a>, <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>, <a class="el" href="a06498.html#l00241">VBase</a>, <a class="el" href="a06498.html#l00241">VLeft</a>, and <a class="el" href="a06498.html#l00241">VRight</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>.
+<p>
+<div class="fragment"><pre>01901 {
+01902 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineFaces, 1);
+01903
+01904 <a class="code" href="a04199.html#a6">nlassert</a>(Patch);
+01905 <span class="comment">// The face must be not splitted, because tested for split.</span>
+01906 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+01907
+01908 <span class="comment">/*</span>
+01909 <span class="comment"> NB: see above for some updateRefine*** doc.</span>
+01910 <span class="comment"> */</span>
+01911
+01912 <span class="comment">// Test for Split.</span>
+01913 <span class="comment">//-----------------------</span>
+01914 <span class="keywordtype">bool</span> splitted= <span class="keyword">false</span>;
+01915 {
+01916 <a class="code" href="a03476.html#NL3D_1_1CTessFacea31">updateErrorMetric</a>();
+01917 <span class="keywordtype">float</span> ps=<a class="code" href="a03476.html#NL3D_1_1CTessFacez972_0">ErrorMetric</a>;
+01918 ps*= CLandscapeGlobals::OORefineThreshold;
+01919 <span class="comment">// 1.0f is the point of split().</span>
+01920 <span class="comment">// 2.0f is the end of geomorph.</span>
+01921
+01922
+01923 <span class="comment">// Test split.</span>
+01924 <span class="comment">//---------------------</span>
+01925 <span class="comment">// If wanted and limit not reached, split().</span>
+01926 <span class="keywordflow">if</span>(ps&gt;1.0f &amp;&amp; <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&lt; (<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel + CLandscapeGlobals::TileMaxSubdivision) )
+01927 {
+01928 <a class="code" href="a03476.html#NL3D_1_1CTessFacea25">split</a>();
+01929
+01930 <span class="comment">// if split ok</span>
+01931 <span class="keywordflow">if</span>(!<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>())
+01932 {
+01933 splitted= <span class="keyword">true</span>;
+01934 }
+01935 }
+01936 }
+01937
+01938
+01939 <span class="comment">// Insert the face in the priority list.</span>
+01940 <span class="comment">//-----------------------</span>
+01941 <span class="comment">// If splitted, then insertion in Landscape-&gt;MergePriorityList at 0 has been done. so nothing to update.</span>
+01942 <span class="comment">// Else, must compute when whe should re-test.</span>
+01943 <span class="keywordflow">if</span>(!splitted)
+01944 {
+01945 <span class="comment">// the face is not splitted here.</span>
+01946 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03476.html#NL3D_1_1CTessFacea14">isLeaf</a>());
+01947
+01948 <span class="keywordtype">float</span> minDeltaDistToUpdate;
+01949
+01950 <span class="comment">// by default insert in the quadrant-less rolling table.</span>
+01951 <a class="code" href="a04558.html#a15">uint</a> quadrantId= 0;
+01952
+01953
+01954 CVector dirToSplitPoint= <a class="code" href="a03476.html#NL3D_1_1CTessFacez972_4">SplitPoint</a> - CLandscapeGlobals::RefineCenter;
+01955 <span class="comment">// The distance of SplitPoint to center.</span>
+01956 <span class="keywordtype">float</span> distSplitPoint= dirToSplitPoint.norm();
+01957 <span class="comment">// The distance where we should split/merge. see updateRefin() doc.</span>
+01958 <span class="keywordtype">float</span> distNormalSplitMerge= (<span class="keywordtype">float</span>)sqrt(Size*CLandscapeGlobals::OORefineThreshold);
+01959
+01960
+01961 <span class="comment">// If the face is at its max subdivision</span>
+01962 <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&gt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel+CLandscapeGlobals::TileMaxSubdivision)
+01963 {
+01964 <span class="comment">// special case: the face do not need to be tested for splitting, because Max subdivision reached.</span>
+01965 <span class="comment">// Hence just unlink from any list, and return.</span>
+01966 <a class="code" href="a03477.html#NL3D_1_1CTessFacePListNodea7">unlinkInPList</a>();
+01967 <span class="keywordflow">return</span>;
+01968 }
+01969 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_4">Level</a>&gt;=<a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;TileLimitLevel)
+01970 {
+01971 <span class="comment">// Always normal ErrorMetric. Because Faces at Tile level decide to split or merge their sons independently </span>
+01972 <span class="comment">// of "Tile ErrorMetric".</span>
+01973
+01974 <span class="comment">// The test is "when do we enter in the Split area?", so we can use Quadrant PriorityList</span>
+01975 quadrantId= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.selectQuadrant(dirToSplitPoint);
+01976
+01977 <span class="comment">// compute distance to split as default "No Quadrant"</span>
+01978 minDeltaDistToUpdate= distSplitPoint - distNormalSplitMerge;
+01979
+01980 <span class="comment">// If a quadrant is selected, try to use it</span>
+01981 <span class="keywordflow">if</span>(quadrantId&gt;0)
+01982 {
+01983 <span class="keyword">const</span> CVector &amp;quadrantDir= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.getQuadrantDirection(quadrantId);
+01984
+01985 <span class="comment">// We must not approach the SplitPoint at distNormalSplitMerge</span>
+01986 <span class="keywordtype">float</span> dMin= quadrantDir*dirToSplitPoint - distNormalSplitMerge;
+01987
+01988 <span class="comment">// If the dist with quadrant is too small then use the std way (without quadrant).</span>
+01989 <span class="keywordflow">if</span>( dMin&lt;<a class="code" href="a05074.html#a0">NL3D_TESS_USE_QUADRANT_THRESHOLD</a> )
+01990 quadrantId= 0;
+01991 <span class="comment">// else ok, use quadrant behavior</span>
+01992 <span class="keywordflow">else</span>
+01993 minDeltaDistToUpdate= dMin;
+01994 }
+01995 }
+01996 <span class="keywordflow">else</span>
+01997 {
+01998 <span class="comment">// Compute Distance of the face from RefineCenter. It is the min of the 3 points, as in computeTileErrorMetric().</span>
+01999 CVector dirToV0= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_13">VBase</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter;
+02000 CVector dirToV1= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_14">VLeft</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter;
+02001 CVector dirToV2= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_15">VRight</a>-&gt;EndPos - CLandscapeGlobals::RefineCenter;
+02002 <span class="keywordtype">float</span> s0= dirToV0.sqrnorm();
+02003 <span class="keywordtype">float</span> s1= dirToV1.sqrnorm();
+02004 <span class="keywordtype">float</span> s2= dirToV2.sqrnorm();
+02005 <span class="keywordtype">float</span> distMinFace= (<span class="keywordtype">float</span>)sqrt( <a class="code" href="a05378.html#a375">minof</a>(s0, s1, s2) );
+02006
+02007 <span class="comment">// compute the delta distance to the normal split point. See above for doc.</span>
+02008 <span class="keywordtype">float</span> normalEMDeltaDist;
+02009 normalEMDeltaDist= distSplitPoint - distNormalSplitMerge;
+02010
+02011
+02012 <span class="comment">/* </span>
+02013 <span class="comment"> There is 3 possibles cases, according to level, and the distances minFaceDist:</span>
+02014 <span class="comment"> */</span>
+02016 <span class="keywordflow">if</span>( distMinFace &gt; CLandscapeGlobals::TileDistFar )
+02017 {
+02018 <span class="comment">// The test is "when do we enter in the Split area OR in TileDistFar area?", so we can use Quadrant PriorityList</span>
+02019 quadrantId= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.selectQuadrant(dirToSplitPoint);
+02020
+02021 <span class="comment">// compute deltaDist as default "Direction less quadrant"</span>
+02022 minDeltaDistToUpdate= normalEMDeltaDist;
+02023 <span class="comment">// We must know when we enter in TileErrorMetric zone, because the computing is different.</span>
+02024 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(minDeltaDistToUpdate, distMinFace - CLandscapeGlobals::TileDistFar);
+02025
+02026 <span class="comment">// try with quadrant if &gt; 0.</span>
+02027 <span class="keywordflow">if</span>(quadrantId&gt;0)
+02028 {
+02029 <span class="keyword">const</span> CVector &amp;quadrantDir= <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.getQuadrantDirection(quadrantId);
+02030
+02031 <span class="comment">// We must not approach the SplitPoint at distNormalSplitMerge</span>
+02032 <span class="keywordtype">float</span> dMin= quadrantDir*dirToSplitPoint - distNormalSplitMerge;
+02033 <span class="comment">// and we must not reach one of the 3 sphere (Vi, TileDistFar).</span>
+02034 <span class="keywordtype">float</span> d0 = quadrantDir*dirToV0 - CLandscapeGlobals::TileDistFar;
+02035 <span class="keywordtype">float</span> d1 = quadrantDir*dirToV1 - CLandscapeGlobals::TileDistFar;
+02036 <span class="keywordtype">float</span> d2 = quadrantDir*dirToV2 - CLandscapeGlobals::TileDistFar;
+02037 <span class="comment">// take min dist</span>
+02038 dMin= <a class="code" href="a05378.html#a375">minof</a>(dMin, d0, d1, d2);
+02039
+02040 <span class="comment">// If the dist with quadrant is too small then use the std way (without quadrant).</span>
+02041 <span class="keywordflow">if</span>( dMin&lt;<a class="code" href="a05074.html#a0">NL3D_TESS_USE_QUADRANT_THRESHOLD</a> )
+02042 quadrantId= 0;
+02043 <span class="comment">// else ok, use quadrant behavior</span>
+02044 <span class="keywordflow">else</span>
+02045 minDeltaDistToUpdate= dMin;
+02046 }
+02047 }
+02049 <span class="keywordflow">else</span> <span class="keywordflow">if</span>( distMinFace &gt; CLandscapeGlobals::TileDistNear )
+02050 {
+02051 <span class="comment">// NB: can't use quadrant behavior here. Leave quadrantId at 0.</span>
+02052
+02053 <span class="comment">// Profile</span>
+02054 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineInTileTransition, 1);
+02055
+02056 <span class="comment">// Compute distance to split/Merge in TileTransition</span>
+02057 <span class="keywordtype">float</span> distTileTransSplitMerge;
+02058 <span class="keywordtype">float</span> maxDeltaDist= 8;
+02059 <span class="keywordtype">float</span> minDeltaDist= 0;
+02060 <a class="code" href="a04558.html#a15">uint</a> nbRecurs= 6;
+02061 <span class="keywordtype">float</span> nearLimit;
+02062 nearLimit= CLandscapeGlobals::RefineThreshold * <a class="code" href="a03476.html#NL3D_1_1CTessFacea4">computeNearLimit</a>();
+02063 <span class="comment">// search the distance to split recursively.</span>
+02064 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt; nbRecurs; i++)
+02065 {
+02066 <span class="keywordtype">float</span> pivotDeltaDist= (maxDeltaDist-minDeltaDist)/2;
+02067 <span class="comment">// If the em computed with this distance is still &lt;1 (ie merged), then we can move further.</span>
+02068 <span class="keywordflow">if</span> ( <a class="code" href="a03476.html#NL3D_1_1CTessFaced2">computeTileEMForUpdateRefine</a>(distSplitPoint-pivotDeltaDist, distMinFace-pivotDeltaDist, nearLimit ) &lt; 1)
+02069 minDeltaDist= pivotDeltaDist;
+02070 <span class="comment">// else we must move not as far</span>
+02071 <span class="keywordflow">else</span>
+02072 maxDeltaDist= pivotDeltaDist;
+02073 }
+02074 <span class="comment">// And so take the minimum resulting delta distance</span>
+02075 distTileTransSplitMerge= minDeltaDist;
+02076
+02077 <span class="comment">// take the min with distance of distMinFace to the TileDistNear and TileDistFar sphere, because formula change at</span>
+02078 <span class="comment">// those limits.</span>
+02079 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(distTileTransSplitMerge, CLandscapeGlobals::TileDistFar - distMinFace );
+02080 minDeltaDistToUpdate= <a class="code" href="a04061.html#a0">min</a>(minDeltaDistToUpdate, distMinFace - CLandscapeGlobals::TileDistNear);
+02081 }
+02083 <span class="keywordflow">else</span>
+02084 {
+02085 <span class="comment">// because the face is not a Tile Level (ie Level&lt;Patch-&gt;TileLimitLevel), it should be splitted, </span>
+02086 <span class="comment">// and won't merge until reaching at least the TileDistNear sphere.</span>
+02087 <span class="comment">// if not splited (should not arise), force the split next time.</span>
+02088 minDeltaDistToUpdate= 0;
+02089 }
+02090
+02091 }
+02092
+02093 <span class="comment">// Profile.</span>
+02094 <span class="keywordflow">if</span>(minDeltaDistToUpdate&lt;0.0625)
+02095 {
+02096 <a class="code" href="a04450.html#a2">NL3D_PROFILE_LAND_ADD</a>(ProfNRefineWithLowDistance, 1);
+02097 }
+02098
+02099
+02100 <span class="comment">// insert in the Split priority list.</span>
+02101 <span class="comment">// Until the RefineCenter move under minDeltaDistToUpdate, we don't need to test face.</span>
+02102 <a class="code" href="a03476.html#NL3D_1_1CTessFacez968_5">Patch</a>-&gt;getLandscape()-&gt;_SplitPriorityList.insert(quadrantId, minDeltaDistToUpdate, <span class="keyword">this</span>);
+02103 }
+02104 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CTessFacev0" doxytag="NL3D::CTessFace::CantMergeFace" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacev0">NL3D::CTessFace::CantMergeFace</a><code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06497.html#l00156">156</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l02448">forceMergeAtTileLevel()</a>, and <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez972_0" doxytag="NL3D::CTessFace::ErrorMetric" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez972_0">NL3D::CTessFace::ErrorMetric</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00276">276</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez972_1" doxytag="NL3D::CTessFace::ErrorMetricDate" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez972_1">NL3D::CTessFace::ErrorMetricDate</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00273">273</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00161">CTessFace()</a>, and <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_0" doxytag="NL3D::CTessFace::Father" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_0">NL3D::CTessFace::Father</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00243">243</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01283">split()</a>, and <a class="el" href="a06497.html#l00911">splitRectangular()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_1" doxytag="NL3D::CTessFace::FBase" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_1">NL3D::CTessFace::FBase</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00242">242</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_2" doxytag="NL3D::CTessFace::FLeft" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_2">NL3D::CTessFace::FLeft</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00242">242</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06155.html#l01805">NL3D::CPatch::changeEdgeNeighbor()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_3" doxytag="NL3D::CTessFace::FRight" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_3">NL3D::CTessFace::FRight</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00242">242</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01805">NL3D::CPatch::changeEdgeNeighbor()</a>, <a class="el" href="a06498.html#l00298">changeNeighbor()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06155.html#l00115">NL3D::CPatch::release()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06155.html#l01724">NL3D::CPatch::unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaceo0" doxytag="NL3D::CTessFace::FVBase" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03480.html">CTessFarVertex</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFaceo0">NL3D::CTessFace::FVBase</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00282">282</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaceo1" doxytag="NL3D::CTessFace::FVLeft" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03480.html">CTessFarVertex</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFaceo1">NL3D::CTessFace::FVLeft</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00282">282</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaceo2" doxytag="NL3D::CTessFace::FVRight" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03480.html">CTessFarVertex</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFaceo2">NL3D::CTessFace::FVRight</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00282">282</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_4" doxytag="NL3D::CTessFace::Level" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_4">NL3D::CTessFace::Level</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00247">247</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06155.html#l00766">NL3D::CPatch::extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>, <a class="el" href="a06155.html#l00848">NL3D::CPatch::removeFaceFromRenderList()</a>, <a class="el" href="a06497.html#l01283">split()</a>, and <a class="el" href="a06497.html#l00911">splitRectangular()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez972_2" doxytag="NL3D::CTessFace::MaxDistToSplitPoint" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez972_2">NL3D::CTessFace::MaxDistToSplitPoint</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00277">277</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, and <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaces0" doxytag="NL3D::CTessFace::MultipleBindFace" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> <a class="el" href="a03476.html#NL3D_1_1CTessFaces0">NL3D::CTessFace::MultipleBindFace</a><code> [static]</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="a06497.html#l00157">157</a> of file <a class="el" href="a06497.html">tessellation.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableSortBlocko0" doxytag="NL3D::CTessFace::Next" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02718.html">CTessNodeList</a>* <a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko0">NL3D::CTessNodeList::Next</a><code> [inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06496.html#l00044">44</a> of file <a class="el" href="a06496.html">tess_list.h</a>.
+<p>
+Referenced by <a class="el" href="a06698.html#l01036">NL3D::CVegetableManager::addInstance()</a>, <a class="el" href="a05862.html#l03489">NL3D::CLandscape::computeDynamicLighting()</a>, <a class="el" href="a06161.html#l01329">NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01311">NL3D::CPatch::computeGeomorphFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01359">NL3D::CPatch::computeGeomorphTileVertexListVB()</a>, <a class="el" href="a06161.html#l01298">NL3D::CPatch::computeGeomorphVertexList()</a>, <a class="el" href="a06161.html#l00893">NL3D::CPatch::debugAllocationMarkIndicesFarList()</a>, <a class="el" href="a06161.html#l00904">NL3D::CPatch::debugAllocationMarkIndicesNearList()</a>, <a class="el" href="a06161.html#l01609">NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01161">NL3D::CPatch::fillFar0VertexListVB()</a>, <a class="el" href="a06161.html#l01664">NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB()</a>, <a class="el" href="a06161.html#l01173">NL3D::CPatch::fillFar1VertexListVB()</a>, <a class="el" href="a06161.html#l01185">NL3D::CPatch::fillTileVertexListVB()</a>, <a class="el" href="a05862.html#l03583">NL3D::CLandscape::getDynamicLightingMemoryLoad()</a>, <a class="el" href="a06491.html#l00177">NL3D::CTessBlock::refillFaceVectorFar0()</a>, <a class="el" href="a06491.html#l00223">NL3D::CTessBlock::refillFaceVectorFar1()</a>, <a class="el" href="a06491.html#l00267">NL3D::CTessBlock::refillFaceVectorTile()</a>, <a class="el" href="a05862.html#l00605">NL3D::CLandscape::refine()</a>, <a class="el" href="a06698.html#l01713">NL3D::CVegetableManager::render()</a>, <a class="el" href="a05862.html#l00939">NL3D::CLandscape::render()</a>, <a class="el" href="a06161.html#l00744">NL3D::CPatch::updateFar0VBAlloc()</a>, <a class="el" href="a06161.html#l00759">NL3D::CPatch::updateFar1VBAlloc()</a>, <a class="el" href="a06704.html#l00074">NL3D::CVegetableSortBlock::updateSortBlock()</a>, and <a class="el" href="a06161.html#l00774">NL3D::CPatch::updateTileVBAlloc()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_5" doxytag="NL3D::CTessFace::Patch" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03057.html">CPatch</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_5">NL3D::CTessFace::Patch</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00240">240</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06498.html#l00368">sameTile()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CVegetableSortBlocko1" doxytag="NL3D::CTessFace::Prec" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02718.html">CTessNodeList</a>* <a class="el" href="a02718.html#NL3D_1_1CVegetableSortBlocko1">NL3D::CTessNodeList::Prec</a><code> [inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06496.html#l00043">43</a> of file <a class="el" href="a06496.html">tess_list.h</a>.
+<p>
+Referenced by <a class="el" href="a06496.html#l00046">NL3D::CTessNodeList::CTessNodeList()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_6" doxytag="NL3D::CTessFace::PVBase" ></a><p>
+<table class="mdTable" 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="a03040.html">CParamCoord</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_6">NL3D::CTessFace::PVBase</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00245">245</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06155.html#l00722">NL3D::CPatch::getNumTessBlock()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l02519">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_7" doxytag="NL3D::CTessFace::PVLeft" ></a><p>
+<table class="mdTable" 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="a03040.html">CParamCoord</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_7">NL3D::CTessFace::PVLeft</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00245">245</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06155.html#l00722">NL3D::CPatch::getNumTessBlock()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_8" doxytag="NL3D::CTessFace::PVRight" ></a><p>
+<table class="mdTable" 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="a03040.html">CParamCoord</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_8">NL3D::CTessFace::PVRight</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00245">245</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06155.html#l00722">NL3D::CPatch::getNumTessBlock()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_9" doxytag="NL3D::CTessFace::RecursMarkCanMerge" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez968_9">NL3D::CTessFace::RecursMarkCanMerge</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00249">249</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l01549">canMerge()</a>, and <a class="el" href="a06497.html#l00161">CTessFace()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_10" doxytag="NL3D::CTessFace::RecursMarkForceMerge" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez968_10">NL3D::CTessFace::RecursMarkForceMerge</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00250">250</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00161">CTessFace()</a>, and <a class="el" href="a06497.html#l02412">forceMerge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFaceo5" doxytag="NL3D::CTessFace::ShadowMapTriId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03476.html#NL3D_1_1CTessFaceo5">NL3D::CTessFace::ShadowMapTriId</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00286">286</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a05862.html#l03669">NL3D::CLandscape::removeFromShadowPolyReceiver()</a>, and <a class="el" href="a06497.html#l00192">~CTessFace()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez972_3" doxytag="NL3D::CTessFace::Size" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez972_3">NL3D::CTessFace::Size</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00274">274</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, and <a class="el" href="a06497.html#l02274">unbind()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_11" doxytag="NL3D::CTessFace::SonLeft" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_11">NL3D::CTessFace::SonLeft</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00243">243</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03194">appendTessellationLeaves()</a>, <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l02448">forceMergeAtTileLevel()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06498.html#l00294">isLeaf()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l02519">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_12" doxytag="NL3D::CTessFace::SonRight" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03476.html">CTessFace</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_12">NL3D::CTessFace::SonRight</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00243">243</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l03194">appendTessellationLeaves()</a>, <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06497.html#l01549">canMerge()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06497.html#l02412">forceMerge()</a>, <a class="el" href="a06497.html#l02448">forceMergeAtTileLevel()</a>, <a class="el" href="a06497.html#l03101">getTesselatedPos()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06497.html#l02904">linkTessFaceWithEdge()</a>, <a class="el" href="a06497.html#l03017">recreateTileUvs()</a>, <a class="el" href="a06497.html#l01783">refineAll()</a>, <a class="el" href="a06497.html#l02519">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02860">updateBind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, and <a class="el" href="a06497.html#l02544">updateBindEdge()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez972_4" doxytag="NL3D::CTessFace::SplitPoint" ></a><p>
+<table class="mdTable" 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="a03476.html#NL3D_1_1CTessFacez972_4">NL3D::CTessFace::SplitPoint</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00275">275</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l00278">updateErrorMetric()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez970_1" doxytag="NL3D::CTessFace::TileFaces" ></a><p>
+<table class="mdTable" 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="a03523.html">CTileFace</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_1">NL3D::CTessFace::TileFaces</a>[NL3D_MAX_TILE_FACE]
+ </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="a06498.html#l00261">261</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06155.html#l00884">NL3D::CPatch::appendFaceToTileRenderList()</a>, <a class="el" href="a06497.html#l00511">buildTileFaces()</a>, <a class="el" href="a06497.html#l00403">checkCreateFillTileVB()</a>, <a class="el" href="a06497.html#l00424">checkFillTileVB()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l00466">copyTileUv()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l00528">deleteTileFaces()</a>, <a class="el" href="a06497.html#l00444">deleteTileUv()</a>, <a class="el" href="a06497.html#l00549">emptyTileFaces()</a>, <a class="el" href="a06497.html#l00490">heritTileUv()</a>, <a class="el" href="a06155.html#l00913">NL3D::CPatch::removeFaceFromTileRenderList()</a>, and <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez970_2" doxytag="NL3D::CTessFace::TileId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a7">uint8</a> <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_2">NL3D::CTessFace::TileId</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00257">257</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06497.html#l00565">initTileUvRGBA()</a>, and <a class="el" href="a06498.html#l00368">sameTile()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez970_3" doxytag="NL3D::CTessFace::TileMaterial" ></a><p>
+<table class="mdTable" 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="a03530.html">CTileMaterial</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez970_3">NL3D::CTessFace::TileMaterial</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00259">259</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00884">NL3D::CPatch::appendFaceToTileRenderList()</a>, <a class="el" href="a06497.html#l00675">computeTileMaterial()</a>, <a class="el" href="a06497.html#l02969">deleteTileUvs()</a>, <a class="el" href="a06497.html#l03053">heritTileMaterial()</a>, <a class="el" href="a06497.html#l00835">releaseTileMaterial()</a>, and <a class="el" href="a06155.html#l00913">NL3D::CPatch::removeFaceFromTileRenderList()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_13" doxytag="NL3D::CTessFace::VBase" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03482.html">CTessVertex</a>* <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_13">NL3D::CTessFace::VBase</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00241">241</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a05824.html#l00077">NL3D::CInstanceLighter::addTriangles()</a>, <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06497.html#l02468">averageTesselationVertices()</a>, <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06497.html#l01604">doMerge()</a>, <a class="el" href="a06155.html#l00766">NL3D::CPatch::extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l01773">NL3D::CPatch::getRootVertexForEdge()</a>, <a class="el" href="a06498.html#l00296">hasVertex()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l02519">refreshTesselationGeometry()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_14" doxytag="NL3D::CTessFace::VLeft" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03482.html">CTessVertex</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_14">NL3D::CTessFace::VLeft</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00241">241</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a05824.html#l00077">NL3D::CInstanceLighter::addTriangles()</a>, <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06155.html#l00766">NL3D::CPatch::extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l01773">NL3D::CPatch::getRootVertexForEdge()</a>, <a class="el" href="a06498.html#l00296">hasVertex()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CTessFacez968_15" doxytag="NL3D::CTessFace::VRight" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03482.html">CTessVertex</a> * <a class="el" href="a03476.html#NL3D_1_1CTessFacez968_15">NL3D::CTessFace::VRight</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06498.html#l00241">241</a> of file <a class="el" href="a06498.html">tessellation.h</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l01613">NL3D::CZoneLighter::addTriangles()</a>, <a class="el" href="a05824.html#l00077">NL3D::CInstanceLighter::addTriangles()</a>, <a class="el" href="a06497.html#l00372">allocTileUv()</a>, <a class="el" href="a06155.html#l00800">NL3D::CPatch::appendFaceToRenderList()</a>, <a class="el" href="a05862.html#l03658">NL3D::CLandscape::appendToShadowPolyReceiver()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06497.html#l00345">computeSplitPoint()</a>, <a class="el" href="a06497.html#l03156">computeTesselatedPos()</a>, <a class="el" href="a06497.html#l00234">computeTileErrorMetric()</a>, <a class="el" href="a06497.html#l00161">CTessFace()</a>, <a class="el" href="a06155.html#l00766">NL3D::CPatch::extendTessBlockWithEndPos()</a>, <a class="el" href="a06155.html#l01773">NL3D::CPatch::getRootVertexForEdge()</a>, <a class="el" href="a06498.html#l00296">hasVertex()</a>, <a class="el" href="a06155.html#l01124">NL3D::CPatch::makeRoots()</a>, <a class="el" href="a06497.html#l01283">split()</a>, <a class="el" href="a06497.html#l00911">splitRectangular()</a>, <a class="el" href="a06497.html#l02274">unbind()</a>, <a class="el" href="a06497.html#l02643">updateBindAndSplit()</a>, <a class="el" href="a06497.html#l00873">updateNearFarVertices()</a>, <a class="el" href="a06497.html#l02108">updateRefineMerge()</a>, and <a class="el" href="a06497.html#l01900">updateRefineSplit()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06498.html">tessellation.h</a><li><a class="el" href="a06497.html">tessellation.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:48:38 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>