OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::GLGizmoSimplify Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Gizmos/GLGizmoSimplify.hpp>

Inheritance diagram for Slic3r::GUI::GLGizmoSimplify:
Collaboration diagram for Slic3r::GUI::GLGizmoSimplify:

Classes

struct  Configuration
struct  State
struct  GuiCfg
class  SimplifyCanceledException

Public Types

enum class  EGrabberExtension {
  None = 0 , PosX = 1 << 0 , NegX = 1 << 1 , PosY = 1 << 2 ,
  NegY = 1 << 3 , PosZ = 1 << 4 , NegZ = 1 << 5
}
enum  EState { Off , On , Num_States }

Public Member Functions

 GLGizmoSimplify (GLCanvas3D &parent, const std::string &icon_filename, unsigned int sprite_id)
virtual ~GLGizmoSimplify ()
bool on_esc_key_down ()
bool init ()
void load (cereal::BinaryInputArchive &ar)
void save (cereal::BinaryOutputArchive &ar) const
std::string get_name (bool include_shortcut=true) const
EState get_state () const
void set_state (EState state)
std::optional< Shortcut > shortcut () const
const std::string & get_icon_filename () const
void set_icon_filename (const std::string &filename)
bool is_activable () const
bool is_selectable () const
CommonGizmosDataID get_requirements () const
virtual bool wants_enter_leave_snapshots () const
virtual bool render_follows_cursor () const
virtual std::string get_gizmo_entering_text () const
virtual std::string get_gizmo_leaving_text () const
virtual std::string get_action_snapshot_name () const
void set_common_data_pool (CommonGizmosDataPool *ptr)
virtual bool apply_clipping_plane ()
virtual bool on_mouse (const wxMouseEvent &mouse_event)
 Implement when want to process mouse events in gizmo Click, Right click, move, drag, ...
unsigned int get_sprite_id () const
int get_hover_id () const
void set_hover_id (int id)
bool is_dragging () const
bool update_items_state ()
void render ()
void render_input_window (float x, float y, float bottom_limit)
virtual void on_change_color_mode (bool is_dark)
virtual std::string get_tooltip () const
 Mouse tooltip text.
int get_count ()
std::string get_gizmo_name ()
virtual void data_changed (bool is_serializing)
 Is called when data (Selection) is changed.
void register_raycasters_for_picking ()
void unregister_raycasters_for_picking ()
virtual bool is_in_editing_mode () const
virtual bool is_selection_rectangle_dragging () const

Static Public Member Functions

static void add_simplify_suggestion_notification (const std::vector< size_t > &object_ids, const std::vector< ModelObject * > &objects, NotificationManager &manager)
static void update_render_colors ()
static void load_render_colors ()

Static Public Attributes

static const unsigned int BASE_ID = 255 * 255 * 254
static const unsigned int GRABBER_ELEMENTS_MAX_COUNT = 7
static float INV_ZOOM = 1.0f
static ColorRGBA DEFAULT_BASE_COLOR = { 0.625f, 0.625f, 0.625f, 1.0f }
static ColorRGBA DEFAULT_DRAG_COLOR = { 1.0f, 1.0f, 1.0f, 1.0f }
static ColorRGBA DEFAULT_HIGHLIGHT_COLOR = {1.0f, 0.38f, 0.0f, 1.0f}
static std::array< ColorRGBA, 3 > AXES_COLOR
static std::array< ColorRGBA, 3 > AXES_HOVER_COLOR
static ColorRGBA CONSTRAINED_COLOR = {0.5f, 0.5f, 0.5f, 1.0f}
static ColorRGBA FLATTEN_COLOR = {0.96f, 0.93f, 0.93f, 0.5f}
static ColorRGBA FLATTEN_HOVER_COLOR = {1.0f, 1.0f, 1.0f, 0.75f}
static ColorRGBA GRABBER_NORMAL_COL = {1.0f, 1.0f, 1.0f, 1.0f}
static ColorRGBA GRABBER_HOVER_COL = {0.863f, 0.125f, 0.063f, 1.0f}
static ColorRGBA GRABBER_UNIFORM_COL = {0, 1.0, 1.0, 1.0f}
static ColorRGBA GRABBER_UNIFORM_HOVER_COL = {0, 0.7, 0.7, 1.0f}

Protected Member Functions

virtual std::string on_get_name () const override
virtual void on_render_input_window (float x, float y, float bottom_limit) override
virtual bool on_is_activable () const override
virtual bool on_is_selectable () const override
virtual void on_set_state () override
virtual bool on_init () override
virtual void on_render () override
CommonGizmosDataID on_get_requirements () const override
bool render_combo (const std::string &label, const std::vector< std::string > &lines, int &selection_idx, float label_width, float item_width)
void render_cross_mark (const Vec3f &target, bool is_single=false)
virtual void on_load (cereal::BinaryInputArchive &ar)
virtual void on_save (cereal::BinaryOutputArchive &ar) const
virtual void on_set_hover_id ()
virtual void on_enable_grabber (unsigned int id)
virtual void on_disable_grabber (unsigned int id)
virtual void on_start_dragging ()
virtual void on_stop_dragging ()
virtual void on_dragging (const UpdateData &data)
bool GizmoImguiBegin (const std::string &name, int flags)
void GizmoImguiEnd ()
void GizmoImguiSetNextWIndowPos (float &x, float y, int flag, float pivot_x=0.0f, float pivot_y=0.0f)
void GizmoImguiSetNextWIndowPos (float &x, float y, float w, float h, int flag, float pivot_x=0.0f, float pivot_y=0.0f)
void register_grabbers_for_picking ()
void unregister_grabbers_for_picking ()
virtual void on_register_raycasters_for_picking ()
virtual void on_unregister_raycasters_for_picking ()
void render_grabbers (const BoundingBoxf3 &box) const
void render_grabbers (float size) const
void render_grabbers (size_t first, size_t last, float size, bool force_hover) const
std::string format (float value, unsigned int decimals) const
void set_dirty ()
bool use_grabbers (const wxMouseEvent &mouse_event)
 function which Set up m_dragging and call functions on_start_dragging / on_dragging / on_stop_dragging
void do_stop_dragging (bool perform_mouse_cleanup)

Protected Attributes

GLCanvas3D & m_parent
int m_group_id
std::optional< Shortcut > m_shortcut
std::string m_icon_filename
unsigned int m_sprite_id
int m_hover_id { -1 }
bool m_dragging { false }
std::vector< Grabber > m_grabbers
ImGuiWrapper * m_imgui
bool m_first_input_window_render { true }
CommonGizmosDataPool * m_c { nullptr }
bool m_is_dark_mode = false
float last_input_window_width = 0

Private Member Functions

void apply_simplify ()
void close ()
void process ()
void stop_worker_thread_request ()
void worker_finished ()
void create_gui_cfg ()
void request_rerender (bool force=false)
void init_model (const indexed_triangle_set &its)
void set_center_position ()

Private Attributes

Configuration m_configuration
bool m_move_to_center
const ModelVolume * m_volume
bool m_show_wireframe
GLModel m_glmodel
size_t m_triangle_count
int64_t m_last_rerender_timestamp = std::numeric_limits<int64_t>::min()
std::thread m_worker
std::mutex m_state_mutex
State m_state
std::optional< GuiCfg > m_gui_cfg
const std::string tr_mesh_name
const std::string tr_triangles
const std::string tr_detail_level
const std::string tr_decimate_ratio
bool m_dirty { false }
int count = 0

Detailed Description


Class Documentation

◆ Slic3r::GUI::GLGizmoSimplify::GuiCfg

struct Slic3r::GUI::GLGizmoSimplify::GuiCfg
Class Members
int bottom_left_width = 100
int input_width = 100
size_t max_char_in_name = 30
duration< long int, milli > prcess_delay = std::chrono::milliseconds(250)
int top_left_width = 100
int window_offset_x = 100
int window_offset_y = 100
int window_padding = 0

Member Enumeration Documentation

◆ EGrabberExtension

enum class Slic3r::GUI::GLGizmoBase::EGrabberExtension
stronginherited
Enumerator
None 
PosX 
NegX 
PosY 
NegY 
PosZ 
NegZ 
74 {
75 None = 0,
76 PosX = 1 << 0,
77 NegX = 1 << 1,
78 PosY = 1 << 2,
79 NegY = 1 << 3,
80 PosZ = 1 << 4,
81 NegZ = 1 << 5,
82 };
@ PosX
Definition PrintConfig.hpp:350
@ NegY
Definition PrintConfig.hpp:351
@ NegX
Definition PrintConfig.hpp:351
@ PosY
Definition PrintConfig.hpp:350
@ NegZ
Definition PrintConfig.hpp:351
@ PosZ
Definition PrintConfig.hpp:350
@ None
Definition SketchEngine.hpp:180

◆ EState

Enumerator
Off 
On 
Num_States 
126 {
127 Off,
128 On,
130 };
@ On
Definition GLGizmoBase.hpp:128
@ Num_States
Definition GLGizmoBase.hpp:129
@ Off
Definition GLGizmoBase.hpp:127

Constructor & Destructor Documentation

◆ GLGizmoSimplify()

Slic3r::GUI::GLGizmoSimplify::GLGizmoSimplify ( GLCanvas3D & parent,
const std::string & icon_filename,
unsigned int sprite_id )
85 : GLGizmoBase(parent, icon_filename, -1)
86 , m_volume(nullptr)
87 , m_show_wireframe(false)
88 , m_move_to_center(false)
89 // translation for GUI size
90 , tr_mesh_name(_u8L("Mesh name"))
91 , tr_triangles(_u8L("Triangles"))
92 , tr_detail_level(_u8L("Detail level"))
93 , tr_decimate_ratio(_u8L("Decimate ratio"))
94{}
GLGizmoBase(GLCanvas3D &parent, const std::string &icon_filename, unsigned int sprite_id)
Definition GLGizmoBase.cpp:327
const std::string tr_mesh_name
Definition GLGizmoSimplify.hpp:141
bool m_show_wireframe
Definition GLGizmoSimplify.hpp:91
bool m_move_to_center
Definition GLGizmoSimplify.hpp:87
const std::string tr_triangles
Definition GLGizmoSimplify.hpp:142
const ModelVolume * m_volume
Definition GLGizmoSimplify.hpp:89
const std::string tr_decimate_ratio
Definition GLGizmoSimplify.hpp:144
const std::string tr_detail_level
Definition GLGizmoSimplify.hpp:143
#define _u8L(s)
Definition I18N.hpp:11

References Slic3r::GUI::GLGizmoBase::GLGizmoBase(), _u8L, m_move_to_center, m_show_wireframe, m_volume, tr_decimate_ratio, tr_detail_level, tr_mesh_name, and tr_triangles.

Referenced by add_simplify_suggestion_notification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~GLGizmoSimplify()

Slic3r::GUI::GLGizmoSimplify::~GLGizmoSimplify ( )
virtual
97{
99 if (m_worker.joinable())
100 m_worker.join();
101 m_glmodel.reset();
102}
GLModel m_glmodel
Definition GLGizmoSimplify.hpp:92
void stop_worker_thread_request()
Definition GLGizmoSimplify.cpp:426
std::thread m_worker
Definition GLGizmoSimplify.hpp:114

References m_glmodel, m_worker, and stop_worker_thread_request().

Here is the call graph for this function:

Member Function Documentation

◆ add_simplify_suggestion_notification()

void Slic3r::GUI::GLGizmoSimplify::add_simplify_suggestion_notification ( const std::vector< size_t > & object_ids,
const std::vector< ModelObject * > & objects,
NotificationManager & manager )
static
117{
118 std::vector<size_t> big_ids;
119 big_ids.reserve(object_ids.size());
120 auto is_big_object = [&objects](size_t object_id) {
121 const uint32_t triangles_to_suggest_simplify = 1000000;
122 if (object_id >= objects.size()) return false; // out of object index
123 ModelVolumePtrs &volumes = objects[object_id]->volumes;
124 if (volumes.size() != 1) return false; // not only one volume
125 size_t triangle_count = volumes.front()->mesh().its.indices.size();
126 if (triangle_count < triangles_to_suggest_simplify)
127 return false; // small volume
128 return true;
129 };
130 std::copy_if(object_ids.begin(), object_ids.end(),
131 std::back_inserter(big_ids), is_big_object);
132 if (big_ids.empty()) return;
133
134 for (size_t object_id : big_ids) {
135 std::string t = GUI::format(_L(
136 "Processing model '%1%' with more than 1M triangles "
137 "could be slow. It is highly recommended to simplify the model."), objects[object_id]->name);
138 std::string hypertext = _u8L("Simplify model");
139
140 std::function<bool(wxEvtHandler *)> open_simplify =
141 [object_id](wxEvtHandler *) {
142 auto plater = wxGetApp().plater();
143 if (object_id >= plater->model().objects.size()) return true;
144
145 Selection &selection = plater->canvas3D()->get_selection();
146 selection.clear();
147 selection.add_object((unsigned int) object_id);
148
149 auto &manager = plater->get_view3D_canvas3D()->get_gizmos_manager();
150 bool close_notification = true;
151 if(!manager.open_gizmo(GLGizmosManager::Simplify))
152 return close_notification;
153 GLGizmoSimplify* simplify = dynamic_cast<GLGizmoSimplify*>(manager.get_current());
154 if (simplify == nullptr) return close_notification;
155 simplify->set_center_position();
156 return close_notification;
157 };
158 manager.push_simplify_suggestion_notification(
159 t, objects[object_id]->id(), hypertext, open_simplify);
160 }
161}
#define _L(s)
Definition OBJ.cpp:34
const GLGizmosManager & get_gizmos_manager() const
Definition GLCanvas3D.hpp:1031
const Selection & get_selection() const
Definition GLCanvas3D.hpp:1028
GLGizmoSimplify(GLCanvas3D &parent, const std::string &icon_filename, unsigned int sprite_id)
Definition GLGizmoSimplify.cpp:82
@ Simplify
Definition GLGizmosManager.hpp:103
const Model & model() const
Definition Plater.cpp:16047
GLCanvas3D * canvas3D()
Definition Plater.cpp:22070
GLCanvas3D * get_view3D_canvas3D()
Definition Plater.cpp:22082
void clear()
Definition Selection.cpp:742
ModelObjectPtrs objects
Definition Model.hpp:1702
void simplify(Polygon &thiss, const int64_t smallest_line_segment_squared, const int64_t allowed_error_distance_squared)
Definition WallToolPaths.cpp:107
@ Selection
Definition Shortcuts.hpp:72
static Plater * plater()
Definition GUI_Factories.cpp:400
std::string format(const char *fmt, TArgs &&... args)
Definition format.hpp:36
std::vector< ModelVolume * > ModelVolumePtrs
Definition Model.hpp:139

