Hi, I am looking for an elegant way to do ray and polygon intersections in 2d. I don't care about languages.
Now what I'm doing is taking a line that lies on the ray (with a screen length) and testing line-to-line intersections between this derived-ray and all lines formed by each consecutive vertices in the polygon.
This, for now, is good even if I don't know which parts of the ray are inside or outside the polygon (in cases it is concave one). But for now I don't need this information, even if a general approach could maybe give it.
I don't care about self-intersection polygons.
Any advice? maybe triangulizing the polygons could be an idea?