summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qvector2d.h
Commit message (Collapse)AuthorAgeFilesLines
* [QMath3D] Add public c-tors that do not initialize the contentsKonstantin Ritt2015-02-041-0/+1
| | | | | | Change-Id: I1a28766451e6750986a239c989e7f30c14479057 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* [QVectorND] Add missing operator/=(const QVectorND &)Konstantin Ritt2015-01-281-0/+14
| | | | | Change-Id: Ic1d2912808b95e02ba5d9cb2972c81c6374bbca9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Revert some previously added constexpr in QVector?d classesAlex Blasche2014-03-101-12/+2
| | | | | | | | | | | | | | This commit partly reverts cd91d8ad0281c984a01b8091696a6fdfdfa69514. The revert is required as the used ifdef relied on undefined compiler behavior. Especially Windows has had trouble. The revert reduces the risk of breaks by future compilers. The proper inline and constexpr has to wait until Qt 6. Task-number: QTBUG-37122 Change-Id: I881fffb95fa46d9c170c9420a578f15640e18aea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QVector* compile on Win/staticAlex Blasche2014-03-081-1/+1
| | | | | | Task-number: QTBUG-37122 Change-Id: Ib2283e8c27da7af2bdc08eee3b7cc542fbe55d71 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convert more QVector*D member functions to constexprAlex Blasche2013-11-201-0/+10
| | | | | | | | | | constexpr requires inline functions. We convert more member functions to inline functions while retaining a version of those functions inside QtGui. This prevents any BC breakage. Change-Id: I325b78da6b41611bda3994869f474c700b6fb306 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add C++11 constexpr to 3D vector classesAlex Blasche2013-11-151-36/+36
| | | | | | | | | This turns QVector2D(1,1) into compile-time expressions when using a C++11 compiler. Change-Id: Ifea2d1cdfd5481300f9a5a0c7bbe8bfe9115c636 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add operator[] to QVectorND classesSean Harmer2013-08-271-0/+15
| | | | | | Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add convenience distance methods to QVector2DLaszlo Papp2013-03-181-0/+3
| | | | | | Change-Id: I8ecdda35912a95e69c2f8dd98ce9c41c77b222d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make gui/math3d classes use float rather than qrealSean Harmer2012-09-071-34/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mismatch between using floats for internal storage and qreal in the API of QVector*D which leads to lots of implicit casts between double and float. This change also stops users from being surprised by the loss of precision when using these classes on desktop platforms and removes the need for the private constructors taking a dummy int as the final argument. The QMatrix4x4 and QQuaternion classes have been changed to use float for their internal storage since these are meant to be used in conjunction with the QVector*D classes. This is to prevent unexpected loss of precision and to improve performance. The on-disk format has also been changed from double to float thereby reducing the storage required when streaming vectors and matrices. This is potentially a large saving when working with complex 3D meshes etc. This also has a significant performance improvement when passing matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no longer have to iterate and convert the data to floats. This is an operation that could easily be needed many times per frame. This change also opens the door for further optimisations of these classes to be implemented by using SIMD intrinsics. This needs to be applied in conjunction with https://codereview.qt-project.org/#change,33548 Task-number: QTBUG-21035 Task-number: QTBUG-20661 Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+262
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12