public QuadTreeNode(Rectangle area, QuadTreeNode parent) { Area = area; mElements = new List <I_WorldObject>(10); Parent = parent; }
public void setNode(QuadTreeNode n) { mNode = n; }
/// <summary> /// Create an empty quadtree that will store rectangles that fit entirely within /// the Rectangle defined by worldsize /// </summary> /// <param name="worldsize">The size of the world this quadtree can represent</param> public QuadTree(Rectangle worldsize) { mRoot = new QuadTreeNode(worldsize, null); mMinWidth = worldsize.Width / (int)Math.Pow(4, MAX_DEPTH - 1); }