diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-08-15 13:50:06 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-08-15 13:50:06 +0300 |
commit | 4d98d321996de6e6d036403c319b6ef044144dcd (patch) | |
tree | c46a910b2e397fc239e89fb18599a8e2234fdb21 /xs/src/slic3r/GUI/GLGizmo.cpp | |
parent | 211790f8c35a7f950fddb95839a7b1009470a6ac (diff) |
Use of bounding box of rotated 3D convex hull for out of print volume detection
Diffstat (limited to 'xs/src/slic3r/GUI/GLGizmo.cpp')
-rw-r--r-- | xs/src/slic3r/GUI/GLGizmo.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index 47b01e8a2..7207022bd 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -189,7 +189,7 @@ GLGizmoRotate::GLGizmoRotate() , m_angle_z(0.0f) , m_center(Pointf(0.0, 0.0)) , m_radius(0.0f) - , m_keep_radius(false) + , m_keep_initial_values(false) { } @@ -229,7 +229,7 @@ bool GLGizmoRotate::on_init() void GLGizmoRotate::on_set_state() { - m_keep_radius = (m_state == On) ? false : true; + m_keep_initial_values = (m_state == On) ? false : true; } void GLGizmoRotate::on_update(const Pointf& mouse_pos) @@ -255,19 +255,19 @@ void GLGizmoRotate::on_update(const Pointf& mouse_pos) void GLGizmoRotate::on_refresh() { - m_keep_radius = false; + m_keep_initial_values = false; } void GLGizmoRotate::on_render(const BoundingBoxf3& box) const { ::glDisable(GL_DEPTH_TEST); - const Pointf3& size = box.size(); - m_center = box.center(); - if (!m_keep_radius) + if (!m_keep_initial_values) { + const Pointf3& size = box.size(); + m_center = box.center(); m_radius = Offset + ::sqrt(sqr(0.5f * size.x) + sqr(0.5f * size.y)); - m_keep_radius = true; + m_keep_initial_values = true; } ::glLineWidth(2.0f); |