Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new terrain height smoother.
 /// </summary>
 /// <param name="terrain">The <see cref="ITerrain"/> to modify.</param>
 /// <param name="engineTerrain">The <see cref="OmegaEngine.Graphics.Renderables.Terrain"/> to live-update while modifying.</param>
 /// <param name="refreshHandler">Called when the presenter needs to be reset.</param>
 /// <param name="sigma">The standard deviation of the Gaussian distribution.</param>
 public HeightSmooth(ITerrain terrain, OmegaEngine.Graphics.Renderables.Terrain engineTerrain, Action refreshHandler, double sigma)
     : base(terrain, engineTerrain, refreshHandler)
 {
     _kernel = MathUtils.GaussKernel(sigma, Math.Max(3, (int)(6 * sigma) - 1));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new terrain height shifter.
 /// </summary>
 /// <param name="terrain">The <see cref="ITerrain"/> to modify.</param>
 /// <param name="engineTerrain">The <see cref="OmegaEngine.Graphics.Renderables.Terrain"/> to live-update while modifying.</param>
 /// <param name="refreshHandler">Called when the presenter needs to be reset.</param>
 /// <param name="diff">The value by which the terrain height is to be shifted.</param>
 public HeightShift(ITerrain terrain, OmegaEngine.Graphics.Renderables.Terrain engineTerrain, Action refreshHandler, short diff)
     : base(terrain, engineTerrain, refreshHandler)
 {
     _diff = diff;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new terrain height noise generator.
 /// </summary>
 /// <param name="terrain">The <see cref="ITerrain"/> to modify.</param>
 /// <param name="engineTerrain">The <see cref="OmegaEngine.Graphics.Renderables.Terrain"/> to live-update while modifying.</param>
 /// <param name="refreshHandler">Called when the presenter needs to be reset.</param>
 /// <param name="amplitude">The maximum amplitude of the noise to generate.</param>
 /// <param name="frequency">The frequency of the noise to generate.</param>
 public HeightNoise(ITerrain terrain, OmegaEngine.Graphics.Renderables.Terrain engineTerrain, Action refreshHandler, double amplitude, double frequency)
     : base(terrain, engineTerrain, refreshHandler)
 {
     _amplitude = amplitude;
     _frequency = frequency;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new terrain plateau creator.
 /// </summary>
 /// <param name="terrain">The <see cref="ITerrain"/> to modify.</param>
 /// <param name="engineTerrain">The <see cref="OmegaEngine.Graphics.Renderables.Terrain"/> to live-update while modifying.</param>
 /// <param name="refreshHandler">Called when the presenter needs to be reset.</param>
 public HeightPlateau(ITerrain terrain, OmegaEngine.Graphics.Renderables.Terrain engineTerrain, Action refreshHandler)
     : base(terrain, engineTerrain, refreshHandler + (() => terrain.OcclusionIntervalMapOutdated = true)) // Mark the shadow maps for update
 {
 }