How to add interactivity for single objects?

Hi there,

i’m new to the forums. I just started programming openGl using Jogl. I wonder if th there is any way to make objects “clickable”. I havent found any informations on that topic yet on the net and i wonder, if anyone has some tipps for me?

Right now i just can think of the possibilty of identifying single vertices though their coordinates. But that leads me straight to my main problem: i have already made a lil application, that builds a lil net out of an datastructure. Now i want to get informations by clicking single node in the visualized 3d-data structures.

I am already able to rotate the whole 3d-model, but the translation from the x- and y-mousse-coordinates to the x- and y-coordinates is somewhat not running properly… but that is something i should be able to take care of myself soon.

My understanding of openGL gets better everyday. But i dont know any other possibilities then display-lists to “group vertices, quads etc”.

Thanx to Java, i’m kinda stuck in object orientated programming and modelling…

Any Ideas?

What you want to do can be achieved fairly easily by using OpenGL’s selection mode. Have a look at Chapter 12 of The Red Book.

In fact, someone here has shared a little picking utility to do the hard work for you.