diff options
Diffstat (limited to 'src/sensors/qrotationsensor.cpp')
-rw-r--r-- | src/sensors/qrotationsensor.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/sensors/qrotationsensor.cpp b/src/sensors/qrotationsensor.cpp index 6adbf6a2..120723c7 100644 --- a/src/sensors/qrotationsensor.cpp +++ b/src/sensors/qrotationsensor.cpp @@ -116,14 +116,6 @@ qreal QRotationReading::x() const } /*! - Sets the rotation around the x axis to \a x. -*/ -void QRotationReading::setX(qreal x) -{ - d->x = x; -} - -/*! \property QRotationReading::y \brief the rotation around the y axis. @@ -137,14 +129,6 @@ qreal QRotationReading::y() const } /*! - Sets the rotation around the y axis to \a y. -*/ -void QRotationReading::setY(qreal y) -{ - d->y = y; -} - -/*! \property QRotationReading::z \brief the rotation around the z axis. @@ -158,10 +142,19 @@ qreal QRotationReading::z() const } /*! - Sets the rotation around the z axis to \a z. -*/ -void QRotationReading::setZ(qreal z) + \brief Sets the rotation from three euler angles. + + This is to be called from the backend. + + The angles are measured in degrees. The order of the rotations matters, as first the \a z rotation + is applied, then the \a x rotation and finally the \a y rotation. + + \since 5.0 + */ +void QRotationReading::setFromEuler(qreal x, qreal y, qreal z) { + d->x = x; + d->y = y; d->z = z; } |