Rowley, Marlin R
2018-08-13 14:07:10 UTC
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:***@01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
***@lmco.com<mailto:***@lmco.com>
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:***@01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
***@lmco.com<mailto:***@lmco.com>