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 /tests | |
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 'tests')
-rw-r--r-- | tests/auto/render/picking/tst_picking.cpp | 6 | ||||
-rw-r--r-- | tests/auto/render/raycasting/tst_raycasting.cpp | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/tests/auto/render/picking/tst_picking.cpp b/tests/auto/render/picking/tst_picking.cpp index 42e7bd49e..54036fc74 100644 --- a/tests/auto/render/picking/tst_picking.cpp +++ b/tests/auto/render/picking/tst_picking.cpp @@ -38,7 +38,6 @@ #include <Qt3DCore/qentity.h> #include <Qt3DCore/qtransform.h> #include <Qt3DCore/QScenePropertyChange> -#include <Qt3DCore/qtranslatetransform.h> #include <Qt3DCore/qboundingvolumeprovider.h> #include <Qt3DRender/private/pickboundingvolumejob_p.h> #include <Qt3DRender/private/objectpicker_p.h> @@ -78,7 +77,6 @@ public: , picker(new MyObjectPicker(this)) , mesh(new QSphereMesh(this)) , transform(new Qt3DCore::QTransform(this)) - , translate(new QTranslateTransform(transform)) , acceptsEvents(true) , pressedCalled(0) , releasedCalled(0) @@ -93,8 +91,7 @@ public: const QByteArray data = (*vertexBuffer->bufferFunctor())(); vertexBuffer->setData(data); - translate->setTranslation(position); - transform->addTransform(translate); + transform->setTranslation(position); addComponent(picker); addComponent(mesh); @@ -108,7 +105,6 @@ public: MyObjectPicker *picker; QSphereMesh *mesh; Qt3DCore::QTransform *transform; - QTranslateTransform *translate; bool acceptsEvents; int pressedCalled; diff --git a/tests/auto/render/raycasting/tst_raycasting.cpp b/tests/auto/render/raycasting/tst_raycasting.cpp index 0c7110edc..57a22a8ee 100644 --- a/tests/auto/render/raycasting/tst_raycasting.cpp +++ b/tests/auto/render/raycasting/tst_raycasting.cpp @@ -322,7 +322,7 @@ void tst_RayCasting::mousePicking() // Window center on near plane Qt3DCore::QRay3D ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.center().toPoint(), - camera.matrix(), + camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); Qt3DRender::Render::Sphere s(QVector3D(0.0f, 0.5f, 0.0f), 1.0f); @@ -335,7 +335,7 @@ void tst_RayCasting::mousePicking() // WHEN ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.topLeft().toPoint(), - camera.matrix(), + camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); intersects = s.intersects(ray, Q_NULLPTR); @@ -345,7 +345,7 @@ void tst_RayCasting::mousePicking() // WHEN ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.topRight().toPoint(), - camera.matrix(), + camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); intersects = s.intersects(ray, Q_NULLPTR); @@ -355,7 +355,7 @@ void tst_RayCasting::mousePicking() // WHEN ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.bottomLeft().toPoint(), - camera.matrix(), + camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); intersects = s.intersects(ray, Q_NULLPTR); @@ -365,7 +365,7 @@ void tst_RayCasting::mousePicking() // WHEN ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.bottomRight().toPoint(), - camera.matrix(), + camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); intersects = s.intersects(ray, Q_NULLPTR); |