summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qquaternion.h
Commit message (Collapse)AuthorAgeFilesLines
* fix warnings about declarations shadowing class members (autotest reported)Jeremy Katz2009-09-291-17/+17
| | | | Reviewed-by: Olivier
* 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-33/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | Reviewed-by: Trust Me
* Faster quaternion multiplications.Ariya Hidayat2009-08-061-18/+11
| | | | | | | | | | | | | Use the known factorization trick to speed-up quaternion multiplication. Now we need only 9 floating-point multiplications, instead of 16 (but at the cost of extra additions and subtractions). Callgrind shows that the function now takes 299 instructions instead of 318 instructions, which is not a big win. However I assume the speed-up has a better effect for mobile CPU, where multiplications are more expensive. Reviewed-by: Rhys Weatherley
* 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
* Add the QQuaternion::nlerp() function as a counterpart to slerp()Rhys Weatherley2009-04-151-0/+2
| | | | | | | | nlerp() implements "normalized linear interpolation", which is faster than slerp() and gives approximate results that are good enough for some applications. Reviewed-by: trustme
* Rename QQuaternion::interpolate() to slerp()Rhys Weatherley2009-04-151-1/+1
| | | | | | slerp() is the more common-place name in the 3D community. Reviewed-by: trustme
* Remove the int constructors from the vector classesRhys Weatherley2009-04-151-3/+0
| | | | | | | | The int constructors existed to make fixed-point conversions faster in certain circumstances. With the removal of fixed-point support, they are no longer required. Reviewed-by: trustme
* Remove fixed-point support from math3dRhys Weatherley2009-04-081-27/+22
| | | | | | | | | 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/+313