public void BuildRain(RainMethod pm, Benchmark bench = null) { Benchmark.Start(bench, "Rain"); // etc if (pm == RainMethod.Equal) { BuildRainByEqual(); } else if (pm == RainMethod.Noise) { BuildRainByNoise(); } else if (pm == RainMethod.Wind) { WindSpawn ws = WindSpawn.TradeLinear; WindRainType rt = WindRainType.HeatBasedContinuous; WindEvaporationType et = WindEvaporationType.WaterAndHeat; WindTurnType wt = WindTurnType.TerrainBased; BuildRainByWind(1000, ws, rt, et, wt, bench); MapUtil.TransformMapMinMax(ref Rain, MapUtil.dNormalize); } if (bench != null) { bench.EndBenchmark("Rain"); } }
public void CreateRain(RainMethod rainMethod) { RainBuilder = new RainBuilder(Elevation, Temperature, seaLevel); RainBuilder.BuildRain(rainMethod, bench); Rain = RainBuilder.Rain; WindMagnitude = RainBuilder.WindMagnitude; WindVector = RainBuilder.WindVectors; }