ostrat.prid.phex
Package ofr hex grids.
Type members
Classlikes
Companion object of HCen trait, contains HVert values for hex tile 0, 0. As well as apply method and Show implicit.
Companion object of HCen trait, contains HVert values for hex tile 0, 0. As well as apply method and Show implicit.
- Companion:
- class
An array of hex tile or hex centre data. For efficiency the data is stored as a flat Array. No run time information distinguishes this from an ordinary linear sequence array of data. Whether in a game or a non game application the data of the grid tiles is likely to change much more frequently than the size, shape, structure of the grid. The compiler knows this is hex grid array and hence the data should be set and retrieved through the HGrid hex grid. So nearly all the methods take the HGrid as an implicit parameter.
An array of hex tile or hex centre data. For efficiency the data is stored as a flat Array. No run time information distinguishes this from an ordinary linear sequence array of data. Whether in a game or a non game application the data of the grid tiles is likely to change much more frequently than the size, shape, structure of the grid. The compiler knows this is hex grid array and hence the data should be set and retrieved through the HGrid hex grid. So nearly all the methods take the HGrid as an implicit parameter.
- Companion:
- object
Companion object for the hex (centres) grid Array of ArrayBuffer classes.
Companion object for the hex (centres) grid Array of ArrayBuffer classes.
- Companion:
- class
Common trait for hex centre and hex side coordinate. The position of these coordinates is proportional, unlike the Hex vertices positions.
Common trait for hex centre and hex side coordinate. The position of these coordinates is proportional, unlike the Hex vertices positions.
- Companion:
- object
Companion object for HCenOrSide trait, contains factory apply method and implicit PersistDec instance.
Companion object for HCenOrSide trait, contains factory apply method and implicit PersistDec instance.
- Companion:
- class
A row or a segment a row of Hex tiles in a grid. The start / left centre HexGrid coordinate and the number of tiles in the row..
A row or a segment a row of Hex tiles in a grid. The start / left centre HexGrid coordinate and the number of tiles in the row..
Companion object for Hex coordinate trait, contains apply factory method and persist and PolygonBuilder implicit instances.
Companion object for Hex coordinate trait, contains apply factory method and persist and PolygonBuilder implicit instances.
- Companion:
- class
The only purpose of this class is to ensure that all HCoord combinations of r and c are valid. Thisis for the combinations where r is even and c is odd.
The only purpose of this class is to ensure that all HCoord combinations of r and c are valid. Thisis for the combinations where r is even and c is odd.
A grid of Hexs. The grid may be a regular rectangle of hexs or an irregular grid with variable length rows.
A grid of Hexs. The grid may be a regular rectangle of hexs or an irregular grid with variable length rows.
An irregular hex grid, where the rows have different lengths and irregular start row coordinates. This is backed by an Array[Int]. The length of this Array is twice the number of tile rows in the grid. Each row from lowest to highest has two values length of the row in the number of tile centres HCens and the rTileMin coordinate for the row.
An irregular hex grid, where the rows have different lengths and irregular start row coordinates. This is backed by an Array[Int]. The length of this Array is twice the number of tile rows in the grid. Each row from lowest to highest has two values length of the row in the number of tile centres HCens and the rTileMin coordinate for the row.
- Value parameters:
- tileRowsStartEnd
the Array contains 2 values per Tile Row, the cStart Tile and the cEnd Tile
- yTileMin
The y value for the bottom tile row of the TileGrid
- Constructor:
creates a new HexGridIrr with a defined grid.
- Companion:
- object
A Regular hex grid where the tile rows have the same length, except the tile rows where r %% 4 == 2 may differ in length by 1 from tile rows where r %% 4 == 0 rows.
A Regular hex grid where the tile rows have the same length, except the tile rows where r %% 4 == 2 may differ in length by 1 from tile rows where r %% 4 == 0 rows.
- Companion:
- object
Companion object for the HGridReg class. Contains an applr method that corrects the r and Y minimum and maximum values.
Companion object for the HGridReg class. Contains an applr method that corrects the r and Y minimum and maximum values.
- Companion:
- class
A Hex side coordinate in a Hex Grid. So Side 1 on its primary Hex tile goes from Vert 6 to 1 while it is Side 4 on its secondary Hex tile and goes from Vertex 4 to vertex 3 So Side 2 on its primary Hex tile goes from Vert 1 to 2 while it is Side 5 on its secondary Hex tile and goes from Vertex 5 to vertex 4 So Side 3 on its primary Hex tile goes from Vert 2 to 3 while it is Side 4 on its secondary Hex tile and goes from Vertex 6 to vertex 4
A Hex side coordinate in a Hex Grid. So Side 1 on its primary Hex tile goes from Vert 6 to 1 while it is Side 4 on its secondary Hex tile and goes from Vertex 4 to vertex 3 So Side 2 on its primary Hex tile goes from Vert 1 to 2 while it is Side 5 on its secondary Hex tile and goes from Vertex 5 to vertex 4 So Side 3 on its primary Hex tile goes from Vert 2 to 3 while it is Side 4 on its secondary Hex tile and goes from Vertex 6 to vertex 4
- Companion:
- object
Companion object for the HSide class, provides an apply factory method that throws an exception for an invalid Hex side coordinate.
Companion object for the HSide class, provides an apply factory method that throws an exception for an invalid Hex side coordinate.
- Companion:
- class
Boolean data corresponding to the sides of a hex grid, stored using an underlying Array[Boolean]. Thhese classes should be created, initalised and used using an [HGrid]] class. For convenience the HGrid is passed as an implicit parameter.
Boolean data corresponding to the sides of a hex grid, stored using an underlying Array[Boolean]. Thhese classes should be created, initalised and used using an [HGrid]] class. For convenience the HGrid is passed as an implicit parameter.
- Companion:
- object
A hex tile vertex coordinate.
A hex tile vertex coordinate.
- Companion:
- object
An array[Int] based collection for HVert.
An array[Int] based collection for HVert.
- Companion:
- object
Not sure about this trait for occupants of a hex tile.
Not sure about this trait for occupants of a hex tile.