References GLGizmoSimplify(), _L, _u8L, Slic3r::GUI::Selection::add_object(), Slic3r::GUI::Selection::clear(), Slic3r::GUI::format(), Slic3r::GUI::plater(), Slic3r::GUI::NotificationManager::push_simplify_suggestion_notification(), and Slic3r::GUI::GLGizmosManager::Simplify.

Here is the call graph for this function:

◆ apply_clipping_plane()

virtual bool Slic3r::GUI::GLGizmoBase::apply_clipping_plane ( )
inlinevirtualinherited
195{ return true; }

Referenced by Slic3r::GUI::GLCanvas3D::_render_objects(), and Slic3r::GUI::GLCanvas3D::get_raycaster_clipping_plane().

Here is the caller graph for this function:

◆ apply_simplify()

void Slic3r::GUI::GLGizmoSimplify::apply_simplify ( )
private
554 {
555
556 const Selection& selection = m_parent.get_selection();
557 int object_idx = selection.get_object_idx();
558
559 auto plater = wxGetApp().plater();
560 plater->take_snapshot(GUI::format("Simplify %1%", m_volume->name));
561 const bool keep_painting = GUI::wxGetApp().app_config->get_bool("keep_painting");
562 if (!keep_painting) {
563 plater->clear_before_change_mesh(object_idx);
564 }
565
566 ModelVolume* mv = get_model_volume(selection, wxGetApp().model());
567 assert(mv == m_volume);
568
569 // Save paint
570 std::optional<TriangleSelector::SavedPainting> saved_painting = keep_painting ? mv->save_painting() :
571 std::optional<TriangleSelector::SavedPainting>{};
572 mv->set_mesh(std::move(*m_state.result));
573 // Remap paint
574 mv->restore_painting(saved_painting);
575 m_state.result.reset();
576 mv->calculate_convex_hull();
577 mv->invalidate_convex_hull_2d();
578 mv->set_new_unique_id();
579 mv->get_object()->invalidate_bounding_box();
580 mv->get_object()->ensure_on_bed();
581
582 // fix hollowing, sla support points, modifiers, ...
583 plater->changed_mesh(object_idx);
584 // Fix warning icon in object list
585 wxGetApp().obj_list()->update_item_error_icon(object_idx, -1);
586 close();
587}
GLCanvas3D & m_parent
Definition GLGizmoBase.hpp:143
void close()
Definition GLGizmoSimplify.cpp:420
State m_state
Definition GLGizmoSimplify.hpp:116
void clear_before_change_mesh(int obj_idx)
Definition Plater.cpp:22192
void take_snapshot(const std::string &snapshot_name)
Definition Plater.cpp:21281
void changed_mesh(int obj_idx)
Definition Plater.cpp:22218
static ModelVolume * get_model_volume(const Selection &selection, Model &model)
Definition GLGizmoBrimEars.cpp:66

References Slic3r::ModelVolume::calculate_convex_hull(), close(), Slic3r::ModelObject::ensure_on_bed(), Slic3r::GUI::format(), Slic3r::GUI::get_model_volume(), Slic3r::ModelVolume::get_object(), Slic3r::GUI::Selection::get_object_idx(), Slic3r::ModelObject::invalidate_bounding_box(), Slic3r::ModelVolume::invalidate_convex_hull_2d(), Slic3r::GUI::GLGizmoBase::m_parent, m_state, m_volume, Slic3r::GUI::plater(), Slic3r::ModelVolume::restore_painting(), Slic3r::ModelVolume::save_painting(), Slic3r::ModelVolume::set_mesh(), and Slic3r::ModelVolume::set_new_unique_id().

Referenced by on_render_input_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

void Slic3r::GUI::GLGizmoSimplify::close ( )
private
420 {
421 // close gizmo == open it again
422 GLGizmosManager &gizmos_mgr = m_parent.get_gizmos_manager();
423 gizmos_mgr.open_gizmo(GLGizmosManager::EType::Simplify);
424}

References Slic3r::GUI::GLGizmoBase::m_parent, Slic3r::GUI::GLGizmosManager::open_gizmo(), and Slic3r::GUI::GLGizmosManager::Simplify.

Referenced by apply_simplify(), and on_render_input_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_gui_cfg()

void Slic3r::GUI::GLGizmoSimplify::create_gui_cfg ( )
private
610 {
611 if (m_gui_cfg.has_value()) return;
612 int space_size = m_imgui->calc_text_size(std::string_view{":MM"}).x;
613 GuiCfg cfg;
614 cfg.top_left_width = std::max(m_imgui->calc_text_size(tr_mesh_name).x,
615 m_imgui->calc_text_size(tr_triangles).x)
616 + space_size;
617
618 const float radio_size = ImGui::GetFrameHeight();
619 cfg.bottom_left_width =
620 std::max(m_imgui->calc_text_size(tr_detail_level).x,
621 m_imgui->calc_text_size(tr_decimate_ratio).x) +
622 space_size + radio_size;
623
624 cfg.input_width = cfg.bottom_left_width * 1.5;
625 cfg.window_offset_x = (cfg.bottom_left_width + cfg.input_width)/2;
626 cfg.window_offset_y = ImGui::GetTextLineHeightWithSpacing() * 5;
627
628 m_gui_cfg = cfg;
629}
ImGuiWrapper * m_imgui
Definition GLGizmoBase.hpp:153
std::optional< GuiCfg > m_gui_cfg
Definition GLGizmoSimplify.hpp:138
Definition GLGizmoSimplify.hpp:123

References Slic3r::GUI::GLGizmoSimplify::GuiCfg::bottom_left_width, Slic3r::GUI::GLGizmoSimplify::GuiCfg::input_width, m_gui_cfg, Slic3r::GUI::GLGizmoBase::m_imgui, Slic3r::GUI::GLGizmoSimplify::GuiCfg::top_left_width, tr_decimate_ratio, tr_detail_level, tr_mesh_name, tr_triangles, Slic3r::GUI::GLGizmoSimplify::GuiCfg::window_offset_x, and Slic3r::GUI::GLGizmoSimplify::GuiCfg::window_offset_y.

Referenced by on_render_input_window().

Here is the caller graph for this function:

◆ data_changed()

◆ do_stop_dragging()

void Slic3r::GUI::GLGizmoBase::do_stop_dragging ( bool perform_mouse_cleanup)
protectedinherited
494{
495 for (auto& grabber : m_grabbers) grabber.dragging = false;
496 m_dragging = false;
497
498 // NOTE: This should be part of GLCanvas3D
499 // Reset hover_id when leave window
500 if (perform_mouse_cleanup) m_parent.mouse_up_cleanup();
501
503
504 // There is prediction that after draggign, data are changed
505 // Data are updated twice also by canvas3D::reload_scene.
506 // Should be fixed.
507 m_parent.get_gizmos_manager().update_data();
508
509 wxGetApp().obj_manipul()->set_dirty();
510
511 // Let the plater know that the dragging finished, so a delayed
512 // refresh of the scene with the background processing data should
513 // be performed.
514 m_parent.post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
515 // updates camera target constraints
516 m_parent.refresh_camera_scene_box();
517}
bool m_dragging
Definition GLGizmoBase.hpp:151
std::vector< Grabber > m_grabbers
Definition GLGizmoBase.hpp:152
virtual void on_stop_dragging()
Definition GLGizmoBase.hpp:254

References m_dragging, m_grabbers, m_parent, and on_stop_dragging().

Referenced by use_grabbers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format()

std::string Slic3r::GUI::GLGizmoBase::format ( float value,
unsigned int decimals ) const
protectedinherited

◆ get_action_snapshot_name()

std::string Slic3r::GUI::GLGizmoBase::get_action_snapshot_name ( ) const
virtualinherited

Reimplemented in Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoFdmSupports, Slic3r::GUI::GLGizmoFuzzySkin, Slic3r::GUI::GLGizmoMmuSegmentation, Slic3r::GUI::GLGizmoSeam, Slic3r::GUI::GLGizmoSVG, and Slic3r::GUI::GLGizmoTextureDisplacement.

339{
340 return "Gizmo action";
341}

Referenced by Slic3r::GUI::Plater::priv::take_snapshot().

Here is the caller graph for this function:

◆ get_count()

int Slic3r::GUI::GLGizmoBase::get_count ( )
inlineinherited
224{ return ++count; }
int count
Definition GLGizmoBase.hpp:294

References count.

◆ get_gizmo_entering_text()

virtual std::string Slic3r::GUI::GLGizmoBase::get_gizmo_entering_text ( ) const
inlinevirtualinherited

◆ get_gizmo_leaving_text()

virtual std::string Slic3r::GUI::GLGizmoBase::get_gizmo_leaving_text ( ) const
inlinevirtualinherited

◆ get_gizmo_name()

std::string Slic3r::GUI::GLGizmoBase::get_gizmo_name ( )
inlineinherited
225{ return on_get_name(); }
virtual std::string on_get_name() const =0

References on_get_name().

Here is the call graph for this function:

◆ get_hover_id()

int Slic3r::GUI::GLGizmoBase::get_hover_id ( ) const
inlineinherited
206{ return m_hover_id; }
int m_hover_id
Definition GLGizmoBase.hpp:150

References m_hover_id.

Referenced by Slic3r::GUI::GLCanvas3D::_scene_cache_key(), Slic3r::GUI::GLGizmosManager::grabber_contains_mouse(), Slic3r::GUI::GLGizmoBrimEars::on_mouse(), Slic3r::GUI::GLGizmoCut3D::on_mouse(), Slic3r::GUI::GLGizmoMeshBoolean::on_mouse(), and Slic3r::GUI::GLGizmoPainterBase::on_mouse().

Here is the caller graph for this function:

◆ get_icon_filename()

const std::string & Slic3r::GUI::GLGizmoBase::get_icon_filename ( ) const
inlineinherited
180{ return m_icon_filename; }
std::string m_icon_filename
Definition GLGizmoBase.hpp:148

References m_icon_filename.

◆ get_name()

std::string Slic3r::GUI::GLGizmoBase::get_name ( bool include_shortcut = true) const
inherited
545{
546 const std::string name = on_get_name();
547 return include_shortcut && m_shortcut.has_value() ? wxGetApp().shortcuts().with_key(name, *m_shortcut) : name;
548}
std::optional< Shortcut > m_shortcut
Definition GLGizmoBase.hpp:147

References m_shortcut, and on_get_name().

Referenced by Slic3r::GUI::GLGizmoAssembly::on_render_input_window(), Slic3r::GUI::GLGizmoBrimEars::on_render_input_window(), Slic3r::GUI::GLGizmoCut3D::on_render_input_window(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMeasure::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), and Slic3r::GUI::GLGizmosManager::update_hover_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_requirements()

CommonGizmosDataID Slic3r::GUI::GLGizmoBase::get_requirements ( ) const
inlineinherited
186{ return on_get_requirements(); }
virtual CommonGizmosDataID on_get_requirements() const
Definition GLGizmoBase.hpp:248

References on_get_requirements().

Here is the call graph for this function:

◆ get_sprite_id()

unsigned int Slic3r::GUI::GLGizmoBase::get_sprite_id ( ) const
inlineinherited
204{ return m_sprite_id; }
unsigned int m_sprite_id
Definition GLGizmoBase.hpp:149

References m_sprite_id.

Referenced by Slic3r::GUI::GLGizmosManager::do_render_overlay().

Here is the caller graph for this function:

◆ get_state()

EState Slic3r::GUI::GLGizmoBase::get_state ( ) const
inlineinherited

◆ get_tooltip()

virtual std::string Slic3r::GUI::GLGizmoBase::get_tooltip ( ) const
inlinevirtualinherited

Mouse tooltip text.

Returns
Text to be visible in mouse tooltip

Reimplemented in Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoRotate, and Slic3r::GUI::GLGizmoScale3D.

222{ return ""; }

Referenced by Slic3r::GUI::GLGizmosManager::get_tooltip().

Here is the caller graph for this function:

◆ GizmoImguiBegin()

◆ GizmoImguiEnd()

◆ GizmoImguiSetNextWIndowPos() [1/2]

void Slic3r::GUI::GLGizmoBase::GizmoImguiSetNextWIndowPos ( float & x,
float y,
float w,
float h,
int flag,
float pivot_x = 0.0f,
float pivot_y = 0.0f )
protectedinherited
384{
385 if (abs(w) > 0.01f) {
386 if (x + w > m_parent.get_canvas_size().get_width()) {
387 if (w > m_parent.get_canvas_size().get_width()) {
388 x = 0;
389 } else {
390 x = m_parent.get_canvas_size().get_width() - w;
391 }
392 }
393 }
394
395 m_imgui->set_next_window_pos(x, y, flag, pivot_x, pivot_y);
396}

References m_imgui, and m_parent.

◆ GizmoImguiSetNextWIndowPos() [2/2]

void Slic3r::GUI::GLGizmoBase::GizmoImguiSetNextWIndowPos ( float & x,
float y,
int flag,
float pivot_x = 0.0f,
float pivot_y = 0.0f )
protectedinherited

◆ init()

bool Slic3r::GUI::GLGizmoBase::init ( )
inlineinherited
168{ return on_init(); }
virtual bool on_init()=0

References on_init().

Here is the call graph for this function:

◆ init_model()

void Slic3r::GUI::GLGizmoSimplify::init_model ( const indexed_triangle_set & its)
private
646{
647 if (its.indices.empty())
648 return;
649
650 m_glmodel.reset();
651 m_glmodel.init_from(its);
652 m_parent.toggle_model_objects_visibility(true); // selected volume may have changed
653 m_parent.toggle_model_objects_visibility(false, m_c->selection_info()->model_object(),
654 m_c->selection_info()->get_active_instance(), m_volume);
655
656 if (const Selection&sel = m_parent.get_selection(); sel.get_volume_idxs().size() == 1)
657 m_glmodel.set_color(sel.get_volume(*sel.get_volume_idxs().begin())->color);
658 m_triangle_count = its.indices.size();
659}
CommonGizmosDataPool * m_c
Definition GLGizmoBase.hpp:155
size_t m_triangle_count
Definition GLGizmoSimplify.hpp:93

References Slic3r::GUI::GLGizmoBase::m_c, m_glmodel, Slic3r::GUI::GLGizmoBase::m_parent, m_triangle_count, and m_volume.

Referenced by on_render_input_window(), and worker_finished().

Here is the caller graph for this function:

◆ is_activable()

bool Slic3r::GUI::GLGizmoBase::is_activable ( ) const
inlineinherited
184{ return on_is_activable(); }
virtual bool on_is_activable() const
Definition GLGizmoBase.hpp:246

References on_is_activable().

Referenced by Slic3r::GUI::GLGizmosManager::activate_gizmo(), Slic3r::GUI::GLGizmosManager::do_render_overlay(), Slic3r::GUI::GLGizmoEmboss::init_create(), and Slic3r::GUI::GLGizmosManager::update_hover_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_dragging()

