/// <summary> /// Calls a render function for each cell within the grid, /// passing as an argument any overlapping items /// </summary> public void Render(Action <Point2D, IEnumerable <ISpatial2DThing <T> > > renderer) { Read(() => { foreach (var row in Rows) { foreach (var p in row.Where(p => ViewPort.Overlaps(p))) { renderer.Invoke(p, GetObjectsOverlapping(p)); } } return(1); }); }