HCornerLayer

ostrat.prid.phex.HCornerLayer
See theHCornerLayer companion object
final 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

Value members

Concrete methods

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

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

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

Attributes

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

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

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

Attributes

def cornerV1(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): HvOffset

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

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

Attributes

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

Returns the last HvOffset for an HCorner. This is used for drawing HSep hex side line segments.

Returns the last HvOffset for an HCorner. This is used for drawing HSep hex side line segments.

Attributes

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

Returns the HCorner encoded as an Int.

Returns the HCorner encoded as an Int.

Attributes

def indexUnsafe(cenR: Int, cenC: Int, vertNum: Int)(implicit gridSys: HGridSys): Int

Returns the HCorner encoded as an Int.

Returns the HCorner encoded as an Int.

Attributes

def isSpecial(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): Boolean

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 numTiles: Int

Number of tiles specified in this HCornerLayer.

Number of tiles specified in this HCornerLayer.

Attributes

def set2CornersIn(cenR: Int, cenC: Int, firstVertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit
def set3CornersIn(cenR: Int, cenC: Int, firstVertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit
def set4CornersIn(cenR: Int, cenC: Int, firstVertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit
def set6CornersIn(cenR: Int, cenC: Int, magnitude: Int)(implicit grid: HGrid): Unit
def setBend0(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 0 of the specified HCen, Bend direction defined as HVDn. The other 2 corners are offset in the opposite direction HVUp.

Sets all 3 corners of a bend. The inside of the bend is at vertex 0 of the specified HCen, Bend direction defined as HVDn. The other 2 corners are offset in the opposite direction HVUp.

Attributes

def setBend1(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 1 of the specified HCen. Bend direction defined as HVDL. The other 2 corners are offset in the opposite direction HVUR.

Sets all 3 corners of a bend. The inside of the bend is at vertex 1 of the specified HCen. Bend direction defined as HVDL. The other 2 corners are offset in the opposite direction HVUR.

Attributes

def setBend1Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 1 of the specified HCen. Bend direction defined as HVDL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUR.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 1 of the specified HCen. Bend direction defined as HVDL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUR.

Attributes

def setBend2(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 2 of the specified HCen. Bend direction defined as HVUL. The other 2 corners are offset in the opposite direction HVDR.

Sets all 3 corners of a bend. The inside of the bend is at vertex 2 of the specified HCen. Bend direction defined as HVUL. The other 2 corners are offset in the opposite direction HVDR.

Attributes

def setBend2Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 2 of the specified HCen. Bend direction defined as HVUL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDR.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 2 of the specified HCen. Bend direction defined as HVUL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDR.

Attributes

def setBend3(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 3 of the specified HCen. Bend direction defined as HVUp. The other 2 corners are offset in the opposite direction HVDn.

Sets all 3 corners of a bend. The inside of the bend is at vertex 3 of the specified HCen. Bend direction defined as HVUp. The other 2 corners are offset in the opposite direction HVDn.

Attributes

def setBend3Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 3 of the specified HCen. Bend direction defined as HVUL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDR.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 3 of the specified HCen. Bend direction defined as HVUL although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDR.

Attributes

def setBend4(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 4 of the specified HCen. Bend direction defined as HVUR The other 2 corners are offset in the opposite direction HVDL.

Sets all 3 corners of a bend. The inside of the bend is at vertex 4 of the specified HCen. Bend direction defined as HVUR The other 2 corners are offset in the opposite direction HVDL.

Attributes

def setBend4Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 4 of the specified HCen. Bend direction defined as HVUR although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDL.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 4 of the specified HCen. Bend direction defined as HVUR although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVDL.

Attributes

def setBend5(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend. The inside of the bend is at vertex 5 of the specified HCen. Bend direction defined as HVDR. The other 2 corners are offset in the opposite direction HVUL.

Sets all 3 corners of a bend. The inside of the bend is at vertex 5 of the specified HCen. Bend direction defined as HVDR. The other 2 corners are offset in the opposite direction HVUL.

Attributes

def setBend5Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 5 of the specified HCen. Bend direction defined as HVDR although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUL.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 5 of the specified HCen. Bend direction defined as HVDR although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUL.

Attributes

def setCorner(cenR: Int, cenC: Int, vertNum: Int, dirn: HVDirnOpt, magnitude: Int)(implicit grid: HGrid): 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 grid: HGrid): Unit

Sets a single HCorner with 1 HVOffsetDelta. 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 HVOffsetDelta. Sets one vertex offset for one adjacent hex. This could leave a gap for side terrain such as straits.

Attributes

def setCornerIn(cenR: Int, cenC: Int, vertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets thr corner in at the specified vertex if the specified HCen exists.

Sets thr corner in at the specified vertex if the specified HCen exists.

Attributes

def setCornerPair(cenR: Int, cenC: Int, vertNum: Int, dirn1: HVDirnOpt, dirn2: HVDirnOpt, magnitude1: Int, magnitude2: Int)(implicit grid: HGrid): Unit

Sets a single HCorner corner with 2 HVOffsetDeltas.

Sets a single HCorner corner with 2 HVOffsetDeltas.

Attributes

def setCornerPair(hCen: HCen, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int, dirn2: HVDirnOpt, magnitude2: Int)(implicit grid: HGrid): Unit

Sets a single HCorner corner with 2 HVOffsetDeltas.

Sets a single HCorner corner with 2 HVOffsetDeltas.

Attributes

def setMouth0(r: Int, c: Int, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 setMouth0Corner(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

HVUL and HVUR. Sets the end of an HSep 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 0.

HVUL and HVUR. Sets the end of an HSep 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 0.

Attributes

def setMouth1(r: Int, c: Int, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 setMouth1Corner(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

HVUp and HVDR. Sets the end of an HSep 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 1.

HVUp and HVDR. Sets the end of an HSep 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 1.

Attributes

def setMouth2(r: Int, c: Int, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 setMouth2Corner(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

HVUR and HVDn. Sets the end of an HSep 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 2.

HVUR and HVDn. Sets the end of an HSep 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 2.

Attributes

def setMouth3(r: Int, c: Int, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 grid: HGrid): Unit

HVDR and HVDL. Sets the end of an HSep 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.

HVDR and HVDL. Sets the end of an HSep 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 grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 setMouth4Corner(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

HVDn and HVUL. Sets the end of an HSep 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 4.

HVDn and HVUL. Sets the end of an HSep 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 4.

Attributes

def setMouth4OffGrid(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 grid: HGrid): Unit

Sets the end of an HSep 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 an HSep 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 setNCornersIn(cenR: Int, cenC: Int, numIndents: Int, firstVertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit
def setSideCornerSpecial(cenR: Int, cenC: Int, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int)(implicit grid: HGrid): Unit

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

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

Attributes

def setSideSpecial(hCen: HCen, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int)(implicit grid: HGrid): Unit

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

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

Attributes

def setVert0Out(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 0 of the specified HCen. Bend direction defined as HVDn although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUp.

Sets the 2 outer corners of a bend The inside of the bend ia at vertex 0 of the specified HCen. Bend direction defined as HVDn although the inner corner is not offset. Sets the corners of the two outer corners in the opposite direction HVUp.

Attributes

def setVertEqual(r: Int, c: Int, magnitude: Int)(implicit grid: HGrid): Unit
def setVertEqual(hv: HVert, magnitude: Int)(implicit grid: HGrid): Unit
def setVertSingle(r: Int, c: Int, dirn: HVDirnOpt, magnitude: Int)(implicit grid: HGrid): 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 grid: HGrid): 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 setVertSource(r: Int, c: Int, dirn: HVDirn, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit
def sideLine(hCen: HCen, vertNum1: Int, vertNum2: Int)(implicit proj: HSysProjection): LineSeg

Not sure about the safety of this method.

Not sure about the safety of this method.

Attributes

def sideLineHVAndOffset(hCen: HCen, vertNum1: Int, vertNum2: Int)(implicit gridSys: HGridSys): LineSegHvOffset

Produces an HSep's line segment specified in HvOffset coordinates.

Produces an HSep's line segment specified in HvOffset coordinates.

Attributes

def sidePoly(hs: HSep)(implicit gridSys: HGridSys): PolygonHvOffset

Returns the PolygonHvOffset PolygonLike for the given HSep.

Returns the PolygonHvOffset PolygonLike for the given HSep.

Attributes

def spawn(parentGridSys: HGridSys, childGridSys: HGridSys): HCornerLayer

Spawns a new HCornerLayer data layer for the child HGridSys.

Spawns a new HCornerLayer data layer for the child HGridSys.

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): PolygonHvOffset
def tilePoly(cenR: Int, cenC: Int)(implicit gridSys: HGridSys): PolygonHvOffset

Concrete fields