Fixed direction of rotate gizmo around y axis

This commit is contained in:
Enrico Turri 2018-08-24 10:32:05 +02:00
parent acdbd987f5
commit 95ae2d715b

View File

@ -513,7 +513,7 @@ void GLGizmoRotate::transform_to_local() const
} }
case Y: case Y:
{ {
::glRotatef(90.0f, 1.0f, 0.0f, 0.0f); ::glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);
::glRotatef(180.0f, 0.0f, 0.0f, 1.0f); ::glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
break; break;
} }
@ -543,7 +543,7 @@ Vec3d GLGizmoRotate::mouse_position_in_local_plane(const Linef3& mouse_ray) cons
case Y: case Y:
{ {
m.rotate(Eigen::AngleAxisd(-(double)PI, Vec3d::UnitZ())); m.rotate(Eigen::AngleAxisd(-(double)PI, Vec3d::UnitZ()));
m.rotate(Eigen::AngleAxisd(-half_pi, Vec3d::UnitX())); m.rotate(Eigen::AngleAxisd(half_pi, Vec3d::UnitX()));
break; break;
} }
default: default: