public IEnumerable <BoxTree <CachedRow> .TileEntry> EnumEntries(int cachedTableIndex, IBox box) { _cachedTableIndex = cachedTableIndex; RowBoxTree rowBoxTree = _rowBoxTrees[cachedTableIndex]; foreach (BoxTree <CachedRow> .TileEntry entry in rowBoxTree.Search(box)) { _cachedRow = entry.Value; yield return(entry); } _cachedRow = null; _cachedTableIndex = 0; }
private static RowBoxTree CreateBoxTree( [NotNull] IEnumerable <CachedRow> cachedRows, [CanBeNull] IBox allBox) { var rowBoxTree = new RowBoxTree(); if (allBox != null) { rowBoxTree.InitSize(new IGmtry[] { allBox }); } foreach (CachedRow cachedRow in cachedRows) { rowBoxTree.Add(cachedRow); } return(rowBoxTree); }