summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3drender/items
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2018-01-15 20:59:57 +0000
committerMike Krus <mike.krus@kdab.com>2018-02-01 21:26:15 +0000
commit227733c5305874a3620dfed1d4b4c0465dda5145 (patch)
treee1bb4082b86504c3b22ea1ecd5f3981b04813017 /src/quick3d/quick3drender/items
parent13791f59f8fe9863fbacb7985d06f29522046bad (diff)
QtQuick API for ray casting
Overrides hits property with QJSValue that can be interpreted from Javascript Change-Id: I8795b1fc9fdf4f36357c4bb5c8c5d0b7c5fd6c75 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick3d/quick3drender/items')
-rw-r--r--src/quick3d/quick3drender/items/items.pri10
-rw-r--r--src/quick3d/quick3drender/items/quick3draycaster.cpp133
-rw-r--r--src/quick3d/quick3drender/items/quick3draycaster_p.h92
-rw-r--r--src/quick3d/quick3drender/items/quick3draycaster_p_p.h89
-rw-r--r--src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp84
-rw-r--r--src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h92
-rw-r--r--src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h89
7 files changed, 587 insertions, 2 deletions
diff --git a/src/quick3d/quick3drender/items/items.pri b/src/quick3d/quick3drender/items/items.pri
index 06a33107b..e264624b3 100644
--- a/src/quick3d/quick3drender/items/items.pri
+++ b/src/quick3d/quick3drender/items/items.pri
@@ -18,7 +18,11 @@ HEADERS += \
$$PWD/quick3dparameter_p_p.h \
$$PWD/quick3dparameter_p.h \
$$PWD/quick3drendertargetoutput_p.h \
- $$PWD/quick3dmemorybarrier_p.h
+ $$PWD/quick3dmemorybarrier_p.h \
+ $$PWD/quick3draycaster_p.h \
+ $$PWD/quick3draycaster_p_p.h \
+ $$PWD/quick3dscreenraycaster_p.h \
+ $$PWD/quick3dscreenraycaster_p_p.h
SOURCES += \
$$PWD/quick3drenderpassfilter.cpp \
@@ -39,6 +43,8 @@ SOURCES += \
$$PWD/quick3dgeometry.cpp \
$$PWD/quick3dbuffer.cpp \
$$PWD/quick3drendertargetoutput.cpp \
- $$PWD/quick3dmemorybarrier.cpp
+ $$PWD/quick3dmemorybarrier.cpp \
+ $$PWD/quick3draycaster.cpp \
+ $$PWD/quick3dscreenraycaster.cpp
INCLUDEPATH += $$PWD
diff --git a/src/quick3d/quick3drender/items/quick3draycaster.cpp b/src/quick3d/quick3drender/items/quick3draycaster.cpp
new file mode 100644
index 000000000..fa05b67d6
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3draycaster.cpp
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <Qt3DQuickRender/private/quick3draycaster_p.h>
+#include <Qt3DQuickRender/private/quick3draycaster_p_p.h>
+#include <Qt3DCore/private/qscene_p.h>
+
+#include <Qt3DCore/QEntity>
+
+#include <QQmlEngine>
+#include <QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+void Quick3DRayCasterPrivate::dispatchHits(const QAbstractRayCaster::Hits &hits)
+{
+ m_hits = hits;
+ updateHitEntites(m_hits, m_scene);
+
+ Q_Q(Quick3DRayCaster);
+ if (!m_engine)
+ m_engine = qmlEngine(q->parent());
+
+ m_jsHits = convertHits(m_hits, m_engine);
+
+ bool v = q->blockNotifications(true);
+ emit q->hitsChanged(m_jsHits);
+ q->blockNotifications(v);
+}
+
+QJSValue Quick3DRayCasterPrivate::convertHits(const QAbstractRayCaster::Hits &hits, QQmlEngine *engine)
+{
+ auto jsHits = engine->newArray(hits.length());
+ for (int i=0; i<hits.size(); i++) {
+ QJSValue v = engine->newObject();
+ v.setProperty(QLatin1Literal("type"), hits[i].type());
+ v.setProperty(QLatin1Literal("entity"), engine->newQObject(hits[i].entity()));
+ v.setProperty(QLatin1Literal("distance"), hits[i].distance());
+ {
+ QJSValue p = engine->newObject();
+ p.setProperty(QLatin1Literal("x"), hits[i].localIntersection().x());
+ p.setProperty(QLatin1Literal("y"), hits[i].localIntersection().y());
+ p.setProperty(QLatin1Literal("z"), hits[i].localIntersection().z());
+ v.setProperty(QLatin1Literal("localIntersection"), p);
+ }
+ {
+ QJSValue p = engine->newObject();
+ p.setProperty(QLatin1Literal("x"), hits[i].worldIntersection().x());
+ p.setProperty(QLatin1Literal("y"), hits[i].worldIntersection().y());
+ p.setProperty(QLatin1Literal("z"), hits[i].worldIntersection().z());
+ v.setProperty(QLatin1Literal("worldIntersection"), p);
+ }
+
+ switch (hits[i].type()) {
+ case Qt3DRender::QRayCasterHit::TriangleHit:
+ v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex());
+ v.setProperty(QLatin1Literal("vertex1Index"), hits[i].vertex1Index());
+ v.setProperty(QLatin1Literal("vertex2Index"), hits[i].vertex2Index());
+ v.setProperty(QLatin1Literal("vertex3Index"), hits[i].vertex3Index());
+ break;
+ case Qt3DRender::QRayCasterHit::LineHit:
+ v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex());
+ v.setProperty(QLatin1Literal("vertex1Index"), hits[i].vertex1Index());
+ v.setProperty(QLatin1Literal("vertex2Index"), hits[i].vertex2Index());
+ break;
+ case Qt3DRender::QRayCasterHit::PointHit:
+ v.setProperty(QLatin1Literal("primitiveIndex"), hits[i].primitiveIndex());
+ break;
+ default: break;
+ }
+
+ jsHits.setProperty(i, v);
+ }
+
+ return jsHits;
+}
+
+Quick3DRayCaster::Quick3DRayCaster(QObject *parent)
+ : QRayCaster(*new Quick3DRayCasterPrivate(), qobject_cast<Qt3DCore::QNode *>(parent))
+{
+}
+
+QJSValue Quick3DRayCaster::hits() const
+{
+ Q_D(const Quick3DRayCaster);
+ return d->m_jsHits;
+}
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3draycaster_p.h b/src/quick3d/quick3drender/items/quick3draycaster_p.h
new file mode 100644
index 000000000..682cee7f7
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3draycaster_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_H
+#define QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <Qt3DRender/qraycaster.h>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuick/private/quick3dnode_p.h>
+
+#include <QtQml/QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+class Quick3DRayCasterPrivate;
+
+class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCaster : public QRayCaster
+{
+ Q_OBJECT
+ Q_PROPERTY(QJSValue hits READ hits NOTIFY hitsChanged)
+public:
+ explicit Quick3DRayCaster(QObject *parent = 0);
+
+ QJSValue hits() const;
+
+Q_SIGNALS:
+ void hitsChanged(const QJSValue &hits);
+
+private:
+ Q_DECLARE_PRIVATE(Quick3DRayCaster)
+};
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
+
+#endif // QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_H
+
diff --git a/src/quick3d/quick3drender/items/quick3draycaster_p_p.h b/src/quick3d/quick3drender/items/quick3draycaster_p_p.h
new file mode 100644
index 000000000..d1bef5be3
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3draycaster_p_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_P_H
+#define QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <Qt3DRender/private/qabstractraycaster_p.h>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuickRender/private/quick3draycaster_p.h>
+#include <Qt3DQuick/private/quick3dnode_p.h>
+
+#include <QtQml/QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCasterPrivate : public QAbstractRayCasterPrivate
+{
+public:
+ explicit Quick3DRayCasterPrivate() : QAbstractRayCasterPrivate() { }
+
+ QJSValue m_jsHits;
+ QQmlEngine *m_engine = nullptr;
+
+ void dispatchHits(const QAbstractRayCaster::Hits &hits) override;
+ static QJSValue convertHits(const QAbstractRayCaster::Hits &hits, QQmlEngine *engine);
+
+ Q_DECLARE_PUBLIC(Quick3DRayCaster)
+};
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
+
+#endif // QT3DRENDER_RENDER_QUICK_QUICKRAYCASTER_P_P_H
+
diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp
new file mode 100644
index 000000000..629acf0f3
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <Qt3DQuickRender/private/quick3dscreenraycaster_p.h>
+#include <Qt3DQuickRender/private/quick3dscreenraycaster_p_p.h>
+#include <Qt3DQuickRender/private/quick3draycaster_p_p.h>
+#include <Qt3DCore/private/qscene_p.h>
+
+#include <Qt3DCore/QEntity>
+
+#include <QQmlEngine>
+#include <QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+void Quick3DScreenRayCasterPrivate::dispatchHits(const QAbstractRayCaster::Hits &hits)
+{
+ m_hits = hits;
+ updateHitEntites(m_hits, m_scene);
+
+ Q_Q(Quick3DScreenRayCaster);
+ if (!m_engine)
+ m_engine = qmlEngine(q->parent());
+
+ m_jsHits = Quick3DRayCasterPrivate::convertHits(m_hits, m_engine);
+ emit q->hitsChanged(m_jsHits);
+}
+
+Quick3DScreenRayCaster::Quick3DScreenRayCaster(QObject *parent)
+ : QScreenRayCaster(*new Quick3DScreenRayCasterPrivate(), qobject_cast<Qt3DCore::QNode *>(parent))
+{
+}
+
+QJSValue Quick3DScreenRayCaster::hits() const
+{
+ Q_D(const Quick3DScreenRayCaster);
+ return d->m_jsHits;
+}
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h
new file mode 100644
index 000000000..5d9b157cd
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_H
+#define QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <Qt3DRender/qscreenraycaster.h>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuick/private/quick3dnode_p.h>
+
+#include <QtQml/QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+class Quick3DScreenRayCasterPrivate;
+
+class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCaster : public QScreenRayCaster
+{
+ Q_OBJECT
+ Q_PROPERTY(QJSValue hits READ hits NOTIFY hitsChanged)
+public:
+ explicit Quick3DScreenRayCaster(QObject *parent = 0);
+
+ QJSValue hits() const;
+
+Q_SIGNALS:
+ void hitsChanged(const QJSValue &hits);
+
+private:
+ Q_DECLARE_PRIVATE(Quick3DScreenRayCaster)
+};
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
+
+#endif // QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_H
+
diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h
new file mode 100644
index 000000000..5c58e5087
--- /dev/null
+++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_P_H
+#define QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <Qt3DRender/private/qabstractraycaster_p.h>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuick/private/quick3dnode_p.h>
+
+#include <QtQml/QJSValue>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+namespace Render {
+namespace Quick {
+
+class Quick3DScreenRayCaster;
+
+class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCasterPrivate : public QAbstractRayCasterPrivate
+{
+public:
+ explicit Quick3DScreenRayCasterPrivate() : QAbstractRayCasterPrivate() { }
+
+ QJSValue m_jsHits;
+ QQmlEngine *m_engine = nullptr;
+
+ void dispatchHits(const QAbstractRayCaster::Hits &hits) override;
+
+ Q_DECLARE_PUBLIC(Quick3DScreenRayCaster)
+};
+
+} // namespace Quick
+} // namespace Render
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
+
+#endif // QT3DRENDER_RENDER_QUICK_QUICKSCREENRAYCASTER_P_P_H
+