Beispiel #1
0
        static public RectTree <T> CreateQuadtree(Rect bounds, int depth, int target_number_items, Operation <Rect, T> operation, IEnumerable <T> items)
        {
            RectTree <T> tree = CreateQuadtree(bounds, depth, target_number_items, operation);

            tree.AddRange(items);
            return(tree);
        }
Beispiel #2
0
 static public IEnumerable <T> GetItemsWithin <T>(this RectTree <T> item, Rect rect)
 {
     return(item.GetItemsWithin(b => b.Overlaps(rect)));
 }
Beispiel #3
0
 static public void AddRange <T>(this RectTree <T> item, params T[] to_add)
 {
     item.AddRange((IEnumerable <T>)to_add);
 }
Beispiel #4
0
 static public void AddRange <T>(this RectTree <T> item, IEnumerable <T> to_add)
 {
     to_add.Process(i => item.Add(i));
 }