diff options
author | Volker Enderlein <volker.enderlein@ifm-chemnitz.de> | 2020-01-09 15:07:50 +0100 |
---|---|---|
committer | Volker Enderlein <volker.enderlein@ifm-chemnitz.de> | 2020-01-10 15:59:16 +0100 |
commit | 709b3039b74f9afca135b9416253164fc0e8d853 (patch) | |
tree | 1b1ea9575ce47cff2076e9ccc0877e67207aa32d /src/render/frontend/qcameralens.cpp | |
parent | 56009681f926a3e27258c4355c5d52e9f776d508 (diff) |
Add viewAll support for orthographic projection mode
- 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>
Diffstat (limited to 'src/render/frontend/qcameralens.cpp')
-rw-r--r-- | src/render/frontend/qcameralens.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/frontend/qcameralens.cpp b/src/render/frontend/qcameralens.cpp index cf30b714a..868ee9abf 100644 --- a/src/render/frontend/qcameralens.cpp +++ b/src/render/frontend/qcameralens.cpp @@ -232,7 +232,7 @@ QCameraLensPrivate::QCameraLensPrivate() void QCameraLens::viewAll(Qt3DCore::QNodeId cameraId) { Q_D(QCameraLens); - if (d->m_projectionType == PerspectiveProjection) { + if (d->m_projectionType == PerspectiveProjection || d->m_projectionType == OrthographicProjection) { QVariant v; v.setValue(cameraId); d->m_pendingViewAllCommand = {QLatin1String("QueryRootBoundingVolume"), @@ -245,7 +245,7 @@ void QCameraLens::viewAll(Qt3DCore::QNodeId cameraId) void QCameraLens::viewEntity(Qt3DCore::QNodeId entityId, Qt3DCore::QNodeId cameraId) { Q_D(QCameraLens); - if (d->m_projectionType == PerspectiveProjection) { + if (d->m_projectionType == PerspectiveProjection || d->m_projectionType == OrthographicProjection) { QVector<Qt3DCore::QNodeId> ids = {entityId, cameraId}; QVariant v; v.setValue(ids); |