summaryrefslogtreecommitdiffstats
path: root/src/core/transforms
Commit message (Collapse)AuthorAgeFilesLines
* Fix unfinished commentThiago Macieira2018-12-121-0/+1
| | | | | | | | Found by ICC. Change-Id: I4ac1156702324f0fb814fffd156f815f33110f71 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Doc: Add doc to undocumented methodsNico Vertriest2018-11-012-1/+17
| | | | | | | | | | | | | - qcomponent.cpp - qbackendnode.cpp - qjoint.cpp - qskeletonloader.cpp - qframeaction.cpp - qscene2d.h - qrenderaspect.cpp Change-Id: I25881dee19d2d01f948bfaf4a156a97f6caaea73 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Add missing dots (qt3d)Paul Wicking2018-06-196-12/+12
| | | | | | Task-number: QTBUG-68933 Change-Id: I4226b8b9d70548b6921948c5ea47520f40f5df98 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix SIMD related warningsPaul Lemire2018-02-281-2/+4
| | | | | Change-Id: Ia7d08551de0b10e3e859da5301ea8e2be501c722 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* simd: declare AVX2 friends only if __AVX2__ definedPaul Lemire2018-02-283-13/+20
| | | | | Change-Id: I8fd88461874367bcaa9f4b27a9b4fc660cd2a030 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix documentation warnings for Qt 3D CoreTopi Reinio2018-02-161-1/+1
| | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Core that are related to how Clang parses the source code and the \fn QDoc commands. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ia6394f453d7bd959bc4d4cc9347ac0039b80f661 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-153-0/+36
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/doc/src/qt3danimation-module.qdoc src/render/backend/abstractrenderer_p.h src/render/backend/buffervisitor_p.h src/render/backend/renderer.cpp src/render/backend/renderer_p.h src/render/backend/triangleboundingvolume_p.h src/render/backend/trianglesextractor_p.h src/render/frontend/sphere_p.h src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/job_common_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/jobs/pickboundingvolumeutils.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/boundingsphere/tst_boundingsphere.cpp tests/auto/render/commons/testrenderer.h tests/auto/render/raycasting/tst_raycasting.cpp tests/auto/render/render.pro tests/auto/render/renderer/tst_renderer.cpp Change-Id: I76633bc5a5a065e5f9ea62cc16563377e5c693a3
| * Render: Use SIMD Vectors and Matrices in the backendPaul Lemire2018-02-023-0/+36
| | | | | | | | | | Change-Id: I19b3b2f8fcb06eb2bc600ebe370465dd15a8eabc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.10' into devSean Harmer2018-01-263-4/+14
|\| | | | | | | Change-Id: I4728b29c349a16867951a781c9417054c798e04a
| * SIMD: Only include SSE classes if options activatedPaul Lemire2018-01-253-4/+14
| | | | | | | | | | | | | | | | | | Relying on the SSE2 or AVX2 defines results in some SSE/AVX classes being included even though the options were disabled, resulting in compile failures. Change-Id: Ie1e3ce2f093eeb3f749ef215835fa0846fbb5019 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QTransform: add fromAxes and rotateFromAxes helperPaul Lemire2018-01-252-0/+23
| | | | | | | | | | | | | | | | | | | | Make it a lot easier to create a QQuaternion or a Rotation matrix for 3 axes. This will greatly simplify implementing custom camera nodes from Transform and CameraLens. Change-Id: Ifed9e3c7442d451ffa4346223afecc0eafff0ed5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2017-11-132-21/+34
|\| | | | | | | Change-Id: I2d373d538df3a65ac2d41238e5c6a214a151be68
| * Decompose a new quaternion rotation into euler anglesSean Harmer2017-10-062-21/+34
| | | | | | | | | | | | | | Same as in QTransform. Change-Id: Ia1dca19c8faf996629ecbf8832e5625e7b22532c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-051-0/+1
|\| | | | | | | | | | | | | Conflicts: src/animation/backend/channelmapper_p.h Change-Id: I4e0f59c6648925ba45d30ccc2405524a9e901a0e
| * Update the local poses of the skeleton in the animation aspectSean Harmer2017-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present it is still needlessly, and incorrectly, updating the transforms of joints for which we have no animation data by using a default value of 0 for each component. This causes the joints to be scaled to 0 which is not particularly useful. We should only update joints for which we have valid animation data and leave the other joints alone. For a skeleton this will be OK as we have the initial set of local poses available. For regular QNode properties, the animator/mapper will need to take a snapshot of the current property value when the animation is started so that we can fill in the missing values when generating property changes. This should also be fixed on the 5.9 branch. Change-Id: Ib8f28c55cdfbca3f335777028f72250641092fc9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-1/+1
|/ | | | | Change-Id: I92c955068e233c50043ad7d06a32300dd386c24d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Send joint names and local poses from render to animation aspectSean Harmer2017-08-301-0/+16
| | | | | | | | | This will allow the animation aspect to easily update the local poses of all joints in a skeleton without needing to be able to address any frontend QJoint objects. Change-Id: Id2137f2533702387dc68296aba1dd8627b0599d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add name property to QJointSean Harmer2017-08-303-0/+23
| | | | | | | And set it from the backend when creating frontend joints. Change-Id: I26d37c7f516944eb353af38716aab4c55bd2f79f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add euler rotation angle convenience properties to QJointSean Harmer2017-08-163-0/+113
| | | | | | | As we did for QTransform. These are frontend only properties. Change-Id: Ic2fb1080ff68e26437c7e35632bdfcc00e51c017 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Create SkeletonData from Joint backend nodesSean Harmer2017-08-161-0/+1
| | | | | | | | | | | | | | This can be done either by using a QSkeleton on the frontend or with a QSkeletonLoader that has the createJointsEnabled property set to true. In the latter case, the loader creates the joint node hierarchy on the backend then moves them to the main thread in a similar way to QGeometryRenderer handles Geoemtry. Once the joint hierarchy is set on the frontend QSkeletonLoader, it notifies the backend and from there it follows the same code path as for QSkeleton. Change-Id: I5f673e154bb3a3e677b80b8ee984f4168403c288 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update skinned mesh example to expose joints of objectSean Harmer2017-08-166-3/+190
| | | | | | | | | | | | | To do this we add a helper Sqt struct that wraps up an affine transformation as a scale vector, rotation quaternion and a translation vector. This is the format in which the animation aspect will animate the joints later so it's easier to keep the transforms split like this. It's also less data to move around compared with a 4x4 matrix (10 vs 16 floats, 12 including the padding). Change-Id: Iaa30b5ef5d1635cc208ead918827140cf2765908 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Matrix4x4: simd (AVX2 and SSE) matrix classesPaul Lemire2017-08-119-10/+1400
| | | | | Change-Id: I8a4d8542a12a9ec6631f76515c0da41cd1c679fe Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add inverseBindMatrix property to QJointSean Harmer2017-08-103-0/+43
| | | | | | | Needed to compute skinning palette of matrices. Change-Id: Ifec41c2bb18855bbb2c332cf80d37642d34f75cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Change scale property of QJoint to QVector3DSean Harmer2017-08-103-11/+11
| | | | | | | Seems to be the norm for joints. Change-Id: I98d786b64153b09e2cd06e9d525f6c80f6372316 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add Vector3D simd classPaul Lemire2017-08-105-8/+544
| | | | | Change-Id: I9a454a3b3be3ad1878eaf09cf2ff77aa2bfbe208 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add Vector4D simd classPaul Lemire2017-08-104-2/+539
| | | | | Change-Id: Ib9e4e5f9fddcc380152bd4e167072ff815a4da30 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add jointCount property to QAbstractSkeletonSean Harmer2017-08-094-0/+46
| | | | | | | Set this from the backend when a skeleton is loaded. Change-Id: I752670b93b6ae1fad70534b5f8983ae2ca86fd78 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add basics of Skeleton backend node to render aspectSean Harmer2017-08-094-2/+18
| | | | | | | Loading of skeleton will be handled in a follow up commit. Change-Id: I4466524098e7cf33d6c39f70752d8bd632bac1f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QArmature componentSean Harmer2017-08-084-2/+342
| | | | | | | | | This will be used by the renderer to perform skinning of the mesh passed to QGeometryRenderer when coupled with a suitable vertex shader via QMaterial. Change-Id: I54f414313ba04aea5f2f1777244cb93cd1bfd688 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QSkeleton and QSkeletonLoaderSean Harmer2017-08-0710-2/+936
| | | | | | | | | | | | | They both inherit from QAbstractSkeleton which exists purely to provide a type for setting skeletons on the upcoming QArmature component. The classes relate in the same way as QAbstractAnimationClip, QAnimationClip and QAnimationClipLoader. The skeleton provides the joint hierarchy that can be animated and then used to skin a mesh via the upcoming QArmature component. Change-Id: I4be8ce3f1d6cbca4af08c5829b33172a2f951b11 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QJoint frontend typeSean Harmer2017-08-074-4/+439
| | | | | | | | | | Represents a joint within a skeleton. For now we limit the scale to a uniform scale represented by a single float. If there is demand we can extend this to support non-uniform scales for joints using a QVector3D. Change-Id: Ib65e45d14c5e40227801c0a70ac5b68557c7e8e9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fixes includes to comply with coding conventions for Src/CoreRobert Brock2017-03-314-4/+3
| | | | | | | | Reordering the header includes to comply with Qt coding conventions Task-number: QTBUG-56185 Change-Id: I3943678c183c4ef46d403e0fff878c3cad964dfa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update QTransform docsAntti Määttä2017-01-101-107/+128
| | | | | | Change-Id: Iad61725581a49bca910e104b13f0ea1925d1a948 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Specify #include path for each \classTopi Reinio2016-12-071-0/+1
| | | | | | | | | | | | QDoc tries to guess the correct #include statement, displayed in the requisites table in the class reference. However, this often produces incorrect information for a module as complex as Qt3D. To fix this, manually specify the include path with the \inheaderfile command. Change-Id: I42929b92600d07d759f4f76e9051ff656785c652 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Mark QTransform component as non-shareableSean Harmer2016-08-091-0/+5
| | | | | | | | | | Add test for default construction. Making transforms non- shareable will make it easier to implement feeding back the world transform as a new property later without introducing ambiguities. Change-Id: I6d472b3da90ce1dacdfcc6f8366a23706044eb5c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QTransform: remove parameter from matrixChangedPaul Lemire2016-06-082-2/+26
| | | | | | | | | | | | | | | | | In order to reduce the overhead cost of composing the matrix when the rotation, scale and/or translation are changed, it is only performed when the getter matrix() is called. That means that emitting a signal matrixChanged(QMatrix4x4) would force the composition when setting the scale, rotation or translation which defeats the purpose. The parameter was therefore removed from the matrixChanged signal so that it can be emitted whenever scale, rotation, translation are changed without the overhead cost of computing the matrix. Change-Id: I2e69fb24b4ac1dadc4af3bc5474467e4853a83ed Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Doc for core moduleColin Ogilvie2016-06-031-4/+2
| | | | | | Task-number: QTBUG-46037 Change-Id: I187794f67a61e3e626e7992b0cfe211811823466 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* De-inline some more dtors of non-leaf Private classesMarc Mutz2016-05-192-0/+5
| | | | | Change-Id: I2d80f964c4de6ef6cef144ca50fa12ffb3eb540c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* De-inline dtors of public polymorphic classesMarc Mutz2016-05-192-0/+8
| | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. It also allows to add code to them later, if necessary. Change-Id: I0da301cd788162abba6cdbbb21910090a22adb9a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add more explicitMarc Mutz2016-05-141-1/+1
| | | | | | Change-Id: Iaa91d6248cbc3822ed3380e360d2880d4894446d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-101-1/+1
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-2/+2
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Strip out cloning subsystemSean Harmer2016-04-292-16/+0
| | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNode: make cleanup a private slotPaul Lemire2016-04-232-9/+0
| | | | | | | | | | QT3D_CLONEABLE now implements a default dtor that calls _q_ cleanup QT3D_CLONEABLE_CUSTOM_DTOR is used for classes that really need to implement their own dtor but they need to invoke _q_cleanup manually Change-Id: I2937a3b9edeb5a763749f0044360d78ab4461a5e Task-number: QTBUG-51464 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QScenePropertyChange -> QNodePropertyChangeSean Harmer2016-04-211-1/+1
| | | | | | | Trying to unify naming of change types. Change-Id: I0bfca0b7ba5adeaaa6145f75ddb41731f76adc09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Added the rest of Qt3DCore doc skeletonsTomi Korpipää2016-04-211-7/+191
| | | | | | | | Change-Id: I6898bdc24821276d44fdf5f42170143b7a0cbfd9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com> Reviewed-by: Antti Määttä <antti.maatta@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.6' into 5.7Sean Harmer2016-04-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qt3d/examples-common/qorbitcontrol.h src/core/qnodecreatedchange.cpp src/core/qnodecreatedchange.h src/input/frontend/qaxisactionhandler.h src/input/frontend/qinputaspect.h src/input/frontend/qkeyboardhandler.h src/input/frontend/qmousedevice.h src/input/frontend/qmousehandler.h src/input/frontend/qphysicaldevicecreatedchange.h src/input/input.pro src/logic/qframeaction.h src/plugins/sceneparsers/assimp/assimp.pro src/quick3d/imports/input/importsinput.pro src/quick3d/imports/render/importsrender.pro src/render/backend/trianglesextractor.cpp src/render/framegraph/qclearbuffer.h src/render/framegraph/qlighting.h src/render/framegraph/qstateset.h src/render/frontend/qrenderattachment.h src/render/geometry/qabstractattribute.h src/render/geometry/qabstractbuffer.h src/render/geometry/qattribute.h src/render/geometry/qboundingvolumespecifier.h src/render/geometry/qbuffer.h src/render/materialsystem/qfilterkey.h src/render/materialsystem/qparameter.h src/render/materialsystem/qparametermapping.h src/render/renderstates/qblendstate.h src/render/renderstates/qdepthmask.h src/render/renderstates/qpointsize.cpp src/render/renderstates/qrenderstatecreatedchange.cpp src/render/renderstates/qstencilop.h src/render/renderstates/qstencilopseparate.h src/render/renderstates/qstenciltestseparate.h src/render/texture/qabstracttexture.h src/render/texture/qabstracttextureimage.h src/render/texture/qtextureproviders.h Change-Id: I894d7781042cabdaa0cac690c198b57a41127bd4
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-011-2/+2
| | | | | | | | | | | | | | | | ... or equivalent. Task-number: QTBUG-45291 Change-Id: I1453477ad718335ca6c5c0c3447539cb93e21176 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QTransform creates creation changesSean Harmer2016-03-223-0/+21
| | | | | | | | | | | | Task-number: QTBUG-51835 Change-Id: I6d12ce3e556e85b5a237a604d59f209e46591de3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QTransform move rotationX,Y,Z signals to bottomPaul Lemire2016-03-181-2/+2
| | | | | | | | | | Change-Id: I917eda0d198e80018d2e456ebf4303c544fdbd9d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>