diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-22 00:55:02 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-22 00:55:02 (GMT) |
commit | 8416ae1af3f13ad865b25a87e3e94e298b3a0ca2 (patch) | |
tree | 21fd4e9e878792bbc1ba8694aa404e428e98667e /src/gui/math3d/qmatrix4x4.cpp | |
parent | 40bdb6a5bed66385c3c2320447b1530e99befeb3 (diff) | |
download | Qt-8416ae1af3f13ad865b25a87e3e94e298b3a0ca2.zip Qt-8416ae1af3f13ad865b25a87e3e94e298b3a0ca2.tar.gz Qt-8416ae1af3f13ad865b25a87e3e94e298b3a0ca2.tar.bz2 |
QMatrix4x4::mapVector() to transform by top-left 3x3
It is useful to be able to map direction vectors by the top-left
3x3 component of a 4x4 matrix, ignoring the translation and
projection components.
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/gui/math3d/qmatrix4x4.cpp')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 123c0f0..ed1b13d 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -1502,7 +1502,17 @@ QTransform QMatrix4x4::toTransform(qreal distanceToPlane) const Maps \a point by multiplying this matrix by \a point. - \sa mapRect() + \sa mapRect(), mapVector() +*/ + +/*! + \fn QVector3D QMatrix4x4::mapVector(const QVector3D& vector) const + + Maps \a vector by multiplying the top 3x3 portion of this matrix + by \a vector. The translation and projection components of + this matrix are ignored. + + \sa map() */ #endif |