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; }
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; }
public QuadTree(int pLevel, Rect pBounds) { Level = pLevel; Bounds = pBounds; }