Class ModifyTextureMap
- Namespace
- AlphaFramework.Editor.World.Commands
- Assembly
- AlphaFramework.Editor.dll
Modifies texture-map data in a ITerrain.
public class ModifyTextureMap : PreExecutedCommand, IUndoCommand
- Inheritance
-
ModifyTextureMap
- Implements
- Inherited Members
- Extension Methods
Constructors
ModifyTextureMap(ITerrain, Point, byte[,], byte[,], Action)
Creates a new command for modifying a rectangular area of the texture-map in a ITerrain.
public ModifyTextureMap(ITerrain terrain, Point offset, byte[,] oldPartialData, byte[,] newPartialData, Action refreshHandler)
Parameters
terrainITerrainThe ITerrain to modify.
offsetPointThe top-left coordinates of the area to modify.
oldPartialDatabyte[,]The texture-map data of the area before it was modified. Do not modify this array after calling this method!
newPartialDatabyte[,]The texture-map data of the area after it was modified. Do not modify this array after calling this method!
refreshHandlerActionCalled when the Terrain needs to be reset.
Methods
OnRedo()
Applies the AlphaFramework.Editor.World.Commands.ModifyTextureMap._newPartialData to TextureMap.
protected override void OnRedo()
OnUndo()
Applies the AlphaFramework.Editor.World.Commands.ModifyTextureMap._oldPartialData to TextureMap.
protected override void OnUndo()