| 1 | // Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QT3DRENDER_QPICKTRIANGLEEVENT_H |
| 5 | #define QT3DRENDER_QPICKTRIANGLEEVENT_H |
| 6 | |
| 7 | #include <Qt3DRender/qpickevent.h> |
| 8 | #include <QtCore/qsharedpointer.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DRender { |
| 13 | class QPickTriangleEventPrivate; |
| 14 | |
| 15 | class Q_3DRENDERSHARED_EXPORT QPickTriangleEvent : public QPickEvent |
| 16 | { |
| 17 | Q_OBJECT |
| 18 | Q_PROPERTY(uint triangleIndex READ triangleIndex CONSTANT) |
| 19 | Q_PROPERTY(uint vertex1Index READ vertex1Index CONSTANT) |
| 20 | Q_PROPERTY(uint vertex2Index READ vertex2Index CONSTANT) |
| 21 | Q_PROPERTY(uint vertex3Index READ vertex3Index CONSTANT) |
| 22 | Q_PROPERTY(QVector3D uvw READ uvw CONSTANT) |
| 23 | public: |
| 24 | QPickTriangleEvent(); |
| 25 | QPickTriangleEvent(const QPointF &position, const QVector3D& worldIntersection, const QVector3D& localIntersection, float distance, |
| 26 | uint triangleIndex, uint vertex1Index, uint vertex2Index, uint vertex3Index); |
| 27 | QPickTriangleEvent(const QPointF &position, const QVector3D& worldIntersection, const QVector3D& localIntersection, float distance, |
| 28 | uint triangleIndex, uint vertex1Index, uint vertex2Index, uint vertex3Index, Buttons button, int buttons, int modifiers, |
| 29 | const QVector3D &uvw); |
| 30 | ~QPickTriangleEvent(); |
| 31 | |
| 32 | public: |
| 33 | uint triangleIndex() const; |
| 34 | uint vertex1Index() const; |
| 35 | uint vertex2Index() const; |
| 36 | uint vertex3Index() const; |
| 37 | QVector3D uvw() const; |
| 38 | |
| 39 | private: |
| 40 | Q_DECLARE_PRIVATE(QPickTriangleEvent) |
| 41 | }; |
| 42 | |
| 43 | typedef QSharedPointer<QPickTriangleEvent> QPickTriangleEventPtr; |
| 44 | |
| 45 | } // Qt3DRender |
| 46 | |
| 47 | QT_END_NAMESPACE |
| 48 | |
| 49 | #endif // QT3DRENDER_QPICKTRIANGLEEVENT_H |
| 50 | |