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
intThe length of the sqaure or the diameter of the circle.
circle
booltrue
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
Size
The length of the sqaure or the diameter of the circle.
public readonly int Size
Field Value
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
Returns
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)