private Boolean Contains(RNode <T> node, IBoundingBox <T> area) { if (!node.BoundingBox.Contains(area)) { return(false); } else { if (node.IsLeaf) { foreach (var item in node.Items) { if (area.CompareTo(item) == 0) { return(true); } } return(false); } else { foreach (var child in node.Children) { if (child.BoundingBox.Contains(area)) { return(this.Contains(child, area)); } } return(false); } } }