<!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>Crystal Space 1.2.1: csChainHull2D Class Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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> <h1>csChainHull2D Class Reference<br> <small> [<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small> </h1><!-- doxytag: class="csChainHull2D" -->This is Andrew's monotone chain 2D convex hull algorithm. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="chainhull2d_8h-source.html">csgeom/chainhull2d.h</a>></code> <p> <p> <a href="classcsChainHull2D-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsChainHull2D.html#251664ca895909773a862bbe64b2a5ed">CalculatePresorted</a> (<a class="el" href="classcsVector2.html">csVector2</a> *points, size_t n, <a class="el" href="classcsVector2.html">csVector2</a> *hull)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates). <a href="#251664ca895909773a862bbe64b2a5ed"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsChainHull2D.html#b079e6090d340f9e9cf4eb6fddacec9a">SortXY</a> (<a class="el" href="classcsVector2.html">csVector2</a> *points, size_t n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sort the given array by increasing x and y coordinates so that it can be used by <a class="el" href="classcsChainHull2D.html#251664ca895909773a862bbe64b2a5ed" title="This routine will calculate the convex hull of the presorted input points (presorted...">CalculatePresorted()</a>. <a href="#b079e6090d340f9e9cf4eb6fddacec9a"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This is Andrew's monotone chain 2D convex hull algorithm. <p>Definition at line <a class="el" href="chainhull2d_8h-source.html#l00046">46</a> of file <a class="el" href="chainhull2d_8h-source.html">chainhull2d.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="251664ca895909773a862bbe64b2a5ed"></a><!-- doxytag: member="csChainHull2D::CalculatePresorted" ref="251664ca895909773a862bbe64b2a5ed" args="(csVector2 *points, size_t n, csVector2 *hull)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static size_t csChainHull2D::CalculatePresorted </td> <td>(</td> <td class="paramtype"><a class="el" href="classcsVector2.html">csVector2</a> * </td> <td class="paramname"> <em>points</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsVector2.html">csVector2</a> * </td> <td class="paramname"> <em>hull</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates). <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>points</em> </td><td>is the presorted set of points. </td></tr> <tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>is the number of points </td></tr> <tr><td valign="top"></td><td valign="top"><em>hull</em> </td><td>is the convex hull output. This array must be at least as big as the 'points' array (i.e. n points) </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of points in the convex hull </dd></dl> </div> </div><p> <a class="anchor" name="b079e6090d340f9e9cf4eb6fddacec9a"></a><!-- doxytag: member="csChainHull2D::SortXY" ref="b079e6090d340f9e9cf4eb6fddacec9a" args="(csVector2 *points, size_t n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csChainHull2D::SortXY </td> <td>(</td> <td class="paramtype"><a class="el" href="classcsVector2.html">csVector2</a> * </td> <td class="paramname"> <em>points</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sort the given array by increasing x and y coordinates so that it can be used by <a class="el" href="classcsChainHull2D.html#251664ca895909773a862bbe64b2a5ed" title="This routine will calculate the convex hull of the presorted input points (presorted...">CalculatePresorted()</a>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>points</em> </td><td>is the set of points </td></tr> <tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>is the number of points </td></tr> </table> </dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csgeom/<a class="el" href="chainhull2d_8h-source.html">chainhull2d.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>