diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-26 00:36:45 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-26 01:03:23 (GMT) |
commit | 1a299a9631a2d1b4e07cedfece7af5318a766fe6 (patch) | |
tree | bde51d4c5acdc7cd975322932bdbea02bcda59bb /src/gui/math3d/qmatrix4x4.h | |
parent | 0d6104d763f4cb32ac6117b3f951afcb73fc50e6 (diff) | |
download | Qt-1a299a9631a2d1b4e07cedfece7af5318a766fe6.zip Qt-1a299a9631a2d1b4e07cedfece7af5318a766fe6.tar.gz Qt-1a299a9631a2d1b4e07cedfece7af5318a766fe6.tar.bz2 |
Optimize QGraphicsRotation's use of QMatrix4x4
Previous code was creating a full 3D rotation matrix and then
projecting back to 2D. This change combines the two steps into
one to avoid calculating matrix components that will be dropped.
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/gui/math3d/qmatrix4x4.h')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 42d992e..ba74b89 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -207,6 +207,10 @@ private: QMatrix4x4(int) { flagBits = General; } QMatrix4x4 orthonormalInverse() const; + + QMatrix4x4& projectedRotate(qreal angle, qreal x, qreal y, qreal z); + + friend class QGraphicsRotation; }; inline QMatrix4x4::QMatrix4x4 |