classgeometry.html

来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 397 行 · 第 1/2 页

HTML
397
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Geometry class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>Geometry  Class Reference</h1><code>#include &lt;<a class="el" href="Geometry_8h-source.html">Geometry.h</a>&gt;</code><p><a href="classGeometry-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d0">getLengthGeomSeries</a> (double dFirst, double dRatio, double dSum)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d1">getSumGeomSeries</a> (double dFirst, double dRatio, double dLength)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d2">getSumInfGeomSeries</a> (double dFirst, double dRatio)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d3">getFirstGeomSeries</a> (double dSum, double dRatio, double dLength)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d4">getFirstInfGeomSeries</a> (double dSum, double dRatio)</td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classGeometry.html#d5">abcFormula</a> (double a, double b, double c, double *s1, double *s2)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class contains several static methods dealing with geometry. <p><p>Definition at line <a class="el" href="Geometry_8h-source.html#l00197">197</a> of file <a class="el" href="Geometry_8h-source.html">Geometry.h</a>.<hr><h2>Member Function Documentation</h2><a name="d5" doxytag="Geometry::abcFormula"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int Geometry::abcFormula </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>a</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>b</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>c</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>s1</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>s2</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method performs the abc formula (Pythagoras' Theorem) on the given parameters and puts the result in *s1 en *s2. It returns the number of found coordinates. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>a</em>&nbsp;</td><td>a parameter in abc formula </td></tr><tr><td valign=top><em>b</em>&nbsp;</td><td>b parameter in abc formula </td></tr><tr><td valign=top><em>c</em>&nbsp;</td><td>c parameter in abc formula </td></tr><tr><td valign=top><em>s1</em>&nbsp;</td><td>first result of abc formula </td></tr><tr><td valign=top><em>s2</em>&nbsp;</td><td>second result of abc formula </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>number of found x-coordinates </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00993">993</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00054">EPSILON</a>.<p>Referenced by <a class="el" href="Geometry_8C-source.html#l01320">Line::getCircleIntersectionPoints</a>().    </td>  </tr></table><a name="d3" doxytag="Geometry::getFirstGeomSeries"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> double Geometry::getFirstGeomSeries </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dSum</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dRatio</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dLength</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the first element of a geometric series given its element, the ratio and the number of steps in the series Normally: s = a + ar + ar^2 + ... + ar^n Now: dSum = dFirst + dFirst*dRatio + ... + dFirst*dRatio^dSteps <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dSum</em>&nbsp;</td><td>sum of the series </td></tr><tr><td valign=top><em>dRatio</em>&nbsp;</td><td>ratio with which the the first term is multiplied </td></tr><tr><td valign=top><em>dSum</em>&nbsp;</td><td>the number of steps to be taken into account </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the first element (a) of a serie </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00958">958</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>Referenced by <a class="el" href="WorldModelHighLevel_8C-source.html#l01070">WorldModel::getFirstSpeedFromDist</a>().    </td>  </tr></table><a name="d4" doxytag="Geometry::getFirstInfGeomSeries"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> double Geometry::getFirstInfGeomSeries </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dSum</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dRatio</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the first element of an infinite geometric series given its first element and the constant ratio between the elements. Note that such an infinite series will only converge when 0&lt;r&lt;1. Normally: s = a + ar + ar^2 + ar^3 + .... Now: dSum = dFirst + dFirst*dRatio + dFirst*dRatio^2... <dl compact><dt><b>

⌨️ 快捷键说明

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