diff options
Diffstat (limited to 'docs/doxygen/nel/a02719.html')
-rw-r--r-- | docs/doxygen/nel/a02719.html | 391 |
1 files changed, 391 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02719.html b/docs/doxygen/nel/a02719.html new file mode 100644 index 00000000..fe1a6800 --- /dev/null +++ b/docs/doxygen/nel/a02719.html @@ -0,0 +1,391 @@ +<!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::CLandscapeVegetableBlockCreateContext 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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CLandscapeVegetableBlockCreateContext Class Reference</h1><code>#include <<a class="el" href="a05877.html">landscape_vegetable_block.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Information for instanciation of vegetable IG. NB: there is one <a class="el" href="a02717.html">CLandscapeVegetableBlock</a> per landscape TessBlock. <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="a05877.html#l00127">127</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.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> </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContexta0">CLandscapeVegetableBlockCreateContext</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContexta1">eval</a> (<a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt, float <a class="el" href="a04223.html#a572">x</a>, float <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a03128.html">CVector</a> &pos)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContexta2">init</a> (<a class="el" href="a03057.html">CPatch</a> *patch, <a class="el" href="a04558.html#a15">uint</a> ts, <a class="el" href="a04558.html#a15">uint</a> tt)</td></tr> + +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr0">_Empty</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03057.html">CPatch</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr2">_Pos</a> [9]</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr3">_Ts</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Coordinate of the lower-left tile. 2x2 tile vegetables are generated. <a href="#NL3D_1_1CLandscapeVegetableBlockCreateContextr3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr4">_Tt</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Coordinate of the lower-left tile. 2x2 tile vegetables are generated. <a href="#NL3D_1_1CLandscapeVegetableBlockCreateContextr4"></a><br><br></td></tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContexta0" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::CLandscapeVegetableBlockCreateContext" ></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::CLandscapeVegetableBlockCreateContext::CLandscapeVegetableBlockCreateContext </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05876.html#l00277">277</a> of file <a class="el" href="a05876.html">landscape_vegetable_block.cpp</a>. +<p> +<div class="fragment"><pre>00278 { +00279 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a>= NULL; +00280 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContexta1" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::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"> void NL3D::CLandscapeVegetableBlockCreateContext::eval </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>ts</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> </td> + <td class="mdname" nowrap> <em>tt</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>y</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> & </td> + <td class="mdname" nowrap> <em>pos</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +If Empty, create all the necessary information from patch. Then compute requested Pos, from the tile ts,tt, and pos in this tile. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>ts,tt</em> </td><td>coordinate of the tile. </td></tr> + <tr><td valign=top><em>x,y</em> </td><td>coordinate [0..1] in the tile.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05876.html#l00295">295</a> of file <a class="el" href="a05876.html">landscape_vegetable_block.cpp</a>. +<p> +References <a class="el" href="a05877.html#l00144">_Empty</a>, <a class="el" href="a06155.html#l01338">NL3D::CPatch::computeVertex()</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="a06492.html#l00045">NL3D_TESSBLOCK_TILESIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a06162.html#l00050">NL3D::CPatch::generateTileVegetable()</a>. +<p> +<div class="fragment"><pre>00296 { +00297 <a class="code" href="a04199.html#a6">nlassert</a>(NL3D_TESSBLOCK_TILESIZE==4); +00298 +00299 <span class="comment">// If never created, do it now</span> +00300 <span class="comment">// ==================</span> +00301 <span class="keywordflow">if</span>(<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr0">_Empty</a>) +00302 { +00303 <span class="comment">// Eval Position and normals for the 9 vertices (around the 2x2 tiles)</span> +00304 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0; j<3;j++) +00305 { +00306 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a627">t</a>= (<span class="keywordtype">float</span>)(<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr4">_Tt</a>+j)/<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a>->getOrderT(); +00307 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i<3;i++) +00308 { +00309 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a626">s</a>= (<span class="keywordtype">float</span>)(<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr3">_Ts</a>+i)/<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a>->getOrderS(); +00310 <span class="comment">// eval position.</span> +00311 <span class="comment">// use computeVertex() and not bpatch->eval() because vegetables must follow the </span> +00312 <span class="comment">// noise (at least at tile precision...). It is slower but necessary.</span> +00313 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr2">_Pos</a>[j*3+i]= <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a>->computeVertex(s, t); +00314 } +00315 } +00316 +00317 <span class="comment">// Ok, it's done</span> +00318 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr0">_Empty</a>= <span class="keyword">false</span>; +00319 } +00320 +00321 +00322 <span class="comment">// Eval, with simple bilinear</span> +00323 <span class="comment">// ==================</span> +00324 <a class="code" href="a04199.html#a6">nlassert</a>(ts==_Ts || ts==_Ts+1); +00325 <a class="code" href="a04199.html#a6">nlassert</a>(tt==_Tt || tt==_Tt+1); +00326 <a class="code" href="a04558.html#a15">uint</a> ds= ts-<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr3">_Ts</a>; +00327 <a class="code" href="a04558.html#a15">uint</a> dt= tt-<a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr4">_Tt</a>; +00328 <span class="comment">// Indices.</span> +00329 <a class="code" href="a04558.html#a15">uint</a> v00= dt*3 + ds; +00330 <a class="code" href="a04558.html#a15">uint</a> v10= v00 + 1; +00331 <a class="code" href="a04558.html#a15">uint</a> v01= v00 + 3; +00332 <a class="code" href="a04558.html#a15">uint</a> v11= v00 + 4; +00333 <span class="comment">// BiLinearFactor.</span> +00334 <span class="keywordtype">float</span> dxdy= (1-<a class="code" href="a04223.html#a572">x</a>)*(1-<a class="code" href="a04223.html#a573">y</a>); +00335 <span class="keywordtype">float</span> dx2dy= <a class="code" href="a04223.html#a572">x</a>*(1-<a class="code" href="a04223.html#a573">y</a>); +00336 <span class="keywordtype">float</span> dxdy2= (1-<a class="code" href="a04223.html#a572">x</a>)*<a class="code" href="a04223.html#a573">y</a>; +00337 <span class="keywordtype">float</span> dx2dy2= <a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a573">y</a>; +00338 +00339 <span class="comment">// Compute Pos.</span> +00340 pos = <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr2">_Pos</a>[v00] * dxdy; +00341 pos+= _Pos[v10] * dx2dy; +00342 pos+= _Pos[v01] * dxdy2; +00343 pos+= _Pos[v11] * dx2dy2; +00344 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContexta2" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::init" ></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::CLandscapeVegetableBlockCreateContext::init </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03057.html">CPatch</a> * </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="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>ts</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> </td> + <td class="mdname" nowrap> <em>tt</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05876.html#l00284">284</a> of file <a class="el" href="a05876.html">landscape_vegetable_block.cpp</a>. +<p> +References <a class="el" href="a05877.html#l00144">_Empty</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05876.html#l00155">NL3D::CLandscapeVegetableBlock::update()</a>. +<p> +<div class="fragment"><pre>00285 { +00286 <a class="code" href="a04199.html#a6">nlassert</a>(patch); +00287 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr0">_Empty</a>= <span class="keyword">true</span>; +00288 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">_Patch</a>= patch; +00289 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr3">_Ts</a>= ts; +00290 <a class="code" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr4">_Tt</a>= tt; +00291 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContextr0" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::_Empty" ></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="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr0">NL3D::CLandscapeVegetableBlockCreateContext::_Empty</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05877.html#l00144">144</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.h</a>. +<p> +Referenced by <a class="el" href="a05876.html#l00295">eval()</a>, and <a class="el" href="a05876.html#l00284">init()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContextr1" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::_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="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr1">NL3D::CLandscapeVegetableBlockCreateContext::_Patch</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05877.html#l00145">145</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContextr2" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::_Pos" ></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="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr2">NL3D::CLandscapeVegetableBlockCreateContext::_Pos</a>[ 9 ]<code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05877.html#l00149">149</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContextr3" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::_Ts" ></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> <a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr3">NL3D::CLandscapeVegetableBlockCreateContext::_Ts</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Coordinate of the lower-left tile. 2x2 tile vegetables are generated. +<p> + +<p> +Definition at line <a class="el" href="a05877.html#l00147">147</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CLandscapeVegetableBlockCreateContextr4" doxytag="NL3D::CLandscapeVegetableBlockCreateContext::_Tt" ></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> <a class="el" href="a02719.html#NL3D_1_1CLandscapeVegetableBlockCreateContextr4">NL3D::CLandscapeVegetableBlockCreateContext::_Tt</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Coordinate of the lower-left tile. 2x2 tile vegetables are generated. +<p> + +<p> +Definition at line <a class="el" href="a05877.html#l00147">147</a> of file <a class="el" href="a05877.html">landscape_vegetable_block.h</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05877.html">landscape_vegetable_block.h</a><li><a class="el" href="a05876.html">landscape_vegetable_block.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:49:18 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> |