bool Slic3r::GUI::GLGizmoBase::is_dragging ( ) const
inlineinherited
209{ return m_dragging; }

References m_dragging.

Referenced by Slic3r::GUI::GLGizmoCut3D::gizmo_event(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), and Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate().

Here is the caller graph for this function:

◆ is_in_editing_mode()

virtual bool Slic3r::GUI::GLGizmoBase::is_in_editing_mode ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoCut3D.

235{ return false; }

Referenced by Slic3r::GUI::GLGizmosManager::on_key().

Here is the caller graph for this function:

◆ is_selectable()

bool Slic3r::GUI::GLGizmoBase::is_selectable ( ) const
inlineinherited
185{ return on_is_selectable(); }
virtual bool on_is_selectable() const
Definition GLGizmoBase.hpp:247

References on_is_selectable().

Here is the call graph for this function:

◆ is_selection_rectangle_dragging()

virtual bool Slic3r::GUI::GLGizmoBase::is_selection_rectangle_dragging ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, and Slic3r::GUI::GLGizmoCut3D.

236{ return false; }

◆ load()

void Slic3r::GUI::GLGizmoBase::load ( cereal::BinaryInputArchive & ar)
inlineinherited
170{ m_state = On; on_load(ar); }
virtual void on_load(cereal::BinaryInputArchive &ar)
Definition GLGizmoBase.hpp:241

References m_state, On, and on_load().

Here is the call graph for this function:

◆ load_render_colors()

void Slic3r::GUI::GLGizmoBase::load_render_colors ( )
staticinherited
93{
99}
@ RenderCol_Grabber_Y
Definition GUI_Colors.hpp:27
@ RenderCol_Flatten_Plane
Definition GUI_Colors.hpp:29
@ RenderCol_Grabber_X
Definition GUI_Colors.hpp:26
@ RenderCol_Grabber_Z
Definition GUI_Colors.hpp:28
@ RenderCol_Flatten_Plane_Hover
Definition GUI_Colors.hpp:30
static ColorRGBA FLATTEN_COLOR
Definition GLGizmoBase.hpp:63
static std::array< ColorRGBA, 3 > AXES_COLOR
Definition GLGizmoBase.hpp:60
static ColorRGBA FLATTEN_HOVER_COLOR
Definition GLGizmoBase.hpp:64
static ImVec4 to_ImVec4(const ColorRGB &color)
Definition ImGuiWrapper.cpp:1053
static ImVec4 colors[RenderCol_Count]
Definition GUI_Colors.hpp:40

References AXES_COLOR, Slic3r::RenderColor::colors, FLATTEN_COLOR, FLATTEN_HOVER_COLOR, RenderCol_Flatten_Plane, RenderCol_Flatten_Plane_Hover, RenderCol_Grabber_X, RenderCol_Grabber_Y, RenderCol_Grabber_Z, and Slic3r::GUI::ImGuiWrapper::to_ImVec4().

Referenced by Slic3r::GUI::GLCanvas3D::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_change_color_mode()

virtual void Slic3r::GUI::GLGizmoBase::on_change_color_mode ( bool is_dark)
inlinevirtualinherited
static bool is_dark()
Definition TextureImportDialog.cpp:85
bool m_is_dark_mode
Definition GLGizmoBase.hpp:157

References is_dark(), and m_is_dark_mode.

Here is the call graph for this function:

◆ on_disable_grabber()

virtual void Slic3r::GUI::GLGizmoBase::on_disable_grabber ( unsigned int id)
inlineprotectedvirtualinherited

◆ on_dragging()

virtual void Slic3r::GUI::GLGizmoBase::on_dragging ( const UpdateData & data)
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoRotate, Slic3r::GUI::GLGizmoScale3D, and Slic3r::GUI::GLGizmoSVG.

255{}

Referenced by use_grabbers().

Here is the caller graph for this function:

◆ on_enable_grabber()

virtual void Slic3r::GUI::GLGizmoBase::on_enable_grabber ( unsigned int id)
inlineprotectedvirtualinherited

◆ on_esc_key_down()

bool Slic3r::GUI::GLGizmoSimplify::on_esc_key_down ( )
104 {
105 return false;
106 /*if (!m_is_worker_running)
107 return false;
108 stop_worker_thread_request();
109 return true;*/
110}

◆ on_get_name()

std::string Slic3r::GUI::GLGizmoSimplify::on_get_name ( ) const
overrideprotectedvirtual

Implements Slic3r::GUI::GLGizmoBase.

164{
165 return _u8L("Simplify");
166}

References _u8L.

Referenced by on_render_input_window().

Here is the caller graph for this function:

◆ on_get_requirements()

CommonGizmosDataID Slic3r::GUI::GLGizmoSimplify::on_get_requirements ( ) const
overrideprotectedvirtual

Reimplemented from Slic3r::GUI::GLGizmoBase.

722{
723 return CommonGizmosDataID(
725}
CommonGizmosDataID
Definition GLGizmosCommon.hpp:72
@ SelectionInfo
Definition GLGizmosCommon.hpp:74

References Slic3r::GUI::SelectionInfo.

◆ on_init()

virtual bool Slic3r::GUI::GLGizmoSimplify::on_init ( )
inlineoverrideprotectedvirtual

Implements Slic3r::GUI::GLGizmoBase.

49{ return true;};

◆ on_is_activable()

bool Slic3r::GUI::GLGizmoSimplify::on_is_activable ( ) const
overrideprotectedvirtual

Reimplemented from Slic3r::GUI::GLGizmoBase.

590{
591 return m_parent.get_selection().is_single_full_object() ||
592 m_parent.get_selection().is_single_volume();
593}

References Slic3r::GUI::GLGizmoBase::m_parent.

◆ on_is_selectable()

virtual bool Slic3r::GUI::GLGizmoSimplify::on_is_selectable ( ) const
inlineoverrideprotectedvirtual

Reimplemented from Slic3r::GUI::GLGizmoBase.

45{ return false; }

◆ on_load()

virtual void Slic3r::GUI::GLGizmoBase::on_load ( cereal::BinaryInputArchive & ar)
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoMeshBoolean, and Slic3r::GUI::GLGizmoPainterBase.

241{}

Referenced by load().

Here is the caller graph for this function:

◆ on_mouse()

virtual bool Slic3r::GUI::GLGizmoBase::on_mouse ( const wxMouseEvent & mouse_event)
inlinevirtualinherited

Implement when want to process mouse events in gizmo Click, Right click, move, drag, ...

Parameters
mouse_eventKeep information about mouse click
Returns
Return True when use the information and don't want to propagate it otherwise False.

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoFlatten, Slic3r::GUI::GLGizmoMeasure, Slic3r::GUI::GLGizmoMeshBoolean, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoPainterBase, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoRotate, Slic3r::GUI::GLGizmoScale3D, Slic3r::GUI::GLGizmoSVG, and Slic3r::GUI::GLGizmoTextureDisplacement.

203{ return false; }

References Slic3r::GUI::wxMouseEvent.

◆ on_register_raycasters_for_picking()

virtual void Slic3r::GUI::GLGizmoBase::on_register_raycasters_for_picking ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoFlatten, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoScale3D, and Slic3r::GUI::GLGizmoSVG.

267{}

Referenced by register_raycasters_for_picking().

Here is the caller graph for this function:

◆ on_render()

void Slic3r::GUI::GLGizmoSimplify::on_render ( )
overrideprotectedvirtual

Implements Slic3r::GUI::GLGizmoBase.

662{
663 if (! m_glmodel.is_initialized())
664 return;
665
666 const auto& selection = m_parent.get_selection();
667 const auto& volume_idxs = selection.get_volume_idxs();
668 if (volume_idxs.empty() || volume_idxs.size() != 1) return;
669 const GLVolume *selected_volume = selection.get_volume(*volume_idxs.begin());
670
671 // Check that the GLVolume still belongs to the ModelObject we work on.
672 if (m_volume != get_model_volume(selection, wxGetApp().model()))
673 return;
674
675 const Transform3d trafo_matrix = selected_volume->world_matrix();
676 auto* gouraud_shader = wxGetApp().get_shader("gouraud_light");
678 gouraud_shader->start_using();
679 const Camera& camera = wxGetApp().plater()->get_camera();
680 const Transform3d& view_matrix = camera.get_view_matrix();
681 const Transform3d view_model_matrix = view_matrix * trafo_matrix;
682 gouraud_shader->set_uniform("view_model_matrix", view_model_matrix);
683 gouraud_shader->set_uniform("projection_matrix", camera.get_projection_matrix());
684 const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * trafo_matrix.matrix().block(0, 0, 3, 3).inverse().transpose();
685 gouraud_shader->set_uniform("view_normal_matrix", view_normal_matrix);
686 m_glmodel.render();
687 gouraud_shader->stop_using();
688
689 if (m_show_wireframe) {
690#if SLIC3R_OPENGL_ES
691 auto* contour_shader = wxGetApp().get_shader("wireframe");
692#else
693 auto *contour_shader = wxGetApp().get_shader("mm_contour");
694#endif // SLIC3R_OPENGL_ES
695 contour_shader->start_using();
696 contour_shader->set_uniform("offset", OpenGLManager::get_gl_info().is_mesa() ? 0.0005 : 0.00001);
697 contour_shader->set_uniform("view_model_matrix", view_model_matrix);
698 contour_shader->set_uniform("projection_matrix", camera.get_projection_matrix());
699 const ColorRGBA color = m_glmodel.get_color();
700 m_glmodel.set_color(ColorRGBA::WHITE());
701#if !SLIC3R_OPENGL_ES
702 if (!OpenGLManager::get_gl_info().is_core_profile())
703 glsafe(::glLineWidth(1.0f));
705#endif // !SLIC3R_OPENGL_ES
706 //ScopeGuard offset_fill_guard([]() { glsafe(::glDisable(GL_POLYGON_OFFSET_FILL)); });
707 //glsafe(::glEnable(GL_POLYGON_OFFSET_FILL));
708 //glsafe(::glPolygonOffset(5.0, 5.0));
709 m_glmodel.render();
710#if !SLIC3R_OPENGL_ES
712#endif // !SLIC3R_OPENGL_ES
713 m_glmodel.set_color(color);
714 contour_shader->stop_using();
715 }
716
718}
#define glsafe(cmd)
Definition OpenGLUtils.hpp:25
static const ColorRGBA WHITE()
Definition Color.hpp:142
static const GLInfo & get_gl_info()
Definition OpenGLManager.hpp:106
#define GL_FRONT_AND_BACK
Definition gl.h:761
#define glEnable
Definition gl.h:3667
#define GL_DEPTH_TEST
Definition gl.h:574
#define GL_FILL
Definition gl.h:654
#define glPopAttrib
Definition gl.h:4477
#define GL_LINE
Definition gl.h:929
#define glLineWidth
Definition gl.h:4215
#define glPolygonMode
Definition gl.h:4469
@ Camera
Definition Shortcuts.hpp:72
Eigen::Transform< double, 3, Eigen::Affine, Eigen::DontAlign > Transform3d
Definition Point.hpp:96
Eigen::Matrix< double, 3, 3, Eigen::DontAlign > Matrix3d
Definition Point.hpp:86

References Slic3r::GUI::OpenGLManager::get_gl_info(), Slic3r::GUI::get_model_volume(), Slic3r::GUI::Camera::get_projection_matrix(), Slic3r::GUI::Camera::get_view_matrix(), GL_DEPTH_TEST, GL_FILL, GL_FRONT_AND_BACK, GL_LINE, glEnable, glLineWidth, glPolygonMode, glPopAttrib, glsafe, m_glmodel, Slic3r::GUI::GLGizmoBase::m_parent, m_show_wireframe, m_volume, Slic3r::ColorRGBA::WHITE(), and Slic3r::GLVolume::world_matrix().

Here is the call graph for this function:

◆ on_render_input_window()

void Slic3r::GUI::GLGizmoSimplify::on_render_input_window ( float x,
float y,
float bottom_limit )
overrideprotectedvirtual

Reimplemented from Slic3r::GUI::GLGizmoBase.

169{
171
172 const Selection &selection = m_parent.get_selection();
173 const ModelVolume *act_volume = get_model_volume(selection, wxGetApp().plater()->model());
174 if (act_volume == nullptr) {
176 close();
177 if (! m_parent.get_selection().is_single_volume()) {
178 MessageDialog msg((wxWindow*)wxGetApp().mainframe,
179 _L("Simplification is currently only allowed when a single part is selected"),
180 _L("Error"));
181 msg.ShowModal();
182 }
183 return;
184 }
185
186 bool is_cancelling = false;
187 bool is_worker_running = false;
188 bool is_result_ready = false;
189 int progress = 0;
190 {
191 std::lock_guard lk(m_state_mutex);
192 is_cancelling = m_state.status == State::cancelling;
193 is_worker_running = m_state.status == State::running;
194 is_result_ready = bool(m_state.result);
195 progress = m_state.progress;
196 }
197
198 // Whether to trigger calculation after rendering is done.
199 bool start_process = false;
200
201
202 // Check selection of new volume
203 // Do not reselect object when processing
204 if (act_volume != m_volume) {
205 bool change_window_position = (m_volume == nullptr);
206 // select different model
207
208 // close suggestion notification
209 auto notification_manager = wxGetApp().plater()->get_notification_manager();
210 notification_manager->remove_simplify_suggestion_with_id(act_volume->get_object()->id());
211
212 m_volume = act_volume;
213 m_configuration.decimate_ratio = 50.; // default value
214 m_configuration.fix_count_by_ratio(m_volume->mesh().its.indices.size());
215 init_model(m_volume->mesh().its);
216
217 // Start processing. If we switched from another object, process will
218 // stop the background thread and it will restart itself later.
219 start_process = true;
220
221 // set window position
222 if (m_move_to_center && change_window_position) {
223 m_move_to_center = false;
224 auto parent_size = m_parent.get_canvas_size();
225 ImVec2 pos(parent_size.get_width() / 2 - m_gui_cfg->window_offset_x,
226 parent_size.get_height() / 2 - m_gui_cfg->window_offset_y);
227 ImGui::SetNextWindowPos(pos, ImGuiCond_Always);
228 }else if (change_window_position) {
229 ImVec2 pos = ImGui::GetMousePos();
230 pos.x -= m_gui_cfg->window_offset_x;
231 pos.y -= m_gui_cfg->window_offset_y;
232 // minimal top left value
233 ImVec2 tl(m_gui_cfg->window_padding, m_gui_cfg->window_padding + m_parent.get_main_toolbar_height());
234 if (pos.x < tl.x) pos.x = tl.x;
235 if (pos.y < tl.y) pos.y = tl.y;
236 // maximal bottom right value
237 auto parent_size = m_parent.get_canvas_size();
238 ImVec2 br(
239 parent_size.get_width() - (2 * m_gui_cfg->window_offset_x + m_gui_cfg->window_padding),
240 parent_size.get_height() - (2 * m_gui_cfg->window_offset_y + m_gui_cfg->window_padding));
241 if (pos.x > br.x) pos.x = br.x;
242 if (pos.y > br.y) pos.y = br.y;
243 ImGui::SetNextWindowPos(pos, ImGuiCond_Always);
244 }
245 }
246 float space_size = m_imgui->get_style_scaling() * 8;
247 float mesh_size = m_imgui->calc_text_size(_L("Mesh name")).x + m_imgui->scaled(2.0f);
248 float triangle_size = m_imgui->calc_text_size(_L("Triangles")).x + m_imgui->scaled(2.0f);
249 float text_left_width = std::max(triangle_size,mesh_size);
250
251 float detail_size = m_imgui->calc_text_size(_L("Detail level")).x + m_imgui->scaled(2.0f);
252 float decimate_size = m_imgui->calc_text_size(_L("Decimate ratio")).x + m_imgui->scaled(2.0f);
253 float circle_size = m_imgui->scaled(2.0f);
254 float bottom_left_width = std::max(detail_size, decimate_size) + circle_size;
255
256 float slider_width = m_imgui->scaled(5.0f);
257
258 m_imgui->push_common_window_style(m_parent.get_scale());
259 int flag = ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize |
260 ImGuiWindowFlags_NoCollapse;
261 m_imgui->begin(on_get_name(), flag);
262
263 m_imgui->text(tr_mesh_name + ":");
264 // BBS: somehow the calculated utf8 width is too narrow, have to add 35 here
265 ImGui::SameLine(text_left_width + space_size);
266 std::string name = m_volume->name;
267 if (name.length() > m_gui_cfg->max_char_in_name)
268 name = name.substr(0, m_gui_cfg->max_char_in_name - 3) + "...";
269 m_imgui->text_colored(ImVec4(0.42f, 0.42f, 0.42f, 1.00f), name);
270
271 m_imgui->text(tr_triangles + ":");
272 ImGui::SameLine(text_left_width + space_size);
273
274 size_t orig_triangle_count = m_volume->mesh().its.indices.size();
275 m_imgui->text_colored(ImVec4(0.42f, 0.42f, 0.42f, 1.00f), std::to_string(orig_triangle_count));
276
277 ImGui::Separator();
278
279 if (m_imgui->bbl_radio_button("##use_error", !m_configuration.use_count)) {
280 m_configuration.use_count = !m_configuration.use_count;
281 start_process = true;
282 }
283
284 ImGui::SameLine();
285 m_imgui->disabled_begin(m_configuration.use_count);
286 ImGui::Text("%s", tr_detail_level.c_str());
287 std::vector<std::string> reduce_captions = {
288 static_cast<std::string>(_u8L("Extra high")),
289 static_cast<std::string>(_u8L("High")),
290 static_cast<std::string>(_u8L("Medium")),
291 static_cast<std::string>(_u8L("Low")),
292 static_cast<std::string>(_u8L("Extra low"))
293 };
294 ImGui::SameLine(bottom_left_width);
295 ImGui::PushItemWidth(bottom_left_width - space_size);
296 static int reduction = 2;
297 ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.81f, 0.81f, 0.81f, 1.00f));
298 ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(0.81f, 0.81f, 0.81f, 1.00f));
299 ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(0.81f, 0.81f, 0.81f, 1.00f));
300 ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORCA); // ORCA Use orca color for step slider text
301 ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImGuiWrapper::COL_ORCA); // ORCA Use orca color for step slider thumb
302
303 if (m_imgui->bbl_sliderin("##ReductionLevel", &reduction, 0, 4, reduce_captions[reduction].c_str())) {
304 if (reduction < 0) reduction = 0;
305 if (reduction > 4) reduction = 4;
306 switch (reduction) {
307 case 0: m_configuration.max_error = 1e-3f; break;
308 case 1: m_configuration.max_error = 1e-2f; break;
309 case 2: m_configuration.max_error = 0.1f; break;
310 case 3: m_configuration.max_error = 0.5f; break;
311 case 4: m_configuration.max_error = 1.f; break;
312 }
313 start_process = true;
314 }
315 ImGui::PopStyleColor(5);
316 m_imgui->disabled_end(); // !use_count
317
318 if (m_imgui->bbl_radio_button("##use_count", m_configuration.use_count)) {
319 m_configuration.use_count = !m_configuration.use_count;
320 start_process = true;
321 }
322
323 ImGui::SameLine();
324
325 // show preview result triangle count (percent)
326 if (!m_configuration.use_count) {
327 m_configuration.wanted_count = static_cast<uint32_t>(m_triangle_count);
328 m_configuration.decimate_ratio =
329 (1.0f - (m_configuration.wanted_count / (float) orig_triangle_count)) * 100.f;
330 }
331
332 m_imgui->disabled_begin(!m_configuration.use_count);
333 ImGui::Text("%s", tr_decimate_ratio.c_str());
334 ImGui::SameLine(bottom_left_width);
335
336 const char * format = (m_configuration.decimate_ratio > 10)? "%.0f %%":
337 ((m_configuration.decimate_ratio > 1)? "%.1f %%":"%.2f %%");
338
339 ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0);
340 ImGui::PushItemWidth(slider_width + space_size);
341 if (m_imgui->bbl_slider_float_style("##decimate_ratio", &m_configuration.decimate_ratio, 0.f, 100.f, format)) {
342 if (m_configuration.decimate_ratio < 0.f)
343 m_configuration.decimate_ratio = 0.01f;
344 if (m_configuration.decimate_ratio > 100.f)
345 m_configuration.decimate_ratio = 100.f;
346 m_configuration.fix_count_by_ratio(orig_triangle_count);
347 start_process = true;
348 }
349 ImGui::SameLine();
350 ImGui::PopStyleVar(1);
351
352 ImGui::PushItemWidth(ImGui::CalcTextSize("100.00%").x + space_size);
353
354 ImGui::BBLDragFloat("##decimate_ratio_input", &m_configuration.decimate_ratio, 0.05f, 0.0f, 0.0f, "%.2f%%");
355
356 ImGui::NewLine();
357 ImGui::SameLine(bottom_left_width + space_size);
358 ImGui::TextUnformatted(GUI::format(_L_PLURAL("%1% triangle", "%1% triangles", m_configuration.wanted_count), m_configuration.wanted_count).c_str());
359 m_imgui->disabled_end(); // use_count
360
361 m_imgui->bbl_checkbox(_L("Show wireframe").c_str(), m_show_wireframe);
362
363 // draw progress bar
364 ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding,12);
365 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0,0));
366 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(10,20));
367 if (is_worker_running) { // apply or preview
368 // draw progress bar
369 std::string progress_text = GUI::format("%1%", std::to_string(progress)) + "%";
370 ImVec2 progress_size(bottom_left_width - space_size, 0.0f);
371 ImGui::BBLProgressBar2(progress / 100., progress_size);
372 ImGui::SameLine();
373 ImGui::AlignTextToFramePadding();
374 ImGui::TextColored(ImVec4(0.42f, 0.42f, 0.42f, 1.00f), "%s", progress_text.c_str());
375 ImGui::SameLine(bottom_left_width + slider_width + m_imgui->scaled(1.0f));
376 } else {
377 ImGui::Dummy(ImVec2(bottom_left_width - space_size, -1));
378 ImGui::SameLine(bottom_left_width + slider_width + m_imgui->scaled(1.0f));
379 }
380 ImGui::PopStyleVar(3);
381
382 ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding,12);
383 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(10,3));
384 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(10,0));
385 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.15f, 0.18f, 0.19f, 1.00f));
386
387 m_imgui->disabled_begin(is_worker_running || ! is_result_ready);
388 m_imgui->push_confirm_button_style();
389 if (m_imgui->bbl_button(_L("Apply"))) {
391 }
392 else if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && is_worker_running) {
393 ImGui::SetTooltip("%s", _u8L("Unable to apply when processing preview").c_str());
394 }
395 m_imgui->pop_confirm_button_style();
396 m_imgui->disabled_end(); // state !settings
397
398 ImGui::SameLine();
399
400 m_imgui->disabled_begin(is_cancelling);
401 m_imgui->push_cancel_button_style();
402 if (m_imgui->bbl_button(_L("Cancel"))) {
403 close();
404 }
405 else if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && is_cancelling)
406 ImGui::SetTooltip("%s", _u8L("Operation already cancelling. Please wait a few seconds.").c_str());
407 m_imgui->pop_cancel_button_style();
408 m_imgui->disabled_end(); // state cancelling
409
410 ImGui::PopStyleVar(3);
411 ImGui::PopStyleColor(1);
412
413 m_imgui->end();
414 m_imgui->pop_common_window_style();
415 if (start_process)
416 process();
417}
std::string format(float value, unsigned int decimals) const
Definition GLGizmoBase.cpp:519
void apply_simplify()
Definition GLGizmoSimplify.cpp:554
void create_gui_cfg()
Definition GLGizmoSimplify.cpp:610
void init_model(const indexed_triangle_set &its)
Definition GLGizmoSimplify.cpp:645
Configuration m_configuration
Definition GLGizmoSimplify.hpp:85
virtual std::string on_get_name() const override
Definition GLGizmoSimplify.cpp:163
void process()
Definition GLGizmoSimplify.cpp:459
std::mutex m_state_mutex
Definition GLGizmoSimplify.hpp:115
static const ImVec4 COL_ORCA
Definition ImGuiWrapper.hpp:408
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
#define _L_PLURAL(s, plural, n)
Definition I18N.hpp:96
@ cancelling
Definition GLGizmoSimplify.hpp:104
@ running
Definition GLGizmoSimplify.hpp:103

