quickhull/performance.cpp
karl 79111d184b Finish Quickhull functionality + basic test
The performance mode, which I'm working on, can now be tested with `make performance && ./performance`.

A very simple test was added, and it works!
2020-11-28 22:21:48 +01:00

22 lines
414 B
C++

#include "Quickhull.h"
int main()
{
std::list<Point> points = {
Point(-1, -1),
Point(-1, 1),
Point(1, -1),
Point(1, 1),
Point(0.5, 0) // Should not be in the hull
};
std::list<Point> hull;
Quickhull::get_hull(points, hull);
for (const Point &point : hull)
{
std::cout << point.x() << ", " << point.y() << std::endl;
}
return 0;
}