public void Query(List <ICullable> results, BoundingVolume volume) { var containmentType = volume.Contains(Bounds); if (containmentType == ContainmentType.Intersects) { foreach (var item in Items) { if (volume.Contains(item.Bounds) != ContainmentType.Disjoint) { results.Add(item); } } foreach (var child in Children) { child.Query(results, volume); } } else if (containmentType == ContainmentType.Contains) { AddAll(results); } }
public void Query(List <ICullable> results, BoundingVolume volume) { root.Query(results, volume); }