Example #1
0
 public static bool PolygonToSegment(Polygon polygon, Segment2 segment)
 {
     return(polygon.segments.Any(s => s.Intersects(segment)));
 }
Example #2
0
 public static bool PolygonToPolygon(Polygon polygon1, Polygon polygon2)
 {
     return(polygon1.segments.Any(s1 => polygon2.segments.Any(s2 => s1.Intersects(s2))));
 }
Example #3
0
 public static void DrawPolygon(Polygon polygon, Color color, float duration)
 {
     DrawPolygon(polygon, color, duration, true);
 }
Example #4
0
 public static void DrawPolygon(Polygon polygon, Color color)
 {
     DrawPolygon(polygon, color, 0f, true);
 }
Example #5
0
 public static void DrawPolygon(Polygon polygon)
 {
     DrawPolygon(polygon, Color.white, 0f, true);
 }
Example #6
0
        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);
        }