HGridReg

class HGridReg(val rCenMin: Int, val rCenMax: Int, val cTileMin: Int, val cTileMax: Int) extends HGrid

A Regular hex grid where the rows have the same length, except div4rem2 rows may differ in length by 1 from div4rem0 rows. A div4rem2 row is where the y coordinate divided by 4 has a remainder of 2. This class replaces the old HexGridReg, which used Roords rather than HCens etc.

Companion
object
trait HGrid
trait TGrid
class Object
trait Matchable
class Any

Document{}

final def sidesForeach(f: HSide => Unit): Unit

foreach Hex side's coordinate HSide, calls the effectfull function.

foreach Hex side's coordinate HSide, calls the effectfull function.

Inherited from
HGrid
@inline
final def rSideMin: Int

The bottom Side Row of this TileGrid. The r value, the row number value.

The bottom Side Row of this TileGrid. The r value, the row number value.

Inherited from
TGrid
def sideRowForeach(f: Int => Unit): Unit

Foreachs over each Row of Sides. Users will not normally need to use this method directly.

Foreachs over each Row of Sides. Users will not normally need to use this method directly.

Inherited from
TGrid
@inline
final def rSideMax: Int

The top Side Row of this TileGrid. The r value, the row number.

The top Side Row of this TileGrid. The r value, the row number.

Inherited from
TGrid
final def sidesFlatMap[ArrT <: ArrImut[_]](f: HSide => ArrT)(implicit build: ArrTFlatBuilder[ArrT]): ArrT

maps over each Hex Side's coordinate HSide in the given Row.

maps over each Hex Side's coordinate HSide in the given Row.

Inherited from
HGrid
final val numSides: Int

The number of Sides in the TileGrid. Needs reimplementing.

The number of Sides in the TileGrid. Needs reimplementing.

Inherited from
HGrid
final def sidesDraw(colour: Colour, lineWidth: Double): LinesDraw

This gives the all tile grid lines in a single colour and line width.

This gives the all tile grid lines in a single colour and line width.

Inherited from
TGrid

The Hex Sides of the Hex Grid defined in integer constructed HCoordLineSeg..

The Hex Sides of the Hex Grid defined in integer constructed HCoordLineSeg..

Inherited from
HGrid
@inline
final def numOfSideRows: Int

The number of Rows of Sides.

The number of Rows of Sides.

Inherited from
TGrid
final def sidesMap[B, ArrT <: ArrImut[B]](f: HSide => B)(implicit build: ArrTBuilder[B, ArrT]): ArrT

maps over each Hex Side's coordinate HSide in the given Row.

maps over each Hex Side's coordinate HSide in the given Row.

Inherited from
HGrid

Value members

Concrete methods

@inline
def arrIndex(r: Int, c: Int): Int

Gives the index into an Arr / Array of Tile data from its tile Roord. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Gives the index into an Arr / Array of Tile data from its tile Roord. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

def cRow0sMax: Int

Maximum column or c value for tile centre rows where r.Div4Rem0.

Maximum column or c value for tile centre rows where r.Div4Rem0.

def cRow0sMin: Int

Minimum c or column value for tile centre rows where r.Div4Rem0.

Minimum c or column value for tile centre rows where r.Div4Rem0.

def cRow2sMax: Int

Maximum column or c value for tile centre rows where r.Div4Rem2.

Maximum column or c value for tile centre rows where r.Div4Rem2.

def cRow2sMin: Int

Minimum column or c value for tile centre rows where r.Div4Rem2.

Minimum column or c value for tile centre rows where r.Div4Rem2.

override def cRowCenMin(row: Int): Int
Definition Classes
def hCenExists(r: Int, c: Int): Boolean
override def height: Double
Definition Classes
override def numCenRows: Int
Definition Classes
override def numCens: Int
Definition Classes
override def numRow0s: Int
Definition Classes
override def numRow2s: Int
Definition Classes
def rRow0sMax: Int