References _L, _L_PLURAL, _u8L, apply_simplify(), Slic3r::GUI::GLGizmoSimplify::State::cancelling, close(), Slic3r::GUI::ImGuiWrapper::COL_ORCA, create_gui_cfg(), Slic3r::GUI::format(), Slic3r::GUI::GLGizmoBase::format(), Slic3r::GUI::get_model_volume(), Slic3r::ModelVolume::get_object(), Slic3r::ObjectBase::id(), init_model(), m_configuration, m_gui_cfg, Slic3r::GUI::GLGizmoBase::m_imgui, m_move_to_center, Slic3r::GUI::GLGizmoBase::m_parent, m_show_wireframe, m_state, m_state_mutex, m_triangle_count, m_volume, on_get_name(), Slic3r::GUI::plater(), process(), Slic3r::GUI::GLGizmoSimplify::State::running, Slic3r::GUI::DPIAware< P >::ShowModal(), stop_worker_thread_request(), tr_decimate_ratio, tr_detail_level, tr_mesh_name, and tr_triangles.

Here is the call graph for this function:

◆ on_save()

virtual void Slic3r::GUI::GLGizmoBase::on_save ( cereal::BinaryOutputArchive & ar) const
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoMeshBoolean, and Slic3r::GUI::GLGizmoPainterBase.

242{}

Referenced by save().

Here is the caller graph for this function:

◆ on_set_hover_id()

virtual void Slic3r::GUI::GLGizmoBase::on_set_hover_id ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoRotate3D, and Slic3r::GUI::GLGizmoSVG.

245{}

Referenced by set_hover_id().

Here is the caller graph for this function:

◆ on_set_state()

void Slic3r::GUI::GLGizmoSimplify::on_set_state ( )
overrideprotectedvirtual

Reimplemented from Slic3r::GUI::GLGizmoBase.

596{
597 // Closing gizmo. e.g. selecting another one
599 m_parent.toggle_model_objects_visibility(true);
600
602 m_volume = nullptr; // invalidate selected model
603 m_glmodel.reset();
605 // when open by hyperlink it needs to show up
607 }
608}
void request_rerender(bool force=false)
Definition GLGizmoSimplify.cpp:631

References m_glmodel, Slic3r::GUI::GLGizmoBase::m_parent, Slic3r::GUI::GLGizmoBase::m_state, m_volume, Slic3r::GUI::GLGizmoBase::Off, Slic3r::GUI::GLGizmoBase::On, request_rerender(), and stop_worker_thread_request().

Here is the call graph for this function:

◆ on_start_dragging()

virtual void Slic3r::GUI::GLGizmoBase::on_start_dragging ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoRotate, Slic3r::GUI::GLGizmoScale3D, and Slic3r::GUI::GLGizmoSVG.

253{}

Referenced by use_grabbers().

Here is the caller graph for this function:

◆ on_stop_dragging()

virtual void Slic3r::GUI::GLGizmoBase::on_stop_dragging ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoScale3D, and Slic3r::GUI::GLGizmoSVG.

254{}

Referenced by do_stop_dragging(), and Slic3r::GUI::GLGizmoRotate::stop_dragging().

Here is the caller graph for this function:

◆ on_unregister_raycasters_for_picking()

virtual void Slic3r::GUI::GLGizmoBase::on_unregister_raycasters_for_picking ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoFlatten, Slic3r::GUI::GLGizmoMove3D, Slic3r::GUI::GLGizmoRotate3D, Slic3r::GUI::GLGizmoScale3D, and Slic3r::GUI::GLGizmoSVG.

268{}

Referenced by unregister_raycasters_for_picking().

Here is the caller graph for this function:

◆ process()

