Removed a bunch of obsolete methods

This commit is contained in:
Enrico Turri 2018-11-14 15:57:11 +01:00
parent 234eaa4b6c
commit 72b5da952d
6 changed files with 0 additions and 194 deletions

View file

@ -1885,16 +1885,6 @@ int _3DScene::check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrint
return s_canvas_mgr.check_volumes_outside_state(canvas, config);
}
bool _3DScene::move_volume_up(wxGLCanvas* canvas, unsigned int id)
{
return s_canvas_mgr.move_volume_up(canvas, id);
}
bool _3DScene::move_volume_down(wxGLCanvas* canvas, unsigned int id)
{
return s_canvas_mgr.move_volume_down(canvas, id);
}
GUI::GLCanvas3D* _3DScene::get_canvas(wxGLCanvas* canvas)
{
return s_canvas_mgr.get_canvas(canvas);
@ -1925,21 +1915,6 @@ void _3DScene::set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape)
s_canvas_mgr.set_bed_shape(canvas, shape);
}
void _3DScene::set_auto_bed_shape(wxGLCanvas* canvas)
{
s_canvas_mgr.set_auto_bed_shape(canvas);
}
BoundingBoxf3 _3DScene::get_volumes_bounding_box(wxGLCanvas* canvas)
{
return s_canvas_mgr.get_volumes_bounding_box(canvas);
}
void _3DScene::set_axes_length(wxGLCanvas* canvas, float length)
{
s_canvas_mgr.set_axes_length(canvas, length);
}
void _3DScene::set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons)
{
s_canvas_mgr.set_cutting_plane(canvas, z, polygons);
@ -1960,11 +1935,6 @@ bool _3DScene::is_layers_editing_allowed(wxGLCanvas* canvas)
return s_canvas_mgr.is_layers_editing_allowed(canvas);
}
bool _3DScene::is_shader_enabled(wxGLCanvas* canvas)
{
return s_canvas_mgr.is_shader_enabled(canvas);
}
bool _3DScene::is_reload_delayed(wxGLCanvas* canvas)
{
return s_canvas_mgr.is_reload_delayed(canvas);
@ -2117,16 +2087,6 @@ std::vector<int> _3DScene::load_object(wxGLCanvas* canvas, const Model* model, i
return s_canvas_mgr.load_object(canvas, model, obj_idx);
}
int _3DScene::get_first_volume_id(wxGLCanvas* canvas, int obj_idx)
{
return s_canvas_mgr.get_first_volume_id(canvas, obj_idx);
}
int _3DScene::get_in_object_volume_id(wxGLCanvas* canvas, int scene_vol_idx)
{
return s_canvas_mgr.get_in_object_volume_id(canvas, scene_vol_idx);
}
void _3DScene::mirror_selection(wxGLCanvas* canvas, Axis axis)
{
s_canvas_mgr.mirror_selection(canvas, axis);

View file

@ -567,8 +567,6 @@ public:
static unsigned int get_volumes_count(wxGLCanvas* canvas);
static void reset_volumes(wxGLCanvas* canvas);
static int check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config);
static bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
static bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
static GUI::GLCanvas3D* get_canvas(wxGLCanvas* canvas);
@ -578,11 +576,6 @@ public:
static void set_model(wxGLCanvas* canvas, Model* model);
static void set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape);
static void set_auto_bed_shape(wxGLCanvas* canvas);
static BoundingBoxf3 get_volumes_bounding_box(wxGLCanvas* canvas);
static void set_axes_length(wxGLCanvas* canvas, float length);
static void set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons);
@ -590,7 +583,6 @@ public:
static bool is_layers_editing_enabled(wxGLCanvas* canvas);
static bool is_layers_editing_allowed(wxGLCanvas* canvas);
static bool is_shader_enabled(wxGLCanvas* canvas);
static bool is_reload_delayed(wxGLCanvas* canvas);
@ -626,9 +618,6 @@ public:
static std::vector<int> load_object(wxGLCanvas* canvas, const ModelObject* model_object, int obj_idx, std::vector<int> instance_idxs);
static std::vector<int> load_object(wxGLCanvas* canvas, const Model* model, int obj_idx);
static int get_first_volume_id(wxGLCanvas* canvas, int obj_idx);
static int get_in_object_volume_id(wxGLCanvas* canvas, int scene_vol_idx);
static void mirror_selection(wxGLCanvas* canvas, Axis axis);
static void reload_scene(wxGLCanvas* canvas, bool force);

View file

