summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/math3d/qquaternion.cpp12
-rw-r--r--src/gui/math3d/qquaternion.h12
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp6
3 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 5d73e54a26..2fb192dab4 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -363,7 +363,7 @@ QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const
#ifndef QT_NO_VECTOR3D
/*!
- \fn void QQuaternion::toAxisAndAngle(QVector3D *axis, float *angle) const
+ \fn void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const
\since 5.5
\overload
@@ -377,7 +377,7 @@ QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const
Creates a normalized quaternion that corresponds to rotating through
\a angle degrees about the specified 3D \a axis.
- \sa toAxisAndAngle()
+ \sa getAxisAndAngle()
*/
QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
{
@@ -402,7 +402,7 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
\sa fromAxisAndAngle()
*/
-void QQuaternion::toAxisAndAngle(float *x, float *y, float *z, float *angle) const
+void QQuaternion::getAxisAndAngle(float *x, float *y, float *z, float *angle) const
{
Q_ASSERT(x && y && z && angle);
@@ -433,7 +433,7 @@ void QQuaternion::toAxisAndAngle(float *x, float *y, float *z, float *angle) con
Creates a normalized quaternion that corresponds to rotating through
\a angle degrees about the 3D axis (\a x, \a y, \a z).
- \sa toAxisAndAngle()
+ \sa getAxisAndAngle()
*/
QQuaternion QQuaternion::fromAxisAndAngle
(float x, float y, float z, float angle)
@@ -485,7 +485,7 @@ QQuaternion QQuaternion::fromAxisAndAngle
\sa fromEulerAngles()
*/
-void QQuaternion::toEulerAngles(float *pitch, float *yaw, float *roll) const
+void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const
{
Q_ASSERT(pitch && yaw && roll);
@@ -543,7 +543,7 @@ void QQuaternion::toEulerAngles(float *pitch, float *yaw, float *roll) const
\a roll degrees around the z axis, \a pitch degrees around the x axis,
and \a yaw degrees around the y axis (in that order).
- \sa toEulerAngles()
+ \sa getEulerAngles()
*/
QQuaternion QQuaternion::fromEulerAngles(float pitch, float yaw, float roll)
{
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);
}
diff --git a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
index 444ccdeb88..a4defcc7f2 100644
--- a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -727,7 +727,7 @@ void tst_QQuaternion::fromAxisAndAngle()
{
QVector3D answerAxis;
float answerAngle;
- answer.toAxisAndAngle(&answerAxis, &answerAngle);
+ answer.getAxisAndAngle(&answerAxis, &answerAngle);
QVERIFY(qFuzzyCompare(answerAxis.x(), vector.x()));
QVERIFY(qFuzzyCompare(answerAxis.y(), vector.y()));
QVERIFY(qFuzzyCompare(answerAxis.z(), vector.z()));
@@ -743,7 +743,7 @@ void tst_QQuaternion::fromAxisAndAngle()
{
float answerAxisX, answerAxisY, answerAxisZ;
float answerAngle;
- answer.toAxisAndAngle(&answerAxisX, &answerAxisY, &answerAxisZ, &answerAngle);
+ answer.getAxisAndAngle(&answerAxisX, &answerAxisY, &answerAxisZ, &answerAngle);
QVERIFY(qFuzzyCompare(answerAxisX, vector.x()));
QVERIFY(qFuzzyCompare(answerAxisY, vector.y()));
QVERIFY(qFuzzyCompare(answerAxisZ, vector.z()));
@@ -872,7 +872,7 @@ void tst_QQuaternion::fromEulerAngles()
{
float answerPitch, answerYaw, answerRoll;
- answer.toEulerAngles(&answerPitch, &answerYaw, &answerRoll);
+ answer.getEulerAngles(&answerPitch, &answerYaw, &answerRoll);
QVERIFY(myFuzzyCompareDegrees(answerPitch, pitch));
QVERIFY(myFuzzyCompareDegrees(answerYaw, yaw));
QVERIFY(myFuzzyCompareDegrees(answerRoll, roll));