Exemplo n.º 1
0
        public static void Test3()
        {
            var sand = SandTable.CreateSandTable(Size, Size, 15);

            SandTable.ClearHeightLimits(sand);
            SandTable.ApplyHeightLimitPattern(sand, HeightLimitPatternLibrary.SmallCube, new Point {
                X = 10, Y = 10, Height = 10
            });

            SandTable.SettleMapTwoPass(sand);
            Exporters.SandToImageExporter.SaveMatrixAsImage(sand, OutDir, "testK.png");
            Exporters.SandTo3dFileExporter.SaveSandAs3dFile(sand, OutDir, "testK.obj");
        }
Exemplo n.º 2
0
        public static void Test2()
        {
            var sand = SandTable.CreateSandTable(Size, Size, 15);

            SandTable.ClearHeightLimits(sand);
            SandTable.ApplyHeightLimitPattern(sand, HeightLimitPatternLibrary.SmallCube, new Point {
                X = 10, Y = 10, Height = 10
            });

            //int iteration = 0;
            //SandToImageOutputter.SaveMatrixAsImage(sand, @"C:\Users\dgulyas\Desktop\out\testC", $"test{iteration++}.png");

            var iteration = 0;

            while (SandTable.SettleMapRandom(sand) && iteration++ < 5)
            {
                Console.WriteLine(iteration);
                //SandToImageOutputter.SaveMatrixAsImage(sand, @"C:\Users\dgulyas\Desktop\out\testC", $"test{iteration++}.png");
            }
            //PrintMapHeights(m_sand);
            Exporters.SandToImageExporter.SaveMatrixAsImage(sand, OutDir, "testG.png");
            Exporters.SandTo3dFileExporter.SaveSandAs3dFile(sand, OutDir, "testG.obj");
            //Console.ReadLine();
        }