Hi Jeremy,

Jeremy Moles schrieb:
> However, as I mentioned earlier, when created a WindowManager must have
> access to an osgViewer::View* so that it can call the
> computeInteresections() method on this pointer and perform proper
> picking. This raises an interesting design question: what exactly is (or
> should be) the relationship between a WindowManager and an osg::Camera?
> There certainly is SOME relationship, but whether or not I am properly
> utilizing it in osgWidget remains to be seen.

I add a custom Eventhandler to my views which does the picking and
handling vorrect MouseEnter/MouseLeave/etc on picked objects.

This EventHandler can call your WindowManager-routines handling the
results. You can even search your WindowManager-node in the first frame
via a nodevisitor

So to use your widget-code the user has to
1) create a WidgetManager and add it to the scene, whereever he wants to
2) create a WidgetEventHandler and add it to the view, which should
handle the event

The WidgetEventHandler searchs for a WidgetManager when ::handle is
called for the first time, and does the picking on every FRAME-event and
cache the result.

I don't know osgWidget for now, perhaps I am completly wrong with my
suggestions, but perhaps it helps you a little bit.


cheers,

Stephan
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to