Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contains for polygons with holes #62

Open
jeffreydking opened this issue Aug 14, 2018 · 0 comments
Open

Contains for polygons with holes #62

jeffreydking opened this issue Aug 14, 2018 · 0 comments

Comments

@jeffreydking
Copy link

jeffreydking commented Aug 14, 2018

The p.Contains(pt) logic for polygons with holes may return bad results.

Context: I have not been able to find documentation for creating a polygon with holes. I assume that you simply continue to add call p.Add(pt) for the points of the holes inside the polygon.

If my assumption is correct, then false line segments are created between the boundary and contained holes (or between successive holes). If a raycast intersects with an odd number of these false segments, the wrong result is returned.

If my assumption is incorrect, better documentation on how to create polygons with holes would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant