public void TestGenerateBottomIslandHeightmap() { var gen = new IslandGenerater(new Random(123)); var map2 = gen.GenerateBottomIslandHeightmap(32); var island = map2.Copy(); gen.MakeIslandShape(island); Action <Array2D <float> > renderLines = delegate(Array2D <float> map) { Func <int, int, SlimDX.Vector3> getPoint = (x, y) => new SlimDX.Vector3(x, map[new Point2(x, y)], y); for (int x = 0; x < map.Size.X; x++) { for (int y = 0; y < map.Size.Y; y++) { TW.Graphics.LineManager3D.AddLine(getPoint(x, y), getPoint(x + 1, y), new Color4(0, 0, 0)); TW.Graphics.LineManager3D.AddLine(getPoint(x, y), getPoint(x + 1, y + 1), new Color4(0, 0, 0)); TW.Graphics.LineManager3D.AddLine(getPoint(x, y), getPoint(x, y + 1), new Color4(0, 0, 0)); } } }; engine.AddSimulator(new BasicSimulator(delegate { renderLines(map2); TW.Graphics.LineManager3D.WorldMatrix = Matrix.Translation(40, 0, 0); renderLines(island); })); }