CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csChainHull2D Class Reference

This is Andrew's monotone chain 2D convex hull algorithm. More...

#include <csgeom/chainhull2d.h>

List of all members.

Static Public Member Functions

void SortXY (csVector2 *points, int n)
 Sort the given array by increasing x and y coordinates so that it can be used by CalculatePresorted().
int CalculatePresorted (csVector2 *points, int n, csVector2 *hull)
 This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates).


Detailed Description

This is Andrew's monotone chain 2D convex hull algorithm.

Definition at line 40 of file chainhull2d.h.


Member Function Documentation

int csChainHull2D::CalculatePresorted csVector2 points,
int  n,
csVector2 hull
[static]
 

This routine will calculate the convex hull of the presorted input points (presorted by increasing x and y coordinates).

Parameters:
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)
Returns:
the number of points in the convex hull

void csChainHull2D::SortXY csVector2 points,
int  n
[static]
 

Sort the given array by increasing x and y coordinates so that it can be used by CalculatePresorted().

Parameters:
points is the set of points
n is the number of points


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1