diff options
author | Mike Krus <mike.krus@kdab.com> | 2018-01-16 22:02:23 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2018-02-01 21:26:06 +0000 |
commit | 13791f59f8fe9863fbacb7985d06f29522046bad (patch) | |
tree | 790f9c7c178e6b302da440f60a8d7d1f78eed779 /tests | |
parent | 89ec1b820a3be3ab5d3abb408bea4408954e82ac (diff) |
Introduce QScreenRayCaster
Split common functionality into abstract base class. Both frontend
classes use the same backend implementation.
Split common pick functionality for the object picking and ray
casting jobs into abstract base class.
Change-Id: Ieb8bdcf65d81db12234841d72c6cb0160e145bf6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/render/raycasting/tst_raycasting.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/render/raycasting/tst_raycasting.cpp b/tests/auto/render/raycasting/tst_raycasting.cpp index 50e33e272..0f3d04962 100644 --- a/tests/auto/render/raycasting/tst_raycasting.cpp +++ b/tests/auto/render/raycasting/tst_raycasting.cpp @@ -31,7 +31,7 @@ #include <Qt3DRender/private/qraycastingservice_p.h> #include <Qt3DRender/private/sphere_p.h> #include <Qt3DRender/private/entity_p.h> -#include <Qt3DRender/private/pickboundingvolumejob_p.h> +#include <Qt3DRender/private/abstractpickingjob_p.h> #include <Qt3DRender/private/qboundingvolumeprovider_p.h> #include <Qt3DRender/private/qray3d_p.h> #include <Qt3DRender/qcamera.h> @@ -324,7 +324,7 @@ void tst_RayCasting::mousePicking() const QRectF viewport(0.0f, 0.0f, 800.0f, 600.0f); // Window center on near plane - QRay3D ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.center().toPoint(), + QRay3D ray = Qt3DRender::Render::AbstractPickingJob::intersectionRay(viewport.center().toPoint(), camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); @@ -337,7 +337,7 @@ void tst_RayCasting::mousePicking() QVERIFY(intersects); // WHEN - ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.topLeft().toPoint(), + ray = Qt3DRender::Render::AbstractPickingJob::intersectionRay(viewport.topLeft().toPoint(), camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); @@ -347,7 +347,7 @@ void tst_RayCasting::mousePicking() QVERIFY(!intersects); // WHEN - ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.topRight().toPoint(), + ray = Qt3DRender::Render::AbstractPickingJob::intersectionRay(viewport.topRight().toPoint(), camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); @@ -357,7 +357,7 @@ void tst_RayCasting::mousePicking() QVERIFY(!intersects); // WHEN - ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.bottomLeft().toPoint(), + ray = Qt3DRender::Render::AbstractPickingJob::intersectionRay(viewport.bottomLeft().toPoint(), camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); @@ -367,7 +367,7 @@ void tst_RayCasting::mousePicking() QVERIFY(!intersects); // WHEN - ray = Qt3DRender::Render::PickBoundingVolumeJob::intersectionRay(viewport.bottomRight().toPoint(), + ray = Qt3DRender::Render::AbstractPickingJob::intersectionRay(viewport.bottomRight().toPoint(), camera.viewMatrix(), camera.projectionMatrix(), viewport.toRect()); |