Files
ViewDesignEngine/include/vde/core/convex_hull.h
T

15 lines
431 B
C++

#pragma once
#include "vde/core/point.h"
#include <vector>
namespace vde::core {
/// 2D convex hull — Graham scan, O(n log n)
std::vector<Point2D> convex_hull_2d(const std::vector<Point2D>& points);
/// 3D convex hull — QuickHull
/// Returns triangles of the hull (counter-clockwise when viewed from outside)
std::vector<std::array<Point3D, 3>> convex_hull_3d(const std::vector<Point3D>& points);
} // namespace vde::core