Skip to content

Commit

Permalink
Tech ENABLE_GLBEGIN_GLEND_REMOVAL - Gizmo scale grabber connections
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoturri1966 committed Jan 20, 2022
1 parent 0b6e2b4 commit 81edc7d
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 73 deletions.
3 changes: 2 additions & 1 deletion src/slic3r/GUI/GLShadersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ std::pair<bool, std::string> GLShadersManager::init()
bool valid = true;

#if ENABLE_GLBEGIN_GLEND_REMOVAL
// basic shader, used to render selection bbox
// basic shader, used to render selection bbox, gizmo cut plane and grabbers connections,
// gizmo move grabbers connections, gizmo scale grabbers connections
valid &= append_shader("flat", { "flat.vs", "flat.fs" });
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
// used to render bed axes and model, selection hints, gcode sequential view marker model, preview shells, options in gcode preview
Expand Down
8 changes: 1 addition & 7 deletions src/slic3r/GUI/Gizmos/GLGizmoMove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ const double GLGizmoMove3D::Offset = 10.0;

GLGizmoMove3D::GLGizmoMove3D(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
: GLGizmoBase(parent, icon_filename, sprite_id)
, m_displacement(Vec3d::Zero())
, m_snap_step(1.0)
, m_starting_drag_position(Vec3d::Zero())
, m_starting_box_center(Vec3d::Zero())
, m_starting_box_bottom_center(Vec3d::Zero())
{
}
{}

std::string GLGizmoMove3D::get_tooltip() const
{
Expand Down
12 changes: 5 additions & 7 deletions src/slic3r/GUI/Gizmos/GLGizmoMove.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ 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;
Vec3d m_displacement{ Vec3d::Zero() };
double m_snap_step{ 1.0 };
Vec3d m_starting_drag_position{ Vec3d::Zero() };
Vec3d m_starting_box_center{ Vec3d::Zero() };
Vec3d m_starting_box_bottom_center{ Vec3d::Zero() };

GLModel m_cone;
#if ENABLE_GLBEGIN_GLEND_REMOVAL
Expand Down
Loading

0 comments on commit 81edc7d

Please sign in to comment.