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