Re: [osg-users] View matrix center

2008-02-11 Thread J.P. Delport
Hi, have a look at these two threads. I've done something similar to what I think you are looking for, but had to add some functionality. Look for the getDRC function. http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/19873/match=DRC http://article.gmane.org/gmane.comp.graphics.

Re: [osg-users] View matrix center

2008-02-07 Thread Jean-Sébastien Guay
Hi Paul, Thanks for the lookAt background, very useful. > Yep, read the code. Look for something like "getCenter" in > MatrixManipulator, that would be a good start. > I'm already going down that road. Trouble is MatrixManipulator doesn't have getCenter(). TrackballManipulator does, and usin

Re: [osg-users] View matrix center

2008-02-07 Thread Paul Martz
> Presumably because getViewMatrixAsLookAt() doesn't do any > magic, it just takes the Y axis (in this case) of the matrix > as the view vector. This vector will be normalised (otherwise > the camera would do funky things), so all it can do is > subtract this unit vector from the eye position.

Re: [osg-users] View matrix center

2008-02-07 Thread John Donovan
Jean-Sébastien Guay wrote: > The eye point is as expected, but instead I get center = (0,-39,0). Presumably because getViewMatrixAsLookAt() doesn't do any magic, it just takes the Y axis (in this case) of the matrix as the view vector. This vector will be normalised (otherwise the camera would

[osg-users] View matrix center

2008-02-07 Thread Jean-Sébastien Guay
Hello, A quick question about the camera view matrix. I have a viewer which is close to the default osgviewer, with the default camera manipulator. I can see that at startup, the camera is at, say, (0,-40,0) (looking down the positive Y axis, with the +Z up convention). I can also see that I a