diff options
Diffstat (limited to 'xs/src/slic3r/GUI/GLGizmo.hpp')
-rw-r--r-- | xs/src/slic3r/GUI/GLGizmo.hpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/xs/src/slic3r/GUI/GLGizmo.hpp b/xs/src/slic3r/GUI/GLGizmo.hpp index a626305c1..b3e6fd8fd 100644 --- a/xs/src/slic3r/GUI/GLGizmo.hpp +++ b/xs/src/slic3r/GUI/GLGizmo.hpp @@ -12,6 +12,11 @@ namespace GUI { class GLGizmoBase { +protected: + static const float BaseColor[3]; + static const float HighlightColor[3]; + static const float GrabberHalfSize; + public: enum EState { @@ -44,10 +49,22 @@ public: protected: virtual bool on_init() = 0; virtual void on_render(const BoundingBoxf3& box) const = 0; + + void _render_square(const Pointf3& center) const; }; class GLGizmoRotate : public GLGizmoBase { + static const float Offset; + static const unsigned int CircleResolution; + static const unsigned int ScaleStepsCount; + static const float ScaleStepRad; + static const unsigned int ScaleLongEvery; + static const float ScaleLongTooth; + static const float ScaleShortTooth; + static const unsigned int SnapRegionsCount; + static const float GrabberOffset; + float m_angle_x; float m_angle_y; float m_angle_z; @@ -58,12 +75,18 @@ public: protected: virtual bool on_init(); virtual void on_render(const BoundingBoxf3& box) const; + +private: + void _render_circle(const Pointf3& center, float radius) const; + void _render_scale(const Pointf3& center, float radius) const; + void _render_snap_radii(const Pointf3& center, float radius) const; + void _render_reference_radius(const Pointf3& center, float radius) const; + void _render_grabber(const Pointf3& center, float radius) const; }; class GLGizmoScale : public GLGizmoBase { static const float Offset; - static const float SquareHalfSize; float m_scale_x; float m_scale_y; @@ -75,9 +98,6 @@ public: protected: virtual bool on_init(); virtual void on_render(const BoundingBoxf3& box) const; - -private: - void _render_square(const Pointf3& center) const; }; } // namespace GUI |