summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/qcamera.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add viewAll support for orthographic projection modeVolker Enderlein2020-01-101-8/+24
| | | | | | | | | | | - viewAll was not supported for orthographic projection mode - Fix viewAll for perspective projection mode - the bounding volume was not fully visible in the render view after applying viewAll Task-number: QTBUG-80078 Change-Id: Ibf7486e41b02997b6b7426bde9a86b2d6c0d2e06 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Fix documentation warningsTopi Reinio2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - Add (basic) documentation for Qt3DAnimation::QAnimationCallback. - Add missing namespace qualifiers for \class, \fn, \instantiates, \sa, and \property commands. - Remove linking to example file pages, as QDoc no longe treats them as linkable targets. - Fix function/QML method parameter documentation - Fix missing \qmlproperty types - Fix linking to QKeyEvent in QtGui. - Move Qt3DRender::Quick namespace documentation to where QDoc can see it. - Add enum documentation for Qt3DRender::QBlitFramebuffer::InterpolationMethod and Qt3DRender::QMesh::Status. - Other minor fixes This brings the current warning count to zero. Fixes: QTBUG-79822 Change-Id: I1154a7f9c34917a3f240e99da0e7a300be7d65a0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-111-0/+20
|\ | | | | | | Change-Id: I4e73060c1941773efcc568f010f5b073ebb10d4a
| * Expand QCamera::exposure documentationMichael Brasser2019-08-201-0/+20
| | | | | | | | | | Change-Id: Ia844b046720b530fbb9b7bac096d1853710225c3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QCamera: make lens and transform accessible to QMLPaul Lemire2019-08-291-0/+24
|/ | | | | | Change-Id: I0d5157586b2410fd23def457ade5b3894757965d Task-number: QTBUG-76703 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Expand documentation for CameraMichael Brasser2019-07-121-15/+88
| | | | | Change-Id: Id886decd4f2bd83a2319b4ad792a15b7280cb448 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch '5.9' into 5.10Sean Harmer2018-01-221-17/+50
|\ | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcamera.cpp tests/auto/render/render.pro Change-Id: I8f848a1f863d07eecb328965fbe27d74b8d442f1
| * Deprecate viewMatrix() on QCamera because its name is misleadingSvenn-Arne Dragly2018-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | The matrix returned by viewMatrix() is in a coordinate system relative to its parent, which is not the final view matrix used when rendering. The final view matrix depends on the world transform of the camera, but we do not calculate this on the frontend for performance reasons. We therefore deprecate this function because its name is misleading. Change-Id: Ib7891c13d83b4de43b86dde878994f66979ecb02 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Calculate and store real transform of camera in addition to view matrixSvenn-Arne Dragly2018-01-221-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to store the viewMatrix as returned by QMatrix4x4::lookAt in the transform component of the QCamera. This was unfortunate for two reasons: 1) An arbitrary entity could not be used as a camera without changing its transform to a viewMatrix, which breaks any other use of the entity. 2) Adding entities as children to cameras lead to the wrong transformation. This made it impossible to properly add objects that should be attached to the camera, such as the hands of a character in first-person view. This commit computes the transform of the camera based on the requested position, view center and up vector. The view matrix is calculated when the matrices are updated in the RenderView. This calculation assumes that the view direction is along the entity's negative z-axis and that the up vector is along the y-axis. Change-Id: If22b29e3d38bf55fbf79e9f7baf0c922e0a48aeb Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support to move the camera so that the entire model is visibleMike Krus2017-05-231-0/+82
|/ | | | | | | | | | | | | | Adds QCamera::viewAll(), QCamera::viewEntity() and QCamera::viewSphere() to move and rotate the camera so that the view center is the center of the sphere and the sphere fits inside the viewport Only works in perspective projection. Introduces a job to compute the bounding sphere of the scene excluding the camera. Change-Id: Id9d67787ea91c354009d5358d5db63a1c9480c70 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add exposure to QCamera's APIKevin Ottens2017-01-311-0/+21
| | | | | Change-Id: I10b8248f10dac510f7750a230cd9a66793ed26a0 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>
* Update QCamera docsAntti Määttä2016-09-021-81/+310
| | | | | | | Add missing docs Change-Id: I700e47f8e221034b12a165e9e5f0493d8e9d9960 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge branch '5.7.0' into 5.7Sean Harmer2016-06-141-47/+177
|\ | | | | | | Change-Id: I6e7f3fded06f8295f33998196e826ac6d4b1513e
| * Fix broken connection due to API change in b1ace55v5.7.0Sean Harmer2016-06-121-2/+2
| | | | | | | | | | | | | | | | | | Fixed by also removing QMatrix4x4 argument in the camera's viewMatrixChanged() signal. Task-number: QTBUG-54039 Change-Id: Icf050aa73a684df824ed34584340911ec6b83f7f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Adding QDoc to QCameraRobert Brock2016-06-081-45/+175
| | | | | | | | | | | | | | | | | | Adding skeletal documentation to QCamera Task-number: QTBUG-46037 Change-Id: I7b130b4ccf8466e97a7467ede9d41e5f4a4099c6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Use fuzzy compare in qCameraMäättä Antti2016-06-071-3/+3
|/ | | | | | | | | Changed vector comparisons to use qFuzzyCompare Task-number: QTBUG-53670 Change-Id: I074ae099ac6897c5dd498950e5ef28ece3b4ffbc Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* De-inline dtors of public polymorphic classesMarc Mutz2016-05-191-0/+5
| | | | | | | | | | | | | | 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>
* QNode: make cleanup a private slotPaul Lemire2016-04-231-5/+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>
* Minor documentation fixesTomi Korpipää2016-04-191-1/+0
| | | | | Change-Id: I5eee874b68c17252acbeccd3f1bde2c2108dc674 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow to specify a custom projection matrix.Volker Krause2016-03-201-1/+6
| | | | | | Task-number: QTBUG-48573 Change-Id: I349b6efe9571158d4d4a8ec48f20e1e38599b932 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Only emit camera changed signals when actually changed smth.Wieland Hagen2016-02-241-16/+23
| | | | | Change-Id: If79f8853070e1712a17943ea8b773c2e6112cd6c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unify license header usageAntti Kokko2016-01-261-11/+14
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Move QCamera/QCameraLens to Qt3DRenderPaul Lemire2016-01-161-0/+486
Also get rid of Qt3DRender::QWindow and of the hard codes camera controller. Change-Id: I307735d01caf97b7a690b28de8dc99fc9866c35f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>