public interface HexagonalGridCalculator<T extends SatelliteData>
HexagonalGrid.
Operations supported:
Hexagons.Hexagon using an arbitrary distance.Hexagons (using obstacles)| Modifier and Type | Method and Description |
|---|---|
int |
calculateDistanceBetween(Hexagon<T> hex0,
Hexagon<T> hex1)
Calculates the distance (in hexagons) between two
Hexagon objects on the grid. |
Set<Hexagon<T>> |
calculateMovementRangeFrom(Hexagon<T> hexagon,
int distance)
|
Set<Hexagon<T>> |
calculateRingFrom(Hexagon<T> centerHexagon,
int radius)
|
List<Hexagon<T>> |
drawLine(Hexagon<T> from,
Hexagon<T> to)
|
boolean |
isVisible(Hexagon<T> from,
Hexagon<T> to)
|
Optional<Hexagon<T>> |
rotateHexagon(Hexagon<T> originalHex,
Hexagon<T> targetHex,
RotationDirection rotationDirection)
Returns the Hexagon on the grid which is at the point resulted by rotating the
targetHex's
coordinates around the originalHex by rotationDirection degrees. |
int calculateDistanceBetween(Hexagon<T> hex0, Hexagon<T> hex1)
Hexagon objects on the grid.hex0 - hex 0hex1 - hex 1Set<Hexagon<T>> calculateMovementRangeFrom(Hexagon<T> hexagon, int distance)
Optional<Hexagon<T>> rotateHexagon(Hexagon<T> originalHex, Hexagon<T> targetHex, RotationDirection rotationDirection)
targetHex's
coordinates around the originalHex by rotationDirection degrees.originalHex - center hextargetHex - hex to rotaterotationDirection - direction of the rotationSet<Hexagon<T>> calculateRingFrom(Hexagon<T> centerHexagon, int radius)
centerHexagon - centerradius - radiusList<Hexagon<T>> drawLine(Hexagon<T> from, Hexagon<T> to)
List of Hexagons which must be traversed in the
given order to go from the from Hexagon to the to Hexagon.from - starting hexagonto - target hexagonCopyright © 2016. All rights reserved.