[osg-users] LookAt() function parameter meanings..
Rowley, Marlin R
marlin.r.rowley at lmco.com
Mon Aug 13 07:07:10 PDT 2018
All,
I'm very confused by the parameters passed into this function. I am going over some of the legacy code and saw this line of code:
osg::Matrixd frustumView;
frustumView.makeLookAt(VIEW_POS, mDirection, mUp);
saw the docs, it's described like this:
void makeLookAt(const Vec3d& eye,const Vec3d& center,const Vec3d& up);
So in this context, I would think that "eye" represents the look vector. However, it seems to work like a position vector. The "center" parameter expects a direction vector (0, -1, 0) where the look vector is along the -yaxis.
This matrix will not translate to OpenGL properly since it's coordinate system is based off of a right handed coordinate frame.
Questions:
1. Am I interpreting these parameters properly?
2. How would I convert this system to the OpenGL right-handed system?
----------------------------------------
Marlin Rowley
Software Engineer, Staff
[cid:image002.jpg at 01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.rowley at lmco.com<mailto:marlin.r.rowley at lmco.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180813/d31fb0e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: image001.jpg
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180813/d31fb0e9/attachment.jpg>
More information about the osg-users
mailing list