Esempio n. 1
0
        /// <summary>
        /// Add the child nodes
        /// </summary>
        public void AddChildren()
        {
            if (Nid >= _tree.FirstLeafNodeId)
            {
                return;
            }

            var splitBounds = GetSplitBounds(1);
            var childId     = Nid * 2;

            _tree.Nodes[childId] = new SbnNode(_tree, childId++, splitBounds[0], splitBounds[1], splitBounds[2], splitBounds[3]);
            Child1.AddChildren();

            splitBounds          = GetSplitBounds(2);
            _tree.Nodes[childId] = new SbnNode(_tree, childId, splitBounds[0], splitBounds[1], splitBounds[2], splitBounds[3]);
            Child2.AddChildren();
        }