public static bool Intersects(this Rect2D rect, IPrimitive primitive)
        {
            switch (primitive)
            {
            case Rect2D other:
                return(Intersects(rect, other));

            case Tri2D tri:
                return(Intersects(rect, tri));

            case Line2D line:
                return(Intersects(rect, line));

            case Circle circle:
                return(Intersects(rect, circle));

            default:
                throw new NotImplementedException($"Unsupported intersectable primitive {primitive.GetType()}");
            }
        }
        public static bool Contains(this Rect2D rect, IPrimitive primitive)
        {
            switch (primitive)
            {
            case Point2D point:
                return(Contains(rect, point));

            case Rect2D other:
                return(Contains(rect, other));

            case Tri2D tri:
                return(Contains(rect, tri));

            case Line2D line:
                return(Contains(rect, line));

            case Circle circle:
                return(Contains(rect, circle));

            default:
                throw new NotSupportedException($"Unsupported containable primitive {primitive.GetType()}");
            }
        }
 public static bool Intersects(this Circle circle, Rect2D rect)
 {
     throw new NotImplementedException();
 }
 public static bool Intersects(this Tri2D tri, Rect2D rect)
 {
     throw new NotImplementedException();
 }
 public static bool Intersects(this Rect2D rect, Line2D line)
 {
     throw new NotImplementedException();
 }
 public static bool Intersects(this Rect2D rect, Rect2D other)
 {
     throw new NotImplementedException();
 }
 public static bool Contains(this Rect2D rect, Circle circle)
 {
     throw new NotImplementedException();
 }
 public static bool Contains(this Rect2D rect, Tri2D tri)
 {
     throw new NotImplementedException();
 }
 public static bool Contains(this Rect2D rect, Point2D point)
 {
     throw new NotImplementedException();
 }