Class StampRegionsUserToolStateBase<TBrushTarget, TTerrainLayer>
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.UserTools.SM.States
Assembly: fwt.hexterrains.dll
Syntax
public abstract class StampRegionsUserToolStateBase<TBrushTarget, TTerrainLayer> : StampUserToolStateBase<TBrushTarget, TTerrainLayer, int>, ISmState where TBrushTarget : HexTerrainLayerGroup where TTerrainLayer : CellRegionLayer
Type Parameters
| Name | Description |
|---|---|
| TBrushTarget | |
| TTerrainLayer |
Constructors
StampRegionsUserToolStateBase(ISmState)
Declaration
protected StampRegionsUserToolStateBase(ISmState parent)
Parameters
| Type | Name | Description |
|---|---|---|
| ISmState | parent |
Methods
ReadOriginCellData(TTerrainLayer, int, out int)
Attempts to read the original cell data for the specified terrain layer and cell index.
Declaration
public override bool ReadOriginCellData(TTerrainLayer terrainLayer, int cellIndex, out int cellData)
Parameters
| Type | Name | Description |
|---|---|---|
| TTerrainLayer | terrainLayer | The terrain layer from which to retrieve cell data. Cannot be null. |
| int | cellIndex | The zero-based index of the cell within the terrain layer whose data is to be read. Must be within the valid range of cell indices for the specified layer. |
| int | cellData | When this method returns, contains the cell data associated with the specified cell index if the operation succeeds; otherwise, contains the default value for the cell data type. |
Returns
| Type | Description |
|---|---|
| bool | true if the cell data was successfully read; otherwise, false. |
Overrides
SetCellDataToTarget(TTerrainLayer, int, int)
Attempts to set the specified cell data on the target terrain layer at the given cell index.
Declaration
public override bool SetCellDataToTarget(TTerrainLayer terrainLayer, int cellIndex, int cellData)
Parameters
| Type | Name | Description |
|---|---|---|
| TTerrainLayer | terrainLayer | The terrain layer on which to set the cell data. Cannot be null. |
| int | cellIndex | The zero-based index of the cell within the terrain layer to update. Must be within the valid range of cell indices for the layer. |
| int | cellData | The cell data to assign to the specified cell. Cannot be null. |
Returns
| Type | Description |
|---|---|
| bool | true if the cell data was successfully set; otherwise, false. |
Overrides
Remarks
This method does not modify the terrain layer if the cell index is out of range or if the cell data is invalid. Implementations may impose additional constraints on valid cell data or indices.