diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-02-19 14:22:59 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-02-26 11:02:38 +0000 |
commit | 1872857ca72658cd58c0c39b31da493f794be6ca (patch) | |
tree | fdf62103ad3b1b37879cf04d238d35c8987aadb4 /src/gui/math3d/qquaternion.h | |
parent | ade2778bee0cb4d0ef797d2069459fc036af851d (diff) |
[QQuaternion] Fix naming of the new methods
According to the Qt naming policy, methods that return value(s) via
the mutable parameter(s) should have "get" prefix to mention that.
[ChangeLog][QtGui][QQuaternion] Added methods to convert a quaternion
to/from Euler angles and to/from rotation matrix.
Change-Id: I95704e1f4623dc4ca54cd237ea203539fb60d452
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/gui/math3d/qquaternion.h')
-rw-r--r-- | src/gui/math3d/qquaternion.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index 4a87b63d25..d5300f96df 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -115,10 +115,10 @@ public: operator QVariant() const; #ifndef QT_NO_VECTOR3D - inline void toAxisAndAngle(QVector3D *axis, float *angle) const; + inline void getAxisAndAngle(QVector3D *axis, float *angle) const; static QQuaternion fromAxisAndAngle(const QVector3D& axis, float angle); #endif - void toAxisAndAngle(float *x, float *y, float *z, float *angle) const; + void getAxisAndAngle(float *x, float *y, float *z, float *angle) const; static QQuaternion fromAxisAndAngle (float x, float y, float z, float angle); @@ -126,7 +126,7 @@ public: inline QVector3D toEulerAngles() const; static inline QQuaternion fromEulerAngles(const QVector3D &eulerAngles); #endif - void toEulerAngles(float *pitch, float *yaw, float *roll) const; + void getEulerAngles(float *pitch, float *yaw, float *roll) const; static QQuaternion fromEulerAngles(float pitch, float yaw, float roll); QMatrix3x3 toRotationMatrix() const; @@ -308,17 +308,17 @@ inline QVector3D QQuaternion::vector() const return QVector3D(xp, yp, zp); } -inline void QQuaternion::toAxisAndAngle(QVector3D *axis, float *angle) const +inline void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const { float aX, aY, aZ; - toAxisAndAngle(&aX, &aY, &aZ, angle); + getAxisAndAngle(&aX, &aY, &aZ, angle); *axis = QVector3D(aX, aY, aZ); } inline QVector3D QQuaternion::toEulerAngles() const { float pitch, yaw, roll; - toEulerAngles(&pitch, &yaw, &roll); + getEulerAngles(&pitch, &yaw, &roll); return QVector3D(pitch, yaw, roll); } |