Follow-up of cd6808fc73
This commit is contained in:
parent
cb81bd52fa
commit
cd389eb7eb
@ -565,15 +565,15 @@ void ObjectManipulation::Show(const bool show)
|
|||||||
bool show_world_local_combo = wxGetApp().get_mode() != comSimple && (selection.is_single_full_instance() || selection.is_single_volume_or_modifier());
|
bool show_world_local_combo = wxGetApp().get_mode() != comSimple && (selection.is_single_full_instance() || selection.is_single_volume_or_modifier());
|
||||||
if (selection.is_single_volume_or_modifier() && m_word_local_combo->GetCount() < 3) {
|
if (selection.is_single_volume_or_modifier() && m_word_local_combo->GetCount() < 3) {
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), 1);
|
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), 2);
|
||||||
#else
|
#else
|
||||||
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), wxNullBitmap, 1);
|
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), wxNullBitmap, 2);
|
||||||
#endif // __linux__
|
#endif // __linux__
|
||||||
m_word_local_combo->Select((int)ECoordinatesType::World);
|
m_word_local_combo->Select((int)ECoordinatesType::World);
|
||||||
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
|
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
|
||||||
}
|
}
|
||||||
else if (selection.is_single_full_instance() && m_word_local_combo->GetCount() > 2) {
|
else if (selection.is_single_full_instance() && m_word_local_combo->GetCount() > 2) {
|
||||||
m_word_local_combo->Delete(1);
|
m_word_local_combo->Delete(2);
|
||||||
m_word_local_combo->Select((int)ECoordinatesType::World);
|
m_word_local_combo->Select((int)ECoordinatesType::World);
|
||||||
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
|
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
|
||||||
}
|
}
|
||||||
|
@ -828,7 +828,7 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor
|
|||||||
assert(is_from_fully_selected_instance(i));
|
assert(is_from_fully_selected_instance(i));
|
||||||
if (transformation_type.world())
|
if (transformation_type.world())
|
||||||
v.set_instance_transformation(Geometry::translation_transform(displacement) * volume_data.get_instance_full_matrix());
|
v.set_instance_transformation(Geometry::translation_transform(displacement) * volume_data.get_instance_full_matrix());
|
||||||
else if (transformation_type.local()) {
|
else if (transformation_type.instance()) {
|
||||||
const Vec3d world_displacement = volume_data.get_instance_rotation_matrix() * displacement;
|
const Vec3d world_displacement = volume_data.get_instance_rotation_matrix() * displacement;
|
||||||
v.set_instance_transformation(Geometry::translation_transform(world_displacement) * volume_data.get_instance_full_matrix());
|
v.set_instance_transformation(Geometry::translation_transform(world_displacement) * volume_data.get_instance_full_matrix());
|
||||||
}
|
}
|
||||||
@ -918,7 +918,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_
|
|||||||
else {
|
else {
|
||||||
if (transformation_type.world())
|
if (transformation_type.world())
|
||||||
new_rotation_matrix = rotation_matrix * inst_trafo.get_rotation_matrix();
|
new_rotation_matrix = rotation_matrix * inst_trafo.get_rotation_matrix();
|
||||||
else if (transformation_type.local())
|
else if (transformation_type.instance())
|
||||||
new_rotation_matrix = inst_trafo.get_rotation_matrix() * rotation_matrix;
|
new_rotation_matrix = inst_trafo.get_rotation_matrix() * rotation_matrix;
|
||||||
else
|
else
|
||||||
assert(false);
|
assert(false);
|
||||||
@ -948,7 +948,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_
|
|||||||
SyncRotationType synch;
|
SyncRotationType synch;
|
||||||
if (transformation_type.world() && rot_axis_max == 2)
|
if (transformation_type.world() && rot_axis_max == 2)
|
||||||
synch = SyncRotationType::NONE;
|
synch = SyncRotationType::NONE;
|
||||||
else if (transformation_type.local())
|
else if (transformation_type.instance())
|
||||||
synch = SyncRotationType::FULL;
|
synch = SyncRotationType::FULL;
|
||||||
else
|
else
|
||||||
synch = SyncRotationType::GENERAL;
|
synch = SyncRotationType::GENERAL;
|
||||||
@ -1365,7 +1365,7 @@ void Selection::scale_and_translate(const Vec3d& scale, const Vec3d& translation
|
|||||||
Geometry::translation_transform(translation) * inst_trafo.get_offset_matrix();
|
Geometry::translation_transform(translation) * inst_trafo.get_offset_matrix();
|
||||||
v.set_instance_transformation(offset_matrix * scale_matrix * inst_trafo.get_matrix_no_offset());
|
v.set_instance_transformation(offset_matrix * scale_matrix * inst_trafo.get_matrix_no_offset());
|
||||||
}
|
}
|
||||||
else if (transformation_type.local()) {
|
else if (transformation_type.instance()) {
|
||||||
const Transform3d scale_matrix = Geometry::scale_transform(relative_scale);
|
const Transform3d scale_matrix = Geometry::scale_transform(relative_scale);
|
||||||
Vec3d offset;
|
Vec3d offset;
|
||||||
if (transformation_type.joint() && translation.isApprox(Vec3d::Zero())) {
|
if (transformation_type.joint() && translation.isApprox(Vec3d::Zero())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user