Class DataLayerBrushUserToolState<TBrushTarget, TSettings, TSettingsScreen, TTerrainLayer, TDataLayer, TDataLayerValue>
An abstract base class for brush user tool states that operate on data layers within a hex terrain environment. Enables interaction with terrain layers and their associated data layers using customizable brush settings and UI screens.
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.UserTools.SM
Assembly: fwt.hexterrains.dll
Syntax
public abstract class DataLayerBrushUserToolState<TBrushTarget, TSettings, TSettingsScreen, TTerrainLayer, TDataLayer, TDataLayerValue> : BrushUserToolState<TBrushTarget, TSettings, TSettingsScreen, TTerrainLayer>, ISmState where TBrushTarget : HexTerrainLayerGroup where TSettingsScreen : ToolSettingsScreen<TSettings> where TTerrainLayer : HexTerrainLayer where TDataLayer : CellValueDataLayer<TDataLayerValue> where TDataLayerValue : unmanaged
Type Parameters
| Name | Description |
|---|---|
| TBrushTarget | The type representing the target group of hex terrain layers that the brush operates on. |
| TSettings | The type containing configuration settings for the brush tool. |
| TSettingsScreen | The type of the settings screen UI used to edit brush settings. |
| TTerrainLayer | The type representing individual hex terrain layers affected by the brush. |
| TDataLayer | The type representing the data layer associated with a terrain layer, containing cell values. |
| TDataLayerValue | The type of the value stored in each cell of the data layer. Must be an unmanaged type. |
Remarks
This class is intended for extension to implement specific brush behaviors that modify or interact with data layers on hex terrain. It provides a framework for tools that require both terrain and data layer manipulation, supporting custom settings and UI integration.
Constructors
DataLayerBrushUserToolState(ISmState)
Declaration
protected DataLayerBrushUserToolState(ISmState parent)
Parameters
| Type | Name | Description |
|---|---|---|
| ISmState | parent |
Methods
GetDataLayer(TTerrainLayer)
Retrieves the data layer associated with the specified terrain layer.
Declaration
public abstract TDataLayer GetDataLayer(TTerrainLayer terrainLayer)
Parameters
| Type | Name | Description |
|---|---|---|
| TTerrainLayer | terrainLayer | The terrain layer for which to obtain the corresponding data layer. Cannot be null. |
Returns
| Type | Description |
|---|---|
| TDataLayer | The data layer mapped to the given terrain layer. |