Beispiel #1
0
 public QuadTreeNode(QuadTree quadTree, QuadTreePool pool, int capacity, int maxDepth)
 {
     this.quadTree = quadTree;
     this.pool     = pool;
     this.capacity = capacity;
     this.maxDepth = maxDepth;
     Agents        = new List <Agent>(capacity);
     mergeBuffer   = new List <Agent>();
 }
Beispiel #2
0
 public QuadTree(WorldPosition position, Size size, int poolSize, int nodeCapacity, int maxDepth)
 {
     pool     = new QuadTreePool(this, poolSize, nodeCapacity, maxDepth);
     RootNode = pool.Get(position, size.Width * 0.5, 0, null);
 }