示例#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);
		}
示例#2
0
 protected override PointyHexPoint GridPointFromArrayPoint(ArrayPoint point)
 {
     return(FlatTriGrid <TCell> .GridPointFromArrayPoint(point));
 }