classcircle.html

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

HTML
652
字号
<!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>Circle 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>Circle  Class Reference</h1><code>#include &lt;<a class="el" href="Geometry_8h-source.html">Geometry.h</a>&gt;</code><p>Collaboration diagram for Circle:<p><center><img src="classCircle__coll__graph.gif" border="0" usemap="#Circle__coll__map" alt="Collaboration graph"></center><map name="Circle__coll__map"><area href="classVecPosition.html" shape="rect" coords="14,14,91,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classCircle-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a0">Circle</a> ()</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a1">Circle</a> (<a class="el" href="classVecPosition.html">VecPosition</a> pos, double dR)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a2">show</a> (ostream &amp;os=cout)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a3">setCircle</a> (<a class="el" href="classVecPosition.html">VecPosition</a> pos, double dR)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a4">setRadius</a> (double dR)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a5">getRadius</a> ()</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a6">setCenter</a> (<a class="el" href="classVecPosition.html">VecPosition</a> pos)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classVecPosition.html">VecPosition</a>&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a7">getCenter</a> ()</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a8">getCircumference</a> ()</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a9">getArea</a> ()</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a10">isInside</a> (<a class="el" href="classVecPosition.html">VecPosition</a> pos)</td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a11">getIntersectionPoints</a> (Circle c, <a class="el" href="classVecPosition.html">VecPosition</a> *p1, <a class="el" href="classVecPosition.html">VecPosition</a> *p2)</td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#a12">getIntersectionArea</a> (Circle c)</td></tr><tr><td colspan=2><br><h2>Private Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classVecPosition.html">VecPosition</a>&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#o0">m_posCenter</a></td></tr><tr><td nowrap align=right valign=top>double&nbsp;</td><td valign=bottom><a class="el" href="classCircle.html#o1">m_dRadius</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class represents a circle. A circle is defined by one <a class="el" href="classVecPosition.html">VecPosition</a> (which denotes the center) and its radius. <p><p>Definition at line <a class="el" href="Geometry_8h-source.html#l00219">219</a> of file <a class="el" href="Geometry_8h-source.html">Geometry.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="Circle::Circle"></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"> Circle::Circle </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </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 is the constructor of a circle which initializes a circle with a radius of zero. <p>Definition at line <a class="el" href="Geometry_8C-source.html#l01027">1027</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l01046">setCircle</a>().    </td>  </tr></table><a name="a1" doxytag="Circle::Circle"></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"> Circle::Circle </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classVecPosition.html">VecPosition</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pos</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dR</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 is the constructor of a circle. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pos</em>&nbsp;</td><td>first point that defines the center of circle </td></tr><tr><td valign=top><em>dR</em>&nbsp;</td><td>the radius of the circle </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>circle with pos as center and radius as radius </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01020">1020</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l01046">setCircle</a>().    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a9" doxytag="Circle::getArea"></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 Circle::getArea </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </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 method returns the area inside the circle. <dl compact><dt><b>Returns: </b><dd>area inside the circle </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01100">1100</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l01070">getRadius</a>().    </td>  </tr></table><a name="a7" doxytag="Circle::getCenter"></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="classVecPosition.html">VecPosition</a> Circle::getCenter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </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 method returns the center of the circle. <dl compact><dt><b>Returns: </b><dd>center of the circle </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01086">1086</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8h-source.html#l00221">m_posCenter</a>.<p>Referenced by <a class="el" href="Geometry_8C-source.html#l01320">Line::getCircleIntersectionPoints</a>(), <a class="el" href="Geometry_8C-source.html#l01174">getIntersectionArea</a>(), and <a class="el" href="Geometry_8C-source.html#l01120">getIntersectionPoints</a>().    </td>  </tr></table><a name="a8" doxytag="Circle::getCircumference"></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 Circle::getCircumference </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </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 method returns the circumference of the circle. <dl compact><dt><b>Returns: </b><dd>circumference of the circle </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01093">1093</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>References <a class="el" href="Geometry_8C-source.html#l01070">getRadius</a>().    </td>  </tr></table><a name="a12" doxytag="Circle::getIntersectionArea"></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 Circle::getIntersectionArea </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">Circle&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>c</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 method returns the size of the intersection area of two circles. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>c</em>&nbsp;</td><td>circle with which intersection should be determined </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>size of the intersection area. </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01174">1174</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>, <a class="el" href="Geometry_8C-source.html#l01086">getCenter</a>(), <a class="el" href="Geometry_8C-source.html#l00589">VecPosition::getDistanceTo</a>(), <a class="el" href="Geometry_8C-source.html#l01120">getIntersectionPoints</a>(), <a class="el" href="Geometry_8C-source.html#l01070">getRadius</a>(), <a class="el" href="Geometry_8C-source.html#l00847">VecPosition::getVecPositionOnLineFraction</a>(), and <a class="el" href="Geometry_8C-source.html#l00075">min</a>().    </td>  </tr></table><a name="a11" doxytag="Circle::getIntersectionPoints"></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 Circle::getIntersectionPoints </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">Circle&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>c</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classVecPosition.html">VecPosition</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>p1</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classVecPosition.html">VecPosition</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>p2</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 method returns the two possible intersection points between two circles. This method returns the number of solutions that were found. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>c</em>&nbsp;</td><td>circle with which intersection should be found </td></tr><tr><td valign=top><em>p1</em>&nbsp;</td><td>will be filled with first solution </td></tr><tr><td valign=top><em>p2</em>&nbsp;</td><td>will be filled with second solution </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>number of solutions. </dl><p>Definition at line <a class="el" href="Geometry_8C-source.html#l01120">1120</a> of file <a class="el" href="Geometry_8C-source.html">Geometry.C</a>.<p>

⌨️ 快捷键说明

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