Exemplo n.º 1
0
 public Tree4()
 {
     objs = new List <NetData>(SplitSize + 1);
     //size = MaxSize;
     border       = new Tree4Border(new Fixed2(0, 0), new Fixed(MaxSize));
     brother      = new Tree4Brother();
     collisonInfo = new CollisonInfo();
     depth        = 0;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化节点信息
 /// </summary>
 /// <param name="depth">当前深度</param>
 /// <param name="border">边界类对象</param>
 /// <param name="brother">邻居类对象</param>
 public Tree4Child(int depth, Tree4Border border, Tree4Brother brother)
 {
     trees = new Tree4[4];
     Tree4Border[] borders = border.Split();
     for (int i = 0; i < 4; i++)
     {
         trees[i] = new Tree4(depth, borders[i]);
     }
     trees[(int)Pos.LeftUp].brother    = new Tree4Brother(brother.Left, RightUp, brother.Up, LeftDown);
     trees[(int)Pos.LeftDown].brother  = new Tree4Brother(brother.Left, RightDown, LeftUp, brother.Down);
     trees[(int)Pos.RightUp].brother   = new Tree4Brother(LeftUp, brother.Right, brother.Up, RightDown);
     trees[(int)Pos.RightDown].brother = new Tree4Brother(LeftDown, brother.Right, RightUp, brother.Down);
 }