public HexOffsetCoordinates AxialToOffsetCoordinates(HexAxialCoordinates axial) { var cube = AxialToCube(axial); var offsetCoordinates = CubeToOffsetCoordinates(cube); return(offsetCoordinates); }
public override Point2F FromAxialToPixel(HexAxialCoordinates axial) { var x = Size * (1.5f * axial.Q); var y = (float)(Size * (Constants.HalfOfSquareRootOf3 * axial.Q + Constants.SquareRootOf3 * axial.R)); var pixel = new Point2F(x, y); return(pixel); }
public HexAxialCoordinates CubeToAxial(HexCubeCoordinates cube) { var q = cube.X; var r = cube.Z; var axial = new HexAxialCoordinates(q, r); return(axial); }
public HexCubeCoordinates AxialToCube(HexAxialCoordinates axial) { var x = axial.Q; var z = axial.R; var y = -x - z; var cube = new HexCubeCoordinates(x, y, z); return(cube); }
public Point2F FromAxialToPixel(HexAxialCoordinates axial) => _hex.FromAxialToPixel(axial);
public HexCubeCoordinates AxialToCube(HexAxialCoordinates axial) => _hex.AxialToCube(axial);
public HexOffsetCoordinates AxialToOffsetCoordinates(HexAxialCoordinates axial) => _hex.AxialToOffsetCoordinates(axial);
public abstract Point2F FromAxialToPixel(HexAxialCoordinates axial);