HCornerLayer

ostrat.prid.phex.HCornerLayer
See theHCornerLayer companion object
class HCornerLayer(val unsafeArray: Array[Int])

HGridSys data layer class that allows the hex tile vertices to be shifted by a small amount to create more pleasing terrain and to feature islands, straits and other tile side features. Every HCen hex tile in the HGridSys has 6 vertex entries.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def corner(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HCorner

Returns the specified HCorner object which specifies, 1 or 2 HVAndOffsets.

Returns the specified HCorner object which specifies, 1 or 2 HVAndOffsets.

Attributes

def corner(hCenR: Int, hCenC: Int, vertNum: Int)(implicit gridSys: HGridSys): HCorner

Returns the specified HCorner object which specifies, 1 or 2 HVAndOffsets.

Returns the specified HCorner object which specifies, 1 or 2 HVAndOffsets.

Attributes

def cornerForSide(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HVAndOffsetArr
def cornerForSideSpecial(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HVAndOffsetArr
def cornerV1(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HVAndOffset

Returns the first and possibly only single HVAndOffset for an HCorner. This is used for drawing HSide hex side line segments.

Returns the first and possibly only single HVAndOffset for an HCorner. This is used for drawing HSide hex side line segments.

Attributes

def cornerVLast(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HVAndOffset

Returns the last HVAndOffset for an HCorner. This is used for drawing HSide hex side line segments.

Returns the last HVAndOffset for an HCorner. This is used for drawing HSide hex side line segments.

Attributes

The number of corners stored / specified in this HCornerLayer object. This will be 6 for every tile in the associated HGridSys.

The number of corners stored / specified in this HCornerLayer object. This will be 6 for every tile in the associated HGridSys.

Attributes

def setCorner(cenR: Int, cenC: Int, vertNum: Int, dirn: HVDirnOpt, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner. Sets one vertex offset for one adjacent hex. This could leave a gap for side terrain such as straits.

Sets a single HCorner. Sets one vertex offset for one adjacent hex. This could leave a gap for side terrain such as straits.

Attributes

def setCorner(hCen: HCen, vertNum: Int, dirn: HVDirnOpt, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner with 1 HVOffset. Sets one vertex offset for one adjacent hex. This could leave a gap for side terrain such as straits.

Sets a single HCorner with 1 HVOffset. Sets one vertex offset for one adjacent hex. This could leave a gap for side terrain such as straits.

Attributes

def setCorner2(cenR: Int, cenC: Int, vertNum: Int, dirn1: HVDirnOpt, dirn2: HVDirnOpt, magnitude1: Int, magnitude2: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner corner with 2 HVOffsets.

Sets a single HCorner corner with 2 HVOffsets.

Attributes

def setCorner2(hCen: HCen, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int, dirn2: HVDirnOpt, magnitude2: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner corner with 2 HVOffsets.

Sets a single HCorner corner with 2 HVOffsets.

Attributes

def setCornerIn(cenR: Int, cenC: Int, vertNum: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner in towards the HCen with a single HVOffset.

Sets the corner in towards the HCen with a single HVOffset.

Attributes

def setMouth0(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 0.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 0.

Attributes

def setMouth1(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 1.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 1.

Attributes

def setMouth2(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 2.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 2.

Attributes

def setMouth3(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 3.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 3.

Attributes

def setMouth3Corner(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for one tile. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 3.

Sets the end of a side terrain at vertex for one tile. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 3.

Attributes

def setMouth3OffGrid(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain from off the HGrid at what would have been vertex 3 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall.

Sets the end of a side terrain from off the HGrid at what would have been vertex 3 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall.

Attributes

def setMouth4(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 4.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 4.

Attributes

def setMouth4OffGrid(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain from off the HGrid at what would have been vertex 4 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall.

Sets the end of a side terrain from off the HGrid at what would have been vertex 4 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall.

Attributes

def setMouth5(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Attributes

def setMouth5Corner(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Sets the end of a side terrain at vertex for all 3 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Attributes

def setMouth5OffGrid(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the end of a side terrain from off the HGrid at what would have been vertex 5 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Sets the end of a side terrain from off the HGrid at what would have been vertex 5 for the other 2 tiles. For example the the mouth of Straits the given HCen is the sea tile, for a wall it would be the hex tile looking at the end of the wall. The vertex for this tile would be 5.

Attributes

def setSideCorner2(cenR: Int, cenC: Int, vertNum: Int, dirn1: HVDirnOpt, dirn2: HVDirnOpt, magnitude1: Int, magnitude2: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner corner with 1 HVOffset for the tile 2 for the hSide.

Sets a single HCorner corner with 1 HVOffset for the tile 2 for the hSide.

Attributes

def setSideCorner2(hCen: HCen, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int, dirn2: HVDirnOpt, magnitude2: Int)(implicit gridSys: HGridSys): Unit

Sets a single HCorner corner with HVOffset for the tile 2 for the HSide.

Sets a single HCorner corner with HVOffset for the tile 2 for the HSide.

Attributes

def setVert0In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner inward HVDn on the 0 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUp.

Sets the corner inward HVDn on the 0 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUp.

Attributes

def setVert1In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner inward HVDL on the 1 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUR.

Sets the corner inward HVDL on the 1 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUR.

Attributes

def setVert2In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner inward HVUL on the 2 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDR.

Sets the corner inward HVUL on the 2 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDR.

Attributes

def setVert3In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner inward HVUp on the 3 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDn.

Sets the corner inward HVUp on the 3 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDn.

Attributes

def setVert4In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner in HVUR on the 4 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDL.

Sets the corner in HVUR on the 4 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVDL.

Attributes

def setVert5In(r: Int, c: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the corner in HVDR on the 5 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUL.

Sets the corner in HVDR on the 5 vertex of the given HCen. Sets the corners of the other two HCens sharing the HVert vertex in the opposite direction HVUL.

Attributes

def setVertAllIn(hVertR: Int, hVertC: Int, magnitude: Int)(implicit gridSys: HGridSys): Unit

Incomplete needs design adjustment.

Incomplete needs design adjustment.

Attributes

def setVertSingle(r: Int, c: Int, dirn: HVDirnOpt, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the same vertex offset for all three adjacent hexs. This leaves no gap for side terrain such as straits.

Sets the same vertex offset for all three adjacent hexs. This leaves no gap for side terrain such as straits.

Attributes

def setVertSingle(hVert: HVert, dirn: HVDirnOpt, magnitude: Int)(implicit gridSys: HGridSys): Unit

Sets the same vertex offset for all three adjacent hexs. This leaves no gap for side terrain such as straits.

Sets the same vertex offset for all three adjacent hexs. This leaves no gap for side terrain such as straits.

Attributes

def sideLine(hCen: HCen, vertNum1: Int, vertNum2: Int)(implicit gridSys: HGridSys): LineSegHVAndOffset

Produces an HSide's line segment specified in HVAndOffset coordinates.

Produces an HSide's line segment specified in HVAndOffset coordinates.

Attributes

def sideVerts(hs: HSide)(implicit gridSys: HGridSys): PolygonHVAndOffset

Returns the PolygonHVAndOffset PolygonLike for the given HSide.

Returns the PolygonHVAndOffset PolygonLike for the given HSide.

Attributes

def tileCorners(hCen: HCen)(implicit gridSys: HGridSys): RArr[HCorner]
def tileCorners(cenR: Int, cenC: Int)(implicit gridSys: HGridSys): RArr[HCorner]
def tilePoly(hCen: HCen)(implicit gridSys: HGridSys): PolygonHVAndOffset
def tilePoly(cenR: Int, cenC: Int)(implicit gridSys: HGridSys): PolygonHVAndOffset
def unsafeIndex(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): Int
def unsafeIndex(cenR: Int, cenC: Int, vertNum: Int)(implicit gridSys: HGridSys): Int

Concrete fields