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:
----------------------------------------
Marlin Rowley
Software Engineer, Staff
![]()
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Ravi,
During the projection matrix phase, OpenGL switches to left-handed system (i.e. Z-axis points positive going into the screen). But I missed the rotation, so it stays left-handed with +x (right), -y (look), and +z(up).
Thanks for the interpretation of the parameter names. I interpreted “center” to mean a position point – not a vector. And “eye” to mean the direction the eye is pointed to.
----------------------------------------
Marlin Rowley
Software Engineer, Staff
![]()
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
Missiles and Fire Control