![]() |
Public API Reference |
![]() |
This is Andrew's monotone chain 2D convex hull algorithm. More...
#include <csgeom/chainhull2d.h>
Static Public Member Functions | |
static size_t | CalculatePresorted (csVector2 *points, size_t n, csVector2 *hull) |
This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates). | |
static void | SortXY (csVector2 *points, size_t n) |
Sort the given array by increasing x and y coordinates so that it can be used by CalculatePresorted(). |
This is Andrew's monotone chain 2D convex hull algorithm.
Definition at line 46 of file chainhull2d.h.
static size_t csChainHull2D::CalculatePresorted | ( | csVector2 * | points, |
size_t | n, | ||
csVector2 * | hull | ||
) | [static] |
This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates).
points | is the presorted set of points. |
n | is the number of points |
hull | is the convex hull output. This array must be at least as big as the 'points' array (i.e. n points) |
static void csChainHull2D::SortXY | ( | csVector2 * | points, |
size_t | n | ||
) | [static] |
Sort the given array by increasing x and y coordinates so that it can be used by CalculatePresorted().
points | is the set of points |
n | is the number of points |