Class HeightShift
- Namespace
- AlphaFramework.Editor.World.TerrainModifiers
- Assembly
- AlphaFramework.Editor.dll
Interactively raises or lowers all points of an area on a ITerrain.
public sealed class HeightShift : Height
- Inheritance
-
HeightShift
- Inherited Members
- Extension Methods
Constructors
HeightShift(ITerrain, Terrain, Action, short)
Creates a new terrain height shifter.
public HeightShift(ITerrain terrain, Terrain engineTerrain, Action refreshHandler, short diff)
Parameters
terrainITerrainThe ITerrain to modify.
engineTerrainTerrainThe Terrain to live-update while modifying.
refreshHandlerActionCalled when the presenter needs to be reset.
diffshortThe value by which the terrain height is to be shifted.
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
offsetPointThe HeightMap index that corresponds to the top-left corner of the area to modify.
brushTerrainBrushThe shape and size of the area to the lower-right of
offsetto modify.oldDatabyte[,]An array to be filled with data from HeightMap before the modification. Both dimensions must be equal to Size.
newDatabyte[,]An array to be filled with data from HeightMap after the modification. Both dimensions must be equal to Size.