public void ApplyErosion()
        {
            float[,] heights = tData.GetHeights(0, 0, size, size);
            float[] heights1D = Erosion.ErosionHelper.twoDtooneD(heights);

            Erosion.Erosion erosion = new Erosion.Erosion();

            erosion.Erode(heights1D, size, 1120000, true);

            heights = Erosion.ErosionHelper.oneDtotwoD(heights1D);

            tData.SetHeights(0, 0, heights);
        }
Beispiel #2
0
        public void ApplyErosion()
        {
            float[,] heights = tData.GetHeights(0, 0, size, size);
            float[]         heights1D = Erosion.ErosionHelper.twoDtooneD(heights);
            Erosion.Erosion erosion   = new Erosion.Erosion();

            int dropletCount = heights1D.Length * dropletsPerUnit;

            erosion.Erode(heights1D, size, dropletCount, true);

            heights = Erosion.ErosionHelper.oneDtotwoD(heights1D);

            tData.SetHeights(0, 0, heights);
        }