On Mon, 2008-11-24 at 23:22 -0500, Jean-Sébastien Guay wrote:
> Hi Jeremy,
> 
> > Why does the WindowManager have to know anything about cameras?
> 
> I have the same question, but with different results: unless I've missed 
> something in your description, why does anyone need to know about the 
> camera? If you get your click events (which you act upon to get 
> intersections) through an event handler, then you can just get an 
> osg::View* with aa.asView(), which then has a camera. No one really 
> needs to hold on to a camera pointer.
> 
> I would definitely go with calculating intersections directly through 
> osgUtil::IntersectionVisitor. You can use the constructor that takes one 
> of the WINDOW, PROJECTION, VIEW and MODEL enum values to easily 
> construct the right intersector. It should even work for 3D "widgets in 
> space... space ... space ..." :-)
> 
> As for creating an ortho viewport, perhaps you can return an osg::Camera 
> with the right setup, and the user can then assign that to their 
> viewer/view/slave camera/scenegraph/whatever. It would be more general.
> 
> That way you can remove the dependency between osgWidget and osgViewer 
> (not sure if that's the goal here, but if intersections was the only 
> thing that forced that dependency, I'd definitely remove it).

Yeah, removing this dependency is definitely something I'd like to do,
and computeIntersections is the only things I use.

> Anyways, like the others who replied I don't really know the internals 
> of osgWidget, so perhaps there's something I've overlooked, but that's 
> how I see it at first glance.
> 
> Hope this helps,
> 
> J-S

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to