Files
OrcaSlicer-bambulab/src/slic3r/GUI/GUI_ObjectManipulation.hpp
T

56 lines
1.6 KiB
C++
Raw Normal View History

2018-10-04 16:43:10 +02:00
#ifndef slic3r_GUI_ObjectManipulation_hpp_
#define slic3r_GUI_ObjectManipulation_hpp_
#include <memory>
2018-11-09 18:39:07 +01:00
#include "GUI_ObjectSettings.hpp"
#include "GLCanvas3D.hpp"
2018-10-04 16:43:10 +02:00
namespace Slic3r {
namespace GUI {
class ObjectManipulation : public OG_Settings
{
bool m_is_percent_scale = false; // true -> percentage scale unit
// false -> uniform scale unit
2018-10-05 23:29:15 +02:00
bool m_is_uniform_scale = false; // It indicates if scale is uniform
2018-10-04 16:43:10 +02:00
public:
ObjectManipulation(wxWindow* parent);
~ObjectManipulation() {}
2018-11-09 18:39:07 +01:00
void Show(const bool show) override;
bool IsShown() override;
void UpdateAndShow(const bool show) override;
2018-10-04 16:43:10 +02:00
int ol_selection();
void update_settings_value(const GLCanvas3D::Selection& selection);
void reset_settings_value();
2018-10-09 15:56:34 +02:00
void reset_position_value();
void reset_rotation_value();
void reset_scale_value();
2018-10-04 16:43:10 +02:00
void update_values();
// update position values displacements or "gizmos"
void update_position_values();
2018-10-09 15:56:34 +02:00
void update_position_value(const Vec3d& position);
2018-10-04 16:43:10 +02:00
// update scale values after scale unit changing or "gizmos"
void update_scale_values();
2018-10-12 15:43:29 +02:00
void update_scale_value(const Vec3d& scaling_factor);
2018-10-04 16:43:10 +02:00
// update rotation values object selection changing
void update_rotation_values();
// update rotation value after "gizmos"
void update_rotation_value(double angle, Axis axis);
void update_rotation_value(const Vec3d& rotation);
2018-10-05 23:29:15 +02:00
void set_uniform_scaling(const bool uniform_scale) { m_is_uniform_scale = uniform_scale; }
2018-10-04 16:43:10 +02:00
};
}}
#endif // slic3r_GUI_ObjectManipulation_hpp_