Пример #1
0
        /// <summary>
        /// Clears the QuadTree of all objects, including any objects living in its children.
        /// </summary>
        internal void Clear()
        {
            // Clear out the children, if we have any
            if (childTL != null)
            {
                childTL.Clear();
                childTR.Clear();
                childBL.Clear();
                childBR.Clear();
            }

            // Clear any objects at this level
            if (objects != null)
            {
                objects.Clear();
                objects = null;
            }

            // Set the children to null
            childTL = null;
            childTR = null;
            childBL = null;
            childBR = null;
        }
Пример #2
0
 ///<summary>
 ///Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1" />.
 ///</summary>
 ///
 ///<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only. </exception>
 public void Clear()
 {
     wrappedDictionary.Clear();
     quadTreeRoot.Clear();
 }