Well this is what I was trying, using viewer.getCamera()->getViewMatrixAsLookAt(osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up, float lookDistance=1.0f). In step 2 (with trackball manipulator) I read back the eye, center, and up values in the camera post draw callback. When the pose is almost identical as in the first step, I read the values and they look quite different than what I was setting in the first step. I am still unclear whether this is "normal" or not. So my question is, if it's "normal", is there a transformation I can do to recuperate the step 1 values ? Or do I need to implement a custom view manipulator to achieve what I am looking for ?
regards, bill -----Original Message----- From: [EMAIL PROTECTED] on behalf of Alberto Luaces Sent: Thu 9/27/2007 4:38 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Trackball and view question Hi Robert et al. Let me explain what I want to do accomplish an example: I load a model with no camera manipulator. I know the camera parameters (eye, ctr, up) that yield a desired pose. I set the viewer camera with those parameters and obtain the desired pose. Now I want to assume that I don't know those parameters. A user loads a model with a trackball manipulator. He / she can manipulate the model until the desired pose is obtained and recuperate the camera parameters (eye, ctr, up), which should be what I used in the previous step... Is that more clear ? How would I achieve this ? regards, Bill What about osg::Camera::getViewMatrixAsLookAt (osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up, float lookDistance=1.0f) ? Alberto _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
<<winmail.dat>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

