Class ChunkMeshesDataLayer
Data layer for storing meshes of the hex terrain chunks
Inherited Members
Namespace: Fwt.HexTerrains.DataLayers
Assembly: fwt.hexterrains.dll
Syntax
public class ChunkMeshesDataLayer : HexTerrainListChunkedDataLayer<Mesh>, IDisposable, ICommitChanges, IListDataLayer<Mesh>
Properties
CellsGridSize
Width and Height of the grid of cells.
Declaration
public override int2 CellsGridSize { get; }
Property Value
| Type | Description |
|---|---|
| int2 |
Overrides
ChunkGridSize
Width and Height of the grid of chunks.
Declaration
public override int2 ChunkGridSize { get; }
Property Value
| Type | Description |
|---|---|
| int2 |
Overrides
ChunkSize
Width and Height of the chunk in cells.
Declaration
public override int2 ChunkSize { get; }
Property Value
| Type | Description |
|---|---|
| int2 |
Overrides
IsConnectedHorizontally
True if left and right edges of the chunk are connected (like in civilization games). Needed for wrapping the grid. If SetCellDirty(cellIndex, checkEdges) is called with checkEdges == true, the chunk of the cell is marked dirty and also all adjacent chunks are also marked dirty. So if the left edge is dirty, the right edge is also dirty.
Declaration
public override bool IsConnectedHorizontally { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
IsConnectedVertically
True if top and bottom edges of the chunk are connected (like in civilization games). Needed for wrapping the grid. If SetCellDirty(cellIndex, checkEdges) is called with checkEdges == true, the chunk of the cell is marked dirty and also all adjacent chunks are also marked dirty. So if the top edge is dirty, the bottom edge is also dirty.
Declaration
public override bool IsConnectedVertically { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
IsDisposableItems
If true, means when layer is resized or disposed, all items that are removed will be disposed (see nested classes description for details as the process may be different from layer to layer)
Declaration
public override bool IsDisposableItems { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
Cleanup()
Declaration
public override void Cleanup()
Overrides
DisposeDataItem(Mesh)
Disposes data item if it is IDisposable.
Declaration
protected override void DisposeDataItem(Mesh item)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | item |
Overrides
DisposeExcessItems(int)
Disposes items at cells greater than layerSize
Declaration
public override void DisposeExcessItems(int layerSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | layerSize | items count to keep, dispose all other items |