diff options
author | Tomi Korpipää <tomi.korpipaa@theqtcompany.com> | 2015-06-25 13:00:54 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@theqtcompany.com> | 2015-06-25 10:08:51 +0000 |
commit | 8dc95e0edc71cefc6c3e5c4cc67bfe385a8a0f32 (patch) | |
tree | b71264a1896b70a33a1642db666c36657eda824c /src/core/core-components/qcamera.cpp | |
parent | 330656aede38ce84735248de1d900a9ab998e826 (diff) |
Fix for shadow pass
Change-Id: Ie7452c66a196ecdf348ed9cf9ca5b7cce7984d7c
Task-number: QTBUG-44988
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/core-components/qcamera.cpp')
-rw-r--r-- | src/core/core-components/qcamera.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core-components/qcamera.cpp b/src/core/core-components/qcamera.cpp index e90479d06..9450ccf5b 100644 --- a/src/core/core-components/qcamera.cpp +++ b/src/core/core-components/qcamera.cpp @@ -77,6 +77,7 @@ QCamera::QCamera(QNode *parent) : QObject::connect(d_func()->m_lookAt, SIGNAL(positionChanged()), this, SIGNAL(positionChanged())); QObject::connect(d_func()->m_lookAt, SIGNAL(upVectorChanged()), this, SIGNAL(upVectorChanged())); QObject::connect(d_func()->m_lookAt, SIGNAL(viewCenterChanged()), this, SIGNAL(viewCenterChanged())); + QObject::connect(d_func()->m_transform, SIGNAL(matrixChanged()), this, SIGNAL(matrixChanged())); d_func()->m_transform->addTransform(d_func()->m_lookAt); addComponent(d_func()->m_lens); addComponent(d_func()->m_transform); @@ -104,6 +105,7 @@ QCamera::QCamera(QCameraPrivate &dd, QNode *parent) QObject::connect(d_func()->m_lookAt, SIGNAL(positionChanged()), this, SIGNAL(positionChanged())); QObject::connect(d_func()->m_lookAt, SIGNAL(upVectorChanged()), this, SIGNAL(upVectorChanged())); QObject::connect(d_func()->m_lookAt, SIGNAL(viewCenterChanged()), this, SIGNAL(viewCenterChanged())); + QObject::connect(d_func()->m_transform, SIGNAL(matrixChanged()), this, SIGNAL(matrixChanged())); d_func()->m_transform->addTransform(d_func()->m_lookAt); addComponent(d_func()->m_lens); addComponent(d_func()->m_transform); @@ -456,6 +458,15 @@ QVector3D QCamera::viewCenter() const return d->m_lookAt->viewCenter(); } +/*! + \qmlproperty matrix4x4 Qt3D::Camera::matrix +*/ +QMatrix4x4 QCamera::matrix() const +{ + Q_D(const QCamera); + return d->m_transform->matrix(); +} + } // Qt3D QT_END_NAMESPACE |