diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp index 4c159d79d..d54e93b1d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp @@ -20,7 +20,6 @@ namespace GUI { GLGizmoPainterBase::GLGizmoPainterBase(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id) : GLGizmoBase(parent, icon_filename, sprite_id) { - m_clipping_plane.reset(new ClippingPlane()); // Make sphere and save it into a vertex buffer. const TriangleMesh sphere_mesh = make_sphere(1., (2*M_PI)/24.); for (size_t i=0; iobject_clipper()->get_clipping_plane(), &facet)) { // In case this hit is clipped, skip it. - if (is_mesh_point_clipped(hit.cast(), trafo_matrices[mesh_id])) { - clipped_mesh_was_hit = true; + if (is_mesh_point_clipped(hit.cast(), trafo_matrices[mesh_id])) continue; - } // Is this hit the closest to the camera so far? double hit_squared_distance = (camera.get_position()-trafo_matrices[mesh_id]*hit.cast()).squaredNorm(); @@ -449,7 +442,7 @@ void GLGizmoPainterBase::update_raycast_cache(const Vec2d& mouse_position, } } - m_rr = {mouse_position, closest_hit_mesh_id, closest_hit, closest_facet, clipped_mesh_was_hit}; + m_rr = {mouse_position, closest_hit_mesh_id, closest_hit, closest_facet}; } bool GLGizmoPainterBase::on_is_activable() const diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp index 4fede0ec7..6f8cbec60 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp @@ -101,8 +101,6 @@ private: const Camera& camera, const std::vector& trafo_matrices) const; - float m_clipping_plane_distance = 0.f; - std::unique_ptr m_clipping_plane; GLIndexedVertexArray m_vbo_sphere; bool m_internal_stack_active = false; @@ -126,7 +124,6 @@ private: int mesh_id; Vec3f hit; size_t facet; - bool clipped_mesh_was_hit; }; mutable RaycastResult m_rr;