Reputation: 4641
I`m confused. I've read a lot of different tutorials related with ray picking. But every time those example are based on some simple shape, square or triangle. In each example for each shape there is a function that is checking this specific shape. How it should be managed without that ? I have different and unnatural shapes, how it can be managed ?
Upvotes: 0
Views: 88
Reputation: 2380
For 2D polygons, I use the Winding number point inside a polygon as described here: http://geomalgorithms.com/a03-_inclusion.html
Near the bottom is C code implementation that is pretty simple to port.
Your polygon hulls are a (closed) list of points.
Upvotes: 0