[osg-users] Trackball and view question

Poirier, Guillaume Guillaume.Poirier at nrc-cnrc.gc.ca
Wed Sep 26 12:56:30 PDT 2007


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


-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org on behalf of Robert Osfield
Sent: Tue 9/18/2007 11:28 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Trackball and view question
 
Hi Bill,

The camera manipulators role is to modifying the view matrix so I'm a
bit perplexed that you are suprised by this.

Also please considering move from SimpleViewer up to osgViewer::Viewer
working as an embedded viewer in 2.x rather than using SimpleViewer as
it only existed for a short while and has been totally superseded.

Robert.

On 9/18/07, Poirier, Guillaume <Guillaume.Poirier at nrc-cnrc.gc.ca> wrote:
>
>
>
>
> Hello everyone,
>
>  I am using a SimpleViewer. I set up a post draw callback on its main
> camera. In it
>  I read the camera eye, center, and up vectors. Initially, this give me (0,
> 0, 0),
>  (0, 0, -1), and (0, 1, 0) respectively. This is what I expect and it gives
> me a
>  particular view of my scene.
>
>  Now I add a trackball manipulator to the main camera and set up the view
> similar
>  to what I had previously. When I read back the data it is quite different.
> I would have
>  expected the same camera position / orientation than before since what I
> see is
>  similar. Unless the trackball affects the model position / orientation and
> not just
>  the view ? How can I use a trackball and read back in the post draw
> callback the
>  values I want ?
>
>
>  sincerely,
>
>
>  Bill
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3900 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070926/90e80691/attachment-0003.bin>


More information about the osg-users mailing list