Snap in gizmo move 3D when holding Shift pressed

This commit is contained in:
Enrico Turri 2018-11-14 13:29:57 +01:00
parent 4149b9ad28
commit 2e9f404df3
2 changed files with 11 additions and 0 deletions

View file

@ -319,6 +319,9 @@ class GLGizmoMove3D : public GLGizmoBase
static const double Offset;
Vec3d m_displacement;
double m_snap_step;
Vec3d m_starting_drag_position;
Vec3d m_starting_box_center;
Vec3d m_starting_box_bottom_center;
@ -326,6 +329,9 @@ class GLGizmoMove3D : public GLGizmoBase
public:
explicit GLGizmoMove3D(GLCanvas3D& parent);
double get_snap_step(double step) const { return m_snap_step; }
void set_snap_step(double step) { m_snap_step = step; }
const Vec3d& get_displacement() const { return m_displacement; }
protected: