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!
22 lines
414 B
C++
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;
|
|
} |