Tech ENABLE_TRANSFORMATIONS_BY_MATRICES - Fixed translation of volumes in local coordinate system

Fixed conflicts during rebase with master
This commit is contained in:
enricoturri1966 2022-05-12 12:07:27 +02:00
parent fd45d0eeed
commit 3fcfd04921

View File

@ -783,8 +783,11 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor
else
assert(false);
}
else
transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(displacement));
else {
const Vec3d offset = transformation_type.local() ?
volume_data.get_volume_transform().get_rotation_matrix() * displacement : displacement;
transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(offset));
}
}
#if !DISABLE_INSTANCES_SYNCH