Hi,
I know that there is a lot of posts about that but I think my case is specific.
So I have a 3D editor. I do not use any textures or any advanced stuff. I draw only primitives - lines and rectangles, which locations are kept in memory.
My scene looks like a set of surfaces (big 2D rectangles) with a lot of small circles, which look like holes - they are also 2D shapes located on that big surface.
How can I get to know which object has been clicked (selected) with mouse? I have read about “casting a ray”, gluUnproject etc., but I do not know which method should I use, because I have a lot of those rectangles - from 1000 to 100 000 in whole scene. I want to know which small rectangle (hole) has been selected or which big rectangle has been selected (when user clicks between holes, but inside big rectangle).
It’s an editor, so I’m looking for some simple algorithm rather than fast one (but of course it cannot take too much time - application should work smoothly).
Any sugestions are welcome
Thanks in advance.