Class HeightNoise
- Namespace
- AlphaFramework.Editor.World.TerrainModifiers
- Assembly
- AlphaFramework.Editor.dll
Interactively adds height noise to a ITerrain.
public sealed class HeightNoise : Height
- Inheritance
-
HeightNoise
- Inherited Members
- Extension Methods
Constructors
HeightNoise(ITerrain, Terrain, Action, double, double)
Creates a new terrain height noise generator.
public HeightNoise(ITerrain terrain, Terrain engineTerrain, Action refreshHandler, double amplitude, double frequency)
Parameters
terrain
ITerrainThe ITerrain to modify.
engineTerrain
TerrainThe Terrain to live-update while modifying.
refreshHandler
ActionCalled when the presenter needs to be reset.
amplitude
doubleThe maximum amplitude of the noise to generate.
frequency
doubleThe frequency of the noise to generate.
Methods
ModifyTerrain(Point, TerrainBrush, byte[,], byte[,])
Modifies the ITerrain and fills arrays with undo/redo data.
protected override void ModifyTerrain(Point offset, TerrainBrush brush, byte[,] oldData, byte[,] newData)
Parameters
offset
PointThe HeightMap index that corresponds to the top-left corner of the area to modify.
brush
TerrainBrushThe shape and size of the area to the lower-right of
offset
to modify.oldData
byte[,]An array to be filled with data from HeightMap before the modification. Both dimensions must be equal to Size.
newData
byte[,]An array to be filled with data from HeightMap after the modification. Both dimensions must be equal to Size.