Board 0.9.6
Functions
hull.cpp File Reference

Implementation of a naive 2D convex hull algorithm. More...

#include <Board.h>
#include <board/Tools.h>
#include <vector>

Functions

bool isSeparing (Point &a, Point &b, const std::vector< Point > &points)
 isSeparing
 
int main (int, char *[])
 

Detailed Description

Implementation of a naive 2D convex hull algorithm.

Author
Sebastien Fourey (GREYC)

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 https://fourey.users.greyc.fr

Function Documentation

◆ isSeparing()

bool isSeparing ( Point a,
Point b,
const std::vector< Point > &  points 
)

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

Parameters
a
b
points
Returns
true if the segment [a,b] is on a line separating the given points, otherwise false.
Examples
examples/hull.cpp.

References LibBoard::Point::x, and LibBoard::Point::y.

Referenced by main().

◆ main()

int main ( int  ,
char *  [] 
)