diff options
Diffstat (limited to 'src/render/picking/qpickevent.h')
-rw-r--r-- | src/render/picking/qpickevent.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/render/picking/qpickevent.h b/src/render/picking/qpickevent.h index 793377ad8..4734a912d 100644 --- a/src/render/picking/qpickevent.h +++ b/src/render/picking/qpickevent.h @@ -38,6 +38,7 @@ #define QT3DRENDER_QPICKEVENT_H #include <QObject> +#include <QVector3D> #include <Qt3DRender/qt3drender_global.h> QT_BEGIN_NAMESPACE @@ -46,12 +47,19 @@ namespace Qt3DRender { class QPickEventPrivate; +class QPickEvent; +typedef QSharedPointer<QPickEvent> QPickEventPtr; + class QT3DRENDERSHARED_EXPORT QPickEvent : public QObject { Q_OBJECT Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted NOTIFY acceptedChanged) + Q_PROPERTY(float distance READ distance CONSTANT) + Q_PROPERTY(QVector3D localIntersection READ localIntersection CONSTANT) + Q_PROPERTY(QVector3D worldIntersection READ worldIntersection CONSTANT) public: QPickEvent(); + QPickEvent(const QVector3D& worldIntersection, const QVector3D& localIntersection, float distance); ~QPickEvent(); bool isAccepted() const; @@ -59,6 +67,10 @@ public: public Q_SLOTS: void setAccepted(bool accepted); + float distance() const; + const QVector3D &worldIntersection() const; + const QVector3D &localIntersection() const; + Q_SIGNALS: void acceptedChanged(bool accepted); @@ -70,4 +82,6 @@ private: QT_END_NAMESPACE +Q_DECLARE_METATYPE(Qt3DRender::QPickEvent*) + #endif // QT3DRENDER_QPICKEVENT_H |