Beispiel #1
0
 public QuadTreeNode(Rectangle area, QuadTreeNode parent)
 {
     Area      = area;
     mElements = new List <I_WorldObject>(10);
     Parent    = parent;
 }
Beispiel #2
0
 public void setNode(QuadTreeNode n)
 {
     mNode = n;
 }
Beispiel #3
0
 /// <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);
 }