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