void Slic3r::GUI::GLGizmoSimplify::process ( )
private
460{
461 if (m_volume == nullptr || m_volume->mesh().its.indices.empty())
462 return;
463
464 bool configs_match = false;
465 bool result_valid = false;
466 bool is_worker_running = false;
467 {
468 std::lock_guard lk(m_state_mutex);
469 configs_match = (m_volume == m_state.mv && m_state.config == m_configuration);
470 result_valid = bool(m_state.result);
471 is_worker_running = m_state.status == State::running;
472 }
473
474 if ((result_valid || is_worker_running) && configs_match) {
475 // Either finished or waiting for result already. Nothing to do.
476 return;
477 }
478
479 if (is_worker_running && ! configs_match) {
480 // Worker is running with outdated config. Stop it. It will
481 // restart itself when cancellation is done.
483 return;
484 }
485
486 if (m_worker.joinable()) {
487 // This can happen when process() is called after previous worker terminated,
488 // but before the worker_finished callback was called. In this case, just join the thread,
489 // the callback will check this and do nothing.
490 m_worker.join();
491 }
492
493 // Copy configuration that will be used.
494 m_state.config = m_configuration;
495 m_state.mv = m_volume;
496 m_state.status = State::running;
497
498 // Create a copy of current mesh to pass to the worker thread.
499 // Using unique_ptr instead of pass-by-value to avoid an extra
500 // copy (which would happen when passing to std::thread).
501 auto its = std::make_unique<indexed_triangle_set>(m_volume->mesh().its);
502
503 m_worker = std::thread([this](std::unique_ptr<indexed_triangle_set> its) {
504
505 // Checks that the UI thread did not request cancellation, throws if so.
506 std::function<void(void)> throw_on_cancel = [this]() {
507 std::lock_guard lk(m_state_mutex);
508 if (m_state.status == State::cancelling)
510 };
511
512 // Called by worker thread, updates progress bar.
513 // Using CallAfter so the rerequest function is run in UI thread.
514 std::function<void(int)> statusfn = [this](int percent) {
515 std::lock_guard lk(m_state_mutex);
516 m_state.progress = percent;
517 call_after_if_active([this]() { request_rerender(); });
518 };
519
520 // Initialize.
521 uint32_t triangle_count = 0;
522 float max_error = std::numeric_limits<float>::max();
523 {
524 std::lock_guard lk(m_state_mutex);
525 if (m_state.config.use_count)
526 triangle_count = m_state.config.wanted_count;
527 if (! m_state.config.use_count)
528 max_error = m_state.config.max_error;
529 m_state.progress = 0;
530 m_state.result.reset();
532 }
533
534 // Start the actual calculation.
535 try {
536 its_quadric_edge_collapse(*its, triangle_count, &max_error, throw_on_cancel, statusfn);
537 } catch (SimplifyCanceledException &) {
538 std::lock_guard lk(m_state_mutex);
539 m_state.status = State::idle;
540 }
541
542 std::lock_guard lk(m_state_mutex);
543 if (m_state.status == State::Status::running) {
544 // We were not cancelled, the result is valid.
546 m_state.result = std::move(its);
547 }
548
549 // Update UI. Use CallAfter so the function is run on UI thread.
550 call_after_if_active([this]() { worker_finished(); });
551 }, std::move(its));
552}
void worker_finished()
Definition GLGizmoSimplify.cpp:436
static void call_after_if_active(std::function< void()> fn, GUI_App *app=&wxGetApp())
Definition GLGizmoSimplify.cpp:44
void its_quadric_edge_collapse(indexed_triangle_set &its, uint32_t triangle_count=0, float *max_error=nullptr, std::function< void(void)> throw_on_cancel=nullptr, std::function< void(int)> statusfn=nullptr)
Simplify mesh by Quadric metric.
Definition QuadricEdgeCollapse.cpp:174
@ idle
Definition GLGizmoSimplify.hpp:102

References Slic3r::GUI::call_after_if_active(), Slic3r::GUI::GLGizmoSimplify::State::cancelling, Slic3r::GUI::GLGizmoSimplify::State::idle, Slic3r::its_quadric_edge_collapse(), m_configuration, m_state, m_state_mutex, m_volume, m_worker, request_rerender(), Slic3r::GUI::GLGizmoSimplify::State::running, stop_worker_thread_request(), and worker_finished().

Referenced by on_render_input_window(), and worker_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_grabbers_for_picking()

void Slic3r::GUI::GLGizmoBase::register_grabbers_for_picking ( )
protectedinherited
399{
400 for (size_t i = 0; i < m_grabbers.size(); ++i) {
401 m_grabbers[i].register_raycasters_for_picking((m_group_id >= 0) ? m_group_id : i);
402 }
403}
int m_group_id
Definition GLGizmoBase.hpp:145

References m_grabbers, and m_group_id.

Referenced by register_raycasters_for_picking().

Here is the caller graph for this function:

◆ register_raycasters_for_picking()

void Slic3r::GUI::GLGizmoBase::register_raycasters_for_picking ( )
inlineinherited
void register_grabbers_for_picking()
Definition GLGizmoBase.cpp:398
virtual void on_register_raycasters_for_picking()
Definition GLGizmoBase.hpp:267

References on_register_raycasters_for_picking(), and register_grabbers_for_picking().

Referenced by Slic3r::GUI::GLGizmosManager::activate_gizmo(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render()

void Slic3r::GUI::GLGizmoBase::render ( )
inlineinherited
214{ on_render(); }
virtual void on_render()=0

References on_render().

Here is the call graph for this function:

◆ render_combo()

bool Slic3r::GUI::GLGizmoBase::render_combo ( const std::string & label,
const std::vector< std::string > & lines,
int & selection_idx,
float label_width,
float item_width )
protectedinherited
227{
229 ImGui::AlignTextToFramePadding();
230 m_imgui->text(label);
231 ImGui::SameLine(label_width);
232 ImGui::PushItemWidth(item_width);
233
234 size_t selection_out = selection_idx;
235
236 const char *selected_str = (selection_idx >= 0 && selection_idx < int(lines.size())) ? lines[selection_idx].c_str() : "";
237 if (ImGui::BBLBeginCombo(("##" + label).c_str(), selected_str, 0)) {
238 for (size_t line_idx = 0; line_idx < lines.size(); ++line_idx) {
239 ImGui::PushID(int(line_idx));
240 if (ImGui::Selectable("", line_idx == selection_idx)) selection_out = line_idx;
241
242 ImGui::SameLine();
243 ImGui::Text("%s", lines[line_idx].c_str());
244 ImGui::PopID();
245 }
246
247 ImGui::EndCombo();
248 }
249
250 bool is_changed = selection_idx != selection_out;
251 selection_idx = selection_out;
252
253 //if (is_changed) update_connector_shape();
255
256 return is_changed;
257}
static void pop_combo_style()
Definition ImGuiWrapper.cpp:2932
static void push_combo_style(const float scale)
Definition ImGuiWrapper.cpp:2907

References m_imgui, m_parent, Slic3r::GUI::ImGuiWrapper::pop_combo_style(), and Slic3r::GUI::ImGuiWrapper::push_combo_style().

Referenced by Slic3r::GUI::GLGizmoAssembly::render_assembly_mode_combo(), and Slic3r::GUI::GLGizmoCut3D::render_connectors_input_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_cross_mark()

void Slic3r::GUI::GLGizmoBase::render_cross_mark ( const Vec3f & target,
bool is_single = false )
protectedinherited
260{
261 const float half_length = 4.0f;
262
263 // ORCA: OpenGL Core Profile
264#if !SLIC3R_OPENGL_ES
265 if (!OpenGLManager::get_gl_info().is_core_profile())
266 glsafe(::glLineWidth(2.0f));
267#endif // !SLIC3R_OPENGL_ES
268
269 auto render_line = [](const Vec3f& p1, const Vec3f& p2, const ColorRGBA& color) {
270 GLModel::Geometry init_data;
272 init_data.color = color;
273 init_data.reserve_vertices(2);
274 init_data.reserve_indices(2);
275
276 // vertices
277 init_data.add_vertex(p1);
278 init_data.add_vertex(p2);
279
280 // indices
281 init_data.add_line(0, 1);
282
283 GLModel model;
284 model.init_from(std::move(init_data));
285 model.render();
286 };
287
288 // draw line for x axis
289 if (!is_single) {
290 render_line(
291 {target(0) - half_length, target(1), target(2)},
292 {target(0) + half_length, target(1), target(2)},
293 ColorRGBA::X()); // ORCA match axis colors
294 }
295 else {
296 render_line(
297 {target(0), target(1), target(2)},
298 {target(0) + half_length, target(1), target(2)},
299 ColorRGBA::X()); // ORCA match axis colors
300 }
301 // draw line for y axis
302 if (!is_single) {
303 render_line(
304 {target(0), target(1) - half_length, target(2)},
305 {target(0), target(1) + half_length, target(2)},
306 ColorRGBA::Y()); // ORCA match axis colors
307 } else {
308 render_line(
309 {target(0), target(1), target(2)},
310 {target(0), target(1) + half_length, target(2)},
311 ColorRGBA::Y()); // ORCA match axis colors
312 }
313 // draw line for z axis
314 if (!is_single) {
315 render_line(
316 {target(0), target(1), target(2) - half_length},
317 {target(0), target(1), target(2) + half_length},
318 ColorRGBA::Z()); // ORCA match axis colors
319 } else {
320 render_line(
321 {target(0), target(1), target(2)},
322 {target(0), target(1), target(2) + half_length},
323 ColorRGBA::Z()); // ORCA match axis colors
324 }
325}
static const ColorRGBA Y()
Definition Color.hpp:146
static const ColorRGBA X()
Definition Color.hpp:145
static const ColorRGBA Z()
Definition Color.hpp:147
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::color, Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::OpenGLManager::get_gl_info(), glLineWidth, glsafe, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::render(), Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::ColorRGBA::X(), Slic3r::ColorRGBA::Y(), and Slic3r::ColorRGBA::Z().

Referenced by Slic3r::GUI::GLGizmoMove3D::on_render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_follows_cursor()

virtual bool Slic3r::GUI::GLGizmoBase::render_follows_cursor ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoMeasure, and Slic3r::GUI::GLGizmoPainterBase.

189{ return false; }

Referenced by Slic3r::GUI::GLCanvas3D::_is_scene_cacheable().

Here is the caller graph for this function:

◆ render_grabbers() [1/3]

void Slic3r::GUI::GLGizmoBase::render_grabbers ( const BoundingBoxf3 & box) const
protectedinherited
413{
414#if ENABLE_FIXED_GRABBER
416#else
417 render_grabbers((float)((box.size().x() + box.size().y() + box.size().z()) / 3.0));
418#endif
419}
void render_grabbers(const BoundingBoxf3 &box) const
Definition GLGizmoBase.cpp:412
static const float FixedGrabberSize
Definition GLGizmoBase.hpp:90

References Slic3r::GUI::GLGizmoBase::Grabber::FixedGrabberSize, render_grabbers(), and Slic3r::BoundingBox3Base< PointType >::size().

Referenced by Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoScale3D::on_render(), Slic3r::GUI::GLGizmoRotate::render_grabber(), render_grabbers(), and render_grabbers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_grabbers() [2/3]

void Slic3r::GUI::GLGizmoBase::render_grabbers ( float size) const
protectedinherited
422{
423 render_grabbers(0, m_grabbers.size() - 1, size, false);
424}

References m_grabbers, and render_grabbers().

Here is the call graph for this function:

◆ render_grabbers() [3/3]

void Slic3r::GUI::GLGizmoBase::render_grabbers ( size_t first,
size_t last,
float size,
bool force_hover ) const
protectedinherited
427{
428 GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
429 if (shader == nullptr)
430 return;
431 shader->start_using();
432 shader->set_uniform("emission_factor", 0.1f);
434 for (size_t i = first; i <= last; ++i) {
435 if (m_grabbers[i].enabled)
436 m_grabbers[i].render(force_hover ? true : m_hover_id == (int)i, size);
437 }
439 shader->stop_using();
440}
#define GL_CULL_FACE
Definition gl.h:500
#define glDisable
Definition gl.h:3607

References GL_CULL_FACE, glDisable, glEnable, glsafe, m_grabbers, m_hover_id, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), and Slic3r::GLShaderProgram::stop_using().

Here is the call graph for this function:

◆ render_input_window()

void Slic3r::GUI::GLGizmoBase::render_input_window ( float x,
float y,
float bottom_limit )
inherited
529{
530 on_render_input_window(x, y, bottom_limit);
532 // imgui windows that don't have an initial size needs to be processed once to get one
533 // and are not rendered in the first frame
534 // so, we forces to render another frame the first time the imgui window is shown
535 // https://github.com/ocornut/imgui/issues/2949
536 m_parent.set_as_dirty();
537 m_parent.request_extra_frame();
539 }
540}
virtual void on_render_input_window(float x, float y, float bottom_limit)
Definition GLGizmoBase.hpp:258
bool m_first_input_window_render
Definition GLGizmoBase.hpp:154

References m_first_input_window_render, m_parent, and on_render_input_window().

Here is the call graph for this function:

◆ request_rerender()

void Slic3r::GUI::GLGizmoSimplify::request_rerender ( bool force = false)
private
631 {
632 int64_t now = m_parent.timestamp_now();
633 if (force || now > m_last_rerender_timestamp + 250) { // 250 ms
634 set_dirty();
635 m_parent.schedule_extra_frame(0);
637 }
638}
void set_dirty()
Definition GLGizmoBase.cpp:524
int64_t m_last_rerender_timestamp
Definition GLGizmoSimplify.hpp:96

References m_last_rerender_timestamp, Slic3r::GUI::GLGizmoBase::m_parent, and Slic3r::GUI::GLGizmoBase::set_dirty().

Referenced by on_set_state(), process(), and worker_finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

void Slic3r::GUI::GLGizmoBase::save ( cereal::BinaryOutputArchive & ar) const
inlineinherited
171{ on_save(ar); }
virtual void on_save(cereal::BinaryOutputArchive &ar) const
Definition GLGizmoBase.hpp:242

References on_save().

Here is the call graph for this function:

◆ set_center_position()

void Slic3r::GUI::GLGizmoSimplify::set_center_position ( )
private
640 {
641 m_move_to_center = true;
642}

References m_move_to_center.

◆ set_common_data_pool()

void Slic3r::GUI::GLGizmoBase::set_common_data_pool ( CommonGizmosDataPool * ptr)
inlineinherited
193{ m_c = ptr; }

References m_c.

◆ set_dirty()

void Slic3r::GUI::GLGizmoBase::set_dirty ( )
protectedinherited
524 {
525 m_dirty = true;
526}
bool m_dirty
Definition GLGizmoBase.hpp:293

References m_dirty.

Referenced by Slic3r::GUI::GLGizmoCut3D::process_cut_line(), and Slic3r::GUI::GLGizmoSimplify::request_rerender().

Here is the caller graph for this function:

◆ set_hover_id()

void Slic3r::GUI::GLGizmoBase::set_hover_id ( int id)
inherited
348{
349 // do not change hover id during dragging
350 assert(!m_dragging);
351
352 // allow empty grabbers when not using grabbers but use hover_id - flatten, rotate
353// if (!m_grabbers.empty() && id >= (int) m_grabbers.size())
354// return;
355
356 m_hover_id = id;
358}
virtual void on_set_hover_id()
Definition GLGizmoBase.hpp:245

References m_dragging, m_hover_id, and on_set_hover_id().

Referenced by Slic3r::GUI::GLGizmoRotate3D::on_set_hover_id().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_icon_filename()

void Slic3r::GUI::GLGizmoBase::set_icon_filename ( const std::string & filename)
inherited
343 {
344 m_icon_filename = filename;
345}

References m_icon_filename.

◆ set_state()

void Slic3r::GUI::GLGizmoBase::set_state ( EState state)
inlineinherited
176{ m_state = state; on_set_state(); }
virtual void on_set_state()
Definition GLGizmoBase.hpp:244

References m_state, and on_set_state().

