Hexameter is a hexagonal grid library. The motivation behind it is to have an optimized, simple and usable library for drawing hexagonal grids without being tied to any GUI framework. So it works on Android, SWT, Swing, you name it! It is 100% unit tested so you don't have to worry about something going wrong.
I'm open to suggestions, feel free to comment or to send me a message. Pull reqeusts are also welcome!
- Hexagonal
- Triangular
- Rectangular
- Trapezoid
- Custom
- Getting a hexagon by its grid coordinate
- Getting a hexagon by its pixel coordinate
- Getting the neighbors of a hexagon
- Calculating the distance between two hexagons
- Calculating the movement range from a hexagon
- Pathfinding with obstacles
- Adding/removing a Hexagon from the grid
- Checking whether a Hexagon is on a grid or not
- Supplying a custom storage object
- Adding custom data to a Hexagon
- Clearing all custom data from the HexagonalGrid
- Getting a subset of Hexagons from the grid
- Field of view calculation with obstacles
- Movement range with obstacles
- Swing JPanel extension component
Hexameter is made available under the MIT License.
Thanks to Adam Arold for the big work Thanks to user georgeek This version by Daniele Brambilla