Hello there, everyone.
Here's just a small question in regards to base algorithms.
For my geometry editing tool, I now need to implement a selection painter in addition to normal point-and-click selection.
In detail, the selection painter works similar to brushes in your basic painting program: A circle is shown around the cursor, every object inside the circle is selected, the artist then basically can "paint" the object he wishes to select.
However, I have slight problems with the implementation:
Obviously, only visible (i.e. non-occluded) objects should be selected in this process, similar to normal selection.
Since I need this to be independent from any rendering facilities, I can't use the simple selection buffer rendering available within OpenGl.
Now, the only alternative I see is to cast a ray for each pixel within the selection brush, and do "normal" selection code for these. However, for a brush with a diameter of say 100 pixels (about the maximum useful size ), I need to cast almost 8000 rays, which, I fear, will seriously hurt interactivity.
I'm also unsure about precision of this approach - i.e. whether all of these rays will give a reliable selection process. It should in particular never happen that "invisible" objects get selected, due to a ray missing something because of FP precision, or similar.
Anybody out there have some ideas / experiences he could share ?
Thank you for your time,