Referenced by Slic3r::GUI::GLGizmosManager::activate_gizmo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shortcut()

std::optional< Shortcut > Slic3r::GUI::GLGizmoBase::shortcut ( ) const
inlineinherited
178{ return m_shortcut; }

References m_shortcut.

Referenced by Slic3r::GUI::GLGizmoFdmSupports::on_tool_shortcut(), Slic3r::GUI::GLGizmoMmuSegmentation::on_tool_shortcut(), Slic3r::GUI::GLGizmoPainterBase::on_tool_shortcut(), and Slic3r::GUI::GLGizmoSeam::on_tool_shortcut().

Here is the caller graph for this function:

◆ stop_worker_thread_request()

void Slic3r::GUI::GLGizmoSimplify::stop_worker_thread_request ( )
private
427{
428 std::lock_guard lk(m_state_mutex);
429 if (m_state.status == State::running)
431}

References Slic3r::GUI::GLGizmoSimplify::State::cancelling, m_state, m_state_mutex, and Slic3r::GUI::GLGizmoSimplify::State::running.

Referenced by ~GLGizmoSimplify(), on_render_input_window(), on_set_state(), and process().

Here is the caller graph for this function:

◆ unregister_grabbers_for_picking()

void Slic3r::GUI::GLGizmoBase::unregister_grabbers_for_picking ( )
protectedinherited
406{
407 for (size_t i = 0; i < m_grabbers.size(); ++i) {
408 m_grabbers[i].unregister_raycasters_for_picking();
409 }
410}

References m_grabbers.

Referenced by unregister_raycasters_for_picking().

Here is the caller graph for this function:

◆ unregister_raycasters_for_picking()

void Slic3r::GUI::GLGizmoBase::unregister_raycasters_for_picking ( )
inlineinherited
virtual void on_unregister_raycasters_for_picking()
Definition GLGizmoBase.hpp:268
void unregister_grabbers_for_picking()
Definition GLGizmoBase.cpp:405

References on_unregister_raycasters_for_picking(), and unregister_grabbers_for_picking().

Referenced by Slic3r::GUI::GLGizmosManager::activate_gizmo(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_items_state()

bool Slic3r::GUI::GLGizmoBase::update_items_state ( )
inherited
361{
362 bool res = m_dirty;
363 m_dirty = false;
364 return res;
365}

References m_dirty.

◆ update_render_colors()

void Slic3r::GUI::GLGizmoBase::update_render_colors ( )
staticinherited

References AXES_COLOR, Slic3r::RenderColor::colors, FLATTEN_COLOR, FLATTEN_HOVER_COLOR, Slic3r::GUI::ImGuiWrapper::from_ImVec4(), RenderCol_Flatten_Plane, RenderCol_Flatten_Plane_Hover, RenderCol_Grabber_X, RenderCol_Grabber_Y, and RenderCol_Grabber_Z.

Referenced by Slic3r::GUI::GLCanvas3D::_render_style_editor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_grabbers()

bool Slic3r::GUI::GLGizmoBase::use_grabbers ( const wxMouseEvent & mouse_event)
protectedinherited

function which Set up m_dragging and call functions on_start_dragging / on_dragging / on_stop_dragging

Parameters
mouse_eventKeep information about mouse click
Returns
same as on_mouse
444 {
445 bool is_dragging_finished = false;
446 if (mouse_event.Moving()) {
447 // it should not happen but for sure
448 assert(!m_dragging);
449 if (m_dragging) is_dragging_finished = true;
450 else return false;
451 }
452
453 if (mouse_event.LeftDown()) {
454 Selection &selection = m_parent.get_selection();
455 if (!selection.is_empty() && m_hover_id != -1 /* &&
456 (m_grabbers.empty() || m_hover_id < static_cast<int>(m_grabbers.size()))*/) {
457 selection.setup_cache();
458
459 m_dragging = true;
460 for (auto &grabber : m_grabbers) grabber.dragging = false;
461// if (!m_grabbers.empty() && m_hover_id < int(m_grabbers.size()))
462// m_grabbers[m_hover_id].dragging = true;
463
465
466 // Let the plater know that the dragging started
467 m_parent.post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_STARTED));
468 m_parent.set_as_dirty();
469 return true;
470 }
471 } else if (m_dragging) {
472 // when mouse cursor leave window than finish actual dragging operation
473 bool is_leaving = mouse_event.Leaving() && !m_parent.has_mouse_capture(); // ORCA keep tracking mouse position while drag active and cursor not in window bounds
474 if (mouse_event.Dragging()) {
475 Point mouse_coord(mouse_event.GetX(), mouse_event.GetY());
476 auto ray = m_parent.mouse_ray(mouse_coord);
477 UpdateData data(ray, mouse_coord);
478
479 on_dragging(data);
480
481 wxGetApp().obj_manipul()->set_dirty();
482 m_parent.set_as_dirty();
483 return true;
484 }
485 else if (mouse_event.LeftUp() || is_leaving || is_dragging_finished) {
486 do_stop_dragging(is_leaving);
487 return true;
488 }
489 }
490 return false;
491}
virtual void on_dragging(const UpdateData &data)
Definition GLGizmoBase.hpp:255
virtual void on_start_dragging()
Definition GLGizmoBase.hpp:253
void do_stop_dragging(bool perform_mouse_cleanup)
Definition GLGizmoBase.cpp:493
Kernel::Point_3 Point
Definition MeshRepair.cpp:81
Definition GLGizmoBase.hpp:133

References do_stop_dragging(), Slic3r::GUI::Selection::is_empty(), m_dragging, m_grabbers, m_hover_id, m_parent, on_dragging(), on_start_dragging(), Slic3r::GUI::Selection::setup_cache(), and Slic3r::GUI::wxMouseEvent.

Referenced by Slic3r::GUI::GLGizmoBrimEars::on_mouse(), Slic3r::GUI::GLGizmoCut3D::on_mouse(), Slic3r::GUI::GLGizmoMove3D::on_mouse(), Slic3r::GUI::GLGizmoRotate3D::on_mouse(), Slic3r::GUI::GLGizmoRotate::on_mouse(), Slic3r::GUI::GLGizmoScale3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_rotation(), and Slic3r::GUI::GLGizmoSVG::on_mouse_for_rotation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wants_enter_leave_snapshots()

virtual bool Slic3r::GUI::GLGizmoBase::wants_enter_leave_snapshots ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::GUI::GLGizmoAssembly, Slic3r::GUI::GLGizmoBrimEars, Slic3r::GUI::GLGizmoCut3D, Slic3r::GUI::GLGizmoEmboss, Slic3r::GUI::GLGizmoMeasure, Slic3r::GUI::GLGizmoPainterBase, and Slic3r::GUI::GLGizmoSVG.

187{ return false; }

Referenced by Slic3r::GUI::GLGizmosManager::activate_gizmo().

Here is the caller graph for this function:

◆ worker_finished()

void Slic3r::GUI::GLGizmoSimplify::worker_finished ( )
private
437{
438 {
439 std::lock_guard lk(m_state_mutex);
440 if (m_state.status == State::running) {
441 // Someone started the worker again, before this callback
442 // was called. Do nothing.
443 return;
444 }
445 }
446 if (m_worker.joinable())
447 m_worker.join();
449 return;
450 if (m_state.result)
451 init_model(*m_state.result);
452 if (m_state.config != m_configuration || m_state.mv != m_volume) {
453 // Settings were changed, restart the worker immediately.
454 process();
455 }
456 request_rerender(true);
457}

References init_model(), m_configuration, Slic3r::GUI::GLGizmoBase::m_state, m_state, m_state_mutex, m_volume, m_worker, Slic3r::GUI::GLGizmoBase::Off, process(), request_rerender(), and Slic3r::GUI::GLGizmoSimplify::State::running.

Referenced by process().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ AXES_COLOR

◆ AXES_HOVER_COLOR

std::array< ColorRGBA, 3 > Slic3r::GUI::GLGizmoBase::AXES_HOVER_COLOR
staticinherited
Initial value:
= {{
{ColorRGBA::X().r() * 1.2f, ColorRGBA::X().g() * 1.4f, ColorRGBA::X().b() * 1.4f, 1.0f},
{ColorRGBA::Y().r() * 1.2f, ColorRGBA::Y().g() * 1.2f, ColorRGBA::Y().b() * 1.2f, 1.0f},
{ColorRGBA::Z().r() * 1.2f, ColorRGBA::Z().g() * 1.2f, ColorRGBA::Z().b() * 1.2f, 1.0f},
}}
float b() const
Definition Color.hpp:107
float r() const
Definition Color.hpp:105
float g() const
Definition Color.hpp:106

Referenced by Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), and Slic3r::GUI::GLGizmoScale3D::update_grabbers_data().

◆ BASE_ID

const unsigned int Slic3r::GUI::GLGizmoBase::BASE_ID = 255 * 255 * 254
staticinherited

◆ CONSTRAINED_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::CONSTRAINED_COLOR = {0.5f, 0.5f, 0.5f, 1.0f}
staticinherited

◆ count

◆ DEFAULT_BASE_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::DEFAULT_BASE_COLOR = { 0.625f, 0.625f, 0.625f, 1.0f }
staticinherited

◆ DEFAULT_DRAG_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::DEFAULT_DRAG_COLOR = { 1.0f, 1.0f, 1.0f, 1.0f }
staticinherited

◆ DEFAULT_HIGHLIGHT_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::DEFAULT_HIGHLIGHT_COLOR = {1.0f, 0.38f, 0.0f, 1.0f}
staticinherited

◆ FLATTEN_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::FLATTEN_COLOR = {0.96f, 0.93f, 0.93f, 0.5f}
staticinherited

◆ FLATTEN_HOVER_COLOR

ColorRGBA Slic3r::GUI::GLGizmoBase::FLATTEN_HOVER_COLOR = {1.0f, 1.0f, 1.0f, 0.75f}
staticinherited

◆ GRABBER_ELEMENTS_MAX_COUNT

const unsigned int Slic3r::GUI::GLGizmoBase::GRABBER_ELEMENTS_MAX_COUNT = 7
staticinherited

◆ GRABBER_HOVER_COL

ColorRGBA Slic3r::GUI::GLGizmoBase::GRABBER_HOVER_COL = {0.863f, 0.125f, 0.063f, 1.0f}
staticinherited

◆ GRABBER_NORMAL_COL

ColorRGBA Slic3r::GUI::GLGizmoBase::GRABBER_NORMAL_COL = {1.0f, 1.0f, 1.0f, 1.0f}
staticinherited

◆ GRABBER_UNIFORM_COL

ColorRGBA Slic3r::GUI::GLGizmoBase::GRABBER_UNIFORM_COL = {0, 1.0, 1.0, 1.0f}
staticinherited

◆ GRABBER_UNIFORM_HOVER_COL

ColorRGBA Slic3r::GUI::GLGizmoBase::GRABBER_UNIFORM_HOVER_COL = {0, 0.7, 0.7, 1.0f}
staticinherited

◆ INV_ZOOM

◆ last_input_window_width

float Slic3r::GUI::GLGizmoBase::last_input_window_width = 0
protectedinherited

◆ m_c

