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>(); }
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); }