Table of Contents

Struct TerrainBrush

Namespace
AlphaFramework.World.Terrains
Assembly
AlphaFramework.World.dll

Describes a square or circle terrain area that is to be modified.

public struct TerrainBrush
Inherited Members
Extension Methods

Constructors

TerrainBrush(int, bool)

Creates a new modification area.

public TerrainBrush(int size, bool circle)

Parameters

size int

The length of the sqaure or the diameter of the circle.

circle bool

true if this is a circle, false if this is a sqaure.

Fields

Circle

true if this is a circle, false if this is a sqaure.

public readonly bool Circle

Field Value

bool

Size

The length of the sqaure or the diameter of the circle.

public readonly int Size

Field Value

int

Methods

Contains(int, int)

Checks whether specific 2D coordinates (relative to the top-left corner) lie within this modification area.

public bool Contains(int x, int y)

Parameters

x int
y int

Returns

bool

Factor(int, int)

Provides a scaling factor depending on how close specific 2D coordinates (relative to the top-left corner) lie to the modification area center.

public double Factor(int x, int y)

Parameters

x int
y int

Returns

double