The maximum row or value, ie the top row where r.Div4Rem0.

The maximum row or value, ie the top row where r.Div4Rem0.

def rRow0sMin: Int

The minimum row or value, ie the bottom row where r.Div4Rem0.

The minimum row or value, ie the bottom row where r.Div4Rem0.

def rRow2sMax: Int

The maximum row or value, i.e the top row, where r.Div4Rem2.

The maximum row or value, i.e the top row, where r.Div4Rem2.

def rRow2sMin: Int

The lowest row or value, i.e the bottom row, where r.Div4Rem2.

The lowest row or value, i.e the bottom row, where r.Div4Rem2.

def row0sNumCen: Int

Length or number of tiles for tile centre rows where r.Div4Rem0.

Length or number of tiles for tile centre rows where r.Div4Rem0.

def row2sNumCen: Int

Length or number of tiles for tile centre rows where r.Div4Rem2.

Length or number of tiles for tile centre rows where r.Div4Rem2.

override def rowForeach(r: Int)(f: HCen => Unit): Unit

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

Definition Classes
override def rowForeachSide(r: Int)(f: HSide => Unit): Unit
Definition Classes
override def rowIForeach(r: Int, startCount: Int)(f: (HCen, Int) => Unit): Int

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

Definition Classes
override def rowNumCens(row: Int): Int
Definition Classes
override def sideArrIndex(r: Int, c: Int): Int

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Definition Classes
override def sideRowIndexArray: Array[Int]

Array of indexs for Side data Arrs giving the index value for the start of each side row.

Array of indexs for Side data Arrs giving the index value for the start of each side row.

Definition Classes
override def width: Double
Definition Classes
def xBottom: Double
def xLeft: Double
def xRight: Double
def xTop: Double

Inherited methods

The active tiles without any PaintElems.

The active tiles without any PaintElems.

Inherited from
HGrid
@inline
final def arrIndex(hc: HCen): Int

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Inherited from
HGrid
def cCen: Double

The centre of the hex grid in terms of c column coordinates.

The centre of the hex grid in terms of c column coordinates.

Inherited from
HGrid
final def cenRowEmpty(row: Int): Boolean

Is the specified tile centre row empty?

Is the specified tile centre row empty?

Inherited from
HGrid
def cenVec: Vec2
Inherited from
TGrid
final def flatMap[ArrT <: ArrImut[_]](f: HCen => ArrT)(implicit build: ArrTFlatBuilder[ArrT]): ArrT

flatMaps from all hex tile centre coordinates to an Arr of type ArrT. The elements of this array can not be accessed from this grid class as the TileGrid structure is lost in the flatMap operation.

flatMaps from all hex tile centre coordinates to an Arr of type ArrT. The elements of this array can not be accessed from this grid class as the TileGrid structure is lost in the flatMap operation.

Inherited from
HGrid
final def flatMapRows[ArrT <: ArrImut[_]](f: Int => ArrT)(implicit build: ArrTFlatBuilder[ArrT]): ArrT

flatMaps over each row number.

flatMaps over each row number.

Inherited from
TGrid
final def foreach(f: HCen => Unit): Unit

foreachs over each HCen hex tile centre, apply the side effecting function.

foreachs over each HCen hex tile centre, apply the side effecting function.

Inherited from
HGrid
override def foreachCenCoord(f: TCoord => Unit): Unit
Definition Classes
Inherited from
HGrid
final def foreachRow(f: Int => Unit): Unit

Foreach grid Row y coordinate.

Foreach grid Row y coordinate.

Inherited from
TGrid
def fullDisplayScale(dispWidth: Double, dispHeight: Double, padding: Double): Double
Inherited from
TGrid
final def hCenExists(hc: HCen): Boolean

Boolean. True if the HCen hex centre exists in this hex grid.

Boolean. True if the HCen hex centre exists in this hex grid.

Inherited from
HGrid
final def iForeach(f: (HCen, Int) => Unit): Unit

