Hi Chase, I have done this in the past using an event callback which responds to the mouse events and then dispatches the intersect traversal.
Recently a OSG user posted some classes to make this easier by explitly supporting point and click callbacks on objects. This was in the last month so have a look through the community section of the website and the mailing list archive. I'm afraid I can't recall with more detail off the top of my head. Robert. On 11/1/06, Bradford, Chase <[EMAIL PROTECTED]> wrote:
Hi Everyone, I have a scenegraph that contains some elements that need to respond specially to clicks. The elements are usually composed of many nodes (geodes and transforms usually) are managed by classes which preserve handles to the scenegraph nodes to manipulate them directly. When one of these objects gets clicked, I need to notify the corresponding manager. I'm currently using a hack that associates the address of the osg Node that registers the intersect with the corresponding manager. This way, when the intersect visitor hits a node with the proper mask, I can use the map to activate the manager. I would prefer to attach a callback object (or any other sort of tag) that can notify the manager directly without the use of this map system. Also, I don't want to make this manager inherit from an existing node type because of issues with the visitor pattern. Thanks for any help, Chase _______________________________________________ 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/
