summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp8
-rw-r--r--src/gui/math3d/qmatrix4x4.h7
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 591809df31..947af641d1 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -627,16 +627,18 @@ QMatrix4x4& QMatrix4x4::operator/=(float divisor)
#ifndef QT_NO_VECTOR3D
+#if QT_DEPRECATED_SINCE(6, 1)
+
/*!
\fn QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix)
\relates QMatrix4x4
+ \obsolete Convert the QVector3D to a QVector4D first, then multiply.
+
Returns the result of transforming \a vector according to \a matrix,
- with the matrix applied post-vector.
+ with the matrix applied post-vector. The vector is transformed as a point.
*/
-#if QT_DEPRECATED_SINCE(6, 1)
-
/*!
\fn QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector)
\relates QMatrix4x4
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 05e882d7c4..7b0c790ab6 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -109,9 +109,9 @@ public:
#ifndef QT_NO_VECTOR3D
#if QT_DEPRECATED_SINCE(6, 1)
friend QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector);
-#endif
friend QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix);
#endif
+#endif
#ifndef QT_NO_VECTOR4D
friend QVector4D operator*(const QVector4D& vector, const QMatrix4x4& matrix);
friend QVector4D operator*(const QMatrix4x4& matrix, const QVector4D& vector);
@@ -720,6 +720,9 @@ inline QMatrix4x4 operator*(const QMatrix4x4& m1, const QMatrix4x4& m2)
#ifndef QT_NO_VECTOR3D
+#if QT_DEPRECATED_SINCE(6, 1)
+
+QT_DEPRECATED_VERSION_X_6_1("Extend the QVector3D to a QVector4D before multiplying")
inline QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix)
{
float x, y, z, w;
@@ -745,8 +748,6 @@ inline QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix)
return QVector3D(x / w, y / w, z / w);
}
-#if QT_DEPRECATED_SINCE(6, 1)
-
QT_DEPRECATED_VERSION_X_6_1("Use matrix.map(vector) or matrix.mapVector(vector) instead")
inline QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector)
{