foreachs with index over each HCen hex tile centre, apply the side effecting function.

foreachs with index over each HCen hex tile centre, apply the side effecting function.

Inherited from
HGrid
final def map[B, ArrB <: ArrImut[B]](f: HCen => B)(implicit build: ArrTBuilder[B, ArrB]): ArrB

Maps over the HCen hex centre tile coordinates. B is used rather than A as a type parameter, as this method maps from HCen => B, corresponding to the standard Scala map function of A => B.

Maps over the HCen hex centre tile coordinates. B is used rather than A as a type parameter, as this method maps from HCen => B, corresponding to the standard Scala map function of A => B.

Inherited from
HGrid
def mapCenCoords[B, BB <: ArrImut[B]](f: TCoord => B)(implicit build: ArrTBuilder[B, BB]): BB
Inherited from
TGrid
final def mapRows[B, BB <: ArrImut[B]](f: Int => B)(implicit build: ArrTBuilder[B, BB]): BB

maps over each row number.

maps over each row number.

Inherited from
TGrid
final def newHCenArrBuff[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrBuff[A]

Creates a new HCenArrBuff An [[HCen] hex tile centre corresponding Arr of empty ArrayBuffers of the given or inferred type.

Creates a new HCenArrBuff An [[HCen] hex tile centre corresponding Arr of empty ArrayBuffers of the given or inferred type.

Inherited from
HGrid
final def newTileArr[A <: AnyRef](value: A)(implicit ct: ClassTag[A]): HCenArr[A]

New immutable Arr of Tile data.

New immutable Arr of Tile data.

Inherited from
HGrid
final def newTileArrArr[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrArr[A]

New immutable Arr of Tile data.

New immutable Arr of Tile data.

Inherited from
HGrid
final def newTileArrOpt[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrOpt[A]

New Tile immutable Tile Arr of Opt data values.

New Tile immutable Tile Arr of Opt data values.

Inherited from
HGrid
@inline
final def numOfVertRows: Int

The number of Rows of vertices.

The number of Rows of vertices.

Inherited from
TGrid
def rBottomRow0: Boolean

The r coordinate of the bottom row of this grid divided by 4 leaves remainder of 0.

The r coordinate of the bottom row of this grid divided by 4 leaves remainder of 0.

Inherited from
HGrid
def rBottomRow2: Boolean

The r coordinate of the bottom row of this grid divided by 4 leaves remainder of 2.

The r coordinate of the bottom row of this grid divided by 4 leaves remainder of 2.

Inherited from
HGrid
final def rTopCenRow0: Boolean

Boolean, true if for top hex tile centre row of this hex grid r %% 4 == 0.

Boolean, true if for top hex tile centre row of this hex grid r %% 4 == 0.

Inherited from
HGrid
final def rTopRow2: Boolean

Boolean, true if for top hex tile centre row of this hex grid r %% 4 == 2.

Boolean, true if for top hex tile centre row of this hex grid r %% 4 == 2.

Inherited from
HGrid

Gives the text graphics for the row and column of each tile centre.

Gives the text graphics for the row and column of each tile centre.

Inherited from
TGrid
@inline
final def sideArrIndex(hc: HSide): Int

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Inherited from
HGrid
override def sideLines: LineSegs
Definition Classes
Inherited from
HGrid
final override def xCen: Double

The centre of the hex grid along the X axis after the XRatio has been applied to c column value.

The centre of the hex grid along the X axis after the XRatio has been applied to c column value.

Definition Classes
Inherited from
HGrid
override def xRatio: Double

The conversion factor for c column tile grid coordinates. 1.0 / sqrt(3).

The conversion factor for c column tile grid coordinates. 1.0 / sqrt(3).

Definition Classes
Inherited from
HGrid
def yCen: Double
Inherited from
TGrid

Concrete fields

val cTileMax: Int
val cTileMin: Int
val rCenMax: Int
val rCenMin: Int