CommonGizmosDataPool* Slic3r::GUI::GLGizmoBase::m_c { nullptr }
protectedinherited
155{ nullptr };

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::apply_projection_frame(), Slic3r::GUI::GLGizmoTextureDisplacement::bake(), Slic3r::GUI::GLGizmoTextureDisplacement::capture_view_projection(), Slic3r::GUI::GLGizmoCut3D::check_and_update_connectors_state(), Slic3r::GUI::GLGizmoBrimEars::data_changed(), Slic3r::GUI::GLGizmoCut3D::data_changed(), Slic3r::GUI::GLGizmoMmuSegmentation::data_changed(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GUI::GLGizmoCut3D::dragging_connector(), Slic3r::GUI::GLGizmoMeshBoolean::generate_new_volume(), Slic3r::GUI::GLGizmoPainterBase::get_clipping_plane_data(), Slic3r::GUI::GLGizmoPainterBase::get_clipping_plane_in_volume_coordinates(), Slic3r::GUI::GLGizmoBrimEars::get_config_options(), Slic3r::GUI::GLGizmoPainterBase::get_projected_height_range(), Slic3r::GUI::GLGizmoPainterBase::get_projected_mouse_positions(), Slic3r::GUI::GLGizmoFdmSupports::get_selection_support_threshold_angle(), Slic3r::GUI::GLGizmoBrimEars::gizmo_event(), Slic3r::GUI::GLGizmoCut3D::gizmo_event(), Slic3r::GUI::GLGizmoMeshBoolean::gizmo_event(), Slic3r::GUI::GLGizmoPainterBase::gizmo_event(), Slic3r::GUI::GLGizmoCut3D::has_valid_contour(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::GUI::GLGizmoMmuSegmentation::init_model_triangle_selectors(), Slic3r::GUI::GLGizmoFdmSupports::init_print_instance(), Slic3r::GUI::GLGizmoBrimEars::is_mesh_point_clipped(), Slic3r::GUI::GLGizmoPainterBase::is_mesh_point_clipped(), Slic3r::GUI::GLGizmoCut3D::is_outside_of_cut_contour(), Slic3r::GUI::GLGizmoFlatten::is_plane_update_necessary(), Slic3r::GUI::GLGizmoPainterBase::mesh_trafo_matrices(), Slic3r::GUI::GLGizmoFdmSupports::need_regenerate_support_volumes(), Slic3r::GUI::GLGizmoMeshBoolean::on_get_requirements(), Slic3r::GUI::GLGizmoMeshBoolean::on_load(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse_adjust_texture(), Slic3r::GUI::GLGizmoCut3D::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoBrimEars::on_render(), Slic3r::GUI::GLGizmoMeshBoolean::on_render(), Slic3r::GUI::GLGizmoBrimEars::on_render_input_window(), Slic3r::GUI::GLGizmoCut3D::on_render_input_window(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::GLGizmoCut3D::on_set_state(), Slic3r::GUI::GLGizmoFdmSupports::on_set_state(), Slic3r::GUI::GLGizmoMmuSegmentation::on_set_state(), Slic3r::GUI::GLGizmoSeam::on_set_state(), Slic3r::GUI::GLGizmoTextureDisplacement::preview_part(), Slic3r::GUI::GLGizmoCut3D::process_contours(), Slic3r::GUI::GLGizmoCut3D::process_selection_rectangle(), Slic3r::GUI::GLGizmoCut3D::put_connectors_on_cut_plane(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_prepare(), Slic3r::GUI::GLGizmoBrimEars::reload_cache(), Slic3r::GUI::GLGizmoMmuSegmentation::remap_filament_assignments(), Slic3r::GUI::GLGizmoTextureDisplacement::render_adjust_texture_gizmo(), Slic3r::GUI::GLGizmoCut3D::render_clipper_cut(), Slic3r::GUI::GLGizmoCut3D::render_connectors(), Slic3r::GUI::GLGizmoCut3D::render_debug_input_window(), Slic3r::GUI::GLGizmoPainterBase::render_follows_cursor(), Slic3r::GUI::GLGizmoTextureDisplacement::render_island_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painted_colors(), Slic3r::GUI::GLGizmoFdmSupports::render_painter_gizmo(), Slic3r::GUI::GLGizmoFuzzySkin::render_painter_gizmo(), Slic3r::GUI::GLGizmoMmuSegmentation::render_painter_gizmo(), Slic3r::GUI::GLGizmoSeam::render_painter_gizmo(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painter_gizmo(), Slic3r::GUI::GLGizmoBrimEars::render_points(), Slic3r::GUI::GLGizmoTextureDisplacement::render_preview_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_seam_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_shaded_preview_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_subdivide_preview(), Slic3r::GUI::GLGizmoPainterBase::render_triangles(), Slic3r::GUI::GLGizmoTextureDisplacement::render_uvcheck_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_wireframe_overlay(), Slic3r::GUI::GLGizmoCut3D::reset_connectors(), Slic3r::GUI::GLGizmoFdmSupports::run_thread(), Slic3r::GUI::GLGizmoTextureDisplacement::seam_edge_at(), Slic3r::GUI::GLGizmoTextureDisplacement::seam_vertex_at(), Slic3r::GUI::GLGizmoFdmSupports::select_facets_by_angle(), Slic3r::GUI::GLGizmoTextureDisplacement::select_visible_faces(), Slic3r::GUI::GLGizmoTextureDisplacement::select_whole_model(), Slic3r::GUI::GLGizmoBrimEars::set_brim_data(), set_common_data_pool(), Slic3r::GUI::GLGizmoCut3D::set_connectors_editing(), Slic3r::GUI::GLGizmoTextureDisplacement::shaded_preview_ready(), Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), Slic3r::GUI::GLGizmoTextureDisplacement::subdivide_model(), Slic3r::GUI::GLGizmoTextureDisplacement::swap_layer_slots(), Slic3r::GUI::GLGizmoCut3D::switch_to_mode(), Slic3r::GUI::GLGizmoTextureDisplacement::texture_parts(), Slic3r::GUI::GLGizmoTextureDisplacement::texture_volume(), Slic3r::GUI::GLGizmoTextureDisplacement::texture_volume_raycaster_index(), Slic3r::GUI::GLGizmoCut3D::unproject_on_cut_plane(), Slic3r::GUI::GLGizmoBrimEars::unproject_on_mesh(), Slic3r::GUI::GLGizmoBrimEars::unproject_on_mesh2(), Slic3r::GUI::GLGizmoCut3D::update_bb(), Slic3r::GUI::GLGizmoCut3D::update_clipper(), Slic3r::GUI::GLGizmoFdmSupports::update_from_model_object(), Slic3r::GUI::GLGizmoFuzzySkin::update_from_model_object(), Slic3r::GUI::GLGizmoSeam::update_from_model_object(), Slic3r::GUI::GLGizmoTextureDisplacement::update_from_model_object(), Slic3r::GUI::GLGizmoBrimEars::update_model_object(), Slic3r::GUI::GLGizmoFdmSupports::update_model_object(), Slic3r::GUI::GLGizmoFuzzySkin::update_model_object(), Slic3r::GUI::GLGizmoMmuSegmentation::update_model_object(), Slic3r::GUI::GLGizmoSeam::update_model_object(), Slic3r::GUI::GLGizmoTextureDisplacement::update_model_object(), Slic3r::GUI::GLGizmoFlatten::update_planes(), Slic3r::GUI::GLGizmoPainterBase::update_raycast_cache(), and Slic3r::GUI::GLGizmoCut3D::update_raycasters_for_picking_transform().

◆ m_configuration

Configuration Slic3r::GUI::GLGizmoSimplify::m_configuration
private

◆ m_dirty

bool Slic3r::GUI::GLGizmoBase::m_dirty { false }
privateinherited
293{ false };

Referenced by set_dirty(), and update_items_state().

◆ m_dragging

◆ m_first_input_window_render

bool Slic3r::GUI::GLGizmoBase::m_first_input_window_render { true }
protectedinherited
154{ true };

Referenced by render_input_window().

◆ m_glmodel

GLModel Slic3r::GUI::GLGizmoSimplify::m_glmodel
private

◆ m_grabbers

◆ m_group_id

int Slic3r::GUI::GLGizmoBase::m_group_id
protectedinherited

◆ m_gui_cfg

std::optional<GuiCfg> Slic3r::GUI::GLGizmoSimplify::m_gui_cfg
private

◆ m_hover_id

int Slic3r::GUI::GLGizmoBase::m_hover_id { -1 }
protectedinherited
150{ -1 };

Referenced by Slic3r::GUI::GLGizmoScale3D::calc_ratio(), Slic3r::GUI::GLGizmoScale3D::do_scale_along_axis(), Slic3r::GUI::GLGizmoScale3D::do_scale_uniform(), Slic3r::GUI::GLGizmoCut3D::dragging_connector(), Slic3r::GUI::GLGizmoCut3D::dragging_grabber_move(), Slic3r::GUI::GLGizmoCut3D::dragging_grabber_rotation(), get_hover_id(), Slic3r::GUI::GLGizmoCut3D::get_tooltip(), Slic3r::GUI::GLGizmoMove3D::get_tooltip(), Slic3r::GUI::GLGizmoRotate::get_tooltip(), Slic3r::GUI::GLGizmoScale3D::get_tooltip(), Slic3r::GUI::GLGizmoBrimEars::gizmo_event(), Slic3r::GUI::GLGizmoCut3D::gizmo_event(), Slic3r::GUI::GLGizmoCut3D::is_selection_changed(), Slic3r::GUI::GLGizmoBrimEars::on_dragging(), Slic3r::GUI::GLGizmoCut3D::on_dragging(), Slic3r::GUI::GLGizmoMove3D::on_dragging(), Slic3r::GUI::GLGizmoRotate3D::on_dragging(), Slic3r::GUI::GLGizmoScale3D::on_dragging(), Slic3r::GUI::GLGizmoCut3D::on_mouse(), Slic3r::GUI::GLGizmoFlatten::on_mouse(), Slic3r::GUI::GLGizmoMeasure::on_mouse(), Slic3r::GUI::GLGizmoFlatten::on_render(), Slic3r::GUI::GLGizmoMeasure::on_render(), Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), Slic3r::GUI::GLGizmoScale3D::on_render(), Slic3r::GUI::GLGizmoBrimEars::on_set_hover_id(), Slic3r::GUI::GLGizmoEmboss::on_set_hover_id(), Slic3r::GUI::GLGizmoRotate3D::on_set_hover_id(), Slic3r::GUI::GLGizmoSVG::on_set_hover_id(), Slic3r::GUI::GLGizmoMeasure::on_set_state(), Slic3r::GUI::GLGizmoBrimEars::on_start_dragging(), Slic3r::GUI::GLGizmoCut3D::on_start_dragging(), Slic3r::GUI::GLGizmoMove3D::on_start_dragging(), Slic3r::GUI::GLGizmoRotate3D::on_start_dragging(), Slic3r::GUI::GLGizmoScale3D::on_start_dragging(), Slic3r::GUI::GLGizmoBrimEars::on_stop_dragging(), Slic3r::GUI::GLGizmoCut3D::on_stop_dragging(), Slic3r::GUI::GLGizmoRotate3D::on_stop_dragging(), Slic3r::GUI::GLGizmoCut3D::render_connectors(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_grabbers(), Slic3r::GUI::GLGizmoCut3D::render_flip_plane_button(), render_grabbers(), Slic3r::GUI::GLGizmoBrimEars::render_points(), set_hover_id(), Slic3r::GUI::GLGizmoMeasure::show_selection_ui(), Slic3r::GUI::GLGizmoScale3D::update_grabbers_data(), and use_grabbers().

◆ m_icon_filename

std::string Slic3r::GUI::GLGizmoBase::m_icon_filename
protectedinherited

◆ m_imgui

ImGuiWrapper* Slic3r::GUI::GLGizmoBase::m_imgui
protectedinherited

Referenced by GLGizmoBase(), Slic3r::GUI::GLGizmoEmboss::GLGizmoEmboss(), Slic3r::GUI::GLGizmoCut3D::add_horizontal_scaled_interval(), Slic3r::GUI::GLGizmoCut3D::add_vertical_scaled_interval(), Slic3r::GUI::GLGizmoSimplify::create_gui_cfg(), Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoEmboss::draw_bold_button(), Slic3r::GUI::GLGizmoEmboss::draw_delete_style_button(), Slic3r::GUI::GLGizmoSVG::draw_depth(), Slic3r::GUI::GLGizmoSVG::draw_distance(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::GUI::GLGizmoEmboss::draw_font_list(), Slic3r::GUI::GLGizmoEmboss::draw_font_list_line(), Slic3r::GUI::GLGizmoEmboss::draw_italic_button(), Slic3r::GUI::GLGizmoSVG::draw_mirroring(), Slic3r::GUI::GLGizmoEmboss::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_rotation(), Slic3r::GUI::GLGizmoSVG::draw_size(), Slic3r::GUI::GLGizmoEmboss::draw_style_add_button(), Slic3r::GUI::GLGizmoEmboss::draw_style_list(), Slic3r::GUI::GLGizmoEmboss::draw_style_rename_button(), Slic3r::GUI::GLGizmoEmboss::draw_style_rename_popup(), Slic3r::GUI::GLGizmoEmboss::draw_style_save_as_popup(), Slic3r::GUI::GLGizmoEmboss::draw_style_save_button(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), Slic3r::GUI::GLGizmoSVG::draw_use_surface(), Slic3r::GUI::GLGizmoEmboss::draw_window(), GizmoImguiBegin(), GizmoImguiEnd(), GizmoImguiSetNextWIndowPos(), Slic3r::GUI::GLGizmoCut3D::init_input_window_data(), Slic3r::GUI::GLGizmoMeasure::on_mouse(), Slic3r::GUI::GLGizmoAssembly::on_render_input_window(), Slic3r::GUI::GLGizmoBrimEars::on_render_input_window(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMeasure::on_render_input_window(), Slic3r::GUI::GLGizmoMeshBoolean::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoMove3D::on_render_input_window(), Slic3r::GUI::GLGizmoRotate3D::on_render_input_window(), Slic3r::GUI::GLGizmoScale3D::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::GLGizmoSVG::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::panel_tooltip(), Slic3r::GUI::GLGizmoCut3D::render_angle_input(), Slic3r::GUI::GLGizmoCut3D::render_build_size(), Slic3r::GUI::GLGizmoCut3D::render_color_marker(), render_combo(), Slic3r::GUI::GLGizmoCut3D::render_connectors_input_window(), Slic3r::GUI::GLGizmoCut3D::render_cut_mode_combo(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_input_window(), Slic3r::GUI::GLGizmoCut3D::render_debug_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::render_debug_stage_panel(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::GLGizmoCut3D::render_double_input(), Slic3r::GUI::GLGizmoMmuSegmentation::render_filament_remap_ui(), Slic3r::GUI::GLGizmoCut3D::render_flip_plane_button(), Slic3r::GUI::GLGizmoCut3D::render_groove_float_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_int_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_two_float_input(), Slic3r::GUI::GLGizmoTextureDisplacement::render_image_adjust_window(), Slic3r::GUI::GLGizmoAssembly::render_input_window_warning(), Slic3r::GUI::GLGizmoCut3D::render_input_window_warning(), Slic3r::GUI::GLGizmoCut3D::render_move_center_input(), Slic3r::GUI::GLGizmoCut3D::render_reset_button(), Slic3r::GUI::GLGizmoCut3D::render_slider_input(), Slic3r::GUI::GLGizmoCut3D::render_slider_two_input(), Slic3r::GUI::GLGizmoCut3D::render_snap_specific_input(), Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), Slic3r::GUI::GLGizmoTextureDisplacement::render_tip_media(), Slic3r::GUI::GLGizmoCut3D::render_tooltip_button(), Slic3r::GUI::GLGizmoFdmSupports::render_tooltip_button(), Slic3r::GUI::GLGizmoFuzzySkin::render_tooltip_button(), Slic3r::GUI::GLGizmoMmuSegmentation::render_tooltip_button(), Slic3r::GUI::GLGizmoPainterBase::render_triangles(), Slic3r::GUI::GLGizmoEmboss::rev_checkbox(), Slic3r::GUI::GLGizmoEmboss::rev_input(), Slic3r::GUI::GLGizmoEmboss::rev_slider(), Slic3r::GUI::GLGizmoEmboss::rev_slider(), Slic3r::GUI::GLGizmoEmboss::rev_slider(), Slic3r::GUI::GLGizmoEmboss::revertible(), Slic3r::GUI::GLGizmoMeasure::show_distance_xyz_ui(), Slic3r::GUI::GLGizmoMeasure::show_face_face_assembly_common(), Slic3r::GUI::GLGizmoMeasure::show_face_face_assembly_senior(), and Slic3r::GUI::GLGizmoMeasure::show_selection_ui().

◆ m_is_dark_mode

◆ m_last_rerender_timestamp

int64_t Slic3r::GUI::GLGizmoSimplify::m_last_rerender_timestamp = std::numeric_limits<int64_t>::min()
private

Referenced by request_rerender().

◆ m_move_to_center

bool Slic3r::GUI::GLGizmoSimplify::m_move_to_center
private

◆ m_parent

GLCanvas3D& Slic3r::GUI::GLGizmoBase::m_parent
protectedinherited

Referenced by GLGizmoBase(), Slic3r::GUI::GLGizmoCut3D::add_connector(), Slic3r::GUI::GLGizmoTextureDisplacement::add_texture_layer(), Slic3r::GUI::GLGizmoCut3D::apply_color_clip_plane_colors(), Slic3r::GUI::GLGizmoTextureDisplacement::apply_projection_frame(), Slic3r::GUI::GLGizmoSimplify::apply_simplify(), Slic3r::GUI::GLGizmoTextureDisplacement::apply_view_mode(), Slic3r::GUI::GLGizmoBrimEars::auto_generate(), Slic3r::GUI::GLGizmoTextureDisplacement::bake(), Slic3r::GUI::GLGizmoCut3D::bounding_box(), Slic3r::GUI::GLGizmoPainterBase::bounding_box(), Slic3r::GUI::GLGizmoEmboss::calculate_scale(), Slic3r::GUI::GLGizmoSVG::calculate_scale(), Slic3r::GUI::GLGizmoTextureDisplacement::capture_view_projection(), Slic3r::GUI::GLGizmoMove3D::change_cs_by_selection(), Slic3r::GUI::GLGizmoScale3D::change_cs_by_selection(), Slic3r::GUI::GLGizmoEmboss::close(), Slic3r::GUI::GLGizmoSimplify::close(), Slic3r::GUI::GLGizmoSVG::close(), Slic3r::GUI::GLGizmoTextureDisplacement::close_image_adjust(), Slic3r::GUI::GLGizmoEmboss::create_volume(), Slic3r::GUI::GLGizmoEmboss::create_volume(), Slic3r::GUI::GLGizmoSVG::create_volume(), Slic3r::GUI::GLGizmoSVG::create_volume(), Slic3r::GUI::GLGizmoSVG::create_volume(), Slic3r::GUI::GLGizmoSVG::create_volume(), Slic3r::GUI::GLGizmoFlatten::data_changed(), Slic3r::GUI::GLGizmoMeasure::data_changed(), Slic3r::GUI::GLGizmoMove3D::data_changed(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GUI::GLGizmoRotate3D::data_changed(), Slic3r::GUI::GLGizmoScale3D::data_changed(), Slic3r::GUI::GLGizmoCut3D::delete_selected_connectors(), Slic3r::GUI::GLGizmoEmboss::do_mirror(), do_stop_dragging(), Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoSVG::draw_distance(), Slic3r::GUI::GLGizmoSVG::draw_face_the_camera(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::GUI::GLGizmoSVG::draw_mirroring(), Slic3r::GUI::GLGizmoEmboss::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_rotation(), Slic3r::GUI::GLGizmoSVG::draw_size(), Slic3r::GUI::GLGizmoEmboss::draw_style_list(), Slic3r::GUI::GLGizmoEmboss::draw_window(), Slic3r::GUI::GLGizmoTextureDisplacement::ease_wheel_scroll(), Slic3r::GUI::GLGizmoBrimEars::find_single(), Slic3r::GUI::GLGizmoBrimEars::first_layer_slicer(), Slic3r::GUI::GLGizmoMeshBoolean::generate_new_volume(), Slic3r::GUI::GLGizmoPainterBase::get_projected_height_range(), Slic3r::GUI::GLGizmoMove3D::get_tooltip(), Slic3r::GUI::GLGizmoScale3D::get_tooltip(), Slic3r::GUI::GLGizmoBrimEars::gizmo_event(), Slic3r::GUI::GLGizmoMeasure::gizmo_event(), Slic3r::GUI::GLGizmoMeshBoolean::gizmo_event(), Slic3r::GUI::GLGizmoPainterBase::gizmo_event(), GizmoImguiSetNextWIndowPos(), Slic3r::GUI::GLGizmoCut3D::has_valid_groove(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::GUI::GLGizmoMeasure::init_plane_glmodel(), Slic3r::GUI::GLGizmoFdmSupports::init_print_instance(), Slic3r::GUI::GLGizmoPainterBase::mesh_trafo_matrices(), Slic3r::GUI::GLGizmoTextureDisplacement::move_texture_layer(), Slic3r::GUI::GLGizmoMove3D::on_dragging(), Slic3r::GUI::GLGizmoAssembly::on_is_activable(), Slic3r::GUI::GLGizmoBrimEars::on_is_activable(), Slic3r::GUI::GLGizmoCut3D::on_is_activable(), Slic3r::GUI::GLGizmoFlatten::on_is_activable(), Slic3r::GUI::GLGizmoMeasure::on_is_activable(), Slic3r::GUI::GLGizmoMeshBoolean::on_is_activable(), Slic3r::GUI::GLGizmoMmuSegmentation::on_is_activable(), Slic3r::GUI::GLGizmoMove3D::on_is_activable(), Slic3r::GUI::GLGizmoPainterBase::on_is_activable(), Slic3r::GUI::GLGizmoRotate3D::on_is_activable(), Slic3r::GUI::GLGizmoScale3D::on_is_activable(), Slic3r::GUI::GLGizmoSimplify::on_is_activable(), Slic3r::GUI::GLGizmoTextureDisplacement::on_is_activable(), Slic3r::GUI::GLGizmoTextureDisplacement::on_island_edited(), Slic3r::GUI::GLGizmoCut3D::on_load(), Slic3r::GUI::GLGizmoBrimEars::on_mouse(), Slic3r::GUI::GLGizmoCut3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse(), Slic3r::GUI::GLGizmoFlatten::on_mouse(), Slic3r::GUI::GLGizmoMeasure::on_mouse(), Slic3r::GUI::GLGizmoPainterBase::on_mouse(), Slic3r::GUI::GLGizmoRotate3D::on_mouse(), Slic3r::GUI::GLGizmoScale3D::on_mouse(), Slic3r::GUI::GLGizmoSVG::on_mouse(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse_adjust_texture(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_rotation(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_rotation(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse_seam(), Slic3r::GUI::GLGizmoFdmSupports::on_opening(), Slic3r::GUI::GLGizmoCut3D::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoFlatten::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoMove3D::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoRotate3D::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoScale3D::on_register_raycasters_for_picking(), Slic3r::GUI::GLGizmoBrimEars::on_render(), Slic3r::GUI::GLGizmoCut3D::on_render(), Slic3r::GUI::GLGizmoEmboss::on_render(), Slic3r::GUI::GLGizmoFlatten::on_render(), Slic3r::GUI::GLGizmoMeasure::on_render(), Slic3r::GUI::GLGizmoMeshBoolean::on_render(), Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), Slic3r::GUI::GLGizmoSimplify::on_render(), Slic3r::GUI::GLGizmoSVG::on_render(), Slic3r::GUI::GLGizmoAssembly::on_render_input_window(), Slic3r::GUI::GLGizmoBrimEars::on_render_input_window(), Slic3r::GUI::GLGizmoCut3D::on_render_input_window(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMeasure::on_render_input_window(), Slic3r::GUI::GLGizmoMeshBoolean::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::GLGizmoSVG::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::GLGizmoCut3D::on_set_state(), Slic3r::GUI::GLGizmoEmboss::on_set_state(), Slic3r::GUI::GLGizmoMeasure::on_set_state(), Slic3r::GUI::GLGizmoMmuSegmentation::on_set_state(), Slic3r::GUI::GLGizmoPainterBase::on_set_state(), Slic3r::GUI::GLGizmoSimplify::on_set_state(), Slic3r::GUI::GLGizmoSVG::on_set_state(), Slic3r::GUI::GLGizmoEmboss::on_shortcut_key(), Slic3r::GUI::GLGizmoFdmSupports::on_shutdown(), Slic3r::GUI::GLGizmoFuzzySkin::on_shutdown(), Slic3r::GUI::GLGizmoMmuSegmentation::on_shutdown(), Slic3r::GUI::GLGizmoSeam::on_shutdown(), Slic3r::GUI::GLGizmoTextureDisplacement::on_shutdown(), Slic3r::GUI::GLGizmoMove3D::on_start_dragging(), Slic3r::GUI::GLGizmoRotate::on_start_dragging(), Slic3r::GUI::GLGizmoEmboss::on_stop_dragging(), Slic3r::GUI::GLGizmoMove3D::on_stop_dragging(), Slic3r::GUI::GLGizmoRotate3D::on_stop_dragging(), Slic3r::GUI::GLGizmoScale3D::on_stop_dragging(), Slic3r::GUI::GLGizmoSVG::on_stop_dragging(), Slic3r::GUI::GLGizmoBrimEars::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoCut3D::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoFlatten::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoMove3D::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoRotate3D::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoScale3D::on_unregister_raycasters_for_picking(), Slic3r::GUI::GLGizmoTextureDisplacement::on_uv_command(), Slic3r::GUI::GLGizmoTextureDisplacement::panel_tooltip(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::GLGizmoEmboss::process(), Slic3r::GUI::GLGizmoSVG::process(), Slic3r::GUI::GLGizmoCut3D::process_contours(), Slic3r::GUI::GLGizmoCut3D::process_cut_line(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_prepare(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_preview_job(), Slic3r::GUI::GLGizmoBrimEars::register_single_mesh_pick(), Slic3r::GUI::GLGizmoMeasure::register_single_mesh_pick(), Slic3r::GUI::GLGizmoEmboss::reinit_text_lines(), Slic3r::GUI::GLGizmoMmuSegmentation::remap_filament_assignments(), Slic3r::GUI::GLGizmoTextureDisplacement::remove_texture_layer(), Slic3r::GUI::GLGizmoTextureDisplacement::render_adjust_texture_gizmo(), Slic3r::GUI::GLGizmoMove3D::render_align_preview(), Slic3r::GUI::GLGizmoAssembly::render_assembly_mode_combo(), render_combo(), Slic3r::GUI::GLGizmoCut3D::render_connectors_input_window(), Slic3r::GUI::GLGizmoPainterBase::render_cursor(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_height_range(), Slic3r::GUI::GLGizmoCut3D::render_cut_mode_combo(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_input_window(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::GLGizmoMeasure::render_follows_cursor(), Slic3r::GUI::GLGizmoPainterBase::render_follows_cursor(), Slic3r::GUI::GLGizmoTextureDisplacement::render_image_adjust_window(), render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::render_island_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painted_colors(), Slic3r::GUI::GLGizmoFdmSupports::render_painter_gizmo(), Slic3r::GUI::GLGizmoFuzzySkin::render_painter_gizmo(), Slic3r::GUI::GLGizmoMmuSegmentation::render_painter_gizmo(), Slic3r::GUI::GLGizmoSeam::render_painter_gizmo(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painter_gizmo(), Slic3r::GUI::GLGizmoTextureDisplacement::render_preview_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_seam_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_shaded_preview_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_subdivide_preview(), Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), Slic3r::GUI::GLGizmoTextureDisplacement::render_tip_media(), Slic3r::GUI::GLGizmoCut3D::render_tooltip_button(), Slic3r::GUI::GLGizmoFdmSupports::render_tooltip_button(), Slic3r::GUI::GLGizmoFuzzySkin::render_tooltip_button(), Slic3r::GUI::GLGizmoMmuSegmentation::render_tooltip_button(), Slic3r::GUI::GLGizmoPainterBase::render_triangles(), Slic3r::GUI::GLGizmoTextureDisplacement::render_uvcheck_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::render_wireframe_overlay(), Slic3r::GUI::GLGizmoSimplify::request_rerender(), Slic3r::GUI::GLGizmoCut3D::reset_cut_plane(), Slic3r::GUI::GLGizmoEmboss::reset_to_default_style(), Slic3r::GUI::GLGizmoTextureDisplacement::run_stage_debug(), Slic3r::GUI::GLGizmoFdmSupports::run_thread(), Slic3r::GUI::GLGizmoTextureDisplacement::run_uv_command(), Slic3r::GUI::GLGizmoTextureDisplacement::seam_edge_at(), Slic3r::GUI::GLGizmoTextureDisplacement::seam_vertex_at(), Slic3r::GUI::GLGizmoFdmSupports::select_facets_by_angle(), Slic3r::GUI::GLGizmoTextureDisplacement::select_visible_faces(), Slic3r::GUI::GLGizmoTextureDisplacement::select_whole_model(), Slic3r::GUI::GLGizmoCut3D::set_connectors_editing(), Slic3r::GUI::GLGizmoMeasure::set_distance(), Slic3r::GUI::GLGizmoTextureDisplacement::set_layer_texture(), Slic3r::GUI::GLGizmoMeasure::set_parallel_distance(), Slic3r::GUI::GLGizmoMeasure::set_to_around_center_of_faces(), Slic3r::GUI::GLGizmoMeasure::set_to_parallel(), Slic3r::GUI::GLGizmoMeasure::set_to_reverse_rotation(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), Slic3r::GUI::GLGizmoCut3D::set_volumes_picking_state(), Slic3r::GUI::GLGizmoTextureDisplacement::show_debug_stage(), Slic3r::GUI::GLGizmoTextureDisplacement::show_projector(), Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), Slic3r::GUI::GLGizmoTextureDisplacement::subdivide_model(), Slic3r::GUI::GLGizmoCut3D::toggle_model_objects_visibility(), Slic3r::GUI::GLGizmoCut3D::transformed_bounding_box(), Slic3r::GUI::GLGizmoBrimEars::unproject_on_mesh(), Slic3r::GUI::GLGizmoCut3D::update_bb(), Slic3r::GUI::GLGizmoBrimEars::update_cache_radius(), Slic3r::GUI::GLGizmoCut3D::update_clipper(), Slic3r::GUI::GLGizmoPainterBase::update_contours(), Slic3r::GUI::GLGizmoScale3D::update_grabbers_data(), Slic3r::GUI::GLGizmoTextureDisplacement::update_image_adjust_preview(), Slic3r::GUI::GLGizmoBrimEars::update_model_object(), Slic3r::GUI::GLGizmoFdmSupports::update_model_object(), Slic3r::GUI::GLGizmoFuzzySkin::update_model_object(), Slic3r::GUI::GLGizmoMmuSegmentation::update_model_object(), Slic3r::GUI::GLGizmoSeam::update_model_object(), Slic3r::GUI::GLGizmoTextureDisplacement::update_model_object(), Slic3r::GUI::GLGizmoPainterBase::update_raycast_cache(), Slic3r::GUI::GLGizmoBrimEars::update_raycasters(), use_grabbers(), Slic3r::GUI::GLGizmoEmboss::volume_transformation_changed(), Slic3r::GUI::GLGizmoSVG::volume_transformation_changed(), and Slic3r::GUI::GLGizmoEmboss::volume_transformation_changing().

◆ m_shortcut

◆ m_show_wireframe

bool Slic3r::GUI::GLGizmoSimplify::m_show_wireframe
private

◆ m_sprite_id

unsigned int Slic3r::GUI::GLGizmoBase::m_sprite_id
protectedinherited

Referenced by GLGizmoBase(), and get_sprite_id().

◆ m_state

State Slic3r::GUI::GLGizmoSimplify::m_state
private

◆ m_state_mutex

std::mutex Slic3r::GUI::GLGizmoSimplify::m_state_mutex
private

◆ m_triangle_count

size_t Slic3r::GUI::GLGizmoSimplify::m_triangle_count
private

◆ m_volume

const ModelVolume* Slic3r::GUI::GLGizmoSimplify::m_volume
private

◆ m_worker

std::thread Slic3r::GUI::GLGizmoSimplify::m_worker
private

◆ tr_decimate_ratio

const std::string Slic3r::GUI::GLGizmoSimplify::tr_decimate_ratio
private

◆ tr_detail_level

const std::string Slic3r::GUI::GLGizmoSimplify::tr_detail_level
private

◆ tr_mesh_name

const std::string Slic3r::GUI::GLGizmoSimplify::tr_mesh_name
private

◆ tr_triangles

const std::string Slic3r::GUI::GLGizmoSimplify::tr_triangles
private

The documentation for this class was generated from the following files: