Skip to content

Check if dpoint is included inside polygon. #2859

Answered by arrufat
pfeatherstone asked this question in Q&A
Discussion options

You must be logged in to vote

I put the answer as a comment, that's why it didn't count as an answer, and it looks like the question remains unanswered.

Here's my answer (copied from my comment above) so that we can mark this discussion as "answered":

As far as I know there isn't.

I had to do something similar recently and my approach was to generate a mask by:

  • painting the face with white
  • painting the other parts with black

All that using draw_solid_polygon.

Then I just use that mask to check if the pixel is white or not...

I'm open to faster/more efficient ways.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@arrufat
Comment options

@pfeatherstone
Comment options

@arrufat
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by pfeatherstone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants