aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03642.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/a03642.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03642.html')
-rw-r--r--docs/doxygen/nel/a03642.html356
1 files changed, 356 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03642.html b/docs/doxygen/nel/a03642.html
new file mode 100644
index 00000000..41ee329e
--- /dev/null
+++ b/docs/doxygen/nel/a03642.html
@@ -0,0 +1,356 @@
+<!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: NLMISC::CValueSmoother 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>NLMISC::CValueSmoother Class Reference</h1><code>#include &lt;<a class="el" href="a06657.html">value_smoother.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLMISC::CValueSmoother:
+<p><center><img src="a03642.png" usemap="#NLMISC::CValueSmoother_map" border="0" alt=""></center>
+<map name="NLMISC::CValueSmoother_map">
+<area href="a03643.html" alt="NLMISC::CValueSmootherTemplate< float >" shape="rect" coords="0,0,258,24">
+</map>
+<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="a03643.html#NLMISC_1_1CValueSmootherTemplatea0">addValue</a> (floatdt)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a new value to be smoothed. <a href="#NLMISC_1_1CValueSmootherTemplatea0"></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="a03642.html#NLMISC_1_1CValueSmoothera1">CValueSmoother</a> (<a class="el" href="a04558.html#a15">uint</a> n=16)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#NLMISC_1_1CValueSmoothera1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector&lt; float &gt; &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03643.html#NLMISC_1_1CValueSmootherTemplatea2">getLastFrames</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="a03643.html#NLMISC_1_1CValueSmootherTemplatea3">getNumFrame</a> () const</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03643.html#NLMISC_1_1CValueSmootherTemplatea4">getSmoothValue</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the smoothed value. <a href="#NLMISC_1_1CValueSmootherTemplatea4"></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="a03643.html#NLMISC_1_1CValueSmootherTemplatea5">init</a> (<a class="el" href="a04558.html#a15">uint</a> n)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reset the ValueSmoother, and set the number of frame to smooth. <a href="#NLMISC_1_1CValueSmootherTemplatea5"></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="a03643.html#NLMISC_1_1CValueSmootherTemplatea6">reset</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reset only the ValueSmoother <a href="#NLMISC_1_1CValueSmootherTemplatea6"></a><br><br></td></tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CValueSmoothera1" doxytag="NLMISC::CValueSmoother::CValueSmoother" ></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"> NLMISC::CValueSmoother::CValueSmoother </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>n</em> = 16 </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, explicit]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Constructor.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00201">201</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00201 : CValueSmootherTemplate&lt;float&gt;(n)
+00202 {
+00203 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea0" doxytag="NLMISC::CValueSmoother::addValue" ></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 <a class="el" href="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::addValue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float &nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>dt</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+add a new value to be smoothed.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00080">80</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+References <a class="el" href="a05484.html#l00038">min</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05559.html#l00424">NL3D::CCloudScape::anim()</a>, <a class="el" href="a05923.html#l00067">NL3D::CLoadBalancingGroup::computeRatioAndSmooth()</a>, and <a class="el" href="a05559.html#l00269">NL3D::CCloudScape::init()</a>.
+<p>
+<div class="fragment"><pre>00081 {
+00082 <span class="keywordflow">if</span> (_LastFrames.empty())
+00083 <span class="keywordflow">return</span>;
+00084
+00085 <span class="comment">// update the frame sum. NB: see init(), at start, array is full of 0. so it works even for un-inited values.</span>
+00086 _FrameSum-= _LastFrames[_CurFrame];
+00087 _FrameSum+= dt;
+00088
+00089 <span class="comment">// backup this value in the array.</span>
+00090 _LastFrames[_CurFrame]= dt;
+00091
+00092 <span class="comment">// next frame.</span>
+00093 _CurFrame++;
+00094 <span class="comment">// _CurFrame%=_LastFrames.size();</span>
+00095 <span class="keywordflow">if</span> (_CurFrame &gt;= _LastFrames.size())
+00096 _CurFrame -= _LastFrames.size();
+00097
+00098 <span class="comment">// update the number of frames added.</span>
+00099 _NumFrame++;
+00100 _NumFrame= <a class="code" href="a04061.html#a0">std::min</a>(_NumFrame, (<a class="code" href="a04558.html#a15">uint</a>)_LastFrames.size());
+00101 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea2" doxytag="NLMISC::CValueSmoother::getLastFrames" ></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"> const std::vector&lt;float &gt;&amp; <a class="el" href="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::getLastFrames </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00117">117</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+<div class="fragment"><pre>00118 {
+00119 <span class="keywordflow">return</span> _LastFrames;
+00120 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea3" doxytag="NLMISC::CValueSmoother::getNumFrame" ></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="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::getNumFrame </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00112">112</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00113 {
+00114 <span class="keywordflow">return</span> _NumFrame;
+00115 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea4" doxytag="NLMISC::CValueSmoother::getSmoothValue" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float <a class="el" href="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::getSmoothValue </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+get the smoothed value.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00104">104</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+Referenced by <a class="el" href="a05923.html#l00067">NL3D::CLoadBalancingGroup::computeRatioAndSmooth()</a>.
+<p>
+<div class="fragment"><pre>00105 {
+00106 <span class="keywordflow">if</span>(_NumFrame&gt;0)
+00107 <span class="keywordflow">return</span> T(_FrameSum / _NumFrame);
+00108 <span class="keywordflow">else</span>
+00109 <span class="keywordflow">return</span> T(0);
+00110 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea5" doxytag="NLMISC::CValueSmoother::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 <a class="el" href="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>n</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset the ValueSmoother, and set the number of frame to smooth.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00056">56</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+Referenced by <a class="el" href="a05923.html#l00054">NL3D::CLoadBalancingGroup::CLoadBalancingGroup()</a>, <a class="el" href="a05923.html#l00067">NL3D::CLoadBalancingGroup::computeRatioAndSmooth()</a>, and <a class="el" href="a05559.html#l00269">NL3D::CCloudScape::init()</a>.
+<p>
+<div class="fragment"><pre>00057 {
+00058 <span class="comment">// reset all the array to 0.</span>
+00059 _LastFrames.clear();
+00060
+00061 <span class="keywordflow">if</span> (n &gt; 0)
+00062 _LastFrames.resize(n, 0);
+00063
+00064 _CurFrame = 0;
+00065 _NumFrame = 0;
+00066 _FrameSum = 0;
+00067 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CValueSmootherTemplatea6" doxytag="NLMISC::CValueSmoother::reset" ></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 <a class="el" href="a03643.html">NLMISC::CValueSmootherTemplate</a>&lt; float &gt;::reset </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+reset only the ValueSmoother
+<p>
+
+<p>
+Definition at line <a class="el" href="a06657.html#l00070">70</a> of file <a class="el" href="a06657.html">value_smoother.h</a>.
+<p>
+Referenced by <a class="el" href="a05923.html#l00067">NL3D::CLoadBalancingGroup::computeRatioAndSmooth()</a>.
+<p>
+<div class="fragment"><pre>00071 {
+00072 std::fill(_LastFrames.begin(), _LastFrames.end(), T(0));
+00073
+00074 _CurFrame = 0;
+00075 _NumFrame = 0;
+00076 _FrameSum = 0;
+00077 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a06657.html">value_smoother.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:40:03 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>