Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/slic3r/GUI/GLCanvas3D.hpp')
-rw-r--r--xs/src/slic3r/GUI/GLCanvas3D.hpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp
index b0706a05d..cc998226b 100644
--- a/xs/src/slic3r/GUI/GLCanvas3D.hpp
+++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp
@@ -225,6 +225,7 @@ public:
void stop_using() const;
void set_uniform(const std::string& name, float value) const;
+ void set_uniform(const std::string& name, const float* matrix) const;
const GLShader* get_shader() const;
@@ -302,7 +303,10 @@ public:
Point start_position_2D;
Pointf3 start_position_3D;
Vectorf3 volume_center_offset;
- int volume_idx;
+
+ bool move_with_shift;
+ int move_volume_idx;
+ int gizmo_volume_idx;
public:
Drag();
@@ -323,6 +327,7 @@ public:
class Gizmos
{
+ static const float OverlayTexturesScale;
static const float OverlayOffsetX;
static const float OverlayGapY;
@@ -360,14 +365,21 @@ public:
bool overlay_contains_mouse(const GLCanvas3D& canvas, const Pointf& mouse_pos) const;
bool grabber_contains_mouse() const;
void update(const Pointf& mouse_pos);
- void update_data(float scale);
+ void refresh();
+
+ EType get_current_type() const;
bool is_running() const;
+
bool is_dragging() const;
void start_dragging();
void stop_dragging();
float get_scale() const;
+ void set_scale(float scale);
+
+ float get_angle_z() const;
+ void set_angle_z(float angle_z);
void render(const GLCanvas3D& canvas, const BoundingBoxf3& box) const;
void render_current_gizmo_for_picking_pass(const BoundingBoxf3& box) const;
@@ -439,6 +451,8 @@ private:
PerlCallback m_on_wipe_tower_moved_callback;
PerlCallback m_on_enable_action_buttons_callback;
PerlCallback m_on_gizmo_scale_uniformly_callback;
+ PerlCallback m_on_gizmo_rotate_callback;
+ PerlCallback m_on_update_geometry_info_callback;
public:
GLCanvas3D(wxGLCanvas* canvas);
@@ -507,6 +521,7 @@ public:
void set_viewport_from_scene(const GLCanvas3D& other);
void update_volumes_colors_by_extruder();
+ void update_gizmos_data();
void render();
@@ -545,6 +560,8 @@ public:
void register_on_wipe_tower_moved_callback(void* callback);
void register_on_enable_action_buttons_callback(void* callback);
void register_on_gizmo_scale_uniformly_callback(void* callback);
+ void register_on_gizmo_rotate_callback(void* callback);
+ void register_on_update_geometry_info_callback(void* callback);
void bind_event_handlers();
void unbind_event_handlers();
@@ -605,6 +622,7 @@ private:
void _stop_timer();
int _get_first_selected_object_id() const;
+ int _get_first_selected_volume_id() const;
// generates gcode extrusion paths geometry
void _load_gcode_extrusion_paths(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
@@ -625,8 +643,6 @@ private:
void _on_move(const std::vector<int>& volume_idxs);
void _on_select(int volume_idx);
- void _update_gizmos_data();
-
static std::vector<float> _parse_colors(const std::vector<std::string>& colors);
};