public static List <Vector2> BuildHull(List <Vector2> points, float scale = 10) { JarvisConvex jarvis = new JarvisConvex(); foreach (Vector2 p in points) { jarvis.AddPoint(p * scale); } return(jarvis.Calculate(scale)); }
public static List <Vector2> BuildHullIndex(List <Vector2> points, out List <int> resultIndex, float scale = 10) { JarvisConvex jarvis = new JarvisConvex(); foreach (Vector2 p in points) { jarvis.AddPoint(p * scale); } var ps = jarvis.Calculate(scale); resultIndex = jarvis.mResultIndex; return(ps); }