AlphaFramework API  1.0.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AlphaFramework.Editor.World.TerrainModifiers.Base Class Referenceabstract

Abstract base class for interactivley modifying a Terrain. More...

Inheritance diagram for AlphaFramework.Editor.World.TerrainModifiers.Base:
AlphaFramework.Editor.World.TerrainModifiers.Height AlphaFramework.Editor.World.TerrainModifiers.Texture AlphaFramework.Editor.World.TerrainModifiers.HeightNoise AlphaFramework.Editor.World.TerrainModifiers.HeightPlateau AlphaFramework.Editor.World.TerrainModifiers.HeightShift AlphaFramework.Editor.World.TerrainModifiers.HeightSmooth

Public Member Functions

abstract void Apply (Vector2 terrainCoords, TerrainBrush brush)
 Applies and accumulates a modification to the Terrain. More...
 
abstract IUndoCommand GetCommand ()
 Creates a pre-executed undo command representing the accumulated Apply calls to this instance. More...
 

Protected Member Functions

 Base (ITerrain terrain)
 Creates a new Terrain modifier. More...
 

Protected Attributes

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...
 

Detailed Description

Abstract base class for interactivley modifying a Terrain.

Constructor & Destructor Documentation

◆ Base()

AlphaFramework.Editor.World.TerrainModifiers.Base.Base ( ITerrain  terrain)
inlineprotected

Creates a new Terrain modifier.

Parameters
terrainThe Terrain to modify.

Member Function Documentation

◆ Apply()

abstract void AlphaFramework.Editor.World.TerrainModifiers.Base.Apply ( Vector2  terrainCoords,
TerrainBrush  brush 
)
pure virtual

Applies and accumulates a modification to the Terrain.

Parameters
terrainCoordsThe center coordinates of the area to modify in world space.
brushThe shape and size of the area around terrainCoords to modify.

Implemented in AlphaFramework.Editor.World.TerrainModifiers.Height, and AlphaFramework.Editor.World.TerrainModifiers.Texture.

◆ GetCommand()

abstract IUndoCommand AlphaFramework.Editor.World.TerrainModifiers.Base.GetCommand ( )
pure virtual

Creates a pre-executed undo command representing the accumulated Apply calls to this instance.

Implemented in AlphaFramework.Editor.World.TerrainModifiers.Texture, and AlphaFramework.Editor.World.TerrainModifiers.Height.

Member Data Documentation

◆ NewData

readonly ExpandableRectangleArray<byte> AlphaFramework.Editor.World.TerrainModifiers.Base.NewData = new ExpandableRectangleArray<byte>()
protected

Used to collect data as it is after the modifcations.

◆ OldData

readonly ExpandableRectangleArray<byte> AlphaFramework.Editor.World.TerrainModifiers.Base.OldData = new ExpandableRectangleArray<byte>()
protected

Used to collect data as it was before the modifications.

◆ Terrain

readonly ITerrain AlphaFramework.Editor.World.TerrainModifiers.Base.Terrain
protected

The Terrain to modify.


The documentation for this class was generated from the following file: