Andreas, unfortunatly I don't have the old messages (i'm new in the mail list). Can you send the code again?
Thnaks
Fernando

Andreas Goebel escreveu:
Fernando Giovanini schrieb:
I understood how to cath mouse and keyboard events in the GLUI lib. But
I can't discover how to interact with the geodes in the SceneView (if
there is a way to do it).
How do you all make it in the lib you use?

Fernando.

Robert Osfield escreveu:
Hi Fernando,

I know nothing about GLUI, but perhaps the osgmovie and osgcggui
examples will give you a bit of inspiration in the way that they use
an event callback to catch mouse and keyboard events.

Robert.

On 10/27/06, Fernando Giovanini <[EMAIL PROTECTED]> wrote:
Hi all,
I trying to create a GUI using the GLUI library.
To render my scene graph I used the sceneView class. But, is there a way to pick the geode using mouse using sceneView and GLUI? If yes, how? If
no, what class I could use to do that?

Thanks,
Fernando
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



Hi,

you will have to "normalize" your mouse-coordinates to values in [-1;1], then compute a "beam" that goes from the mouse-pointer into the scene and then intersect this beam with the scene.

You will get a "hit-list", which is a vector of "hit", and a "hit" (see ref-docs) contains information about geode, node and drawable that was picked.

This is the overview, and the code I posted before contains all there is to do already coded!

Regards,

Andreas

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to