summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qmatrix4x4.h
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Fix "array subscript out of bounds" warning with GCC 4.5 in QtOpenGLThiago Macieira2011-02-211-3/+3
| | | | | | | | | | | | | | | | | | If you have: qreal m[2][2]; const qreal *constData() { return m[0]; } And somewhere else: const qreal *data = matrix.constData(); for (int i = 0; i < 2 * 2; ++i) tmp = data[i]; Then GCC "sees through" the data pointer to know that the type is actually a qreal[2] and will complain when you access data[2] and data[3] in the example above. It seems to be satisfied with this return *m, even though it's exactly the same thing. This is probably fragile.
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Deprecate qGenericMatrixFromMatrix4x4 and qGenericMatrixToMatrix4x4Olivier Goffart2010-08-061-2/+4
| | | | | | | | Rev-by: dev mailing list
* | It is no longer necessary to check for QT_NO_MEMBER_TEMPLATESminiak2010-08-031-8/+2
|/ | | | | Merge-request: 756 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Add Q_MOVABLE_TYPE decls to QVector?D, QMatrix4x4, QQuaternionRhys Weatherley2010-02-021-0/+2
| | | | | | | | Marking these types are movable allows container classes to optimize for their unique properties. Reviewed-by: Sarah Smith Reviewed-by: Daniel Pope
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Remove QMatrix4x4& return values in response to API review feedbackRhys Weatherley2009-11-041-18/+18
| | | | Reviewed-by: Sarah Smith
* Incorporate API review feedback for math3d classes.Rhys Weatherley2009-11-041-10/+5
| | | | Reviewed-by: Sarah Smith
* Optimize QGraphicsRotation's use of QMatrix4x4Rhys Weatherley2009-10-261-0/+4
| | | | | | | | 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
* Add an extra overload for QMatrix4x4::toTransform()Rhys Weatherley2009-10-251-1/+2
| | | | | | | | | | | | | | Change 100afe8d fixed a bug in QGraphicsRotation related to when the "distance to plane" projection needed to be performed. As a side effect it made the toTransform() API not do the expected thing when the function is called with no argument. This change makes the default no-argument version of toTransform() do the simple "drop row 3 and column 3" orthographic transformation that normal users of the class expect, and adds a new overload for the "distance to plane" projection case for the special case. Reviewed-by: trustme
* fix warnings about declarations shadowing class members (autotest reported)Jeremy Katz2009-09-291-20/+20
| | | | Reviewed-by: Olivier
* QMatrix4x4::mapVector() to transform by top-left 3x3Rhys Weatherley2009-09-221-0/+22
| | | | | | | | 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
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Modify QMatrix4x4 and QQuaternion to use qreal internallyRhys Weatherley2009-09-041-116/+116
| | | | | | | | | | | | | | | | | | | | | | | | Some concerns were expressed about the float precision of QMatrix4x4, which this change addresses by using qreal instead. The QVector2D/3D/4D classes still use float internally, so that they can be used directly in large arrays of vertex values to be uploaded to an OpenGL server. QQuaternion is a client-side class, and it should produce rotations that are consistent with QMatrix4x4. So its precision was changed too. A consequence of this change is that the following no longer works in a portable fashion: QMatrix4x4 mat; ... glLoadMatrixf(mat.constData()); The caller must now repack the argument to convert from qreal to GLfloat. Reviewed-by: Michael Goddard Reviewed-by: Andreas
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Add implicit conversions from math3d classes to QVariantRhys Weatherley2009-08-211-0/+3
| | | | | | | | Existing QVariant-capable classes in QtGui like QColor, QPixmap, etc have "operator QVariant()". This change adds the same operators for QVector2D, QVector3D, QVector4D, QQuaternion, and QMatrix4x4. Reviewed-by: Justin McPherson
* Add projection support to QMatrix4x4::toTransform()Rhys Weatherley2009-08-191-1/+1
| | | | | | | | | | | When converting from 3D back to 2D, it is necessary to project the z component unless an orthographic projection is desired. This change adds a distanceToPlane argument that specifies the perspective projection factor to apply during the conversion. The default value of 1024 corresponds to the projection performed by QTransform::rotate(), for consistency with existing classes. Reviewed-by: trustme
* Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | Reviewed-by: Trust Me
* Add the math3d types to QVariantRhys Weatherley2009-07-231-4/+5
| | | | Reviewed-by: Sarah Smith
* Update license headers in files that are new in 4.6.Jason McDonald2009-06-171-2/+2
| | | | Reviewed-by: Trust Me
* Fix some incorrect license headers.Jason McDonald2009-06-101-1/+1
| | | | | | | The MODULE placeholder shouldn't be used anymore, and neither should the old Trolltech license header. Reviewed-by: Trust Me
* Optimize QMatrix4x4::map() for QVector3D/QPoint/QPointFRhys Weatherley2009-06-021-45/+90
| | | | | Use the matrix "flagBits" to short-cut transformations when the matrix type is identity/translate/scale.
* QMatrix4x4::scale(qreal,qreal) and QMatrix4x4::translate(qreal,qreal) methodsAaron Kennedy2009-06-021-2/+4
|
* Optimize QMatrix4x4::mapRect() for translation and scale operationsRhys Weatherley2009-06-021-26/+0
|
* Remove fixed-point support from math3dRhys Weatherley2009-04-081-92/+85
| | | | | | | | | The main use case for fixed-point support is to build large arrays of vertices. This can be handled using qvertextype or something similar at higher levels. So it isn't worth risking numerical instability in the core classes. Reviewed-by: trustme
* Update the license on this code to match the rest.Thiago Macieira2009-03-311-1/+31
| | | | | | These sources had the old headers. Update to the new LGPL ones. Reviewed-by: TrustMe
* Long live Qt!Lars Knoll2009-03-231-0/+954