osg::ref_ptr<osg::Camera> camera = view->getCamera();
//v_window = v_local * MVPW
//v_local = v_window * inverse(MVPW)
//MVPW = ModelViewMatrix * ProjectionMatrix * WindowMatrix
osg::Vec3 vWindow(x, y, 0);
osg::Matrix mVPW = camera->getViewMatrix() * camera->getProjectionMatrix() * camera->getViewport()->computeWindowMatrix();
osg::Matrix invertMVPW;
invertMVPW.invert(mVPW);
osg::Vec3 vLocal = vWindow * invertMVPW;
//VView = VViewWorld * MView
//VViewWorld = VView * inverse(MView)
//VView = osg::Vec3(0, 0, 0) MView = camera->getViewMatrix()
osg::Vec3 vView = osg::Vec3(0, 0, 0);
osg::Matrix mView = camera->getViewMatrix();
osg::Matrix inverseMView;
inverseMView.invert(camera->getViewMatrix());
osg::Vec3 vViewWorld = vView * inverseMView;
std::cout << vLocal.x() << " " << vLocal.y() << " " << vLocal.z() << " " << vViewWorld.x() << " " << vViewWorld.y() << " " << vViewWorld.z() << std::endl;
osg::Vec3 vMouse = vViewWorld - vLocal;
vMouse.normalize();