Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Struct: RT.Coordinates.HexSummary
Represents a tile in a 2D flat-topped hexagonal grid. Remarks
Represents a hexagonal tile in a two-dimensional grid in which each tile is a hexagon with a flat top and bottom
and two of its vertices pointing left and right. Each hex is represented as a pair of coordinates (Q, R), where an
increasing Q coordinate moves down and right, while an increasing R coordinate moves down. ConstructorsInstance methodsstring | |
Returns a string representing this hex tile’s position within a Hex.LargeHexagon(int, Hex) structure
in a more human-intuitive (but mathematically unhelpful) format. The first coordinate identifies a column of
hexes, counting from 1 on the far left of the grid. The second specifies the position of the hex within that
column, counting from 1 at the top. | bool | | Compares this hex tile to another for equality. | bool | | Refer to the documentation for object.Equals. | IEnumerable<Hex.Direction> | |
Assuming a Hex.LargeHexagon(int, Hex) structure of side length sideLength,
returns a collection specifying which edges of the structure the current hex tile is adjacent to. | int | | Refer to the documentation for object.GetHashCode. | PointD[] | |
Returns a polygon describing the shape and position of the current hex tile in 2D space. | Hex | |
Returns the hex tile reached by moving in the specified direction. | Hex | |
Rotates the current hex’s position within the grid about the center hex (0, 0) clockwise by the specified
multiple of 60°. | string | | Refer to the documentation for object.ToString. |
Static methodsdouble | |
Returns the total height of a Hex.LargeHexagon(int, Hex) structure, assuming each hex tile’s width
is 1 . | IEnumerable<Hex> | |
Returns a collection of tiles that form a hexagon of the specified size and position. | IEnumerable<PointD> | |
Returns a series of points that describe the outline of a Hex.LargeHexagon(int, Hex) structure. | double | |
Returns the total width of a Hex.LargeHexagon(int, Hex) structure, assuming each hex tile’s width is
1 . |
OperatorsHex | | Adds two hexes (treating them as vectors). | bool | | Compares two Hex values for equality. | bool | | Compares two Hex values for inequality. | Hex | |
Multiplies a hex’s coordinates by a multiplier. | Hex | | Hex | | Subtracts a hex from another (treating them as vectors). |
Instance propertiesPointD | | Returns the center of the hex tile in 2D space. | int | |
Calculates the number of steps required to move from the center hex (0, 0) to the current hex. | IEnumerable<Link<Vertex>> | | Refer to the documentation for IHasSvgGeometry.Edges. | Hex | |
Returns the hex tile which is equal to the current hex tile when mirrored about the X-axis (horizontal line
going through the center hex (0, 0)). | IEnumerable<Hex> | |
Returns a collection containing all of the current tile’s neighbors. | int | | Returns the Q coordinate (see Hex remarks). | int | | Returns the R coordinate (see Hex remarks). | Vertex[] | | Returns the vertices along the perimeter of this Hex, going clockwise from the top-left. |
Static fieldsIEnumerable<Hex.Direction> | | Provides a collection of all hexagonal directions. | double | |
The ratio of the height of a hex tile to its width. In other words, if the width of a hex tile is 1 (from the
left-pointing vertex to the right-pointing vertex), this constant is equal to the height (from the top edge to
the bottom edge). |
Nested types | Identifies a direction within a 2D hexagonal grid. | | Describes a 2D grid of flat-topped hexagonal cells. | | Describes a vertex (gridline intersection) in a hexagonal grid (Hex.Grid). |
|