2018-10-04 14:43:10 +00:00
|
|
|
#ifndef slic3r_GUI_ObjectManipulation_hpp_
|
|
|
|
#define slic3r_GUI_ObjectManipulation_hpp_
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2018-11-09 17:39:07 +00:00
|
|
|
#include "GUI_ObjectSettings.hpp"
|
2018-10-08 12:02:12 +00:00
|
|
|
#include "GLCanvas3D.hpp"
|
2018-10-04 14:43:10 +00:00
|
|
|
|
2018-11-23 10:54:06 +00:00
|
|
|
class wxStaticText;
|
2018-10-04 14:43:10 +00:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
|
|
|
class ObjectManipulation : public OG_Settings
|
|
|
|
{
|
2018-11-14 15:24:36 +00:00
|
|
|
Vec3d cache_position { 0., 0., 0. };
|
2018-12-18 09:10:14 +00:00
|
|
|
Vec3d cache_rotation { 0., 0., 0. };
|
|
|
|
Vec3d cache_scale { 100., 100., 100. };
|
|
|
|
Vec3d cache_size { 0., 0., 0. };
|
|
|
|
|
2018-11-22 14:12:09 +00:00
|
|
|
wxStaticText* m_move_Label = nullptr;
|
2018-11-14 15:24:36 +00:00
|
|
|
|
2018-10-04 14:43:10 +00:00
|
|
|
public:
|
|
|
|
ObjectManipulation(wxWindow* parent);
|
|
|
|
~ObjectManipulation() {}
|
|
|
|
|
2018-11-09 17:39:07 +00:00
|
|
|
void Show(const bool show) override;
|
|
|
|
bool IsShown() override;
|
|
|
|
void UpdateAndShow(const bool show) override;
|
|
|
|
|
2018-10-04 14:43:10 +00:00
|
|
|
int ol_selection();
|
|
|
|
|
2018-10-08 12:02:12 +00:00
|
|
|
void update_settings_value(const GLCanvas3D::Selection& selection);
|
|
|
|
void reset_settings_value();
|
2018-10-09 13:56:34 +00:00
|
|
|
void reset_position_value();
|
|
|
|
void reset_rotation_value();
|
|
|
|
void reset_scale_value();
|
2018-12-18 09:10:14 +00:00
|
|
|
void reset_size_value();
|
2018-10-08 12:02:12 +00:00
|
|
|
|
2018-10-04 14:43:10 +00:00
|
|
|
// update position values displacements or "gizmos"
|
2018-10-09 13:56:34 +00:00
|
|
|
void update_position_value(const Vec3d& position);
|
2018-10-04 14:43:10 +00:00
|
|
|
// update scale values after scale unit changing or "gizmos"
|
2018-10-12 13:43:29 +00:00
|
|
|
void update_scale_value(const Vec3d& scaling_factor);
|
2018-12-18 09:10:14 +00:00
|
|
|
// update size values after scale unit changing or "gizmos"
|
|
|
|
void update_size_value(const Vec3d& size);
|
2018-10-04 14:43:10 +00:00
|
|
|
// update rotation value after "gizmos"
|
|
|
|
void update_rotation_value(const Vec3d& rotation);
|
|
|
|
|
2018-11-14 15:24:36 +00:00
|
|
|
// change values
|
|
|
|
void change_position_value(const Vec3d& position);
|
2018-11-15 10:15:24 +00:00
|
|
|
void change_rotation_value(const Vec3d& rotation);
|
|
|
|
void change_scale_value(const Vec3d& scale);
|
2018-12-18 09:10:14 +00:00
|
|
|
void change_size_value(const Vec3d& size);
|
2018-10-04 14:43:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif // slic3r_GUI_ObjectManipulation_hpp_
|