Sort the shapes front to back. For each shape you check whether the point is inside or not:
Check for intersections between each edge of the shape, and an edge running from the point you’re testing to infinity in any direction. For example 10000 units along the x axis. If the total number of intersections is odd, then the point is inside the shape.
Sort the shapes front to back. For each shape you check whether the point is inside or not:
Check for intersections between each edge of the shape, and an edge running from the point you’re testing to infinity in any direction. For example 10000 units along the x axis. If the total number of intersections is odd, then the point is inside the shape.