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