Ejemplo n.º 1
0
            /// <summary>
            /// Returns all objects stored in this node/nodes under this node.
            /// </summary>
            /// <returns>A list of objects that are stored under this node.</returns>
            private List <T> GetAllObjectsUnder()
            {
                if (isLeaf)
                {
                    return(nodeBucket.Where(x => x != null).ToList());
                }
                else
                {
                    List <T> allObjects = new List <T>();

                    allObjects.AddRange(NE.GetAllObjectsUnder());
                    allObjects.AddRange(NW.GetAllObjectsUnder());
                    allObjects.AddRange(SE.GetAllObjectsUnder());
                    allObjects.AddRange(SW.GetAllObjectsUnder());

                    return(allObjects);
                }
            }