New selection -> removed obsolete parameters from GLVolumeCollection::load_object()

This commit is contained in:
Enrico Turri 2018-10-08 16:05:55 +02:00
parent 9ae6d115a2
commit 99fe5761d8
4 changed files with 24 additions and 2 deletions

View File

@ -5,7 +5,7 @@
#define ENABLE_1_42_0 1
// Add z coordinate to model instances' offset
// Add x and y rotation components to model instances' offset
// Add x and y rotation components to model instances' rotation
// Add scaling factors for all the three axes to model instances
#define ENABLE_MODELINSTANCE_3D_FULL_TRANSFORM (1 && ENABLE_1_42_0)
// Add double click on gizmo grabbers to reset transformation components to their default value

View File

@ -693,6 +693,14 @@ void GLVolume::generate_layer_height_texture(const PrintObject *print_object, bo
#define LAYER_HEIGHT_TEXTURE_WIDTH 1024
#define LAYER_HEIGHT_TEXTURE_HEIGHT 1024
#if ENABLE_EXTENDED_SELECTION
std::vector<int> GLVolumeCollection::load_object(
const ModelObject *model_object,
int obj_idx,
const std::vector<int> &instance_idxs,
const std::string &color_by,
bool use_VBOs)
#else
std::vector<int> GLVolumeCollection::load_object(
const ModelObject *model_object,
int obj_idx,
@ -701,6 +709,7 @@ std::vector<int> GLVolumeCollection::load_object(
const std::string &select_by,
const std::string &drag_by,
bool use_VBOs)
#endif // ENABLE_EXTENDED_SELECTION
{
static float colors[4][4] = {
{ 1.0f, 1.0f, 0.0f, 1.f },

View File

@ -437,6 +437,14 @@ public:
GLVolumeCollection() {};
~GLVolumeCollection() { clear(); };
#if ENABLE_EXTENDED_SELECTION
std::vector<int> load_object(
const ModelObject *model_object,
int obj_idx,
const std::vector<int> &instance_idxs,
const std::string &color_by,
bool use_VBOs);
#else
std::vector<int> load_object(
const ModelObject *model_object,
int obj_idx,
@ -445,6 +453,7 @@ public:
const std::string &select_by,
const std::string &drag_by,
bool use_VBOs);
#endif // ENABLE_EXTENDED_SELECTION
int load_wipe_tower_preview(
int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool use_VBOs, bool size_unknown, float brim_width);

View File

@ -3123,7 +3123,7 @@ std::vector<int> GLCanvas3D::load_object(const ModelObject& model_object, int ob
}
}
#if ENABLE_EXTENDED_SELECTION
return m_volumes.load_object(&model_object, obj_idx, instance_idxs, m_color_by, "object", "object", m_use_VBOs && m_initialized);
return m_volumes.load_object(&model_object, obj_idx, instance_idxs, m_color_by, m_use_VBOs && m_initialized);
#else
return m_volumes.load_object(&model_object, obj_idx, instance_idxs, m_color_by, m_select_by, m_drag_by, m_use_VBOs && m_initialized);
#endif // ENABLE_EXTENDED_SELECTION
@ -6025,7 +6025,11 @@ void GLCanvas3D::_load_shells()
instance_ids[i] = i;
}
#if ENABLE_EXTENDED_SELECTION
m_volumes.load_object(model_obj, object_id, instance_ids, "object", m_use_VBOs && m_initialized);
#else
m_volumes.load_object(model_obj, object_id, instance_ids, "object", "object", "object", m_use_VBOs && m_initialized);
#endif // ENABLE_EXTENDED_SELECTION
++object_id;
}