Example #1
0
        public void SearchBounds(AxisAlignedBoundingBox bounds, List <T> results)
        {
            if (bounds.Intersects(Aabb))
            {
                // check all the items that are part of this object
                foreach (var item in Items)
                {
                    if (item.Aabb.Intersects(bounds))
                    {
                        results.Add(item.Item);
                    }
                }

                nodeA?.SearchBounds(bounds, results);
                nodeB?.SearchBounds(bounds, results);
            }
        }