Пример #1
0
        public bool Intersects(Rect obj)
        {
            if (X < obj.X
            || X > obj.X + obj.Width
            || Y < obj.Y
            || Y > obj.Y + obj.Height)
            return false;

              return true;
        }
Пример #2
0
            public static Rectangle[] ConvertToXNARectangle(Rect[] rectangleArray)
            {
                Rectangle[] toReturn = new Rectangle[rectangleArray.Length];

                for (int i = 0; i < rectangleArray.Length; i++)
                  toReturn[i] = rectangleArray[i].GetRectangle();

                return toReturn;
            }
Пример #3
0
 public QuadTree(int pLevel, Rect pBounds)
 {
     Level = pLevel;
       Bounds = pBounds;
 }