Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Jan 31, 2017
2 parents cfac681 + c6581c8 commit bdbdd9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dart/gui/Win3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ void Win3D::click(int _button, int _state, int _x, int _y) {
} else if (_button == 3 && _state == GLUT_DOWN) { // mouse wheel up
// each scroll generates a down and an immediate up,
// so ignore ups
mZoom += 0.1;
mZoom += mZoom * 0.1;
} else if (_button == 4 && _state == GLUT_DOWN) { // mouse wheel down?
// each scroll generates a down and an immediate up,
// so ignore ups
mZoom -= 0.1;
mZoom -= mZoom * 0.1;
}
mMouseX = _x;
mMouseY = _y;
Expand All @@ -152,7 +152,7 @@ void Win3D::drag(int _x, int _y) {
}
if (mTranslate) {
Eigen::Matrix3d rot = mTrackBall.getRotationMatrix();
mTrans += rot.transpose()*Eigen::Vector3d(deltaX, -deltaY, 0.0);
mTrans += (1 / mZoom) * rot.transpose()*Eigen::Vector3d(deltaX, -deltaY, 0.0);
}
if (mZooming) {
mZoom += deltaY*0.01;
Expand Down

0 comments on commit bdbdd9d

Please sign in to comment.