⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classvector3.html

📁 Tixys source code, include G.711, G.726, IMA-ADPCM etc.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
          <td class="mdname1" valign="top" nowrap> <em>vector</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the cross product of this vector and a second vector.<p>If any product of two components is greater than 0x4000.0000 then the result is undefined. This limitation can be met if all components, in both vectors, have a magnitude less than 128. (0x80.00000)<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>vector</em>&nbsp;</td><td>The second vector.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The cross product of this and <em>vector</em> </dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00112">112</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a15" doxytag="Vector3::Length"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga1">ufix</a> Vector3::Length           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the length (magnitude) of this vector. Accuracy is limited to 24 significant bits.<p><dl compact><dt><b>Returns:</b></dt><dd>The length.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00132">132</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a16" doxytag="Vector3::CompareLength"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT int Vector3::CompareLength           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__fix.html#ga1">ufix</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>length</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Compare the length (magnitude) of this vector with a given value. This is faster than comparing the value returned by <a class="el" href="classVector3.html#a15">Length()</a>. E.g. instead of <div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span>(vector.Length()&lt;distance)</pre></div> use <div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span>(vector.CompareLength(distance)&lt;0)</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The length value to compare with.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>0, if the length of this vector is equal to <em>length</em>. <br> 1, if the length of this vector is greater than <em>length</em>. <br> -1, if the length of this vector is less than <em>length</em>.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00167">167</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a17" doxytag="Vector3::CompareLengths"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT int Vector3::CompareLengths           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classVector3.html">Vector3</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>vector</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Compare the length of this vector with another. This is faster than comparing two values returned by <a class="el" href="classVector3.html#a15">Length()</a>. E.g. instead of <div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span>(vector1.Length()&lt;vector2.Length())</pre></div> use <div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span>(vector1.CompareLengths(vector2)&lt;0)</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>vector</em>&nbsp;</td><td>The vector to compare with.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>0, if the lengths are the same. <br> 1, if the length of this is greater than the length of <em>vector</em>. <br> -1, if the length of this is less than the length of <em>vector</em>.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00197">197</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a18" doxytag="Vector3::LengthSquared"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__integers.html#ga2">uint32</a> Vector3::LengthSquared           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__integers.html#ga2">uint32</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>fraction</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the square of the length of this vector. This is faster than <a class="el" href="classVector3.html#a15">Length()</a> and is useful when comparing a vector length with a constant or pre-calculated value. (Comparing the square of lengths will give the same result as comparing the lengths.)<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>fraction</em>&nbsp;</td><td>Set to the fraction part of the result, i.e the 32 bits to the right of the binary point.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The integer part of the result.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00215">215</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a19" doxytag="Vector3::UnitVector"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="classVector3.html">Vector3</a> Vector3::UnitVector           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the unit vector which lies in the same direction as this vector. I.e. scale this vector so it has a length of 1.0.<p>Rounding inacuracies mean the length of this 'unit' vector will actualy lie in the range 0x0.fffe to 0x1.0000.<p><dl compact><dt><b>Returns:</b></dt><dd>The unit vector.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00310">310</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a20" doxytag="Vector3::Normal"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="classVector3.html">Vector3</a> Vector3::Normal           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classVector3.html">Vector3</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>vector</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the unit vector which is normal to this vector and a second vector. I.e. the unit vector which is at right angles to both this vector and the second vector; acording to the right-hand rule.<p>Rounding inacuracies mean the length of this 'unit' vector will actualy lie in the range 0x0.fffe to 0x1.0000.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>vector</em>&nbsp;</td><td>The second vector.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The unit vector normal to this and <em>vector</em>.</dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00331">331</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a21" doxytag="Vector3::Angle"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga2">fixangle</a> Vector3::Angle           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classVector3.html">Vector3</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>vector</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the angle between this vector and a second vector.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>vector</em>&nbsp;</td><td>The second vector.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The angle between this and <em>vector</em>. This lies in the range 0x0000 and 0x8000.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fix.html#ga2">fixangle</a></dd></dl><p>Definition at line <a class="el" href="vector3_8cpp-source.html#l00349">349</a> of file <a class="el" href="vector3_8cpp-source.html">vector3.cpp</a>.    </td>  </tr></table><a class="anchor" name="a22" doxytag="Vector3::Normal"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="classVector3.html">Vector3</a> Vector3::Normal           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classVector3.html">Vector3</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>point1</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="classVector3.html">Vector3</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>point2</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const</td>        </tr>      </table>    </td>  </tr></table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -