Click or drag to resize

PointyHexPoint Class

Provides constants and methods for working with points in pointy hex grids.
Inheritance Hierarchy
SystemObject
  Gamelogic.Grids2PointyHexPoint

Namespace:  Gamelogic.Grids2
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static class PointyHexPoint

The PointyHexPoint type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDownTriPseudoNorm
Returns the down-triangle pseudonorm of the given point.
Public methodStatic memberEuclideanNorm
Returns the Euclidean norm of this point, treating it as lying in a (normalized) hex grid.
Public methodStatic memberGetOrthogonalNeighbors
Gets the "orthogonal" neighbors for the given point, that is, the six neighbors in the cardinal directions.
Public methodStatic memberGetSpiralIterator
Get's an enumerable of shape points in a spiral outwards from a given point, assuming the points are coordinates of a hex grid.
Public methodStatic memberHexNorm
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.
Public methodStatic memberManhattanNorm
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.
Public methodStatic memberReflectAboutX
Reflects the given point about the X-axis.
Public methodStatic memberReflectAboutY
Reflects the given point about the Y-axis.
Public methodStatic memberRotate120
Rotates the given point by 120 degrees counter clock-wise.
Public methodStatic memberRotate120AndReflectAboutY Obsolete.
Public methodStatic memberRotate180
Rotates the given point by 180 degrees counter clock-wise.
Public methodStatic memberRotate180AndReflectAboutY Obsolete.
Public methodStatic memberRotate240
Rotates the given point by 240 degrees counter clock-wise.
Public methodStatic memberRotate240AndReflectAboutY Obsolete.
Public methodStatic memberRotate300
Rotates the given point by 300 degrees counter clock-wise.
Public methodStatic memberRotate300AndReflectAboutY Obsolete.
Public methodStatic memberRotate60
Rotates the given point by 60 degrees counter clock-wise.
Public methodStatic memberRotate60AndReflectAboutY Obsolete.
Public methodStatic memberRoundToGridPoint
Rounds a vector to the closest grid point if the points represent a hex grid.
Public methodStatic memberStarNorm
Returns the star norm of the point.
Public methodStatic memberUpTriPseudoNorm
Returns the up-triangle pseudonorm of the given point.
Top
Fields
  NameDescription
Public fieldStatic memberDirections
The a list of the six cardinal directions of a hex grid, two directions for each axis.
Public fieldStatic memberEast
The grid point to the east of the origin, that is, the point (1, 0).
Public fieldStatic memberNorthEast
The grid point to the north-east of the origin, that is, the point (0, 1).
Public fieldStatic memberNorthWest
The grid point to the north-west of the origin, that is, the point (-1, 1).
Public fieldStatic memberOrthogonalLines
A list of the three cardinal lines of a hex grid, that is, the axes.
Public fieldStatic memberRawSpaceMapTransform
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.
Public fieldStatic memberSouthEast
The grid point to the south-east of the origin, that is, the point (1, -1).
Public fieldStatic memberSouthWest
The grid point to the south-west of the origin, that is, the point (0, -1).
Public fieldStatic memberSpaceMapTransform
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.
Public fieldStatic memberSqrt3
The square root of 3, which is often used in raw math calculations involving hex grids.
Public fieldStatic memberWest
The grid point to the west of the origin, that is, the point (-1, 0).
Top
See Also