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

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 sepExtra(hCen: HCen, vertNum: Int)(implicit gridSys: HGridSys): Boolean

The separator that shares meets this corner has an extra vertex.

The separator that shares meets this corner has an extra vertex.

Attributes

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, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra0(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra1(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra2(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra3(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra4(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 setBendExtra5(r: Int, c: Int, magIn: Int, magOut: Int)(implicit grid: HGrid): Unit

Sets all 3 corners of a bend, with extra separator vertex. 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, with extra separator vertex. 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 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, 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 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 setCornerSepExtra(cenR: Int, cenC: Int, vertNum: Int, dirn1: HVDirnOpt, magnitude1: Int)(implicit grid: HGrid): Unit

Sets a single HCorner corner with 1 HVOffsetDelta, but allows an adjacent HSep to have an extra vertex with no offset.

Sets a single HCorner corner with 1 HVOffsetDelta, but allows an adjacent HSep to have an extra vertex with no offset.

Attributes

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

Sets a single HCorner corner with 1 HVOffsetDelta, but allows an adjacent HSep to have an extra vertex with no offset .

Sets a single HCorner corner with 1 HVOffsetDelta, but allows an adjacent HSep to have an extra vertex with no offset .

Attributes

def setNCornersIn(cenR: Int, cenC: Int, numIndents: Int, firstVertNum: Int, magnitude: Int)(implicit grid: HGrid): Unit
def setOrigLt(r: Int, c: Int, dirn: HVDirn, magLeft: Int)(implicit grid: HGrid): Unit

Set the HCorner of an HSep source or end point.

Set the HCorner of an HSep source or end point.

Attributes

def setOrigRt(r: Int, c: Int, dirn: HVDirn, magRight: Int)(implicit grid: HGrid): Unit

Set the single HCorners of an HSep source or end point.

Set the single HCorners of an HSep source or end point.

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

Sets the 3 HCorners of the HVert in the 3 HCens inward (away from the HVert) by the same magnitude.

Sets the 3 HCorners of the HVert in the 3 HCens inward (away from the HVert) by the same magnitude.

Attributes

def setVertEqual(hv: HVert, magnitude: Int)(implicit grid: HGrid): Unit

Sets the 3 HCorners of the HVert in the 3 HCens inward (away from the HVert) by the same magnitude. There is a name overload to specify the HCen by row and column.

Sets the 3 HCorners of the HVert in the 3 HCens inward (away from the HVert) by the same magnitude. There is a name overload to specify the HCen by row and column.

Attributes

def setVertOrig(r: Int, c: Int, dirn: HVDirn, magLeft: Int, magRight: Int)(implicit grid: HGrid): Unit

Set the 3 HCorners of an HSep source or end point. There is a name overload to specify the HCen asa single parameter.

Set the 3 HCorners of an HSep source or end point. There is a name overload to specify the HCen asa single parameter.

Attributes

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 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]

Returns the 6 HCorners for the tile. There is a name overload to specify the HCen by row and column.

Returns the 6 HCorners for the tile. There is a name overload to specify the HCen by row and column.

Attributes

def tileCorners(cenR: Int, cenC: Int)(implicit gridSys: HGridSys): RArr[HCorner]

Returns the 6 HCorners for the tile. There is a name overload to specify the HCen asa single parameter.

Returns the 6 HCorners for the tile. There is a name overload to specify the HCen asa single parameter.

Attributes

def tilePoly(hCen: HCen)(implicit gridSys: HGridSys): PolygonHvOffset

Returns the polygon of the HCen in HvOffsets. There is a name overload to specify the HCen asa single parameter.

Returns the polygon of the HCen in HvOffsets. There is a name overload to specify the HCen asa single parameter.

Attributes

def tilePoly(cenR: Int, cenC: Int)(implicit gridSys: HGridSys): PolygonHvOffset

Returns the polygon of the HCen in HvOffsets. There is a name overload to specify the HCen by row and column.

Returns the polygon of the HCen in HvOffsets. There is a name overload to specify the HCen by row and column.

Attributes

Concrete fields