aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03070.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/a03070.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a03070.html563
1 files changed, 563 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03070.html b/docs/doxygen/nel/a03070.html
new file mode 100644
index 00000000..7ebbff10
--- /dev/null
+++ b/docs/doxygen/nel/a03070.html
@@ -0,0 +1,563 @@
+<!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::CPatchUVLocator 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::CPatchUVLocator Class Reference</h1><code>#include &lt;<a class="el" href="a06166.html">patchuv_locator.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+From a patch and UV coordinate in [0,OrderS], [0,OrderT], retrieve the appropriate coordinate in neighborhood. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00045">45</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></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="a03070.html#NL3D_1_1CPatchUVLocatora0">build</a> (const <a class="el" href="a03057.html">CPatch</a> *patchCenter, <a class="el" href="a04558.html#a14">sint</a> edgeCenter, <a class="el" href="a03058.html">CPatch::CBindInfo</a> &amp;bindInfo)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatora1">locateUV</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uvIn, <a class="el" href="a04558.html#a15">uint</a> patch, <a class="el" href="a03057.html">CPatch</a> *&amp;patchOut, <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uvOut)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatora2">sameEdgeOrder</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatora3">selectPatch</a> (const <a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;uvIn)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatorr0">_CenterPatch</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="a03070.html#NL3D_1_1CPatchUVLocatorr1">_CenterPatchEdge</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03071.html">CUVBasis</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatorr2">_NeighborBasis</a> [4]</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="a03070.html#NL3D_1_1CPatchUVLocatorr3">_NeighborPatch</a> [4]</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="a03070.html#NL3D_1_1CPatchUVLocatorr4">_NPatchs</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatorr5">_SameEdgeOrder</a></td></tr>
+
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatora0" doxytag="NL3D::CPatchUVLocator::build" ></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::CPatchUVLocator::build </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03057.html">CPatch</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>patchCenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>edgeCenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03058.html">CPatch::CBindInfo</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bindInfo</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="a06165.html#l00038">38</a> of file <a class="el" href="a06165.html">patchuv_locator.cpp</a>.
+<p>
+References <a class="el" href="a06166.html#l00082">_CenterPatch</a>, <a class="el" href="a06166.html#l00083">_CenterPatchEdge</a>, <a class="el" href="a06166.html#l00086">_NeighborBasis</a>, <a class="el" href="a06166.html#l00085">_NeighborPatch</a>, <a class="el" href="a06166.html#l00084">_NPatchs</a>, <a class="el" href="a06166.html#l00087">_SameEdgeOrder</a>, <a class="el" href="a06156.html#l00322">NL3D::CPatch::CBindInfo::Edge</a>, <a class="el" href="a06155.html#l02196">NL3D::CPatch::getOrderForEdge()</a>, <a class="el" href="a06156.html#l00392">NL3D::CPatch::getOrderS()</a>, <a class="el" href="a06156.html#l00393">NL3D::CPatch::getOrderT()</a>, <a class="el" href="a06156.html#l00318">NL3D::CPatch::CBindInfo::MultipleBindId</a>, <a class="el" href="a06156.html#l00316">NL3D::CPatch::CBindInfo::MultipleBindNum</a>, <a class="el" href="a06156.html#l00321">NL3D::CPatch::CBindInfo::Next</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06156.html#l00312">NL3D::CPatch::CBindInfo::NPatchs</a>, <a class="el" href="a06677.html#l00110">NLMISC::CVector2f::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06166.html#l00073">NL3D::CPatchUVLocator::CUVBasis::UvI</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>, and <a class="el" href="a06156.html#l00309">NL3D::CPatch::CBindInfo::Zone</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, <a class="el" href="a06155.html#l01363">NL3D::CPatch::computeContinousVertex()</a>, <a class="el" href="a06158.html#l00471">NL3D::CPatch::computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">NL3D::CPatch::computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00422">NL3D::CPatch::computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06157.html#l00864">NL3D::CPatch::computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">NL3D::CPatch::computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">NL3D::CPatch::computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">NL3D::CPatch::computeNormalOnNeighbor()</a>, and <a class="el" href="a06157.html#l00799">NL3D::CPatch::computeTileLightmapPixelAroundCorner()</a>.
+<p>
+<div class="fragment"><pre>00039 {
+00040 <a class="code" href="a04199.html#a6">nlassert</a>(bindInfo.Zone);
+00041 <span class="comment">// copy basic. NB: NPatchs==0 means patchCenter is binded on a 1/X patch.</span>
+00042 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr0">_CenterPatch</a>= const_cast&lt;CPatch*&gt;(patchCenter);
+00043 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr1">_CenterPatchEdge</a>= edgeCenter;
+00044 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr4">_NPatchs</a>= bindInfo.NPatchs;
+00045
+00046
+00047 <span class="comment">// set it to true. false-d if one of the neighbor patch does not have same number of tile.</span>
+00048 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr5">_SameEdgeOrder</a>= <span class="keyword">true</span>;
+00049
+00050
+00051 <span class="comment">// For all patchs binded to me.</span>
+00052 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0; i&lt;<a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr4">_NPatchs</a>; i++)
+00053 {
+00054 <span class="comment">// The edge of the neihbor on which we are binded.</span>
+00055 <a class="code" href="a04558.html#a14">sint</a> edgeNeighbor= bindInfo.Edge[i];
+00056 CPatch *paNeighbor= bindInfo.Next[i];
+00057 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr3">_NeighborPatch</a>[i]= paNeighbor;
+00058
+00059
+00060 <span class="comment">// Find uvI, uvJ, uvP such that: </span>
+00061 <span class="comment">// uvOut= uvIn.x * uvI + uvIn.y * uvJ + uvP.</span>
+00062 <a class="code" href="a03660.html">CVector2f</a> &amp;uvI= <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr2">_NeighborBasis</a>[i].<a class="code" href="a03071.html#NL3D_1_1CPatchUVLocator_1_1CUVBasiso0">UvI</a>;
+00063 <a class="code" href="a03660.html">CVector2f</a> &amp;uvJ= _NeighborBasis[i].UvJ;
+00064 <a class="code" href="a03660.html">CVector2f</a> &amp;uvP= _NeighborBasis[i].UvP;
+00065
+00066
+00067 <span class="comment">// Find the basis MeToNeighbor.</span>
+00068 <span class="comment">//=============================</span>
+00069 <a class="code" href="a04558.html#a14">sint</a> rotation= (edgeCenter - edgeNeighbor + 4) &amp; 3;
+00070 <span class="comment">// Find scale to apply.</span>
+00071 <span class="keywordtype">float</span> scX, scY;
+00072 <span class="comment">// If our neighbor edge is a vertical edge</span>
+00073 <span class="keywordflow">if</span>( (edgeNeighbor&amp;1)==0 )
+00074 {
+00075 scX= 1;
+00076
+00077 <span class="comment">// Manage difference of Order at the edge.</span>
+00078 scY= (<span class="keywordtype">float</span>)paNeighbor-&gt;getOrderForEdge(edgeNeighbor) / (<span class="keywordtype">float</span>)patchCenter-&gt;getOrderForEdge(edgeCenter);
+00079 <span class="comment">// Manage bind on the edge.</span>
+00080 <span class="comment">// If patchCenter is binded on a bigger</span>
+00081 <span class="keywordflow">if</span>(bindInfo.MultipleBindNum!=0)
+00082 scY/= bindInfo.MultipleBindNum;
+00083 <span class="keywordflow">if</span>(_NPatchs&gt;1)
+00084 scY*= _NPatchs;
+00085 <span class="comment">// same TileOrder on the edge??</span>
+00086 <span class="keywordflow">if</span>(scY!=1)
+00087 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr5">_SameEdgeOrder</a>= <span class="keyword">false</span>;
+00088 }
+00089 <span class="keywordflow">else</span>
+00090 {
+00091 scY= 1;
+00092
+00093 <span class="comment">// Manage difference of Order at the edge.</span>
+00094 scX= (<span class="keywordtype">float</span>)paNeighbor-&gt;getOrderForEdge(edgeNeighbor) / (<span class="keywordtype">float</span>)patchCenter-&gt;getOrderForEdge(edgeCenter);
+00095 <span class="comment">// Manage bind on the edge.</span>
+00096 <span class="comment">// If patchCenter is binded on a bigger</span>
+00097 <span class="keywordflow">if</span>(bindInfo.MultipleBindNum!=0)
+00098 scX/= bindInfo.MultipleBindNum;
+00099 <span class="keywordflow">if</span>(_NPatchs&gt;1)
+00100 scX*= _NPatchs;
+00101 <span class="comment">// same TileOrder on the edge??</span>
+00102 <span class="keywordflow">if</span>(scX!=1)
+00103 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr5">_SameEdgeOrder</a>= <span class="keyword">false</span>;
+00104 }
+00105 <span class="comment">// Find rotation to apply.</span>
+00106 <span class="keywordflow">switch</span>(rotation)
+00107 {
+00108 <span class="keywordflow">case</span> 0: uvI.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(-scX, 0); uvJ.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, -scY); <span class="keywordflow">break</span>;
+00109 <span class="keywordflow">case</span> 1: uvI.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, -scY); uvJ.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(scX, 0); <span class="keywordflow">break</span>;
+00110 <span class="keywordflow">case</span> 2: uvI.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(scX, 0); uvJ.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, scY); <span class="keywordflow">break</span>;
+00111 <span class="keywordflow">case</span> 3: uvI.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, scY); uvJ.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(-scX, 0); <span class="keywordflow">break</span>;
+00112 }
+00113
+00114
+00115 <span class="comment">// Find the position.</span>
+00116 <span class="comment">//=============================</span>
+00117 <span class="comment">// Find the uv coord at start of the edge, for 2 patchs.</span>
+00118 <a class="code" href="a03660.html">CVector2f</a> uvCenter;
+00119 <a class="code" href="a03660.html">CVector2f</a> uvNeighbor;
+00120 <span class="keywordtype">float</span> decal;
+00121
+00122 <span class="comment">// find the uv at start of edgeCenter, + decal due to bind 1/X.</span>
+00123 <span class="keywordtype">float</span> ocS= patchCenter-&gt;getOrderS();
+00124 <span class="keywordtype">float</span> ocT= patchCenter-&gt;getOrderT();
+00125 <span class="comment">// Manage Bind 1/X.</span>
+00126 <span class="keywordflow">if</span>(_NPatchs&gt;1)
+00127 {
+00128 <span class="comment">// Move uvCenter, so it is near the position at start of edgeNeighbor.</span>
+00129 decal= (<span class="keywordtype">float</span>)i / _NPatchs;
+00130 }
+00131 <span class="keywordflow">else</span>
+00132 decal= 0;
+00133 <span class="comment">// Manage rotation.</span>
+00134 <span class="keywordflow">switch</span>(edgeCenter)
+00135 {
+00136 <span class="keywordflow">case</span> 0: uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, decal*ocT); <span class="keywordflow">break</span>;
+00137 <span class="keywordflow">case</span> 1: uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(decal*ocS, ocT); <span class="keywordflow">break</span>;
+00138 <span class="keywordflow">case</span> 2: uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(ocS, (1-decal)*ocT); <span class="keywordflow">break</span>;
+00139 <span class="keywordflow">case</span> 3: uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>((1-decal)*ocS, 0); <span class="keywordflow">break</span>;
+00140 };
+00141
+00142 <span class="comment">// find the uv at start of edgeNeighbor, + decal due to bind X/1.</span>
+00143 <span class="keywordtype">float</span> onS= paNeighbor-&gt;getOrderS();
+00144 <span class="keywordtype">float</span> onT= paNeighbor-&gt;getOrderT();
+00145 <span class="comment">// Manage Bind X/1.</span>
+00146 <span class="keywordflow">if</span>(bindInfo.MultipleBindNum!=0)
+00147 {
+00148 <span class="comment">// Must invert the id, because of mirror.... (make a draw).</span>
+00149 <a class="code" href="a04558.html#a14">sint</a> <span class="keywordtype">id</span>= (bindInfo.MultipleBindNum-1) - bindInfo.MultipleBindId;
+00150 <span class="comment">// Move uvNeighbor, so it is near the position at start of edgeCenter.</span>
+00151 decal= (<span class="keywordtype">float</span>)<span class="keywordtype">id</span> / bindInfo.MultipleBindNum;
+00152 }
+00153 <span class="keywordflow">else</span>
+00154 decal= 0;
+00155 <span class="comment">// Manage rotation.</span>
+00156 <span class="keywordflow">switch</span>(edgeNeighbor)
+00157 {
+00158 <span class="keywordflow">case</span> 0: uvNeighbor.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(0, (1-decal)*onT); <span class="keywordflow">break</span>;
+00159 <span class="keywordflow">case</span> 1: uvNeighbor.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>((1-decal)*onS, onT); <span class="keywordflow">break</span>;
+00160 <span class="keywordflow">case</span> 2: uvNeighbor.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(onS, decal*onT); <span class="keywordflow">break</span>;
+00161 <span class="keywordflow">case</span> 3: uvNeighbor.<a class="code" href="a03660.html#NLMISC_1_1CVector2fz2067_6">set</a>(decal*onS, 0); <span class="keywordflow">break</span>;
+00162 };
+00163
+00164
+00165
+00166 <span class="comment">// uvOut= uvIn.x * uvI + uvIn.y * uvJ + uvP.</span>
+00167 <span class="comment">// So uvP = uvOut - uvIn.x * uvI - uvIn.y * uvJ</span>
+00168 uvP= uvNeighbor - uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a> * uvI - uvCenter.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a> * uvJ;
+00169
+00170 }
+00171 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatora1" doxytag="NL3D::CPatchUVLocator::locateUV" ></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::CPatchUVLocator::locateUV </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>uvIn</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>patch</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03057.html">CPatch</a> *&amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>patchOut</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03660.html">NLMISC::CVector2f</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>uvOut</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="a06165.html#l00202">202</a> of file <a class="el" href="a06165.html">patchuv_locator.cpp</a>.
+<p>
+References <a class="el" href="a06166.html#l00086">_NeighborBasis</a>, <a class="el" href="a06166.html#l00085">_NeighborPatch</a>, <a class="el" href="a06166.html#l00084">_NPatchs</a>, <a class="el" href="a06166.html#l00075">NL3D::CPatchUVLocator::CUVBasis::mulPoint()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01363">NL3D::CPatch::computeContinousVertex()</a>, <a class="el" href="a06158.html#l00471">NL3D::CPatch::computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">NL3D::CPatch::computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00422">NL3D::CPatch::computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06157.html#l00864">NL3D::CPatch::computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">NL3D::CPatch::computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">NL3D::CPatch::computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">NL3D::CPatch::computeNormalOnNeighbor()</a>, and <a class="el" href="a06157.html#l00799">NL3D::CPatch::computeTileLightmapPixelAroundCorner()</a>.
+<p>
+<div class="fragment"><pre>00203 {
+00204 <span class="keywordflow">if</span>(<a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr4">_NPatchs</a>==1)
+00205 {
+00206 <span class="comment">// Change basis and select good patch.</span>
+00207 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr2">_NeighborBasis</a>[0].<a class="code" href="a03071.html#NL3D_1_1CPatchUVLocator_1_1CUVBasisa0">mulPoint</a>(uvIn, uvOut);
+00208 patchOut= <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr3">_NeighborPatch</a>[0];
+00209 }
+00210 <span class="keywordflow">else</span>
+00211 {
+00212 <span class="comment">// Change basis and select good patch.</span>
+00213 <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr2">_NeighborBasis</a>[patch].<a class="code" href="a03071.html#NL3D_1_1CPatchUVLocator_1_1CUVBasisa0">mulPoint</a>(uvIn, uvOut);
+00214 patchOut= <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr3">_NeighborPatch</a>[patch];
+00215 }
+00216 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatora2" doxytag="NL3D::CPatchUVLocator::sameEdgeOrder" ></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::CPatchUVLocator::sameEdgeOrder </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>
+return true only if the 2 edges have same number of tiles. bind 1/X case: return true only if ALL the adjacents patchs respect this rule. So you are sure that for all the src patch, one tile has exaclty one neighbor tile near him.
+<p>
+Definition at line <a class="el" href="a06166.html#l00066">66</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+References <a class="el" href="a06166.html#l00087">_SameEdgeOrder</a>.
+<p>
+Referenced by <a class="el" href="a06764.html#l00042">NL3D::CZoneCornerSmoother::buildPatchBindInfo()</a>, and <a class="el" href="a06157.html#l00864">NL3D::CPatch::computeNearBlockLightmap()</a>.
+<p>
+<div class="fragment"><pre>00066 {<span class="keywordflow">return</span> <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr5">_SameEdgeOrder</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatora3" doxytag="NL3D::CPatchUVLocator::selectPatch" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CPatchUVLocator::selectPatch </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="mdname1" valign="top" nowrap> <em>uvIn</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06165.html#l00175">175</a> of file <a class="el" href="a06165.html">patchuv_locator.cpp</a>.
+<p>
+References <a class="el" href="a06166.html#l00082">_CenterPatch</a>, <a class="el" href="a06166.html#l00083">_CenterPatchEdge</a>, <a class="el" href="a06166.html#l00084">_NPatchs</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06156.html#l00392">NL3D::CPatch::getOrderS()</a>, <a class="el" href="a06156.html#l00393">NL3D::CPatch::getOrderT()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::x</a>, and <a class="el" href="a06677.html#l00052">NLMISC::CVector2f::y</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l01847">NL3D::CPatch::bind()</a>, <a class="el" href="a06155.html#l01363">NL3D::CPatch::computeContinousVertex()</a>, <a class="el" href="a06158.html#l00471">NL3D::CPatch::computeDisplaceCornerSmooth()</a>, <a class="el" href="a06158.html#l00288">NL3D::CPatch::computeDisplaceEdgeSmooth()</a>, <a class="el" href="a06158.html#l00422">NL3D::CPatch::computeDisplaceRawOnNeighbor()</a>, <a class="el" href="a06157.html#l00864">NL3D::CPatch::computeNearBlockLightmap()</a>, <a class="el" href="a06158.html#l00728">NL3D::CPatch::computeNormalCornerSmooth()</a>, <a class="el" href="a06158.html#l00588">NL3D::CPatch::computeNormalEdgeSmooth()</a>, <a class="el" href="a06158.html#l00675">NL3D::CPatch::computeNormalOnNeighbor()</a>, and <a class="el" href="a06157.html#l00799">NL3D::CPatch::computeTileLightmapPixelAroundCorner()</a>.
+<p>
+<div class="fragment"><pre>00176 {
+00177 <span class="keywordflow">if</span>(<a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr4">_NPatchs</a>==1)
+00178 <span class="keywordflow">return</span> 0;
+00179 <span class="keywordflow">else</span>
+00180 {
+00181 <span class="comment">// Choice before on which patch we must go.</span>
+00182 <span class="keywordtype">float</span> selection=0.0;
+00183 <a class="code" href="a04558.html#a15">uint</a> os= <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr0">_CenterPatch</a>-&gt;getOrderS();
+00184 <a class="code" href="a04558.html#a15">uint</a> ot= <a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr0">_CenterPatch</a>-&gt;getOrderT();
+00185 <span class="keywordflow">switch</span>(<a class="code" href="a03070.html#NL3D_1_1CPatchUVLocatorr1">_CenterPatchEdge</a>)
+00186 {
+00187 <span class="keywordflow">case</span> 0: selection= uvIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a> / ot; <span class="keywordflow">break</span>;
+00188 <span class="keywordflow">case</span> 1: selection= uvIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a> / os; <span class="keywordflow">break</span>;
+00189 <span class="keywordflow">case</span> 2: selection= (ot-uvIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo1">y</a>) / ot; <span class="keywordflow">break</span>;
+00190 <span class="keywordflow">case</span> 3: selection= (os-uvIn.<a class="code" href="a03660.html#NLMISC_1_1CVector2fo0">x</a>) / os; <span class="keywordflow">break</span>;
+00191 }
+00192
+00193 <a class="code" href="a04558.html#a14">sint</a> sel= (<a class="code" href="a04558.html#a14">sint</a>)floor(selection*_NPatchs);
+00194 <a class="code" href="a05378.html#a374">clamp</a>(sel, 0, _NPatchs-1);
+00195
+00196 <span class="keywordflow">return</span> sel;
+00197 }
+00198 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr0" doxytag="NL3D::CPatchUVLocator::_CenterPatch" ></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="a03070.html#NL3D_1_1CPatchUVLocatorr0">NL3D::CPatchUVLocator::_CenterPatch</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00082">82</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, and <a class="el" href="a06165.html#l00175">selectPatch()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr1" doxytag="NL3D::CPatchUVLocator::_CenterPatchEdge" ></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="a03070.html#NL3D_1_1CPatchUVLocatorr1">NL3D::CPatchUVLocator::_CenterPatchEdge</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00083">83</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, and <a class="el" href="a06165.html#l00175">selectPatch()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr2" doxytag="NL3D::CPatchUVLocator::_NeighborBasis" ></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="a03071.html">CUVBasis</a> <a class="el" href="a03070.html#NL3D_1_1CPatchUVLocatorr2">NL3D::CPatchUVLocator::_NeighborBasis</a>[4]<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00086">86</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, and <a class="el" href="a06165.html#l00202">locateUV()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr3" doxytag="NL3D::CPatchUVLocator::_NeighborPatch" ></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="a03070.html#NL3D_1_1CPatchUVLocatorr3">NL3D::CPatchUVLocator::_NeighborPatch</a>[4]<code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00085">85</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, and <a class="el" href="a06165.html#l00202">locateUV()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr4" doxytag="NL3D::CPatchUVLocator::_NPatchs" ></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="a03070.html#NL3D_1_1CPatchUVLocatorr4">NL3D::CPatchUVLocator::_NPatchs</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00084">84</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, <a class="el" href="a06165.html#l00202">locateUV()</a>, and <a class="el" href="a06165.html#l00175">selectPatch()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CPatchUVLocatorr5" doxytag="NL3D::CPatchUVLocator::_SameEdgeOrder" ></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="a03070.html#NL3D_1_1CPatchUVLocatorr5">NL3D::CPatchUVLocator::_SameEdgeOrder</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06166.html#l00087">87</a> of file <a class="el" href="a06166.html">patchuv_locator.h</a>.
+<p>
+Referenced by <a class="el" href="a06165.html#l00038">build()</a>, and <a class="el" href="a06166.html#l00066">sameEdgeOrder()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06166.html">patchuv_locator.h</a><li><a class="el" href="a06165.html">patchuv_locator.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:01:14 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>