You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
962 lines
50 KiB
HTML
962 lines
50 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.5"/>
|
|
<title>Otter: Otter.Polygon 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="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
$(window).load(resizeHeight);
|
|
</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</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="projectlogo"><img alt="Logo" src="otterlogosmall.png"/></td>
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Otter
|
|
 <span id="projectnumber">0.9.8.91</span>
|
|
</div>
|
|
<div id="projectbrief">2d Game Development Framework based on SFML.Net</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.5 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Packages</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('class_otter_1_1_polygon.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Properties</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="#properties">Properties</a> |
|
|
<a href="class_otter_1_1_polygon-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Otter.Polygon Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Class representing a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>.
|
|
<a href="class_otter_1_1_polygon.html#details">More...</a></p>
|
|
<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:adcfb5663325afb33f6107d0bfb0c4ca6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#adcfb5663325afb33f6107d0bfb0c4ca6">Polygon</a> (<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> firstPoint, params <a class="el" href="struct_otter_1_1_vector2.html">Vector2</a>[] points)</td></tr>
|
|
<tr class="memdesc:adcfb5663325afb33f6107d0bfb0c4ca6"><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. <a href="#adcfb5663325afb33f6107d0bfb0c4ca6">More...</a><br/></td></tr>
|
|
<tr class="separator:adcfb5663325afb33f6107d0bfb0c4ca6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af6b0c5bf22d6ee002f95ee6eab5b2f07"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#af6b0c5bf22d6ee002f95ee6eab5b2f07">Polygon</a> (<a class="el" href="class_otter_1_1_polygon.html">Polygon</a> copy)</td></tr>
|
|
<tr class="memdesc:af6b0c5bf22d6ee002f95ee6eab5b2f07"><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. <a href="#af6b0c5bf22d6ee002f95ee6eab5b2f07">More...</a><br/></td></tr>
|
|
<tr class="separator:af6b0c5bf22d6ee002f95ee6eab5b2f07"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a59d9767706c14cebcddf49dbe4039596"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a59d9767706c14cebcddf49dbe4039596">Polygon</a> (params float[] points)</td></tr>
|
|
<tr class="memdesc:a59d9767706c14cebcddf49dbe4039596"><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. <a href="#a59d9767706c14cebcddf49dbe4039596">More...</a><br/></td></tr>
|
|
<tr class="separator:a59d9767706c14cebcddf49dbe4039596"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5dae8a956260da765925ee6a3c209d83"><td class="memItemLeft" align="right" valign="top">List< <a class="el" href="class_otter_1_1_line2.html">Line2</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a5dae8a956260da765925ee6a3c209d83">GetEdgesAsLines</a> ()</td></tr>
|
|
<tr class="memdesc:a5dae8a956260da765925ee6a3c209d83"><td class="mdescLeft"> </td><td class="mdescRight">Get a list of all the edges of the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> as <a class="el" href="class_otter_1_1_line2.html" title="Class for a simple line with two points. ">Line2</a> objects. <a href="#a5dae8a956260da765925ee6a3c209d83">More...</a><br/></td></tr>
|
|
<tr class="separator:a5dae8a956260da765925ee6a3c209d83"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a12f1504f73f51438794748a5c1ecb682"><td class="memItemLeft" align="right" valign="top">override string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a12f1504f73f51438794748a5c1ecb682">ToString</a> ()</td></tr>
|
|
<tr class="memdesc:a12f1504f73f51438794748a5c1ecb682"><td class="mdescLeft"> </td><td class="mdescRight">Convert to a string. <a href="#a12f1504f73f51438794748a5c1ecb682">More...</a><br/></td></tr>
|
|
<tr class="separator:a12f1504f73f51438794748a5c1ecb682"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9679b4bea6622d0a419b92daff77c43e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a9679b4bea6622d0a419b92daff77c43e">OffsetPoints</a> (<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> vector)</td></tr>
|
|
<tr class="memdesc:a9679b4bea6622d0a419b92daff77c43e"><td class="mdescLeft"> </td><td class="mdescRight">Offset all the points by a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> amount. <a href="#a9679b4bea6622d0a419b92daff77c43e">More...</a><br/></td></tr>
|
|
<tr class="separator:a9679b4bea6622d0a419b92daff77c43e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa3653b510ebd7ae2fdb65049b959892f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#aa3653b510ebd7ae2fdb65049b959892f">Rotate</a> (float amount, float aroundX, float aroundY)</td></tr>
|
|
<tr class="memdesc:aa3653b510ebd7ae2fdb65049b959892f"><td class="mdescLeft"> </td><td class="mdescRight">Rotate the polygon by a specified amount. <a href="#aa3653b510ebd7ae2fdb65049b959892f">More...</a><br/></td></tr>
|
|
<tr class="separator:aa3653b510ebd7ae2fdb65049b959892f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4cae30794567d00bc68096a89af88522"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a4cae30794567d00bc68096a89af88522">Scale</a> (float amountX, float amountY, float aroundX, float aroundY)</td></tr>
|
|
<tr class="memdesc:a4cae30794567d00bc68096a89af88522"><td class="mdescLeft"> </td><td class="mdescRight">Scale the polygon by a specified amount. <a href="#a4cae30794567d00bc68096a89af88522">More...</a><br/></td></tr>
|
|
<tr class="separator:a4cae30794567d00bc68096a89af88522"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab2a064ffc3f511b6e4bdff9b391fd267"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#ab2a064ffc3f511b6e4bdff9b391fd267">Clear</a> ()</td></tr>
|
|
<tr class="memdesc:ab2a064ffc3f511b6e4bdff9b391fd267"><td class="mdescLeft"> </td><td class="mdescRight">Clear all points. <a href="#ab2a064ffc3f511b6e4bdff9b391fd267">More...</a><br/></td></tr>
|
|
<tr class="separator:ab2a064ffc3f511b6e4bdff9b391fd267"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae4cd9ee2c7c9e3826c64a99e9f072743"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#ae4cd9ee2c7c9e3826c64a99e9f072743">OffsetPoints</a> (float x, float y)</td></tr>
|
|
<tr class="memdesc:ae4cd9ee2c7c9e3826c64a99e9f072743"><td class="mdescLeft"> </td><td class="mdescRight">Offset all the points by a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> amount. <a href="#ae4cd9ee2c7c9e3826c64a99e9f072743">More...</a><br/></td></tr>
|
|
<tr class="separator:ae4cd9ee2c7c9e3826c64a99e9f072743"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a475bb5b0d15feeec02714f0e1652dd9b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a475bb5b0d15feeec02714f0e1652dd9b">ContainsPoint</a> (<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> point)</td></tr>
|
|
<tr class="memdesc:a475bb5b0d15feeec02714f0e1652dd9b"><td class="mdescLeft"> </td><td class="mdescRight">Check to see if a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> contains a point. <a href="#a475bb5b0d15feeec02714f0e1652dd9b">More...</a><br/></td></tr>
|
|
<tr class="separator:a475bb5b0d15feeec02714f0e1652dd9b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5a4b8f31fc62a6ca1e7f5835bb7b3e08"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a5a4b8f31fc62a6ca1e7f5835bb7b3e08">ContainsPoint</a> (float x, float y)</td></tr>
|
|
<tr class="memdesc:a5a4b8f31fc62a6ca1e7f5835bb7b3e08"><td class="mdescLeft"> </td><td class="mdescRight">Check to see if a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> contains a point. <a href="#a5a4b8f31fc62a6ca1e7f5835bb7b3e08">More...</a><br/></td></tr>
|
|
<tr class="separator:a5a4b8f31fc62a6ca1e7f5835bb7b3e08"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9ab566aae634061611098798abdae025"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a9ab566aae634061611098798abdae025">Add</a> (<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> point)</td></tr>
|
|
<tr class="memdesc:a9ab566aae634061611098798abdae025"><td class="mdescLeft"> </td><td class="mdescRight">Add a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> to the list of points. <a href="#a9ab566aae634061611098798abdae025">More...</a><br/></td></tr>
|
|
<tr class="separator:a9ab566aae634061611098798abdae025"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a50abe8959cdcef9bc23537ef5765079e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a50abe8959cdcef9bc23537ef5765079e">Add</a> (float x, float y)</td></tr>
|
|
<tr class="memdesc:a50abe8959cdcef9bc23537ef5765079e"><td class="mdescLeft"> </td><td class="mdescRight">Add an X Y position to the list of points. <a href="#a50abe8959cdcef9bc23537ef5765079e">More...</a><br/></td></tr>
|
|
<tr class="separator:a50abe8959cdcef9bc23537ef5765079e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2179017e84a9e485e129819c6d019e3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_otter_1_1_range.html">Range</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a2179017e84a9e485e129819c6d019e3c">Projection</a> (<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> axis)</td></tr>
|
|
<tr class="memdesc:a2179017e84a9e485e129819c6d019e3c"><td class="mdescLeft"> </td><td class="mdescRight">Project the polygon onto an axis. <a href="#a2179017e84a9e485e129819c6d019e3c">More...</a><br/></td></tr>
|
|
<tr class="separator:a2179017e84a9e485e129819c6d019e3c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a321c8c62b110ba29a7fad81514702133"><td class="memItemLeft" align="right" valign="top">List< <a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a321c8c62b110ba29a7fad81514702133">GetAxes</a> ()</td></tr>
|
|
<tr class="memdesc:a321c8c62b110ba29a7fad81514702133"><td class="mdescLeft"> </td><td class="mdescRight">Get the axes to project on. <a href="#a321c8c62b110ba29a7fad81514702133">More...</a><br/></td></tr>
|
|
<tr class="separator:a321c8c62b110ba29a7fad81514702133"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af213a127e169cd446fe4fcd2dec66a5a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#af213a127e169cd446fe4fcd2dec66a5a">Overlap</a> (<a class="el" href="class_otter_1_1_polygon.html">Polygon</a> other)</td></tr>
|
|
<tr class="memdesc:af213a127e169cd446fe4fcd2dec66a5a"><td class="mdescLeft"> </td><td class="mdescRight">Test another <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> for an overlap. Will not work if either <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> is concave! <a href="#af213a127e169cd446fe4fcd2dec66a5a">More...</a><br/></td></tr>
|
|
<tr class="separator:af213a127e169cd446fe4fcd2dec66a5a"><td class="memSeparator" colspan="2"> </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:a2ff41c886e0c8d01a23fa2e277fb8b90"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_otter_1_1_polygon.html">Polygon</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a2ff41c886e0c8d01a23fa2e277fb8b90">CreateCircle</a> (float radius, int steps=32)</td></tr>
|
|
<tr class="memdesc:a2ff41c886e0c8d01a23fa2e277fb8b90"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> in the shape of a circle. <a href="#a2ff41c886e0c8d01a23fa2e277fb8b90">More...</a><br/></td></tr>
|
|
<tr class="separator:a2ff41c886e0c8d01a23fa2e277fb8b90"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5286358161c66850f87045ac85d225ab"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_otter_1_1_polygon.html">Polygon</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a5286358161c66850f87045ac85d225ab">CreateRectangle</a> (float width, float height)</td></tr>
|
|
<tr class="memdesc:a5286358161c66850f87045ac85d225ab"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> in the shape of a rectangle. <a href="#a5286358161c66850f87045ac85d225ab">More...</a><br/></td></tr>
|
|
<tr class="separator:a5286358161c66850f87045ac85d225ab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
|
|
Properties</h2></td></tr>
|
|
<tr class="memitem:a1e1297b3c9c9f15aae582b38ff40f5e9"><td class="memItemLeft" align="right" valign="top">List< <a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a1e1297b3c9c9f15aae582b38ff40f5e9">Points</a><code> [get, set]</code></td></tr>
|
|
<tr class="memdesc:a1e1297b3c9c9f15aae582b38ff40f5e9"><td class="mdescLeft"> </td><td class="mdescRight">The list of <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> points. <a href="#a1e1297b3c9c9f15aae582b38ff40f5e9">More...</a><br/></td></tr>
|
|
<tr class="separator:a1e1297b3c9c9f15aae582b38ff40f5e9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a15ef690f37141d10c8d626547397dcb3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a15ef690f37141d10c8d626547397dcb3">Count</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:a15ef690f37141d10c8d626547397dcb3"><td class="mdescLeft"> </td><td class="mdescRight">The number of points in the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. <a href="#a15ef690f37141d10c8d626547397dcb3">More...</a><br/></td></tr>
|
|
<tr class="separator:a15ef690f37141d10c8d626547397dcb3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abf5f466931d3e5774ca03699d4c357e1"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#abf5f466931d3e5774ca03699d4c357e1">Width</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:abf5f466931d3e5774ca03699d4c357e1"><td class="mdescLeft"> </td><td class="mdescRight">The Width of the polygon determined by the right most point minus the left most point. <a href="#abf5f466931d3e5774ca03699d4c357e1">More...</a><br/></td></tr>
|
|
<tr class="separator:abf5f466931d3e5774ca03699d4c357e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9982041ce13ee90a147b84936badb14e"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a9982041ce13ee90a147b84936badb14e">Height</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:a9982041ce13ee90a147b84936badb14e"><td class="mdescLeft"> </td><td class="mdescRight">The Height of the polygon determined by the bottom most point minus the top most point. <a href="#a9982041ce13ee90a147b84936badb14e">More...</a><br/></td></tr>
|
|
<tr class="separator:a9982041ce13ee90a147b84936badb14e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adb02f931868cde3cf8a747b54d393fde"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#adb02f931868cde3cf8a747b54d393fde">HalfWidth</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:adb02f931868cde3cf8a747b54d393fde"><td class="mdescLeft"> </td><td class="mdescRight">Half of the Width. <a href="#adb02f931868cde3cf8a747b54d393fde">More...</a><br/></td></tr>
|
|
<tr class="separator:adb02f931868cde3cf8a747b54d393fde"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a952165e98d181b833fb43b16b4809f4a"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#a952165e98d181b833fb43b16b4809f4a">HalfHeight</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:a952165e98d181b833fb43b16b4809f4a"><td class="mdescLeft"> </td><td class="mdescRight">Half of the Height. <a href="#a952165e98d181b833fb43b16b4809f4a">More...</a><br/></td></tr>
|
|
<tr class="separator:a952165e98d181b833fb43b16b4809f4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa867999e00391a1c1a118347b75e5130"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa867999e00391a1c1a118347b75e5130"></a>
|
|
float </td><td class="memItemRight" valign="bottom"><b>Left</b><code> [get]</code></td></tr>
|
|
<tr class="separator:aa867999e00391a1c1a118347b75e5130"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a19c2fd26f3ae29b95d3d1c649b126a80"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19c2fd26f3ae29b95d3d1c649b126a80"></a>
|
|
float </td><td class="memItemRight" valign="bottom"><b>Right</b><code> [get]</code></td></tr>
|
|
<tr class="separator:a19c2fd26f3ae29b95d3d1c649b126a80"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeaaf0605227adff76b79773d6e5e39ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeaaf0605227adff76b79773d6e5e39ad"></a>
|
|
float </td><td class="memItemRight" valign="bottom"><b>Top</b><code> [get]</code></td></tr>
|
|
<tr class="separator:aeaaf0605227adff76b79773d6e5e39ad"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab5f7b42d6a0db9844e9e0ae0584a285c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5f7b42d6a0db9844e9e0ae0584a285c"></a>
|
|
float </td><td class="memItemRight" valign="bottom"><b>Bottom</b><code> [get]</code></td></tr>
|
|
<tr class="separator:ab5f7b42d6a0db9844e9e0ae0584a285c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa4ed584c5935301a2c0832297ad1fdab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_polygon.html#aa4ed584c5935301a2c0832297ad1fdab">this[int index]</a><code> [get, set]</code></td></tr>
|
|
<tr class="memdesc:aa4ed584c5935301a2c0832297ad1fdab"><td class="mdescLeft"> </td><td class="mdescRight">The list of <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> points in the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. <a href="#aa4ed584c5935301a2c0832297ad1fdab">More...</a><br/></td></tr>
|
|
<tr class="separator:aa4ed584c5935301a2c0832297ad1fdab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Class representing a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="adcfb5663325afb33f6107d0bfb0c4ca6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Otter.Polygon.Polygon </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td>
|
|
<td class="paramname"><em>firstPoint</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">params <a class="el" href="struct_otter_1_1_vector2.html">Vector2</a>[] </td>
|
|
<td class="paramname"><em>points</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">points</td><td>The <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> points composing the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af6b0c5bf22d6ee002f95ee6eab5b2f07"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Otter.Polygon.Polygon </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_otter_1_1_polygon.html">Polygon</a> </td>
|
|
<td class="paramname"><em>copy</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">copy</td><td>The source <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> to copy.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a59d9767706c14cebcddf49dbe4039596"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Otter.Polygon.Polygon </td>
|
|
<td>(</td>
|
|
<td class="paramtype">params float[] </td>
|
|
<td class="paramname"><em>points</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create a new <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">points</td><td>A series of points to create the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> from (x1, y1, x2, y2, x3, y3...)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a9ab566aae634061611098798abdae025"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.Add </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td>
|
|
<td class="paramname"><em>point</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Add a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> to the list of points. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">point</td><td>The <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> to add the points.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a50abe8959cdcef9bc23537ef5765079e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.Add </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>y</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Add an X Y position to the list of points. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">x</td><td>The X position to add.</td></tr>
|
|
<tr><td class="paramname">y</td><td>The Y position to add.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab2a064ffc3f511b6e4bdff9b391fd267"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.Clear </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Clear all points. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a475bb5b0d15feeec02714f0e1652dd9b"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool Otter.Polygon.ContainsPoint </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td>
|
|
<td class="paramname"><em>point</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Check to see if a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> contains a point. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">point</td><td>The point to check for.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the polygon contains the point.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5a4b8f31fc62a6ca1e7f5835bb7b3e08"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool Otter.Polygon.ContainsPoint </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>y</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Check to see if a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> contains a point. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">x</td><td>The X position of the point to check for.</td></tr>
|
|
<tr><td class="paramname">y</td><td>The Y position of the point to check for.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the polygon contains the point.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2ff41c886e0c8d01a23fa2e277fb8b90"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="class_otter_1_1_polygon.html">Polygon</a> Otter.Polygon.CreateCircle </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>radius</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>steps</em> = <code>32</code> </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>Creates a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> in the shape of a circle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">radius</td><td>The radius of the circle.</td></tr>
|
|
<tr><td class="paramname">steps</td><td>How many steps to use to create the circle (higher is rounder.)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A circle shaped <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5286358161c66850f87045ac85d225ab"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="class_otter_1_1_polygon.html">Polygon</a> Otter.Polygon.CreateRectangle </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>width</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>height</em> </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>Creates a <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> in the shape of a rectangle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">width</td><td>The width of the rectangle.</td></tr>
|
|
<tr><td class="paramname">height</td><td>The height of the rectangle.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>A rectangle shaped <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a321c8c62b110ba29a7fad81514702133"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">List<<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a>> Otter.Polygon.GetAxes </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the axes to project on. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>A list of normals from the polygon.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5dae8a956260da765925ee6a3c209d83"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">List<<a class="el" href="class_otter_1_1_line2.html">Line2</a>> Otter.Polygon.GetEdgesAsLines </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get a list of all the edges of the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> as <a class="el" href="class_otter_1_1_line2.html" title="Class for a simple line with two points. ">Line2</a> objects. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="class_otter_1_1_line2.html" title="Class for a simple line with two points. ">Line2</a> list of all edges.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9679b4bea6622d0a419b92daff77c43e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.OffsetPoints </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td>
|
|
<td class="paramname"><em>vector</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Offset all the points by a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> amount. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">vector</td><td>The offset amount.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ae4cd9ee2c7c9e3826c64a99e9f072743"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.OffsetPoints </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>y</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Offset all the points by a <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> amount. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">vector</td><td>The offset amount.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af213a127e169cd446fe4fcd2dec66a5a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool Otter.Polygon.Overlap </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_otter_1_1_polygon.html">Polygon</a> </td>
|
|
<td class="paramname"><em>other</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Test another <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> for an overlap. Will not work if either <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a> is concave! </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">other</td><td>The other polygon to check.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if this polygon overlaps the other polygon.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2179017e84a9e485e129819c6d019e3c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="class_otter_1_1_range.html">Range</a> Otter.Polygon.Projection </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> </td>
|
|
<td class="paramname"><em>axis</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Project the polygon onto an axis. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">axis</td><td>The axis to project on.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The min and max values of the projection.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa3653b510ebd7ae2fdb65049b959892f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.Rotate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>amount</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>aroundX</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>aroundY</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Rotate the polygon by a specified amount. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">amount</td><td>The amount in degrees to rotate.</td></tr>
|
|
<tr><td class="paramname">aroundX</td><td>The X position to rotate around.</td></tr>
|
|
<tr><td class="paramname">aroundY</td><td>The Y position to rotate around.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4cae30794567d00bc68096a89af88522"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void Otter.Polygon.Scale </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>amountX</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>amountY</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>aroundX</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>aroundY</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Scale the polygon by a specified amount. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">amountX</td><td>The amount to scale horizontally.</td></tr>
|
|
<tr><td class="paramname">amountY</td><td>The amount to scale veritcally.</td></tr>
|
|
<tr><td class="paramname">aroundX</td><td>The X position to scale around.</td></tr>
|
|
<tr><td class="paramname">aroundY</td><td>The Y position to scale around.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a12f1504f73f51438794748a5c1ecb682"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">override string Otter.Polygon.ToString </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert to a string. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>String of data about the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Property Documentation</h2>
|
|
<a class="anchor" id="a15ef690f37141d10c8d626547397dcb3"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int Otter.Polygon.Count</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The number of points in the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a952165e98d181b833fb43b16b4809f4a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">float Otter.Polygon.HalfHeight</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Half of the Height. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="adb02f931868cde3cf8a747b54d393fde"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">float Otter.Polygon.HalfWidth</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Half of the Width. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9982041ce13ee90a147b84936badb14e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">float Otter.Polygon.Height</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The Height of the polygon determined by the bottom most point minus the top most point. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1e1297b3c9c9f15aae582b38ff40f5e9"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">List<<a class="el" href="struct_otter_1_1_vector2.html">Vector2</a>> Otter.Polygon.Points</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The list of <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> points. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa4ed584c5935301a2c0832297ad1fdab"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="struct_otter_1_1_vector2.html">Vector2</a> Otter.Polygon.this[int index]</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The list of <a class="el" href="struct_otter_1_1_vector2.html" title="Struct for representing a Vector2. ">Vector2</a> points in the <a class="el" href="class_otter_1_1_polygon.html" title="Class representing a Polygon. ">Polygon</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">index</td><td>The index of the point.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>The point at the specified index.</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abf5f466931d3e5774ca03699d4c357e1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">float Otter.Polygon.Width</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The Width of the polygon determined by the right most point minus the left most point. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>Otter/Utility/Polygon.cs</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespace_otter.html">Otter</a></li><li class="navelem"><a class="el" href="class_otter_1_1_polygon.html">Polygon</a></li>
|
|
<li class="footer">Generated on Thu May 12 2016 18:16:53 for Otter by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|