mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 16:59:01 +08:00
remove GLModel from base class
- only 2 gizmo use cone
This commit is contained in:
parent
123903f317
commit
3c7390e34e
@ -89,9 +89,6 @@ GLGizmoBase::GLGizmoBase(GLCanvas3D& parent, const std::string& icon_filename, u
|
||||
, m_first_input_window_render(true)
|
||||
, m_dirty(false)
|
||||
{
|
||||
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_hover_id(int id)
|
||||
|
@ -99,10 +99,6 @@ protected:
|
||||
ImGuiWrapper* m_imgui;
|
||||
bool m_first_input_window_render;
|
||||
CommonGizmosDataPool* m_c;
|
||||
GLModel m_cone;
|
||||
GLModel m_cylinder;
|
||||
GLModel m_sphere;
|
||||
|
||||
public:
|
||||
GLGizmoBase(GLCanvas3D& parent,
|
||||
const std::string& icon_filename,
|
||||
|
@ -91,6 +91,7 @@ void GLGizmoRotate::disable_grabber() { m_grabbers[0].enabled = false; }
|
||||
|
||||
bool GLGizmoRotate::on_init()
|
||||
{
|
||||
m_cone.init_from(its_make_cone(1., 1., 2 * PI / 24));
|
||||
m_grabbers.push_back(Grabber());
|
||||
return true;
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ private:
|
||||
|
||||
std::array<float, 4> m_drag_color;
|
||||
std::array<float, 4> m_highlight_color;
|
||||
|
||||
GLModel m_cone;
|
||||
public:
|
||||
GLGizmoRotate(GLCanvas3D& parent, Axis axis);
|
||||
virtual ~GLGizmoRotate() = default;
|
||||
|
@ -28,9 +28,7 @@ namespace GUI {
|
||||
|
||||
GLGizmoSlaSupports::GLGizmoSlaSupports(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
||||
: GLGizmoBase(parent, icon_filename, sprite_id)
|
||||
{
|
||||
}
|
||||
|
||||
{}
|
||||
|
||||
bool GLGizmoSlaSupports::on_init()
|
||||
{
|
||||
@ -49,6 +47,10 @@ bool GLGizmoSlaSupports::on_init()
|
||||
m_desc["clipping_of_view"] = _L("Clipping of view")+ ": ";
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,10 @@ private:
|
||||
void render_points(const Selection& selection, bool picking = false) const;
|
||||
bool unsaved_changes() const;
|
||||
|
||||
GLModel m_cone;
|
||||
GLModel m_cylinder;
|
||||
GLModel m_sphere;
|
||||
|
||||
bool m_lock_unique_islands = false;
|
||||
bool m_editing_mode = false; // Is editing mode active?
|
||||
float m_new_point_head_diameter; // Size of a new point.
|
||||
|
Loading…
x
Reference in New Issue
Block a user