internal void CreateChildRecursive(int depth) { if (depth == m_MaxDepth) { return; } var leftTopBox = new ReactBox { Left = SpaceBox.Left, Right = SpaceBox.MiddleLength + m_LooseSpacing, Top = SpaceBox.Top, Bottom = SpaceBox.MiddleHeight - m_LooseSpacing }; LeftTop = new Quadtree(leftTopBox, this); LeftTop.CreateChildRecursive(depth + 1); var rightTopBox = new ReactBox { Left = SpaceBox.MiddleLength - m_LooseSpacing, Right = SpaceBox.Right, Top = SpaceBox.Top, Bottom = SpaceBox.MiddleHeight - m_LooseSpacing }; RightTop = new Quadtree(rightTopBox, this); RightTop.CreateChildRecursive(depth + 1); var leftBottomBox = new ReactBox { Left = SpaceBox.Left, Right = SpaceBox.MiddleLength + m_LooseSpacing, Top = SpaceBox.MiddleHeight + m_LooseSpacing, Bottom = SpaceBox.Bottom }; LeftBottom = new Quadtree(leftBottomBox, this); LeftBottom.CreateChildRecursive(depth + 1); var rightBottomBox = new ReactBox { Left = SpaceBox.MiddleLength - m_LooseSpacing, Right = SpaceBox.Right, Top = SpaceBox.MiddleHeight + m_LooseSpacing, Bottom = SpaceBox.Bottom }; RightBottom = new Quadtree(rightBottomBox, this); RightBottom.CreateChildRecursive(depth + 1); }