I am writing a GUI for a finite element program. I want to be able to highlight/choose a primitive from a list, where the list is limited to those primitives which are visible. Bounding boxes really won’t work, since the multiple surfaces are irregular, skewed in space, and arbitrarily rotated. How do I generate the list?
The terms you want to websearch for are Potentially Visible Set (PVS), Visibility culling, and Occlusion Culling.
Lots of ways to go about this depending on your specific requirements. If your scene and objects are sufficiently simple, you may be able to just launch them each at the GPU nearest-to-furthest in their own occlusion query, and for those primitives that come back as having touched some screen samples, add them to your list. Then again, maybe not. You’ll have to decide.
If you don’t really care about occlusion, just do a frustum cull on your primitives. That’s easy.