コード例 #1
0
        public static bool Intersects(this Tri2D tri, IPrimitive primitive)
        {
            switch (primitive)
            {
            case Line2D line:
                return(Intersects(tri, line));

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

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

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

            default:
                throw new NotImplementedException($"Unsupported intersectable primitive {primitive.GetType()}");
            }
        }
コード例 #2
0
        public static bool Contains(this Tri2D tri, IPrimitive primitive)
        {
            switch (primitive)
            {
            case Point2D point:
                return(Contains(tri, point));

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

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

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

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

            default:
                throw new NotSupportedException($"Unsupported containable primitive {primitive.GetType()}");
            }
        }
コード例 #3
0
 public static bool Intersects(this Circle circle, Tri2D tri)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public static bool Contains(this Circle circle, Tri2D tri)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 public static bool Intersects(this Tri2D tri, Tri2D other)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public static bool Intersects(this Tri2D tri, Rect2D rect)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public static bool Intersects(this Tri2D tri, Line2D line)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
 public static bool Contains(this Tri2D tri, Tri2D other)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
 public static bool Contains(this Tri2D tri, Line2D line)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 public static bool Contains(this Tri2D tri, Point2D point)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
 public static bool Contains(this Rect2D rect, Tri2D tri)
 {
     throw new NotImplementedException();
 }