diff options
Diffstat (limited to 'src/core/core-components/qcameralens_p.h')
-rw-r--r-- | src/core/core-components/qcameralens_p.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core-components/qcameralens_p.h b/src/core/core-components/qcameralens_p.h index f0c810357..10d1aaf8e 100644 --- a/src/core/core-components/qcameralens_p.h +++ b/src/core/core-components/qcameralens_p.h @@ -62,6 +62,9 @@ public: case QCameraLens::PerspectiveProjection: updatePerpectiveProjection(); break; + case QCameraLens::FrustumProjection: + updateFrustumProjection(); + break; } } @@ -98,6 +101,14 @@ private: m_projectionMatrix.ortho(m_left, m_right, m_bottom, m_top, m_nearPlane, m_farPlane); Q_EMIT q->projectionMatrixChanged(); } + + inline void updateFrustumProjection() + { + Q_Q(QCameraLens); + m_projectionMatrix.setToIdentity(); + m_projectionMatrix.frustum(m_left, m_right, m_bottom, m_top, m_nearPlane, m_farPlane); + Q_EMIT q->projectionMatrixChanged(); + } }; } // namespace Qt3D |