Class StampCellItemUserToolState<TBrushTarget, TTerrainLayer, TChunkMeshLayerGroup, TChunkMeshLayer>
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.UserTools.SM.States.CellItems
Assembly: fwt.hexterrains.dll
Syntax
public abstract class StampCellItemUserToolState<TBrushTarget, TTerrainLayer, TChunkMeshLayerGroup, TChunkMeshLayer> : StampUserToolStateBase<TBrushTarget, TTerrainLayer, (int, int, float3, quaternion, float3)>, ISmState where TBrushTarget : HexTerrainLayerGroup where TTerrainLayer : CellItemLayer where TChunkMeshLayerGroup : ChunkMeshLayerGroup where TChunkMeshLayer : ChunkMeshLayer
Type Parameters
| Name | Description |
|---|---|
| TBrushTarget | |
| TTerrainLayer | |
| TChunkMeshLayerGroup | |
| TChunkMeshLayer |
Constructors
StampCellItemUserToolState(ISmState)
Declaration
protected StampCellItemUserToolState(ISmState parent)
Parameters
| Type | Name | Description |
|---|---|---|
| ISmState | parent |
Methods
ReadOriginCellData(TTerrainLayer, int, out (int, int, float3, quaternion, float3))
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, int, float3, quaternion, float3) cellValue)
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, int, float3, quaternion, float3) | cellValue |
Returns
| Type | Description |
|---|---|
| bool | true if the cell data was successfully read; otherwise, false. |
Overrides
SetCellDataToTarget(TTerrainLayer, int, (int, int, float3, quaternion, float3))
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, int, float3, quaternion, float3) cellValue)
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, int, float3, quaternion, float3) | cellValue |
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.