Commit f405bc4b authored by Frédéric Larue's avatar Frédéric Larue

Bug fixed in the camera plane translation (mouse middle button) of NavigationControl class.

parent 9ff96598
......@@ -64,9 +64,7 @@ void GLViewer::NavigationControl::mouseMoveEvent( double dx, double dy, QMouseEv
}
else if( evt->buttons() & Qt::MidButton )
{
double proj[16];
glGetDoublev( GL_PROJECTION_MATRIX, proj );
double scaleFactor = 2.0*v.distToFocusPoint() / (v.width()*proj[0]);
double scaleFactor = 2.0*v.distToFocusPoint() / (v.width()*v.projectionMatrix()(0,0));
double scaledDX = dx * scaleFactor;
double scaledDY = dy * scaleFactor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment