Commit 9c409646 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Navigation using the numerical keypad corrected.

parent bdc3c02c
......@@ -2079,7 +2079,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_3:
{
QMatrix4x4 rot;
rot.rotate( 90.0f, 0,1,0 );
rot.rotate( -90.0f, 0,1,0 );
setViewRotationMatrix( rot );
update();
break;
......@@ -2087,7 +2087,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_7:
{
QMatrix4x4 rot;
rot.rotate( -90.0f, 1,0,0 );
rot.rotate( 90.0f, 1,0,0 );
setViewRotationMatrix( rot );
update();
break;
......@@ -2095,7 +2095,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_4:
{
QMatrix4x4 rot;
rot.rotate( -15.0f, 0,1,0 );
rot.rotate( 15.0f, 0,1,0 );
setViewRotationMatrix( viewRotationMatrix() * rot );
update();
break;
......@@ -2103,7 +2103,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_6:
{
QMatrix4x4 rot;
rot.rotate( 15.0f, 0,1,0 );
rot.rotate( -15.0f, 0,1,0 );
setViewRotationMatrix( viewRotationMatrix() * rot );
update();
break;
......@@ -2111,7 +2111,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_2:
{
QMatrix4x4 rot;
rot.rotate( 15.0f, 1,0,0 );
rot.rotate( -15.0f, 1,0,0 );
setViewRotationMatrix( rot * viewRotationMatrix() );
update();
break;
......@@ -2119,7 +2119,7 @@ void GLViewer::keyPressEvent( QKeyEvent *evt )
case Qt::Key_8:
{
QMatrix4x4 rot;
rot.rotate( -15.0f, 1,0,0 );
rot.rotate( 15.0f, 1,0,0 );
setViewRotationMatrix( rot * viewRotationMatrix() );
update();
break;
......
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