diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-11-07 19:02:14 +0000 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-11-17 19:41:18 +0000 |
commit | 26a118cfbce29014864f6cdddae66cccb65ffb4f (patch) | |
tree | daea9f2fc41c1df586c35cd56daa61f920ce5b58 /examples/qt3d/dynamicscene-cpp/boxentity.cpp | |
parent | ace675a084ab944a245500b9f54be653126c3147 (diff) |
Remove transforms property of QTransform
Compound transformations are now built up using QMatrix4x4 in both QML
and C++. Updating examples accordingly.
Change-Id: I03c9abf1f6cdd1b56226dc0e16a7ad5ce84516dd
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/dynamicscene-cpp/boxentity.cpp')
-rw-r--r-- | examples/qt3d/dynamicscene-cpp/boxentity.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/qt3d/dynamicscene-cpp/boxentity.cpp b/examples/qt3d/dynamicscene-cpp/boxentity.cpp index c6f1df33c..3ab25fed0 100644 --- a/examples/qt3d/dynamicscene-cpp/boxentity.cpp +++ b/examples/qt3d/dynamicscene-cpp/boxentity.cpp @@ -41,14 +41,11 @@ BoxEntity::BoxEntity(QNode *parent) : Qt3DCore::QEntity(parent) , m_transform(new Qt3DCore::QTransform()) - , m_translate(new Qt3DCore::QTranslateTransform()) , m_mesh(new Qt3DRender::QCuboidMesh()) , m_material(new Qt3DRender::QPhongMaterial()) , m_angle(0.0f) , m_radius(1.0f) { - m_transform->addTransform(m_translate); - connect(m_material, SIGNAL(diffuseChanged()), this, SIGNAL(diffuseColorChanged())); m_material->setAmbient(Qt::gray); m_material->setSpecular(Qt::white); @@ -101,7 +98,7 @@ float BoxEntity::radius() const void BoxEntity::updateTransformation() { - m_translate->setTranslation(QVector3D(qCos(m_angle) * m_radius, + m_transform->setTranslation(QVector3D(qCos(m_angle) * m_radius, 1.0f, qSin(m_angle) * m_radius)); } |