Table of Contents

Class HeightSmooth

Namespace
AlphaFramework.Editor.World.TerrainModifiers
Assembly
AlphaFramework.Editor.dll

Interactively smoothes a ITerrain area using a Gaussian filter.

public sealed class HeightSmooth : Height
Inheritance
HeightSmooth
Inherited Members
Extension Methods

Constructors

HeightSmooth(ITerrain, Terrain, Action, double)

Creates a new terrain height smoother.

public HeightSmooth(ITerrain terrain, Terrain engineTerrain, Action refreshHandler, double sigma)

Parameters

terrain ITerrain

The ITerrain to modify.

engineTerrain Terrain

The Terrain to live-update while modifying.

refreshHandler Action

Called when the presenter needs to be reset.

sigma double

The standard deviation of the Gaussian distribution.

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

offset Point

The HeightMap index that corresponds to the top-left corner of the area to modify.

brush TerrainBrush

The shape and size of the area to the lower-right of offset to modify.

oldData byte[,]

An array to be filled with data from HeightMap before the modification. Both dimensions must be equal to Size.

newData byte[,]

An array to be filled with data from HeightMap after the modification. Both dimensions must be equal to Size.