Gui: Use extrinsic angles for absolute position mode in transform dialog
This commit is contained in:
@@ -310,7 +310,7 @@ void TaskTransform::updatePositionAndRotationUi() const
|
||||
auto blockers = {QSignalBlocker(x), QSignalBlocker(y), QSignalBlocker(z)};
|
||||
|
||||
double alpha, beta, gamma;
|
||||
rot.getEulerAngles(Base::Rotation::Intrinsic_XYZ, alpha, beta, gamma);
|
||||
rot.getEulerAngles(eulerSequence(), alpha, beta, gamma);
|
||||
|
||||
x->setValue(fixNegativeZero(alpha));
|
||||
y->setValue(fixNegativeZero(beta));
|
||||
@@ -434,6 +434,12 @@ TaskTransform::CoordinateSystem TaskTransform::currentCoordinateSystem() const
|
||||
: globalCoordinateSystem();
|
||||
}
|
||||
|
||||
Base::Rotation::EulerSequence TaskTransform::eulerSequence() const
|
||||
{
|
||||
return positionMode == PositionMode::Local ? Base::Rotation::Intrinsic_XYZ
|
||||
: Base::Rotation::Extrinsic_XYZ;
|
||||
}
|
||||
|
||||
void TaskTransform::onSelectionChanged(const SelectionChanges& msg)
|
||||
{
|
||||
const auto isSupportedMessage =
|
||||
@@ -676,7 +682,7 @@ void TaskTransform::onRotationChange(QuantitySpinBox* changed)
|
||||
}
|
||||
}
|
||||
|
||||
const auto uvwRotation = Base::Rotation::fromEulerAngles(Base::Rotation::Intrinsic_XYZ,
|
||||
const auto uvwRotation = Base::Rotation::fromEulerAngles(eulerSequence(),
|
||||
ui->xRotationSpinBox->rawValue(),
|
||||
ui->yRotationSpinBox->rawValue(),
|
||||
ui->zRotationSpinBox->rawValue());
|
||||
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
CoordinateSystem localCoordinateSystem() const;
|
||||
CoordinateSystem currentCoordinateSystem() const;
|
||||
|
||||
Base::Rotation::EulerSequence eulerSequence() const;
|
||||
|
||||
private:
|
||||
void onSelectionChanged(const SelectionChanges& msg) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user