public void VisitItemsByItem(IItem iitem, IContentLookUpper look_upper) { var item = GetItemWithCast(iitem); var item_node = item.Owner; if (item_node != null) { item_node.VisitItemsByBounds(item.Bounds, look_upper); BackwardVisitNodes(item_node.Parent, item.Bounds, look_upper); } }
public void VisitItemsByBounds(IsoRect bounds, IContentLookUpper look_upper) { if (look_upper == null) { throw new System.ArgumentNullException("look_upper"); } if (_rootNode != null) { _rootNode.VisitItemsByBounds(bounds, look_upper); } }
void BackwardVisitNodes(Node node, IsoRect bounds, IContentLookUpper loop_upper) { while (node != null) { for (int i = 0, e = node.Items.Count; i < e; ++i) { var item = node.Items[i]; if (bounds.Overlaps(item.Bounds)) { loop_upper.LookUp(item.Content); } } node = node.Parent; } }
public void VisitItemsByBounds( IsoRect bounds, IContentLookUpper look_upper) { if (bounds.Overlaps(SelfBounds)) { for (int i = 0, e = Items.Count; i < e; ++i) { var item = Items[i]; if (bounds.Overlaps(item.Bounds)) { look_upper.LookUp(item.Content); } } for (int i = 0, e = Nodes.Length; i < e; ++i) { var node = Nodes[i]; if (node != null) { node.VisitItemsByBounds(bounds, look_upper); } } } }