[osg-users] Trackball and view question
Guillaume.Poirier at nrc-cnrc.gc.ca
Thu Sep 27 11:25:56 PDT 2007
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 ?
From: osg-users-bounces at lists.openscenegraph.org 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
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
recuperate the camera parameters (eye, ctr, up), which should be what I used
in the previous
Is that more clear ? How would I achieve this ?
What about osg::Camera::getViewMatrixAsLookAt (osg::Vec3 &eye, osg::Vec3
¢er, osg::Vec3 &up, float lookDistance=1.0f) ?
osg-users mailing list
osg-users at lists.openscenegraph.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 3624 bytes
Desc: not available
More information about the osg-users