public IGrid <TNewCell, PointyTriPoint> MakeVertexGrid <TNewCell>() { var vertices = this.SelectMany(x => x.GetVertices()); var storage = PointyTriGrid <TNewCell> .CalculateStorage(vertices); var offset = PointyTriGrid <TNewCell> .GridPointFromArrayPoint(storage.offset); return(new PointyTriGrid <TNewCell>(storage.dimensions.X, storage.dimensions.Y, x => IsInsideVertexGrid(x + offset), offset)); }
protected override FlatHexPoint GridPointFromArrayPoint(ArrayPoint point) { return(PointyTriGrid <TCell> .GridPointFromArrayPoint(point)); }