예제 #1
0
파일: Shape.cs 프로젝트: fchorney/MX-Engine
        public virtual bool Intersects(IShape shape)
        {
            switch (shape.Type)
            {
            case ShapeType.Everywhere:
                return(Intersect.EverywhereToShape((Everywhere)shape, this));

            case ShapeType.Bottom:
                return(Intersect.BottomToShape((Bottom)shape, this));

            case ShapeType.Top:
                return(Intersect.TopToShape((Top)shape, this));

            case ShapeType.Circle:
                return(Intersect.CircleToRectangle((Circle)shape, this));

            case ShapeType.Rectangle:
                return(Intersect.RectangleToRectangle((Rectangle)shape, this));

            default:
                return(false);
            }
        }
예제 #2
0
파일: Shape.cs 프로젝트: fchorney/MX-Engine
 public bool Intersects(IShape shape)
 {
     return(Intersect.BottomToShape(this, shape));
 }
예제 #3
0
파일: Shape.cs 프로젝트: fchorney/MX-Engine
 public bool Intersects(IShape shape)
 {
     return(Intersect.EverywhereToShape(this, shape));
 }