PointyHexPoint Class |
Namespace: Gamelogic.Grids2
public static class PointyHexPoint
The PointyHexPoint type exposes the following members.
Name | Description | |
---|---|---|
DownTriPseudoNorm |
Returns the down-triangle pseudonorm of the given point.
| |
EuclideanNorm |
Returns the Euclidean norm of this point, treating it as lying in a (normalized) hex grid.
| |
GetOrthogonalNeighbors |
Gets the "orthogonal" neighbors for the given point, that is, the
six neighbors in the cardinal directions.
| |
GetSpiralIterator |
Get's an enumerable of shape points in a spiral outwards from a given point, assuming the points are coordinates of
a hex grid.
| |
HexNorm |
Returns the hex norm of a point, defined by how many
edges you have to cross in a hex grid moving from the origin to the point.
| |
ManhattanNorm |
Returns the Hex-Manhatten norm of a point, defined by how many
edges you have to cross in a hex grid moving from the origin to the point.
| |
ReflectAboutX |
Reflects the given point about the X-axis.
| |
ReflectAboutY |
Reflects the given point about the Y-axis.
| |
Rotate120 |
Rotates the given point by 120 degrees counter clock-wise.
| |
Rotate120AndReflectAboutY | Obsolete. | |
Rotate180 |
Rotates the given point by 180 degrees counter clock-wise.
| |
Rotate180AndReflectAboutY | Obsolete. | |
Rotate240 |
Rotates the given point by 240 degrees counter clock-wise.
| |
Rotate240AndReflectAboutY | Obsolete. | |
Rotate300 |
Rotates the given point by 300 degrees counter clock-wise.
| |
Rotate300AndReflectAboutY | Obsolete. | |
Rotate60 |
Rotates the given point by 60 degrees counter clock-wise.
| |
Rotate60AndReflectAboutY | Obsolete. | |
RoundToGridPoint |
Rounds a vector to the closest grid point if the points represent a hex grid.
| |
StarNorm |
Returns the star norm of the point.
| |
UpTriPseudoNorm |
Returns the up-triangle pseudonorm of the given point.
|
Name | Description | |
---|---|---|
Directions |
The a list of the six cardinal directions of a hex grid, two directions for each axis.
| |
East |
The grid point to the east of the origin, that is, the point (1, 0).
| |
NorthEast |
The grid point to the north-east of the origin, that is, the point (0, 1).
| |
NorthWest |
The grid point to the north-west of the origin, that is, the point (-1, 1).
| |
OrthogonalLines |
A list of the three cardinal lines of a hex grid, that is, the axes.
| |
RawSpaceMapTransform |
The raw space map transform for hex grids. This should be used with a scale matrix with
values (width, height, 1) to get cells with the desired with and height.
| |
SouthEast |
The grid point to the south-east of the origin, that is, the point (1, -1).
| |
SouthWest |
The grid point to the south-west of the origin, that is, the point (0, -1).
| |
SpaceMapTransform |
The default space map transform for hex grids. This should be used with a uniform scale
matrix (with the value of the cell width) to get a regular hex grid.
| |
Sqrt3 |
The square root of 3, which is often used in raw math calculations involving hex grids.
| |
West |
The grid point to the west of the origin, that is, the point (-1, 0).
|