geos_390_docs/classgeos_1_1geom_1_1Triang...

394 lines
20 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GEOS: geos::geom::Triangle Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GEOS
&#160;<span id="projectnumber">3.9.1dev</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacegeos.html">geos</a></li><li class="navelem"><a class="el" href="namespacegeos_1_1geom.html">geom</a></li><li class="navelem"><a class="el" href="classgeos_1_1geom_1_1Triangle.html">Triangle</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="classgeos_1_1geom_1_1Triangle-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">geos::geom::Triangle Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Represents a planar triangle, and provides methods for calculating various properties of triangles.
<a href="classgeos_1_1geom_1_1Triangle.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="Triangle_8h_source.html">Triangle.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for geos::geom::Triangle:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classgeos_1_1geom_1_1Triangle__coll__graph.svg" width="286" height="163"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a068233b8bc8d7b7aed1260beb36d4852"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#a068233b8bc8d7b7aed1260beb36d4852">Triangle</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;nP0, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;nP1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;nP2)</td></tr>
<tr class="separator:a068233b8bc8d7b7aed1260beb36d4852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5b0905bee3ed78c709e6f22b3062c7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#ad5b0905bee3ed78c709e6f22b3062c7e">inCentre</a> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;resultPoint)</td></tr>
<tr class="memdesc:ad5b0905bee3ed78c709e6f22b3062c7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The inCentre of a triangle is the point which is equidistant from the sides of the triangle. <a href="#ad5b0905bee3ed78c709e6f22b3062c7e">More...</a><br /></td></tr>
<tr class="separator:ad5b0905bee3ed78c709e6f22b3062c7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64789a74d87116ae141e68974940a08d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#a64789a74d87116ae141e68974940a08d">circumcentre</a> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;resultPoint)</td></tr>
<tr class="memdesc:a64789a74d87116ae141e68974940a08d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the circumcentre of a triangle. <a href="#a64789a74d87116ae141e68974940a08d">More...</a><br /></td></tr>
<tr class="separator:a64789a74d87116ae141e68974940a08d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6a86e8e7f920de055b1444fb90edb3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#a9a6a86e8e7f920de055b1444fb90edb3">circumcentreDD</a> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;resultPoint)</td></tr>
<tr class="separator:a9a6a86e8e7f920de055b1444fb90edb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8707e552329befd166b07789f8260ee6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#a8707e552329befd166b07789f8260ee6">isIsoceles</a> ()</td></tr>
<tr class="separator:a8707e552329befd166b07789f8260ee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aa5cf3994bd12f3001b34354995602ff1"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#aa5cf3994bd12f3001b34354995602ff1">circumcentre</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;<a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab30ed7979f268c708c92d92c77e35f23">p0</a>, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;<a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab5e0e2421b7462f9abe892da69f18953">p1</a>, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;<a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab381328587badbe69cc847133f56c79e">p2</a>)</td></tr>
<tr class="memdesc:aa5cf3994bd12f3001b34354995602ff1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the circumcentre of a triangle. <a href="#aa5cf3994bd12f3001b34354995602ff1">More...</a><br /></td></tr>
<tr class="separator:aa5cf3994bd12f3001b34354995602ff1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ab30ed7979f268c708c92d92c77e35f23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab30ed7979f268c708c92d92c77e35f23">p0</a></td></tr>
<tr class="separator:ab30ed7979f268c708c92d92c77e35f23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5e0e2421b7462f9abe892da69f18953"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab5e0e2421b7462f9abe892da69f18953">p1</a></td></tr>
<tr class="separator:ab5e0e2421b7462f9abe892da69f18953"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab381328587badbe69cc847133f56c79e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#ab381328587badbe69cc847133f56c79e">p2</a></td></tr>
<tr class="separator:ab381328587badbe69cc847133f56c79e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:ac39b3cb5f88c0207ab1ae0cd114f2b74"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Triangle.html#ac39b3cb5f88c0207ab1ae0cd114f2b74">det</a> (double m00, double m01, double m10, double m11) const </td></tr>
<tr class="separator:ac39b3cb5f88c0207ab1ae0cd114f2b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a planar triangle, and provides methods for calculating various properties of triangles. </p>
<p>Definition at line <a class="el" href="Triangle_8h_source.html#l00031">31</a> of file <a class="el" href="Triangle_8h_source.html">Triangle.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a068233b8bc8d7b7aed1260beb36d4852"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">geos::geom::Triangle::Triangle </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>nP0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>nP1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>nP2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="Triangle_8h_source.html#l00035">35</a> of file <a class="el" href="Triangle_8h_source.html">Triangle.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a64789a74d87116ae141e68974940a08d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void geos::geom::Triangle::circumcentre </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>resultPoint</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the circumcentre of a triangle. </p>
<p>The circumcentre is the centre of the circumcircle, the smallest circle which encloses the triangle. It is also the common intersection point of the perpendicular bisectors of the sides of the triangle, and is the only point which has equal distance to all three vertices of the triangle.</p>
<p>The circumcentre does not necessarily lie within the triangle. For example, the circumcentre of an obtuse isoceles triangle lies outside the triangle.</p>
<p>This method uses an algorithm due to J.R.Shewchuk which uses normalization to the origin to improve the accuracy of computation. (See <em>Lecture Notes on Geometric Robustness</em>, Jonathan Richard Shewchuk, 1999).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">resultPoint</td><td>the point into which to write the inCentre of the triangle </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa5cf3994bd12f3001b34354995602ff1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> geos::geom::Triangle::circumcentre </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>p0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>p1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>p2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the circumcentre of a triangle. </p>
</div>
</div>
<a class="anchor" id="a9a6a86e8e7f920de055b1444fb90edb3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void geos::geom::Triangle::circumcentreDD </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>resultPoint</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="ac39b3cb5f88c0207ab1ae0cd114f2b74"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double geos::geom::Triangle::det </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m00</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m01</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m10</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>m11</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the determinant of a 2x2 matrix. Uses standard double-precision arithmetic, so is susceptible to round-off error.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">m00</td><td>the [0,0] entry of the matrix </td></tr>
<tr><td class="paramname">m01</td><td>the [0,1] entry of the matrix </td></tr>
<tr><td class="paramname">m10</td><td>the [1,0] entry of the matrix </td></tr>
<tr><td class="paramname">m11</td><td>the [1,1] entry of the matrix </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the determinant </dd></dl>
</div>
</div>
<a class="anchor" id="ad5b0905bee3ed78c709e6f22b3062c7e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void geos::geom::Triangle::inCentre </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&#160;</td>
<td class="paramname"><em>resultPoint</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The inCentre of a triangle is the point which is equidistant from the sides of the triangle. </p>
<p>This is also the point at which the bisectors of the angles meet.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">resultPoint</td><td>the point into which to write the inCentre of the triangle </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8707e552329befd166b07789f8260ee6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool geos::geom::Triangle::isIsoceles </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ab30ed7979f268c708c92d92c77e35f23"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> geos::geom::Triangle::p0</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="Triangle_8h_source.html#l00033">33</a> of file <a class="el" href="Triangle_8h_source.html">Triangle.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab5e0e2421b7462f9abe892da69f18953"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> geos::geom::Triangle::p1</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="Triangle_8h_source.html#l00033">33</a> of file <a class="el" href="Triangle_8h_source.html">Triangle.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab381328587badbe69cc847133f56c79e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> geos::geom::Triangle::p2</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="Triangle_8h_source.html#l00033">33</a> of file <a class="el" href="Triangle_8h_source.html">Triangle.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Triangle_8h_source.html">Triangle.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>