summaryrefslogtreecommitdiffstats
path: root/src/animation
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-233-12/+38
|\ | | | | | | Change-Id: I8c12142e4733d0d95fde3e673eb684c47363ff6f
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-163-12/+38
| |\ | | | | | | | | | Change-Id: I0f68ab1277617c32b1c31f29d8793d23d9909208
| | * Take shortest path on quaternion slerpJuan Jose Casafranca2019-07-153-12/+38
| | | | | | | | | | | | | | | Change-Id: I4499e945481a22adfbafcc82198f7c411d04301b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devPaul Lemire2019-06-031-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/renderer/renderer.cpp tests/auto/render/textures/tst_textures.cpp Change-Id: I4da0eafe7ddd4dd822c3dcb5f5fa826653a335b4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-261-3/+3
| |\| | | | | | | | | | Change-Id: I4a35126d98e04ed228e5b3a4ed9157995bef3a0a
| | * Check if animation channel only have one component and shortcircuitJuan Jose Casafranca2019-05-141-3/+3
| | | | | | | | | | | | | | | Change-Id: I6f80d3378fe3002142e2d84d410bcbf356cb02ea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Eradicate Q_FOREACH loops and mark the module cleanMarc Mutz2019-05-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only noteworth change is where a loop around spy.events modified the container using takeFirst(). There was no reason to do so, so it was changed to use the loop variable instead of the result of taking. Change-Id: I02c62a7c2efc5d042c6e669fe5daddd7da7e85d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-185-12/+6
|\| | | | | | | | | | | Change-Id: I830139030c589f9f9354223dc9a73dbe3e137532
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-135-12/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/render/shaderbuilder/tst_shaderbuilder.cpp Change-Id: I27de9b83fa6ef6bb319e4b11c932f91f9ff92dc3
| | * QChannelMapping: only send const char *propertyName to backendPaul Lemire2019-05-105-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was otherwise sending a QString property as well as the const char *propertyName. Given only propertyName is actually used, remove QString property from the backend to avoid useless confusion and stop sending the notification change. Change-Id: Ie26771e320e26d44d7fce3e0a864bad1d4df558f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Liang Qi2019-05-097-78/+176
|\| | | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 5.12 into 5.13Paul Lemire2019-04-267-78/+176
| |\| | | | | | | | | | Change-Id: I42affdd02bddb5205b9f2455f0c5e5efbd414dd8
| | * Fix slerp interpolation when two quats are equalJuan Jose Casafranca2019-04-221-4/+4
| | | | | | | | | | | | | | | Change-Id: Ibcf668adfc3d701bf2b27f9f25626f819e2445b3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Animations: handle variable length propertiesPaul Lemire2019-04-037-74/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | For that we know determine the expected number of channel components for a given property in the frontend where we have access to both the type and the value rather than in the backend using the type only. Change-Id: I75aca20d43dd1b3db316c303af041acd557c07e4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Fix some warningsSergio Martins2019-05-091-3/+0
|/ / | | | | | | | | | | | | | | | | | | | | In preparation to mark the module with warning_clean backend/gltfimporter.cpp:345:19: warning: unused variable 's' [-Wunused-variable] backend/gltfimporter.cpp:353:19: warning: unused variable 't' [-Wunused-variable] Change-Id: I1c69e7cb3931fb6a1d3e352c59f7147b958a00f0 Reviewed-by: Andy Maloney <asmaloney@gmail.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* / Switch export macros to standard formKai Koehne2019-04-0233-35/+35
|/ | | | | | | | | | | | Qt expects the export macros to have Q_ prefixes, otherwise the symbol versioning script won't find them and mark them. Also remove non-exising QT3DLOGIC_PRIVATE_EXPORT macro from src/doc/qt3d.qdocconf Task-number: QTBUG-74752 Change-Id: I71b9e85ff09c002fb283824aa51a5a8f50e937f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Dont play animations that are disabledJuan Jose Casafranca2019-03-281-0/+2
| | | | | | Change-Id: I5293ff8d16c511de79c4583783b238154af32f61 Task-number: QTBUG-69373 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make slerping saferSean Harmer2019-03-111-6/+13
| | | | | | | | Now handles case where the two bounding keyframe quaternions are equal by returning the first as the interpolated value. Change-Id: I43d0dfb1e20afafd690817d30aeac2d510847422 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use slerp for animating rotation channelsJuan Jose Casafranca2019-02-224-12/+124
| | | | | Change-Id: Ic6aa6fd1c1a1e7757dba9466b59d20834b56e246 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: fix broken links in qanimationcallback.cpp and qframegraphnode.cppv5.12.0-beta3Nico Vertriest2018-10-181-1/+1
| | | | | | | | | | qframegraphnode.cpp:217: Cannot tie this documentation to anything qcallbackmapping.cpp:104: Can't link to 'QAnimationCallback::onValueChanged()' Change-Id: I20fb3a5688c16e86c2a62201991d30f735358d76 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix notifications for QClipAnimator::clip propertyJim Albamont2018-10-051-0/+1
| | | | | | | | | | | Qt3DAnimation::QAbstractAnimationClip was not registered as metatype resulting in the following error when calling QClipAnimator::setClip: QMetaProperty::read: Unable to handle unregistered datatype 'Qt3DAnimation::QAbstractAnimationClip*' for property 'Qt3DAnimation::QClipAnimator::clip Change-Id: If92d781fdab5be06ce11ec88f0b3921cfbd557ff Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Apply similar logic to the native Qt 3D animation clip selectionSean Harmer2018-08-023-6/+42
| | | | | | | | | If the file contains a single animation use that clip. Otherwise we then consider animationName and animationIndex with the index having priority. Change-Id: Id974b1d446d6067bbe4c5ecce9f20891cb1086b0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add support for loading specific animations from glTF 2 filesSean Harmer2018-08-024-12/+53
| | | | | | | | | | | | | | Can now specify source urls to QAnimationClipLoader with query parameters for animationIndex or animationName. Add a new manual test to demonstrate/test this by loading the 2nd animation from the Rigged-Simple.gltf file. Will followup with the same support for Qt 3D native json animation files. Change-Id: Icb66073f29b8471fe06e2e2e9c43720567dc9ee5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Enable ConstantInterpolation for fcurvesJuan Jose Casafranca2018-07-311-2/+1
| | | | | Change-Id: If51c8377f5b29433feaa520a7586f0608b7510f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Check animator can be played in frontend and backendJuan Jose Casafranca2018-07-115-1/+22
| | | | | | | | | | | We check that the animator can be played in the frontend. Each animator subclass must implement their own canPlay method. In the backend we correctly check the clipAnimator can be played Task-number: QTBUG-69369 Change-Id: If8bca9b73321e2bfdb4d68ddc286df0109ee91f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* More fuzzy evaluation when calculating rootsChristian Strømme2018-07-101-1/+1
| | | | | | | | If the discriminant is close to zero, evaluate it as being zero. Change-Id: Ief2624dd512d703e44d8a0c63431baef3cee7c45 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Add missing dots (qt3d)Paul Wicking2018-06-1914-21/+21
| | | | | | Task-number: QTBUG-68933 Change-Id: I4226b8b9d70548b6921948c5ea47520f40f5df98 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-2/+2
|\ | | | | | | Change-Id: I666d4ca1ad39f81e41a9b47a8828d1689ff2b33e
| * Animation: Make a fuzzy comparison when verifying cubic rootsSvenn-Arne Dragly2018-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | Accept cubic roots that are close enough to 0 or 1 that the difference is likely a numerical error. Also add a regression test to catch one of these corner cases. Task-number: QTBUG-67886 Change-Id: Ia05650699638e4bb7d13fa18b31d71071909bd51 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-207-39/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.11, QDoc uses Clang to parse C++ documentation. Clang requires a module header, as well as proper include paths, to build a precompiled header and process the sources. To do this, add a custom module header that pulls in all Qt 3D modules - this way, we can continue using a single documentation project to covers all of Qt 3D. Fix all documentation warnings are caused by missing namespaces, QML module/type names and typos, as well as a number of linking problems and other minor issues. After this change, the remaining documentation issues consist of 'No documentation for ...' warnings. Task-number: QTBUG-67790 Change-Id: I38b91163c475a00cc1893e793240470c5409eb57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Revert "Doc: Divide documentation into submodules"Topi Reinio2018-04-203-279/+0
|/ | | | | | | | | | | This reverts commit c8964b8f1cf56718a189b0f57bad446cec30a8b8. QDoc now supports documentation-specific custom module headers and include headers that allow us to keep using a single documentation project that covers multiple modules. Change-Id: I84706a7149097a6b03f0f266e55d6f712a6c773e Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix findCubicRoots for cases where coefficients are close to zeroSvenn-Arne Dragly2018-03-251-5/+46
| | | | | | | | | | | | | | | The equation is a*x^3 + b*x^2 + c*x + d = 0. Previously, we would divide by zero if a = ~0. This change also makes sure that we return zero no roots in the case where a = ~0 and c*c - 4*b*d < 0, and the case where a = b = c = ~0. Finally, we return 0 or 1 if we're close enough to assume that it could be a numerical error. This change also adds tests for the above cases. Change-Id: I426d2fc6175b3aff6fe099845bf63d433c158536 Co-authored-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Document state of the Qt 3D modulesKai Koehne2018-03-121-4/+7
| | | | | | | | | | | | | Do make it explicit which ones are still in development also in the landing page, and add \preliminary and \since tags (for released and TP modules, respectively). Note that the \preliminary, \since tags currently do not work for \qmlmodule, which hopefully gets fixed at one point: QTBUG-65963. Change-Id: I6648311c38f331286be37eefa60794984cd239b7 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Either fully qualify property types, or not at allVolker Krause2018-03-063-4/+4
| | | | | | | | | The semi-qualified types confuse the meta type system, QAbstractAnimation in particular, as that also exists as a top-level type. Change-Id: If20387fe76d46f88f6a89523d5d3f4aac8b1fef0 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-154-3/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doc: add doc to undocumented methods and properties qt3dNico Vertriest2018-02-063-2/+28
| | | | | | | | | | | | Change-Id: Ia498dd96a6d35997a3f493f26b376fb8fa146196 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-141-0/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderer_p.h tests/auto/render/renderer/tst_renderer.cpp Done-with: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Change-Id: I2ca9bac4777e51434579edf86030414734f533ac
| * Initialize the unused memberThiago Macieira2018-01-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 complains that it is used uninitialized. The line number points to the opening brace of the class, so I suppose it's the implicit copy constructor. Loading undefined floating point values is probably a bad idea. Could generate an FP exception. animationutils_p.h:126:8: error: ‘<anonymous>.Qt3DAnimation::Animation::ChannelNameAndType::pad’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I11d489f37e7e424b971dfffd150e3268d4be9294 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Avoid duplicate animation job dependenciesKaj Grönholm2018-02-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | When testing Qt3D Studio runtime 2.0, noticed slowing down and memory usage increasing which came from AspectTaskRunnable m_dependers growing. Located reason being multiple dependencies to m_findRunningClipAnimatorsJob, so make sure that each job has only single dependency to that and m_loadAnimationClipJob. Task-number: QT3DS-909 Change-Id: I0d3ebc3ea2ab17af51394c69bc32b8aa2db0913e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: Divide documentation into submodulesTopi Reinio2018-02-093-0/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc in Qt 5.11 will use Clang (libclang) to parse C++ documentation. In order to do that, Clang needs to have the include paths available when parsing source; qmake provides that information to QDoc but only when the documentation project is located under the correct module (source) path. By having dedicated doc projects for Qt 3D Core, Render, Input, etc. the number of documentation warnings is signicantly reduced. A top-level 'Qt 3D' project is still kept, and contains the landing page, overview, examples, and top-level 'C++ classes' and 'QML types' pages that list all types documented across all Qt 3D submodules. Change-Id: Id5936de36f31c2a8764a64e1e9d7ae0d10e8ab14 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge branch '5.10' into devSean Harmer2018-01-261-7/+28
|\| | | | | | | Change-Id: I4728b29c349a16867951a781c9417054c798e04a
| * Doc: add doc to undocumented methods in qt3dNico Vertriest2018-01-241-7/+28
| | | | | | | | | | Change-Id: Icde8db3bb95f0275d820f5e0effa01ac2033134b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add normalizedTime function to blendedlclip animatorsChristian Strømme2018-01-238-16/+65
| | | | | | | | | | Change-Id: I19c1907371d9d131295558eb19c297d544ebef7d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for setting a time index in the ClipAnimatorChristian Strømme2018-01-2310-14/+125
| | | | | | | | | | | | | | | | | | This makes it possible to seek the animation clip to a specific position in the time-line. The index is a real value between 0 and 1, where 0.0 is the start of the clip and 1.0 is at the end of the clip Change-Id: Ic8c57d04e4f1e0a7628713e057b5b8a41a400c5a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add convenience functions to convert between seconds and NSsChristian Strømme2018-01-231-1/+5
| | | | | | | | | | | | | | Makes it easier to read and to re-use. Change-Id: I74be7a623d0c2495ff2f6a42ac495ab469bb4d60 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-226-5/+65
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer_p.h src/render/geometry/geometryrenderer.cpp src/render/geometry/qmesh.cpp src/render/geometry/qmesh_p.h tests/auto/render/commons/testrenderer.h tests/auto/render/meshfunctors/tst_meshfunctors.cpp tests/auto/render/qmesh/tst_qmesh.cpp Change-Id: Ia078029e2faf23fe253c5ce385e393c094266e3b
| * Add function to apply channel defaults and call itSean Harmer2018-01-223-0/+12
| | | | | | | | | | | | Change-Id: If3c9515565acf2b1b2b361e07f9abb884c13dcb5 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Generate default channel values as neededSean Harmer2018-01-224-5/+53
| | | | | | | | | | Change-Id: I20871448ba10cf6459b156d00bebdf7a7c8a319b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-2011-72/+285
|\| | | | | | | Change-Id: If94c3e34550fa45ec2df47f813ac7aa22c1de2b1
| * Add a function to calculate the default value for missing channelsSean Harmer2018-01-192-0/+72
| | | | | | | | | | | | Change-Id: Ic7bee59324da81fe2e467fd940029706297fc286 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>