Covered hexes by a line or polygon #123
szikoramarci
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
It might be better to update the existing line traverser to set the start and end coordinates as points instead of hex coordinates (or either points or hex coordinates). I think I have a Todo somewhere to implement this already. I'll look into this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I'm working on an algorithm that returns a grid of hexes which are covered by a line or polygon. I mean these lines or polygons are described with Points and they are in the coordinate system of offset X and Y.
For my project there is a need to get hexes which are on a spcific line. Unfortunately the line traverser can be only used from center of hex to center of hex, and there is a special case when the line going through an other hex edge. In that case the function returns always just one side (simply say the left hex) and I would need both.
So I don't need a hex line, I need covered hexes by a line.
I'll do that in my project. What do you think? I can implement it in this repository as well to get a reusable function.
Beta Was this translation helpful? Give feedback.
All reactions