quickhull/performance.cpp
karl 535d912742 Likely performance improvement by limiting points
Instead of just deleting points in the triangle, we only check specific ones which are relevant
2020-11-28 23:58:17 +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;
}