//Provide a point which is inside of the convex hull to make it easier to triangulate colinear points //And the triangles should be more "even", which can also be useful public static HashSet <Triangle2> PointsOnConvexHull(List <MyVector2> pointsOnConvexHull, MyVector2 insidePoint) { HashSet <Triangle2> triangles = TriangulateConvexHull.GetTriangles(pointsOnConvexHull, insidePoint); return(triangles); }
// // Triangulate points on convex hull // //Input should always be a list with the points on the convex hull sorted in clockwise or counter-clockwise order //If you have colinear points, the algorithm will triangulate the entire area, but all points will not be //a part of the triangulation. But you can add the missing points if you want do, but at a performance cost public static HashSet <Triangle2> PointsOnConvexHull(List <MyVector2> pointsOnConvexHull, bool addColinearPoints) { HashSet <Triangle2> triangles = TriangulateConvexHull.GetTriangles(pointsOnConvexHull, addColinearPoints); return(triangles); }