Commit 9d99df48 authored by Frédéric Larue's avatar Frédéric Larue

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

Bug fixed in the camera plane translation (mouse middle button) of NavigationControl class in the 2D viewer case.
parent f405bc4b
......@@ -19,9 +19,7 @@ void GLViewer::NavigationControl::mouseMoveEvent( double dx, double dy, QMouseEv
{
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