I want to know the general logic to find the display object under the dot.
Let there be various figures on the screen, and I want to find the figure (or figures) at some point, possibly the point of the mouse cursor. If all these shapes are rectangles, this will be a trivial question. But what about triangles and ovals and ...
In other words, what is the general logic of any gui systems that detect which object is clicked or under the cursor? Or, what is the logic of games that detect which character is pressed or under the cursor?
Probably this question was asked before, but I could not find.
edit) At least I want to know a two-dimensional pixel based algorithm. I found Point-in-polygon there , but this is not about ovals and other irregular shapes.
source
share