mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
remove GLModel from base class
- only 2 gizmo use cone (cherry picked from commit prusa3d/PrusaSlicer@3c7390e34e) (cherry picked from commit 4647fc49ef5b925432e087252f32a6601d0410da)
This commit is contained in:
parent
356405adf6
commit
f6a3421e2a
6 changed files with 12 additions and 9 deletions
|
@ -161,9 +161,6 @@ GLGizmoBase::GLGizmoBase(GLCanvas3D& parent, const std::string& icon_filename, u
|
||||||
m_base_color = DEFAULT_BASE_COLOR;
|
m_base_color = DEFAULT_BASE_COLOR;
|
||||||
m_drag_color = DEFAULT_DRAG_COLOR;
|
m_drag_color = DEFAULT_DRAG_COLOR;
|
||||||
m_highlight_color = DEFAULT_HIGHLIGHT_COLOR;
|
m_highlight_color = DEFAULT_HIGHLIGHT_COLOR;
|
||||||
m_cone.init_from(its_make_cone(1., 1., 2 * PI / 24));
|
|
||||||
m_sphere.init_from(its_make_sphere(1., (2 * M_PI) / 24.));
|
|
||||||
m_cylinder.init_from(its_make_cylinder(1., 1., 2 * PI / 24.));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoBase::set_icon_filename(const std::string &filename) {
|
void GLGizmoBase::set_icon_filename(const std::string &filename) {
|
||||||
|
|
|
@ -123,9 +123,6 @@ protected:
|
||||||
bool m_first_input_window_render;
|
bool m_first_input_window_render;
|
||||||
mutable std::string m_tooltip;
|
mutable std::string m_tooltip;
|
||||||
CommonGizmosDataPool* m_c;
|
CommonGizmosDataPool* m_c;
|
||||||
GLModel m_cone;
|
|
||||||
GLModel m_cylinder;
|
|
||||||
GLModel m_sphere;
|
|
||||||
|
|
||||||
bool m_is_dark_mode = false;
|
bool m_is_dark_mode = false;
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ std::string GLGizmoRotate::get_tooltip() const
|
||||||
|
|
||||||
bool GLGizmoRotate::on_init()
|
bool GLGizmoRotate::on_init()
|
||||||
{
|
{
|
||||||
|
m_cone.init_from(its_make_cone(1., 1., 2 * PI / 24));
|
||||||
m_grabbers.push_back(Grabber());
|
m_grabbers.push_back(Grabber());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ private:
|
||||||
mutable float m_snap_fine_in_radius;
|
mutable float m_snap_fine_in_radius;
|
||||||
mutable float m_snap_fine_out_radius;
|
mutable float m_snap_fine_out_radius;
|
||||||
|
|
||||||
|
GLModel m_cone;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GLGizmoRotate(GLCanvas3D& parent, Axis axis);
|
GLGizmoRotate(GLCanvas3D& parent, Axis axis);
|
||||||
GLGizmoRotate(const GLGizmoRotate& other);
|
GLGizmoRotate(const GLGizmoRotate& other);
|
||||||
|
|
|
@ -28,9 +28,7 @@ namespace GUI {
|
||||||
|
|
||||||
GLGizmoSlaSupports::GLGizmoSlaSupports(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
GLGizmoSlaSupports::GLGizmoSlaSupports(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
||||||
: GLGizmoBase(parent, icon_filename, sprite_id)
|
: GLGizmoBase(parent, icon_filename, sprite_id)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool GLGizmoSlaSupports::on_init()
|
bool GLGizmoSlaSupports::on_init()
|
||||||
{
|
{
|
||||||
|
@ -48,6 +46,10 @@ bool GLGizmoSlaSupports::on_init()
|
||||||
m_desc["manual_editing"] = _L("Manual editing");
|
m_desc["manual_editing"] = _L("Manual editing");
|
||||||
m_desc["clipping_of_view"] = _L("Clipping of view")+ ": ";
|
m_desc["clipping_of_view"] = _L("Clipping of view")+ ": ";
|
||||||
m_desc["reset_direction"] = _L("Reset direction");
|
m_desc["reset_direction"] = _L("Reset direction");
|
||||||
|
|
||||||
|
m_cone.init_from(its_make_cone(1., 1., 2 * PI / 24));
|
||||||
|
m_cylinder.init_from(its_make_cylinder(1., 1., 2 * PI / 24.));
|
||||||
|
m_sphere.init_from(its_make_sphere(1., (2 * M_PI) / 24.));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,10 @@ private:
|
||||||
void render_points(const Selection& selection, bool picking = false) const;
|
void render_points(const Selection& selection, bool picking = false) const;
|
||||||
bool unsaved_changes() const;
|
bool unsaved_changes() const;
|
||||||
|
|
||||||
|
GLModel m_cone;
|
||||||
|
GLModel m_cylinder;
|
||||||
|
GLModel m_sphere;
|
||||||
|
|
||||||
bool m_lock_unique_islands = false;
|
bool m_lock_unique_islands = false;
|
||||||
bool m_editing_mode = false; // Is editing mode active?
|
bool m_editing_mode = false; // Is editing mode active?
|
||||||
float m_new_point_head_diameter; // Size of a new point.
|
float m_new_point_head_diameter; // Size of a new point.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue