On 4/23/07, Andreas Goebel <[EMAIL PROTECTED]> wrote:
I don“t know which pick-visitor you are using now. In some way or another the pick visitor will have to "know" the view and projection matrix of the current view. Are you using an osg::Viewer? Are you following on the line of the osgPick-example? Or are you doing things differently? I, for instance, use a GUI and have an OpenGL window within, so I have to take care to update the pick-visitor (in fact, I use a new one each time) every time the projection changes.
Yes, I'm using osg::Viewer and I modified the picking example from "OpenSceneGraph Quick Start Guide" not the osgPick example. As far as I can understand, my picker is created within the overridden osgGA::GUIEventHandler::handle() method and it is executed when the right event (for example a mouse click...) is catched, so I suppose it is up to date when the point of view changes. Maybe, my menu item picking problem deals with the original picking problem I talked about here...ie that it works fine with vertices but not with the polygon those vertices describe... Alessandro
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
