Open Shkyrockett opened 7 years ago
After looking around, it seems the best solution might be to use a modified version of the scanbeam Point in Polygon method, but test the intersections of the shapes for each shape. This would require having working Line intersections methods for each shape type.
The current method for determining whether a Polycurve contains a Point is to test whether the locus of start/end points contains the point as a polygon, then XOR it with tests for each individual shape that makes up the edge of the Polycurve.
This has the benefit of being relatively simple to figure out for some cases, but produces incorrect false negative results on the overlapping boundaries of the locus polygon and edge shapes. I tried other approaches to try to reduce the issues with overlapping boundaries, but ended up with it as it is now, as a compromise over having false positive results or false positives and false negatives.
I'm open to other ideas of how to deal with Polycurve hit testing. However I would prefer to not flatten the curves into polygons.
Required Methods