Scribus
Open source desktop publishing at your fingertips
Geom::ConvexHull Class Reference

#include <convex-cover.h>

Public Member Functions

void find_pivot ()
 
void angle_sort ()
 
void graham_scan ()
 
void graham ()
 
void merge (Point p)
 
bool contains_point (Point p)
 
Point operator[] (int i) const
 
 ConvexHull (std::vector< Point > const &points)
 
template<typename T >
 ConvexHull (T b, T e)
 
bool is_clockwise () const
 
bool no_colinear_points () const
 
bool top_point_first () const
 
bool meets_invariants () const
 
bool empty () const
 
bool singular () const
 
bool linear () const
 
bool is_degenerate () const
 
double area () const
 
Point const * furthest (Point direction) const
 
bool is_left (Point p, int n)
 
int find_left (Point p)
 

Public Attributes

std::vector< Pointboundary
 

Detailed Description

ConvexHull A convexhull is a convex region - every point between two points in the convex hull is also in the convex hull. It is defined by a set of points travelling in a clockwise direction. We require the first point to be top most, and of the topmost, leftmost.

An empty hull has no points, we allow a single point or two points degenerate cases.

We could provide the centroid as a member for efficient direction determination. We can update the centroid with all operations with the same time complexity as the operation.

Member Function Documentation

bool Geom::ConvexHull::is_clockwise ( ) const

Is the convex hull clockwise? We use the definition of clockwise from point.h


The documentation for this class was generated from the following files: