Table of Contents

Class HexBlockPoint

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

Class with methods for working with hex block points.

[Version(2, 2, 0)]
public static class HexBlockPoint
Inheritance
HexBlockPoint
Inherited Members

Remarks

Hex block points are layers of 2D hexagonal lattices stacked (and aligned) vertically.

Fields

Directions

The list of the eight cardinal directions of a hex-block grid, two directions for each axis.

Down

The grid point one unit down from the origin, that is, the point (0, -1, 0).

East

The grid point to the east of the origin, that is, the point (1, 0, 0).

NorthEast

The grid point to the north-east of the origin, that is, the point (0, 0, 1).

NorthWest

The grid point to the north-west of the origin, that is, the point (-1, 0, 1).

OrthogonalLines

A list of the three cardinal lines of a hex-block grid, that is, the axes.

SouthEast

The grid point to the south-east of the origin, that is, the point (1, 0, -1).

SouthWest

The grid point to the south-west of the origin, that is, the point (0, 0, -1).

Up

The grid point one unit up from the origin, that is, the point (0, 1, 0).

West

The grid point to the west of the origin, that is, the point (-1, 0, 0).

Methods

GetOrthogonalNeighbors(GridPoint3)

Gets the "orthogonal" neighbors for the given point, that is, the eight neighbors in the cardinal directions.

RoundToGridPoint(Vector3)

Rounds a vector to the closest grid point if the points represent a hex-block grid.