summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qmatrix4x4.h
Commit message (Collapse)AuthorAgeFilesLines
* 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