hi,

idontgot aname schrieb:

is there any other way to do this?

My solution for this problem is an abstract class called Pickable. My pickable objects in the scenegraph are either inherited from Pickable or from Pickable inherited objects are attached to the geode with setUserData.

In my pick-handler I do a dynamic_cast<Pickable*> of the geode or of getUserData() and call the coresponding functions of the object (Mousedown, mouseUp, mouseEnter, mouseLeave, ...) there is a bit more logic inside my pick-handler to keep track of the last picked object etc.

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

Reply via email to