Does anyone have suggestions on suitable solutions for handling storage of a map of hexagon tiles, tile vertices and tile edges.
- Mouse clicks need to be mapped to either a tile, a vertex or an edge
- A tile needs to be able to find its vertices
- An edge needs to be able to find its vertices
- A vertex needs to be able to find its edges (and possibly its tiles)
- The intersection of three tiles in one of their vertices should be considered one and the same vertex, not three separate vertices.
Are there existing structures and algorithms described somewhere that handle this well? And if so, what are they called? The tiles are aligned so that vertices exist aligned in rows and columns (sharing either the x or the y coordinate). Should I just store tiles, vertices and edges (with mappings between each data structure) and use naive lookups? Or is it better to keep 2-dimensional lookup tables, that in turn are mapped back to the vertex storage?
And any hints (or known algorithms to study) on how to proceed with pathfinding. Do note that paths are restricted to tile edges.
I'm mainly concerned with ease of implementation since execution efficiency won't really be a factor. But on the other hand, I might as well learn something in the process.