src/Quadtree.cs
/// <summary>Inserts <paramref name="item"/> into the tree. ONLY USE IF <paramref name="item"/> ISN'T ALREADY IN THE TREE.</summary>
Inserts  into the tree. ONLY USE IF  ISN'T ALREADY IN THE TREE.
Inserts into the tree . ONLY USE IF ISN ' T ALREADY IN THE TREE .
public void Add(T item) {
            var xy = item.Bounds.Center.ToPoint();
            _safeItem.Add(item);
            if (_safeItem.Count == 1 && _bounds.IsEmpty) {
                Bounds = new Rectangle(xy, new Point(1));
                return;
            }
            if (TryExpandTree(xy))
                return;
            var n = Insert(item, _root, xy);
            _item.Add(item, (n, xy));
            if (n.ItemCount > NodesCapacity && n.Depth < MaxDepth)
                _nodesToSubdivide.Add(n);
            _nodesToGrow.Add(n);
            QueueClean();
        }
public void Add ( T item ) { var xy = item . Bounds . Center . ToPoint ( ) ; _safeItem . Add ( item ) ; if ( _safeItem . Count == 1 && _bounds . IsEmpty ) { Bounds = new Rectangle ( xy , new Point ( 1 ) ) ; return ; } if ( TryExpandTree ( xy ) ) return ; var n = Insert ( item , _root , xy ) ; _item . Add ( item , ( n , xy ) ) ; if ( n . ItemCount > NodesCapacity && n . Depth < MaxDepth ) _nodesToSubdivide . Add ( n ) ; _nodesToGrow . Add ( n ) ; QueueClean ( ) ; }
Inserts  into the tree.
Inserts into the tree .
item
T