internal void AddEntry([NotNull] Rectangle r, int id) { ids[entryCount] = id; entries[entryCount] = r.Copy(); entryCount++; if (mbr == null) { mbr = r.Copy(); } else { mbr.Add(r); } }
private Rectangle CalculateMBR([NotNull] Node<T> n) { var mbr = new Rectangle(n.entries[0]._min, n.entries[0]._max); for (var i = 1; i < n.entryCount; i++) { mbr.Add(n.entries[i]); } return mbr; }