aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02258.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a02258.html')
-rw-r--r--docs/doxygen/nel/a02258.html1001
1 files changed, 1001 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02258.html b/docs/doxygen/nel/a02258.html
new file mode 100644
index 00000000..c571569b
--- /dev/null
+++ b/docs/doxygen/nel/a02258.html
@@ -0,0 +1,1001 @@
+<!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::CBezierPatch 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::CBezierPatch Class Reference</h1><code>#include &lt;<a class="el" href="a05479.html">bezier_patch.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A standard bezier patch of float. (quadpatch only). QuadPatch layout (same notations as 3ds Max SDK).<p>
+0 ---s---&gt; 3<p>
+A---&gt; ad ---- da &lt;---D | | | | | | v v | ab ia id dc t | | | | | | v ba ib ic cd ^ ^ | | | | B---&gt; bc ---- cb &lt;---C 1 2<p>
+<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="a05479.html#l00073">73</a> of file <a class="el" href="a05479.html">bezier_patch.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="a02258.html#NL3D_1_1CBezierPatcha0">applyMatrix</a> (const <a class="el" href="a02851.html">CMatrix</a> &amp;m)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do the matrix transformation m*patch. <a href="#NL3D_1_1CBezierPatcha0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02258.html#NL3D_1_1CBezierPatcha1">CBezierPatch</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor: undefined Bezier patch!! <a href="#NL3D_1_1CBezierPatcha1"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcha2">eval</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate. <a href="#NL3D_1_1CBezierPatcha2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03664.html">CVectorD</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02258.html#NL3D_1_1CBezierPatcha3">evalDouble</a> (double <a class="el" href="a04223.html#a626">s</a>, double <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate, but return a vector double. <a href="#NL3D_1_1CBezierPatcha3"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcha4">evalNormal</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate the normal at (s,t). returned vector is normalized. <a href="#NL3D_1_1CBezierPatcha4"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcha5">evalTangentS</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate the tangentS at (s,t). returned vector is normalized. <a href="#NL3D_1_1CBezierPatcha5"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcha6">evalTangentT</a> (float <a class="el" href="a04223.html#a626">s</a>, float <a class="el" href="a04223.html#a627">t</a>) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate the tangentT at (s,t). returned vector is normalized. <a href="#NL3D_1_1CBezierPatcha6"></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="a02258.html#NL3D_1_1CBezierPatcha7">make</a> (<a class="el" href="a03128.html">CVector</a> vertices[4], <a class="el" href="a03128.html">CVector</a> normals[4])</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">complete computation of Vertices, Tangents, and Interiors, provinding the vertices and vertex normals. <a href="#NL3D_1_1CBezierPatcha7"></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="a02258.html#NL3D_1_1CBezierPatcha8">makeInteriors</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">make default Interiors, according to Vertices and Tangents. <a href="#NL3D_1_1CBezierPatcha8"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Subdivision.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02258.html#NL3D_1_1CBezierPatchz37_0">subdivideS</a> (<a class="el" href="a02258.html">CBezierPatch</a> &amp;left, <a class="el" href="a02258.html">CBezierPatch</a> &amp;right, float <a class="el" href="a04223.html#a626">s</a>=0.5f) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02258.html#NL3D_1_1CBezierPatchz37_1">subdivideT</a> (<a class="el" href="a02258.html">CBezierPatch</a> &amp;top, <a class="el" href="a02258.html">CBezierPatch</a> &amp;bottom, float <a class="el" href="a04223.html#a627">t</a>=0.5f) const </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="a03128.html">CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a> [4]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The interiors, ia,ib,ic,id. NB: interiors are points, not vectors. <a href="#NL3D_1_1CBezierPatcho0"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcho1">Tangents</a> [8]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The tangents ab, ba, bc, cb, cd, dc, da, ad. NB: tangents are points, not vectors. <a href="#NL3D_1_1CBezierPatcho1"></a><br><br></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="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a> [4]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The vertices a,b,c,d of the quad patch. <a href="#NL3D_1_1CBezierPatcho2"></a><br><br></td></tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NL3D_1_1CBezierPatcha1" doxytag="NL3D::CBezierPatch::CBezierPatch" ></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::CBezierPatch::CBezierPatch </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> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor: undefined Bezier patch!!
+<p>
+
+<p>
+Definition at line <a class="el" href="a05479.html#l00086">86</a> of file <a class="el" href="a05479.html">bezier_patch.h</a>.
+<p>
+<div class="fragment"><pre>00086 {}
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CBezierPatcha0" doxytag="NL3D::CBezierPatch::applyMatrix" ></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::CBezierPatch::applyMatrix </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02851.html">CMatrix</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>m</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>
+Do the matrix transformation m*patch.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00073">73</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+<div class="fragment"><pre>00074 {
+00075 <a class="code" href="a04558.html#a14">sint</a> i;
+00076
+00077 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00078 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a>[i]= m*<a class="code" href="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a>[i];
+00079 <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
+00080 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho1">Tangents</a>[i]= m*<a class="code" href="a02258.html#NL3D_1_1CBezierPatcho1">Tangents</a>[i];
+00081 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00082 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[i]= m*<a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[i];
+00083 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha2" doxytag="NL3D::CBezierPatch::eval" ></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> NL3D::CBezierPatch::eval </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</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>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Evaluate.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00105">105</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05478.html#l00087">NL3D::mulAdd()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00955">NL3D::CPatch::appendTileMaterialToRenderList()</a>, <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</a>, <a class="el" href="a06162.html#l00294">NL3D::CPatch::createVegetableBlock()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, and <a class="el" href="a05876.html#l00089">NL3D::CLandscapeVegetableBlock::init()</a>.
+<p>
+<div class="fragment"><pre>00106 {
+00107 CVector p;
+00108
+00109 <span class="keywordtype">float</span> ps2 = ps * ps;
+00110 <span class="keywordtype">float</span> ps1 = 1.0f - ps;
+00111 <span class="keywordtype">float</span> ps12 = ps1 * ps1;
+00112 <span class="keywordtype">float</span> s0 = ps12 * ps1;
+00113 <span class="keywordtype">float</span> s1 = 3.0f * ps * ps12;
+00114 <span class="keywordtype">float</span> s2 = 3.0f * ps2 * ps1;
+00115 <span class="keywordtype">float</span> s3 = ps2 * ps;
+00116 <span class="keywordtype">float</span> pt2 = pt * pt;
+00117 <span class="keywordtype">float</span> pt1 = 1.0f - pt;
+00118 <span class="keywordtype">float</span> pt12 = pt1 * pt1;
+00119 <span class="keywordtype">float</span> t0 = pt12 * pt1;
+00120 <span class="keywordtype">float</span> t1 = 3.0f * pt * pt12;
+00121 <span class="keywordtype">float</span> t2 = 3.0f * pt2 * pt1;
+00122 <span class="keywordtype">float</span> t3 = pt2 * pt;
+00123
+00124 p.set(0,0,0);
+00125 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Vertices[0] , s0 * t0);
+00126 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[7] , s1 * t0);
+00127 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[6] , s2 * t0);
+00128 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Vertices[3] , s3 * t0);
+00129 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[0] , s0 * t1);
+00130 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Interiors[0], s1 * t1);
+00131 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Interiors[3], s2 * t1);
+00132 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[5] , s3 * t1);
+00133 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[1] , s0 * t2);
+00134 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Interiors[1], s1 * t2);
+00135 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Interiors[2], s2 * t2);
+00136 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[4] , s3 * t2);
+00137 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Vertices[1] , s0 * t3);
+00138 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[2] , s1 * t3);
+00139 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Tangents[3] , s2 * t3);
+00140 <a class="code" href="a05363.html#a369">mulAdd</a>(p, Vertices[2] , s3 * t3);
+00141
+00142 <span class="keywordflow">return</span> p;
+00143 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha3" doxytag="NL3D::CBezierPatch::evalDouble" ></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="a03664.html">CVectorD</a> NL3D::CBezierPatch::evalDouble </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>double&nbsp;</td>
+ <td class="mdname" nowrap> <em>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Evaluate, but return a vector double.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00145">145</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05478.html#l00096">NL3D::mulAddD()</a>, <a class="el" href="a06685.html#l00136">NLMISC::CVectorD::set()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+<div class="fragment"><pre>00146 {
+00147 <a class="code" href="a03664.html">CVectorD</a> p;
+00148
+00149 <span class="keywordtype">double</span> ps2 = ps * ps;
+00150 <span class="keywordtype">double</span> ps1 = 1.0f - ps;
+00151 <span class="keywordtype">double</span> ps12 = ps1 * ps1;
+00152 <span class="keywordtype">double</span> s0 = ps12 * ps1;
+00153 <span class="keywordtype">double</span> s1 = 3.0f * ps * ps12;
+00154 <span class="keywordtype">double</span> s2 = 3.0f * ps2 * ps1;
+00155 <span class="keywordtype">double</span> s3 = ps2 * ps;
+00156 <span class="keywordtype">double</span> pt2 = pt * pt;
+00157 <span class="keywordtype">double</span> pt1 = 1.0f - pt;
+00158 <span class="keywordtype">double</span> pt12 = pt1 * pt1;
+00159 <span class="keywordtype">double</span> t0 = pt12 * pt1;
+00160 <span class="keywordtype">double</span> t1 = 3.0f * pt * pt12;
+00161 <span class="keywordtype">double</span> t2 = 3.0f * pt2 * pt1;
+00162 <span class="keywordtype">double</span> t3 = pt2 * pt;
+00163
+00164 p.<a class="code" href="a03664.html#NLMISC_1_1CVectorDz2079_9">set</a>(0,0,0);
+00165 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Vertices[0] , s0 * t0);
+00166 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[7] , s1 * t0);
+00167 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[6] , s2 * t0);
+00168 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Vertices[3] , s3 * t0);
+00169 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[0] , s0 * t1);
+00170 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Interiors[0], s1 * t1);
+00171 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Interiors[3], s2 * t1);
+00172 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[5] , s3 * t1);
+00173 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[1] , s0 * t2);
+00174 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Interiors[1], s1 * t2);
+00175 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Interiors[2], s2 * t2);
+00176 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[4] , s3 * t2);
+00177 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Vertices[1] , s0 * t3);
+00178 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[2] , s1 * t3);
+00179 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Tangents[3] , s2 * t3);
+00180 <a class="code" href="a05363.html#a370">mulAddD</a>(p, Vertices[2] , s3 * t3);
+00181
+00182 <span class="keywordflow">return</span> p;
+00183 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha4" doxytag="NL3D::CBezierPatch::evalNormal" ></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> NL3D::CBezierPatch::evalNormal </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</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>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Evaluate the normal at (s,t). returned vector is normalized.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00187">187</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05478.html#l00087">NL3D::mulAdd()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00955">NL3D::CPatch::appendTileMaterialToRenderList()</a>, <a class="el" href="a06768.html#l02045">NL3D::CZoneLighter::buildZoneInformation()</a>, <a class="el" href="a06158.html#l00874">NL3D::CPatch::computeNoise()</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>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>, <a class="el" href="a06768.html#l01506">NL3D::CZoneLighter::getNormal()</a>, and <a class="el" href="a06768.html#l03346">NL3D::CZoneLighter::processZonePointLightRT()</a>.
+<p>
+<div class="fragment"><pre>00188 {
+00189 CVector tgtS, tgtT;
+00190
+00191 <span class="keywordtype">float</span> s0,s1,s2,s3;
+00192 <span class="keywordtype">float</span> t0,t1,t2,t3;
+00193 <span class="keywordtype">float</span> ps2 = ps * ps;
+00194 <span class="keywordtype">float</span> ps1 = 1.0f - ps;
+00195 <span class="keywordtype">float</span> ps12 = ps1 * ps1;
+00196 <span class="keywordtype">float</span> pt2 = pt * pt;
+00197 <span class="keywordtype">float</span> pt1 = 1.0f - pt;
+00198 <span class="keywordtype">float</span> pt12 = pt1 * pt1;
+00199
+00200 <span class="comment">// Compute tangentS</span>
+00201 <span class="comment">//=================</span>
+00202 <span class="comment">// s/ds.</span>
+00203 s0 = -3* ps12;
+00204 s1 = 9*ps2 + 3 -12*ps;
+00205 s2 =-9*ps2 + 6*ps ;
+00206 s3 = 3* ps2;
+00207 <span class="comment">// t/dt.</span>
+00208 t0 = pt12 * pt1;
+00209 t1 = 3.0f * pt * pt12;
+00210 t2 = 3.0f * pt2 * pt1;
+00211 t3 = pt2 * pt;
+00212
+00213 tgtS.set(0,0,0);
+00214 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[0] , s0 * t0);
+00215 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[7] , s1 * t0);
+00216 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[6] , s2 * t0);
+00217 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[3] , s3 * t0);
+00218 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[0] , s0 * t1);
+00219 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[0], s1 * t1);
+00220 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[3], s2 * t1);
+00221 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[5] , s3 * t1);
+00222 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[1] , s0 * t2);
+00223 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[1], s1 * t2);
+00224 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[2], s2 * t2);
+00225 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[4] , s3 * t2);
+00226 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[1] , s0 * t3);
+00227 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[2] , s1 * t3);
+00228 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[3] , s2 * t3);
+00229 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[2] , s3 * t3);
+00230
+00231 <span class="comment">// Compute tangentT</span>
+00232 <span class="comment">//=================</span>
+00233 <span class="comment">// s/ds.</span>
+00234 s0 = ps12 * ps1;
+00235 s1 = 3.0f * ps * ps12;
+00236 s2 = 3.0f * ps2 * ps1;
+00237 s3 = ps2 * ps;
+00238 <span class="comment">// t/dt.</span>
+00239 t0 = -3* pt12;
+00240 t1 = 9*pt2 + 3 -12*pt;
+00241 t2 =-9*pt2 + 6*pt ;
+00242 t3 = 3* pt2;
+00243
+00244 tgtT.set(0,0,0);
+00245 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[0] , s0 * t0);
+00246 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[7] , s1 * t0);
+00247 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[6] , s2 * t0);
+00248 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[3] , s3 * t0);
+00249 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[0] , s0 * t1);
+00250 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[0], s1 * t1);
+00251 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[3], s2 * t1);
+00252 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[5] , s3 * t1);
+00253 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[1] , s0 * t2);
+00254 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[1], s1 * t2);
+00255 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[2], s2 * t2);
+00256 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[4] , s3 * t2);
+00257 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[1] , s0 * t3);
+00258 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[2] , s1 * t3);
+00259 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[3] , s2 * t3);
+00260 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[2] , s3 * t3);
+00261
+00262
+00263 <span class="comment">// Return the normal.</span>
+00264 CVector norm= tgtT^tgtS;
+00265 norm.normalize();
+00266 <span class="keywordflow">return</span> norm;
+00267 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha5" doxytag="NL3D::CBezierPatch::evalTangentS" ></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> NL3D::CBezierPatch::evalTangentS </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</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>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Evaluate the tangentS at (s,t). returned vector is normalized.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00271">271</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05478.html#l00087">NL3D::mulAdd()</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+<div class="fragment"><pre>00272 {
+00273 CVector tgtS;
+00274
+00275 <span class="keywordtype">float</span> s0,s1,s2,s3;
+00276 <span class="keywordtype">float</span> t0,t1,t2,t3;
+00277 <span class="keywordtype">float</span> ps2 = ps * ps;
+00278 <span class="keywordtype">float</span> ps1 = 1.0f - ps;
+00279 <span class="keywordtype">float</span> ps12 = ps1 * ps1;
+00280 <span class="keywordtype">float</span> pt2 = pt * pt;
+00281 <span class="keywordtype">float</span> pt1 = 1.0f - pt;
+00282 <span class="keywordtype">float</span> pt12 = pt1 * pt1;
+00283
+00284 <span class="comment">// Compute tangentS</span>
+00285 <span class="comment">//=================</span>
+00286 <span class="comment">// s/ds.</span>
+00287 s0 = -3* ps12;
+00288 s1 = 9*ps2 + 3 -12*ps;
+00289 s2 =-9*ps2 + 6*ps ;
+00290 s3 = 3* ps2;
+00291 <span class="comment">// t/dt.</span>
+00292 t0 = pt12 * pt1;
+00293 t1 = 3.0f * pt * pt12;
+00294 t2 = 3.0f * pt2 * pt1;
+00295 t3 = pt2 * pt;
+00296
+00297 tgtS.set(0,0,0);
+00298 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[0] , s0 * t0);
+00299 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[7] , s1 * t0);
+00300 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[6] , s2 * t0);
+00301 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[3] , s3 * t0);
+00302 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[0] , s0 * t1);
+00303 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[0], s1 * t1);
+00304 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[3], s2 * t1);
+00305 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[5] , s3 * t1);
+00306 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[1] , s0 * t2);
+00307 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[1], s1 * t2);
+00308 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Interiors[2], s2 * t2);
+00309 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[4] , s3 * t2);
+00310 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[1] , s0 * t3);
+00311 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[2] , s1 * t3);
+00312 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Tangents[3] , s2 * t3);
+00313 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtS, Vertices[2] , s3 * t3);
+00314
+00315 <span class="comment">// Return the tgt normalized</span>
+00316 <span class="keywordflow">return</span> tgtS.normed();
+00317 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha6" doxytag="NL3D::CBezierPatch::evalTangentT" ></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> NL3D::CBezierPatch::evalTangentT </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>s</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>t</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Evaluate the tangentT at (s,t). returned vector is normalized.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00321">321</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05478.html#l00087">NL3D::mulAdd()</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a06682.html#l00136">NLMISC::CVector::set()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+<div class="fragment"><pre>00322 {
+00323 CVector tgtT;
+00324
+00325 <span class="keywordtype">float</span> s0,s1,s2,s3;
+00326 <span class="keywordtype">float</span> t0,t1,t2,t3;
+00327 <span class="keywordtype">float</span> ps2 = ps * ps;
+00328 <span class="keywordtype">float</span> ps1 = 1.0f - ps;
+00329 <span class="keywordtype">float</span> ps12 = ps1 * ps1;
+00330 <span class="keywordtype">float</span> pt2 = pt * pt;
+00331 <span class="keywordtype">float</span> pt1 = 1.0f - pt;
+00332 <span class="keywordtype">float</span> pt12 = pt1 * pt1;
+00333
+00334 <span class="comment">// Compute tangentT</span>
+00335 <span class="comment">//=================</span>
+00336 <span class="comment">// s/ds.</span>
+00337 s0 = ps12 * ps1;
+00338 s1 = 3.0f * ps * ps12;
+00339 s2 = 3.0f * ps2 * ps1;
+00340 s3 = ps2 * ps;
+00341 <span class="comment">// t/dt.</span>
+00342 t0 = -3* pt12;
+00343 t1 = 9*pt2 + 3 -12*pt;
+00344 t2 =-9*pt2 + 6*pt ;
+00345 t3 = 3* pt2;
+00346
+00347 tgtT.set(0,0,0);
+00348 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[0] , s0 * t0);
+00349 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[7] , s1 * t0);
+00350 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[6] , s2 * t0);
+00351 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[3] , s3 * t0);
+00352 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[0] , s0 * t1);
+00353 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[0], s1 * t1);
+00354 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[3], s2 * t1);
+00355 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[5] , s3 * t1);
+00356 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[1] , s0 * t2);
+00357 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[1], s1 * t2);
+00358 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Interiors[2], s2 * t2);
+00359 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[4] , s3 * t2);
+00360 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[1] , s0 * t3);
+00361 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[2] , s1 * t3);
+00362 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Tangents[3] , s2 * t3);
+00363 <a class="code" href="a05363.html#a369">mulAdd</a>(tgtT, Vertices[2] , s3 * t3);
+00364
+00365 <span class="comment">// Return the tgt normalized</span>
+00366 <span class="keywordflow">return</span> tgtT.normed();
+00367 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha7" doxytag="NL3D::CBezierPatch::make" ></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::CBezierPatch::make </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03128.html">CVector</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>vertices</em>[4], </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03128.html">CVector</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>normals</em>[4]</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>
+complete computation of Vertices, Tangents, and Interiors, provinding the vertices and vertex normals.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00036">36</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05478.html#l00061">makeInteriors()</a>, <a class="el" href="a06682.html#l00115">NLMISC::CVector::norm()</a>, <a class="el" href="a06682.html#l00119">NLMISC::CVector::normalize()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+<div class="fragment"><pre>00037 {
+00038 <a class="code" href="a04558.html#a14">sint</a> i;
+00039 <span class="keyword">static</span> <a class="code" href="a04558.html#a14">sint</a> starts[8]= {0,1, 1,2, 2,3, 3,0};
+00040 <span class="keyword">static</span> <a class="code" href="a04558.html#a14">sint</a> ends[8]= {1,0, 2,1, 3,2, 0,3};
+00041
+00042 <span class="keywordflow">for</span>(i=0;i&lt;4;i++)
+00043 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a>[i]= vertices[i];
+00044
+00045 <span class="comment">// For all tangents.</span>
+00046 <span class="keywordflow">for</span>(i=0;i&lt;8;i++)
+00047 {
+00048 CVector tgt= <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a>[ends[i]] - Vertices[starts[i]];
+00049 CVector I,J,K;
+00050 J= normals[starts[i]];
+00051 I= J^tgt;
+00052 K= I^J;
+00053 K.normalize();
+00054 <span class="comment">// Yes, we store tangents as position, not vectors...</span>
+00055 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho1">Tangents</a>[i]= Vertices[starts[i]] + K*tgt.norm()/3;
+00056 }
+00057
+00058 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcha8">makeInteriors</a>();
+00059 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcha8" doxytag="NL3D::CBezierPatch::makeInteriors" ></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::CBezierPatch::makeInteriors </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>
+make default Interiors, according to Vertices and Tangents.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05478.html#l00061">61</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+Referenced by <a class="el" href="a05478.html#l00036">make()</a>.
+<p>
+<div class="fragment"><pre>00062 {
+00063 CVector &amp;a = <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho2">Vertices</a>[0];
+00064 CVector &amp;b = Vertices[1];
+00065 CVector &amp;c = Vertices[2];
+00066 CVector &amp;d = Vertices[3];
+00067 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[0] = <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho1">Tangents</a>[7] + Tangents[0] - a;
+00068 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[1] = Tangents[1] + Tangents[2] - b;
+00069 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[2] = Tangents[3] + Tangents[4] - c;
+00070 <a class="code" href="a02258.html#NL3D_1_1CBezierPatcho0">Interiors</a>[3] = Tangents[5] + Tangents[6] - d;
+00071 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatchz37_0" doxytag="NL3D::CBezierPatch::subdivideS" ></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::CBezierPatch::subdivideS </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>left</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>right</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>s</em> = 0.5f</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Subdivide the bezier patch in 2 bezier patch along s, at s (beetween [0,1]). NB: left goes from 0 to s, right goes from s to 1.
+<p>
+Definition at line <a class="el" href="a05478.html#l00391">391</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00130">NL3D::CBezierPatch::CBezierCurve::get()</a>, <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05479.html#l00126">NL3D::CBezierPatch::CBezierCurve::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05478.html#l00371">NL3D::CBezierPatch::CBezierCurve::subdivide()</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00514">NL3D::CPatch::addPatchBlocksInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00280">NL3D::CPatch::addTrianglesInBBoxRecurs()</a>.
+<p>
+<div class="fragment"><pre>00392 {
+00393 CBezierCurve curveT[4];
+00394 CBezierCurve curveTLeft[4];
+00395 CBezierCurve curveTRight[4];
+00396
+00397 <span class="comment">// Setup horizontal curves.</span>
+00398 curveT[0].set(Vertices[0], Tangents[7] , Tangents[6] , Vertices[3]);
+00399 curveT[1].set(Tangents[0], Interiors[0], Interiors[3], Tangents[5]);
+00400 curveT[2].set(Tangents[1], Interiors[1], Interiors[2], Tangents[4]);
+00401 curveT[3].set(Vertices[1], Tangents[2] , Tangents[3] , Vertices[2]);
+00402
+00403 <span class="comment">// Subdivide curves.</span>
+00404 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;4;i++)
+00405 curveT[i].subdivide(curveTLeft[i], curveTRight[i], s);
+00406
+00407 <span class="comment">// Setup bezier patchs.</span>
+00408 <span class="comment">// left.</span>
+00409 curveTLeft[0].get(left.Vertices[0], left.Tangents[7] , left.Tangents[6] , left.Vertices[3]);
+00410 curveTLeft[1].get(left.Tangents[0], left.Interiors[0], left.Interiors[3], left.Tangents[5]);
+00411 curveTLeft[2].get(left.Tangents[1], left.Interiors[1], left.Interiors[2], left.Tangents[4]);
+00412 curveTLeft[3].get(left.Vertices[1], left.Tangents[2] , left.Tangents[3] , left.Vertices[2]);
+00413 <span class="comment">// right.</span>
+00414 curveTRight[0].get(right.Vertices[0], right.Tangents[7] , right.Tangents[6] , right.Vertices[3]);
+00415 curveTRight[1].get(right.Tangents[0], right.Interiors[0], right.Interiors[3], right.Tangents[5]);
+00416 curveTRight[2].get(right.Tangents[1], right.Interiors[1], right.Interiors[2], right.Tangents[4]);
+00417 curveTRight[3].get(right.Vertices[1], right.Tangents[2] , right.Tangents[3] , right.Vertices[2]);
+00418 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatchz37_1" doxytag="NL3D::CBezierPatch::subdivideT" ></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::CBezierPatch::subdivideT </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>top</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02258.html">CBezierPatch</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>bottom</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>t</em> = 0.5f</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> const</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Subdivide the bezier patch in 2 bezier patch along t, at t (beetween [0,1]). NB: top goes from 0 to t, bottom goes from t to 1.
+<p>
+Definition at line <a class="el" href="a05478.html#l00422">422</a> of file <a class="el" href="a05478.html">bezier_patch.cpp</a>.
+<p>
+References <a class="el" href="a05479.html#l00130">NL3D::CBezierPatch::CBezierCurve::get()</a>, <a class="el" href="a05479.html#l00081">Interiors</a>, <a class="el" href="a05479.html#l00126">NL3D::CBezierPatch::CBezierCurve::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05478.html#l00371">NL3D::CBezierPatch::CBezierCurve::subdivide()</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05479.html#l00079">Tangents</a>, and <a class="el" href="a05479.html#l00077">Vertices</a>.
+<p>
+Referenced by <a class="el" href="a06155.html#l00514">NL3D::CPatch::addPatchBlocksInBBoxRecurs()</a>, and <a class="el" href="a06155.html#l00280">NL3D::CPatch::addTrianglesInBBoxRecurs()</a>.
+<p>
+<div class="fragment"><pre>00423 {
+00424 CBezierCurve curveS[4];
+00425 CBezierCurve curveSTop[4];
+00426 CBezierCurve curveSBottom[4];
+00427
+00428 <span class="comment">// Setup vertical curves.</span>
+00429 curveS[0].set(Vertices[0], Tangents[0] , Tangents[1] , Vertices[1]);
+00430 curveS[1].set(Tangents[7], Interiors[0], Interiors[1], Tangents[2]);
+00431 curveS[2].set(Tangents[6], Interiors[3], Interiors[2], Tangents[3]);
+00432 curveS[3].set(Vertices[3], Tangents[5] , Tangents[4] , Vertices[2]);
+00433
+00434 <span class="comment">// Subdivide curves.</span>
+00435 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;4;i++)
+00436 curveS[i].subdivide(curveSTop[i], curveSBottom[i], t);
+00437
+00438 <span class="comment">// Setup bezier patchs.</span>
+00439 <span class="comment">// top.</span>
+00440 curveSTop[0].get(top.Vertices[0], top.Tangents[0] , top.Tangents[1] , top.Vertices[1]);
+00441 curveSTop[1].get(top.Tangents[7], top.Interiors[0], top.Interiors[1], top.Tangents[2]);
+00442 curveSTop[2].get(top.Tangents[6], top.Interiors[3], top.Interiors[2], top.Tangents[3]);
+00443 curveSTop[3].get(top.Vertices[3], top.Tangents[5] , top.Tangents[4] , top.Vertices[2]);
+00444 <span class="comment">// bottom.</span>
+00445 curveSBottom[0].get(bottom.Vertices[0], bottom.Tangents[0] , bottom.Tangents[1] , bottom.Vertices[1]);
+00446 curveSBottom[1].get(bottom.Tangents[7], bottom.Interiors[0], bottom.Interiors[1], bottom.Tangents[2]);
+00447 curveSBottom[2].get(bottom.Tangents[6], bottom.Interiors[3], bottom.Interiors[2], bottom.Tangents[3]);
+00448 curveSBottom[3].get(bottom.Vertices[3], bottom.Tangents[5] , bottom.Tangents[4] , bottom.Vertices[2]);
+00449 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NL3D_1_1CBezierPatcho0" doxytag="NL3D::CBezierPatch::Interiors" ></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="a02258.html#NL3D_1_1CBezierPatcho0">NL3D::CBezierPatch::Interiors</a>[4]
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The interiors, ia,ib,ic,id. NB: interiors are points, not vectors.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05479.html#l00081">81</a> of file <a class="el" href="a05479.html">bezier_patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a05478.html#l00073">applyMatrix()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06155.html#l00221">NL3D::CPatch::buildBBoxFromBezierPatch()</a>, <a class="el" href="a05478.html#l00105">eval()</a>, <a class="el" href="a05478.html#l00145">evalDouble()</a>, <a class="el" href="a05478.html#l00187">evalNormal()</a>, <a class="el" href="a05478.html#l00271">evalTangentS()</a>, <a class="el" href="a05478.html#l00321">evalTangentT()</a>, <a class="el" href="a05478.html#l00061">makeInteriors()</a>, <a class="el" href="a06782.html#l00039">NL3D::CZoneTgtSmoother::makeVerticesCoplanar()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06776.html#l00067">NL3D::CZoneSmoother::smoothTangents()</a>, <a class="el" href="a05478.html#l00391">subdivideS()</a>, <a class="el" href="a05478.html#l00422">subdivideT()</a>, <a class="el" href="a06758.html#l01825">NL3D::CPatchInfo::transform()</a>, and <a class="el" href="a06155.html#l00192">NL3D::CPatch::unpack()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcho1" doxytag="NL3D::CBezierPatch::Tangents" ></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="a02258.html#NL3D_1_1CBezierPatcho1">NL3D::CBezierPatch::Tangents</a>[8]
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The tangents ab, ba, bc, cb, cd, dc, da, ad. NB: tangents are points, not vectors.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05479.html#l00079">79</a> of file <a class="el" href="a05479.html">bezier_patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a05478.html#l00073">applyMatrix()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06155.html#l00221">NL3D::CPatch::buildBBoxFromBezierPatch()</a>, <a class="el" href="a05478.html#l00105">eval()</a>, <a class="el" href="a05478.html#l00145">evalDouble()</a>, <a class="el" href="a05478.html#l00187">evalNormal()</a>, <a class="el" href="a05478.html#l00271">evalTangentS()</a>, <a class="el" href="a05478.html#l00321">evalTangentT()</a>, <a class="el" href="a05478.html#l00036">make()</a>, <a class="el" href="a05478.html#l00061">makeInteriors()</a>, <a class="el" href="a06782.html#l00039">NL3D::CZoneTgtSmoother::makeVerticesCoplanar()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06776.html#l00067">NL3D::CZoneSmoother::smoothTangents()</a>, <a class="el" href="a05478.html#l00391">subdivideS()</a>, <a class="el" href="a05478.html#l00422">subdivideT()</a>, <a class="el" href="a06758.html#l01825">NL3D::CPatchInfo::transform()</a>, and <a class="el" href="a06155.html#l00192">NL3D::CPatch::unpack()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CBezierPatcho2" doxytag="NL3D::CBezierPatch::Vertices" ></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="a02258.html#NL3D_1_1CBezierPatcho2">NL3D::CBezierPatch::Vertices</a>[4]
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+The vertices a,b,c,d of the quad patch.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05479.html#l00077">77</a> of file <a class="el" href="a05479.html">bezier_patch.h</a>.
+<p>
+Referenced by <a class="el" href="a06758.html#l01452">NL3D::CZone::applyHeightField()</a>, <a class="el" href="a05478.html#l00073">applyMatrix()</a>, <a class="el" href="a06758.html#l00122">NL3D::CZone::build()</a>, <a class="el" href="a06155.html#l00221">NL3D::CPatch::buildBBoxFromBezierPatch()</a>, <a class="el" href="a06155.html#l00206">NL3D::CPatch::computeDefaultErrorSize()</a>, <a class="el" href="a05478.html#l00105">eval()</a>, <a class="el" href="a05478.html#l00145">evalDouble()</a>, <a class="el" href="a05478.html#l00187">evalNormal()</a>, <a class="el" href="a05478.html#l00271">evalTangentS()</a>, <a class="el" href="a05478.html#l00321">evalTangentT()</a>, <a class="el" href="a05478.html#l00036">make()</a>, <a class="el" href="a05478.html#l00061">makeInteriors()</a>, <a class="el" href="a06758.html#l00289">NL3D::CZone::retrieve()</a>, <a class="el" href="a06778.html#l00472">NL3D::CZoneSymmetrisation::setOrientedTileState()</a>, <a class="el" href="a06778.html#l00312">NL3D::CZoneSymmetrisation::setTileState()</a>, <a class="el" href="a05478.html#l00391">subdivideS()</a>, <a class="el" href="a05478.html#l00422">subdivideT()</a>, <a class="el" href="a06758.html#l01825">NL3D::CPatchInfo::transform()</a>, and <a class="el" href="a06155.html#l00192">NL3D::CPatch::unpack()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05479.html">bezier_patch.h</a><li><a class="el" href="a05478.html">bezier_patch.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:44:35 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>