geometry_8c.html

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

HTML
798
字号
<!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.C File 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.C File Reference</h1><code>#include "<a class="el" href="Geometry_8h-source.html">Geometry.h</a>"</code><br><code>#include &lt;stdio.h&gt;</code><br><p>Include dependency graph for Geometry.C:<p><center><img src="Geometry_8C__incl.gif" border="0" usemap="#Geometry.C_map" alt="Include dependency graph"></center><map name="Geometry.C_map"><area href="Geometry_8h.html" shape="rect" coords="35,80,110,99" alt=""></map><p><a href="Geometry_8C-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a0">sign</a> (double d1)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a1">max</a> (double d1, double d2)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a2">min</a> (double d1, double d2)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a3">Rad2Deg</a> (<a class="el" href="Geometry_8h.html#a1">AngRad</a> x)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a1">AngRad</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a4">Deg2Rad</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> x)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a5">cosDeg</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> x)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a6">sinDeg</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> x)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a7">tanDeg</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> x)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a8">atanDeg</a> (double x)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a9">atan2Deg</a> (double x, double y)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a10">acosDeg</a> (double x)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a11">asinDeg</a> (double x)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a12">isAngInInterval</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> ang, <a class="el" href="Geometry_8h.html#a2">AngDeg</a> angMin, <a class="el" href="Geometry_8h.html#a2">AngDeg</a> angMax)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a13">getBisectorTwoAngles</a> (<a class="el" href="Geometry_8h.html#a2">AngDeg</a> angMin, <a class="el" href="Geometry_8h.html#a2">AngDeg</a> angMax)</td></tr><tr><td nowrap align=right valign=top>ostream &amp;&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a14">operator&lt;&lt;</a> (ostream &amp;os, <a class="el" href="classVecPosition.html">VecPosition</a> v)</td></tr><tr><td nowrap align=right valign=top>ostream &amp;&nbsp;</td><td valign=bottom><a class="el" href="Geometry_8C.html#a15">operator&lt;&lt;</a> (ostream &amp;os, <a class="el" href="classLine.html">Line</a> l)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2> <pre><b>File:</b>          <a class="el" href="Geometry_8C.html">Geometry.C</a><b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn 2001<b>Authors:</b>       Jelle Kok and Remco de Boer<b>Created:</b>       13/02/2001<b>Last Revision:</b> 17/05/2001<b>Contents:</b>      class declarations of different geometry classes:<br><ul><li><a class="el" href="classVecPosition.html">VecPosition</a>: representation of a point<li><a class="el" href="classLine.html">Line</a>:        representation of a line<li><a class="el" href="classRectangle.html">Rectangle</a>:   representation of a rectangle<li><a class="el" href="classCircle.html">Circle</a>:      representation of a circle<li><a class="el" href="classGeometry.html">Geometry</a>:    different geometry methods</ul>Furthermore it contains some goniometric functions to work with sine, cosineand tangent functions using degrees and some utility functions to returnthe maximum and the minimum of two values.</pre><p><p>Definition in file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<hr><h2>Function Documentation</h2><a name="a10" doxytag="Geometry.C::acosDeg"></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"> <a class="el" href="Geometry_8h.html#a2">AngDeg</a> acosDeg </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>          <td class="md" valign="top">)&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>This function returns the principal value of the arc cosine of x in degrees using the built-in arc cosine function which returns this value in radians. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>a double value </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the arc cosine of the given value in degrees </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00155">155</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, and <a class="el" href="Geometry_8C-source.html#l00085">Rad2Deg</a>().    </td>  </tr></table><a name="a11" doxytag="Geometry.C::asinDeg"></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"> <a class="el" href="Geometry_8h.html#a2">AngDeg</a> asinDeg </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>          <td class="md" valign="top">)&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>This function returns the principal value of the arc sine of x in degrees using the built-in arc sine function which returns this value in radians. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>a double value </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the arc sine of the given value in degrees </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00169">169</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, and <a class="el" href="Geometry_8C-source.html#l00085">Rad2Deg</a>().    </td>  </tr></table><a name="a9" doxytag="Geometry.C::atan2Deg"></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 atan2Deg </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>x</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>y</em></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>This function returns the principal value of the arc tangent of y/x in degrees using the signs of both arguments to determine the quadrant of the return value. For this the built-in 'atan2' function is used which returns this value in radians. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>a double value </td></tr><tr><td valign=top><em>y</em>&nbsp;</td><td>a double value </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the arc tangent of y/x in degrees taking the signs of x and y into account </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00143">143</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>, and <a class="el" href="Geometry_8C-source.html#l00085">Rad2Deg</a>().    </td>  </tr></table><a name="a8" doxytag="Geometry.C::atanDeg"></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"> <a class="el" href="Geometry_8h.html#a2">AngDeg</a> atanDeg </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>          <td class="md" valign="top">)&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>This function returns the principal value of the arc tangent of x in degrees using the built-in arc tangent function which returns this value in radians. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>a double value </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the arc tangent of the given value in degrees </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l00130">130</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, and <a class="el" href="Geometry_8C-source.html#l00085">Rad2Deg</a>().    </td>  </tr></table><a name="a5" doxytag="Geometry.C::cosDeg"></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 cosDeg </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="Geometry_8h.html#a2">AngDeg</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>          <td class="md" valign="top">)&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>This function returns the cosine of a given angle in degrees using the built-in cosine function that works with angles in radians. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>an angle in degrees </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>the cosine of the given angle </dl><p>

⌨️ 快捷键说明

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