Board
0.9.5
|
Implementation of a naive 2D convex hull algorithm. More...
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <utility>
#include <vector>
#include "Board.h"
#include "board/Tools.h"
Functions | |
bool | isSeparing (Point &a, Point &b, const std::vector< Point > &points) |
isSeparing More... | |
int | main (int, char *[]) |
Implementation of a naive 2D convex hull algorithm.
This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey http://foureys.users.greyc.fr
isSeparing
Check whether a segment [a,b] is on a line separating a vector of points. If not, the points a and b may be swapped so that all points are "on the left" of the vector a->b
a | |
b | |
points |
References LibBoard::Point::x, and LibBoard::Point::y.