Table of Contents

Class ModifyHeightMap

Namespace
AlphaFramework.Editor.World.Commands
Assembly
AlphaFramework.Editor.dll

Modifies height-map data in a ITerrain.

public class ModifyHeightMap : FirstExecuteCommand, IUndoCommand
Inheritance
ModifyHeightMap
Implements
Inherited Members
Extension Methods

Constructors

ModifyHeightMap(ITerrain, Point, byte[,], byte[,], Action)

Creates a new command for modifying a rectangular area of the height-map in a ITerrain.

public ModifyHeightMap(ITerrain terrain, Point offset, byte[,] oldPartialData, byte[,] newPartialData, Action refreshHandler)

Parameters

terrain ITerrain

The ITerrain to modify.

offset Point

The top-left coordinates of the area to modify.

oldPartialData byte[,]

The height-map data of the area before it was modified. Do not modify this array after calling this method!

newPartialData byte[,]

The height-map data of the area after it was modified. Do not modify this array after calling this method!

refreshHandler Action

Called when the presenter needs to be reset.

Methods

OnFirstExecute()

Template method to perform the desired action the first time.

protected override void OnFirstExecute()

OnRedo()

Applies the AlphaFramework.Editor.World.Commands.ModifyHeightMap._newPartialData to HeightMap.

protected override void OnRedo()

OnUndo()

Applies the AlphaFramework.Editor.World.Commands.ModifyHeightMap._oldPartialData to HeightMap.

protected override void OnUndo()