public static bool PolygonToSegment(Polygon polygon, Segment2 segment) { return(polygon.segments.Any(s => s.Intersects(segment))); }
public static bool PolygonToPolygon(Polygon polygon1, Polygon polygon2) { return(polygon1.segments.Any(s1 => polygon2.segments.Any(s2 => s1.Intersects(s2)))); }
public static void DrawPolygon(Polygon polygon, Color color, float duration) { DrawPolygon(polygon, color, duration, true); }
public static void DrawPolygon(Polygon polygon, Color color) { DrawPolygon(polygon, color, 0f, true); }
public static void DrawPolygon(Polygon polygon) { DrawPolygon(polygon, Color.white, 0f, true); }
public static void DrawCircle(Vector3 center, Vector3 radius, Color color, float duration, bool depthTest) { var polygon = Polygon.Circle(radius.magnitude) + center; DrawPolygon(polygon, color, duration, depthTest); }