summaryrefslogtreecommitdiffstats
path: root/src/core/core-components/qcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core-components/qcamera.cpp')
-rw-r--r--src/core/core-components/qcamera.cpp11
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