Constrained gizmo-scaling -> keep initial ctrl key status while dragging

This commit is contained in:
Enrico Turri 2019-05-10 13:50:25 +02:00
parent 86d466688b
commit efcc38f717
2 changed files with 9 additions and 7 deletions

View file

@ -17,8 +17,9 @@ class GLGizmoScale3D : public GLGizmoBase
Vec3d drag_position;
BoundingBoxf3 box;
Vec3d pivots[6];
bool ctrl_down;
StartingData() : scale(Vec3d::Ones()), drag_position(Vec3d::Zero()) { for (int i = 0; i < 5; ++i) { pivots[i] = Vec3d::Zero(); } }
StartingData() : scale(Vec3d::Ones()), drag_position(Vec3d::Zero()), ctrl_down(false) { for (int i = 0; i < 5; ++i) { pivots[i] = Vec3d::Zero(); } }
};
mutable BoundingBoxf3 m_box;