From 709b3039b74f9afca135b9416253164fc0e8d853 Mon Sep 17 00:00:00 2001 From: Volker Enderlein Date: Thu, 9 Jan 2020 15:07:50 +0100 Subject: 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 --- src/render/frontend/qcameralens.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render/frontend/qcameralens.cpp') 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 ids = {entityId, cameraId}; QVariant v; v.setValue(ids); -- cgit v1.2.3