AlphaFramework API
1.0.3
|
Abstract base class for interactivley changing the height of an area on a ITerrain. More...
Public Member Functions | |
override void | Apply (Vector2 terrainCoords, TerrainBrush brush) |
Applies and accumulates a modification to the Terrain. | |
override IUndoCommand | GetCommand () |
Creates a pre-executed undo command representing the accumulated Apply calls to this instance. | |
Protected Member Functions | |
Height (ITerrain terrain, Terrain engineTerrain, Action refreshHandler) | |
Creates a new terrain height modifier. More... | |
abstract void | ModifyTerrain (Point offset, TerrainBrush brush, byte[,] oldData, byte[,] newData) |
Modifies the ITerrain and fills arrays with undo/redo data. More... | |
Protected Member Functions inherited from AlphaFramework.Editor.World.TerrainModifiers.Base | |
Base (ITerrain terrain) | |
Creates a new Terrain modifier. More... | |
Additional Inherited Members | |
Protected Attributes inherited from AlphaFramework.Editor.World.TerrainModifiers.Base | |
readonly ExpandableRectangleArray< byte > | OldData = new ExpandableRectangleArray<byte>() |
Used to collect data as it was before the modifications. More... | |
readonly ExpandableRectangleArray< byte > | NewData = new ExpandableRectangleArray<byte>() |
Used to collect data as it is after the modifcations. More... | |
readonly ITerrain | Terrain |
The Terrain to modify. More... | |
Abstract base class for interactivley changing the height of an area on a ITerrain.
|
inlineprotected |
Creates a new terrain height modifier.
terrain | The ITerrain to modify. |
engineTerrain | The OmegaEngine.Graphics.Renderables.Terrain to live-update while modifying. |
refreshHandler | Called when the presenter needs to be reset. |
|
protectedpure virtual |
Modifies the ITerrain and fills arrays with undo/redo data.
offset | The ITerrain.HeightMap index that corresponds to the top-left corner of the area to modify. |
brush | The shape and size of the area to the lower-right of offset to modify. |
oldData | An array to be filled with data from ITerrain.HeightMap before the modification. Both dimensions must be equal to TerrainBrush.Size. |
newData | An array to be filled with data from ITerrain.HeightMap after the modification. Both dimensions must be equal to TerrainBrush.Size. |
Implemented in AlphaFramework.Editor.World.TerrainModifiers.HeightNoise, AlphaFramework.Editor.World.TerrainModifiers.HeightShift, AlphaFramework.Editor.World.TerrainModifiers.HeightSmooth, and AlphaFramework.Editor.World.TerrainModifiers.HeightPlateau.