Exemplo n.º 1
0
		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);
		}
Exemplo n.º 2
0
 protected override PointyHexPoint GridPointFromArrayPoint(ArrayPoint point)
 {
     return(FlatTriGrid <TCell> .GridPointFromArrayPoint(point));
 }