AlphaFramework API  1.0.3
Public Member Functions | Public Attributes | List of all members
AlphaFramework.World.Terrains.TerrainBrush Struct Reference

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

Public Member Functions

 TerrainBrush (int size, bool circle)
 Creates a new modification area. More...
 
bool Contains (int x, int y)
 Checks whether specific 2D coordinates (relative to the top-left corner) lie within this modification area. More...
 
double Factor (int x, int y)
 Provides a scaling factor depending on how close specific 2D coordinates (relative to the top-left corner) lie to the modification area center. More...
 

Public Attributes

readonly int Size
 The length of the sqaure or the diameter of the circle. More...
 
readonly bool Circle
 true if this is a circle, false if this is a sqaure. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TerrainBrush()

AlphaFramework.World.Terrains.TerrainBrush.TerrainBrush ( int  size,
bool  circle 
)
inline

Creates a new modification area.

Parameters
sizeThe length of the sqaure or the diameter of the circle.
circletrue if this is a circle, false if this is a sqaure.

Member Function Documentation

◆ Contains()

bool AlphaFramework.World.Terrains.TerrainBrush.Contains ( int  x,
int  y 
)
inline

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

◆ Factor()

double AlphaFramework.World.Terrains.TerrainBrush.Factor ( int  x,
int  y 
)
inline

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

Member Data Documentation

◆ Circle

readonly bool AlphaFramework.World.Terrains.TerrainBrush.Circle

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

◆ Size

readonly int AlphaFramework.World.Terrains.TerrainBrush.Size

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


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