@ -3305,38 +3305,6 @@ int GLCanvas3D::check_volumes_outside_state(const DynamicPrintConfig* config) co
return (int)state;
}
bool GLCanvas3D::move_volume_up(unsigned int id)
{
if ((id > 0) && (id < (unsigned int)m_volumes.volumes.size()))
{
std::swap(m_volumes.volumes[id - 1], m_volumes.volumes[id]);
GLVolume &v1 = *m_volumes.volumes[id - 1];
GLVolume &v2 = *m_volumes.volumes[id];
std::swap(v1.object_id, v2.object_id);
std::swap(v1.volume_id, v2.volume_id);
std::swap(v1.instance_id, v2.instance_id);
return true;
}
return false;
}
bool GLCanvas3D::move_volume_down(unsigned int id)
{
if ((id >= 0) && (id + 1 < (unsigned int)m_volumes.volumes.size()))
{
std::swap(m_volumes.volumes[id + 1], m_volumes.volumes[id]);
GLVolume &v1 = *m_volumes.volumes[id + 1];
GLVolume &v2 = *m_volumes.volumes[id];
std::swap(v1.object_id, v2.object_id);
std::swap(v1.volume_id, v2.volume_id);
std::swap(v1.instance_id, v2.instance_id);
return true;
}
return false;
}
void GLCanvas3D::set_config(DynamicPrintConfig* config)
{
m_config = config;
@ -3378,26 +3346,6 @@ void GLCanvas3D::set_bed_shape(const Pointfs& shape)
m_dirty = true;
}
void GLCanvas3D::set_auto_bed_shape()
{
// draw a default square bed around object center
const BoundingBoxf3& bbox = volumes_bounding_box();
double max_size = bbox.max_size();
const Vec3d center = bbox.center();
Pointfs bed_shape;
bed_shape.reserve(4);
bed_shape.emplace_back(center(0) - max_size, center(1) - max_size);
bed_shape.emplace_back(center(0) + max_size, center(1) - max_size);
bed_shape.emplace_back(center(0) + max_size, center(1) + max_size);
bed_shape.emplace_back(center(0) - max_size, center(1) + max_size);
set_bed_shape(bed_shape);
// Set the origin for painting of the coordinate system axes.
m_axes.origin = Vec3d(center(0), center(1), (double)GROUND_Z);
}
void GLCanvas3D::set_axes_length(float length)
{
m_axes.length = length;
@ -3439,11 +3387,6 @@ bool GLCanvas3D::is_layers_editing_allowed() const
return m_layers_editing.is_allowed();
}
bool GLCanvas3D::is_shader_enabled() const
{
return m_shader_enabled;
}
bool GLCanvas3D::is_reload_delayed() const
{
return m_reload_delayed;
@ -3720,22 +3663,6 @@ std::vector<int> GLCanvas3D::load_support_meshes(const Model& model, int obj_idx
return volumes;
}
int GLCanvas3D::get_first_volume_id(int obj_idx) const
{
for (int i = 0; i < (int)m_volumes.volumes.size(); ++i)
{
if ((m_volumes.volumes[i] != nullptr) && (m_volumes.volumes[i]->object_idx() == obj_idx))
return i;
}
return -1;
}
int GLCanvas3D::get_in_object_volume_id(int scene_vol_idx) const
{
return ((0 <= scene_vol_idx) && (scene_vol_idx < (int)m_volumes.volumes.size())) ? m_volumes.volumes[scene_vol_idx]->volume_idx() : -1;
}
void GLCanvas3D::mirror_selection(Axis axis)
{
m_selection.mirror(axis);

View file

@ -752,8 +752,6 @@ public:
unsigned int get_volumes_count() const;
void reset_volumes();
int check_volumes_outside_state(const DynamicPrintConfig* config) const;
bool move_volume_up(unsigned int id);
bool move_volume_down(unsigned int id);
void set_config(DynamicPrintConfig* config);
void set_print(Print* print);
@ -768,8 +766,6 @@ public:
// fills the m_bed.m_grid_lines and sets m_bed.m_origin.
// Sets m_bed.m_polygon to limit the object placement.
void set_bed_shape(const Pointfs& shape);
// Used by ObjectCutDialog and ObjectPartsPanel to generate a rectangular ground plane to support the scene objects.
void set_auto_bed_shape();
void set_axes_length(float length);
@ -783,7 +779,6 @@ public:
bool is_layers_editing_enabled() const;
bool is_layers_editing_allowed() const;
bool is_shader_enabled() const;
bool is_reload_delayed() const;
@ -828,9 +823,6 @@ public:
// Load SLA support tree and SLA pad meshes into the scene, if available at the respective SLAPrintObject instances.
std::vector<int> load_support_meshes(const Model& model, int obj_idx);
int get_first_volume_id(int obj_idx) const;
int get_in_object_volume_id(int scene_vol_idx) const;
void mirror_selection(Axis axis);
void reload_scene(bool force);

View file

@ -252,18 +252,6 @@ int GLCanvas3DManager::check_volumes_outside_state(wxGLCanvas* canvas, const Dyn
return (it != m_canvases.end()) ? it->second->check_volumes_outside_state(config) : false;
}
bool GLCanvas3DManager::move_volume_up(wxGLCanvas* canvas, unsigned int id)
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->move_volume_up(id) : false;
}
bool GLCanvas3DManager::move_volume_down(wxGLCanvas* canvas, unsigned int id)
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->move_volume_down(id) : false;
}
GLCanvas3D* GLCanvas3DManager::get_canvas(wxGLCanvas* canvas)
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
@ -284,7 +272,6 @@ void GLCanvas3DManager::set_print(wxGLCanvas* canvas, Print* print)
it->second->set_print(print);
}
void GLCanvas3DManager::set_SLA_print(wxGLCanvas* canvas, SLAPrint* print)
{
CanvasesMap::iterator it = _get_canvas(canvas);
@ -306,26 +293,6 @@ void GLCanvas3DManager::set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape)
it->second->set_bed_shape(shape);
}
void GLCanvas3DManager::set_auto_bed_shape(wxGLCanvas* canvas)
{
CanvasesMap::iterator it = _get_canvas(canvas);
if (it != m_canvases.end())
it->second->set_auto_bed_shape();
}
BoundingBoxf3 GLCanvas3DManager::get_volumes_bounding_box(wxGLCanvas* canvas)
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->volumes_bounding_box() : BoundingBoxf3();
}
void GLCanvas3DManager::set_axes_length(wxGLCanvas* canvas, float length)
{
CanvasesMap::iterator it = _get_canvas(canvas);
if (it != m_canvases.end())
it->second->set_axes_length(length);
}
void GLCanvas3DManager::set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons)
{
CanvasesMap::iterator it = _get_canvas(canvas);
@ -352,12 +319,6 @@ bool GLCanvas3DManager::is_layers_editing_allowed(wxGLCanvas* canvas) const
return (it != m_canvases.end()) ? it->second->is_layers_editing_allowed() : false;
}
bool GLCanvas3DManager::is_shader_enabled(wxGLCanvas* canvas) const
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->is_shader_enabled() : false;
}
bool GLCanvas3DManager::is_reload_delayed(wxGLCanvas* canvas) const
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
@ -538,18 +499,6 @@ std::vector<int> GLCanvas3DManager::load_object(wxGLCanvas* canvas, const Model*
return (it != m_canvases.end()) ? it->second->load_object(*model, obj_idx) : std::vector<int>();
}
int GLCanvas3DManager::get_first_volume_id(wxGLCanvas* canvas, int obj_idx) const
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->get_first_volume_id(obj_idx) : -1;
}
int GLCanvas3DManager::get_in_object_volume_id(wxGLCanvas* canvas, int scene_vol_idx) const
{
CanvasesMap::const_iterator it = _get_canvas(canvas);
return (it != m_canvases.end()) ? it->second->get_in_object_volume_id(scene_vol_idx) : -1;
}
void GLCanvas3DManager::mirror_selection(wxGLCanvas* canvas, Axis axis)
{
CanvasesMap::iterator it = _get_canvas(canvas);

View file

@ -89,8 +89,6 @@ public:
unsigned int get_volumes_count(wxGLCanvas* canvas) const;
void reset_volumes(wxGLCanvas* canvas);
int check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config) const;
bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
GLCanvas3D* get_canvas(wxGLCanvas* canvas);
@ -100,11 +98,6 @@ public:
void set_model(wxGLCanvas* canvas, Model* model);
void set_bed_shape(wxGLCanvas* canvas, const Pointfs& shape);
void set_auto_bed_shape(wxGLCanvas* canvas);
BoundingBoxf3 get_volumes_bounding_box(wxGLCanvas* canvas);
void set_axes_length(wxGLCanvas* canvas, float length);
void set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons);
@ -112,7 +105,6 @@ public:
bool is_layers_editing_enabled(wxGLCanvas* canvas) const;
bool is_layers_editing_allowed(wxGLCanvas* canvas) const;
bool is_shader_enabled(wxGLCanvas* canvas) const;
bool is_reload_delayed(wxGLCanvas* canvas) const;
@ -148,9 +140,6 @@ public:
std::vector<int> load_object(wxGLCanvas* canvas, const ModelObject* model_object, int obj_idx, std::vector<int> instance_idxs);
std::vector<int> load_object(wxGLCanvas* canvas, const Model* model, int obj_idx);
int get_first_volume_id(wxGLCanvas* canvas, int obj_idx) const;
int get_in_object_volume_id(wxGLCanvas* canvas, int scene_vol_idx) const;
void mirror_selection(wxGLCanvas* canvas, Axis axis);
void reload_scene(wxGLCanvas* canvas, bool force);