Struct HexTerrainMetrics
Metrics of the HexTerrain. Contains information about the size of the terrain, chunk size, number of cells, etc.
Inherited Members
Namespace: Fwt.HexTerrains.Data
Assembly: fwt.hexterrains.dll
Syntax
public struct HexTerrainMetrics
Fields
CellsCount
Total number of cells in the terrain.
Declaration
public int CellsCount
Field Value
| Type | Description |
|---|---|
| int |
CellsCountInChunk
Total number of cells in one chunk.
Declaration
public int CellsCountInChunk
Field Value
| Type | Description |
|---|---|
| int |
ChunkSize_Cells
Size of the chunk in cells.
Declaration
public int2 ChunkSize_Cells
Field Value
| Type | Description |
|---|---|
| int2 |
ChunkSize_Units
Size of the chunk in units (meters).
Declaration
public float2 ChunkSize_Units
Field Value
| Type | Description |
|---|---|
| float2 |
ChunksCount
Total number of chunks in the terrain.
Declaration
public int ChunksCount
Field Value
| Type | Description |
|---|---|
| int |
ChunksGridSize
Size of the terrain in chunks.
Declaration
public int2 ChunksGridSize
Field Value
| Type | Description |
|---|---|
| int2 |
HexAreaSize
Size of the hexagon area in meters (rect in which the hexagon fits).
Declaration
public float2 HexAreaSize
Field Value
| Type | Description |
|---|---|
| float2 |
HexSideSize
Size of the hexagon side (radius) in units.
Declaration
public float HexSideSize
Field Value
| Type | Description |
|---|---|
| float |
TerrainSize_Cells
Size of the terrain in cells.
Declaration
public int2 TerrainSize_Cells
Field Value
| Type | Description |
|---|---|
| int2 |
TerrainSize_Units
Size of the terrain in units (meters).
Declaration
public float2 TerrainSize_Units
Field Value
| Type | Description |
|---|---|
| float2 |
Methods
CreateMetrics(HexTerrainSettings)
Creates a new instance of HexTerrainMetrics based on the provided terrain settings.
Declaration
public static HexTerrainMetrics CreateMetrics(HexTerrainSettings terrainSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainSettings | terrainSettings | terrain settings to create a terrain metrics based on |
Returns
| Type | Description |
|---|---|
| HexTerrainMetrics | Terrain metrics calculated based on terrain settings |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |