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 QT3DCORE_QGEOMETRY_H |
5 | #define QT3DCORE_QGEOMETRY_H |
6 | |
7 | #include <Qt3DCore/qnode.h> |
8 | #include <Qt3DCore/qt3dcore_global.h> |
9 | #include <Qt3DCore/qattribute.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | namespace Qt3DCore { |
14 | |
15 | class QGeometryPrivate; |
16 | |
17 | class Q_3DCORESHARED_EXPORT QGeometry : public Qt3DCore::QNode |
18 | { |
19 | Q_OBJECT |
20 | Q_PROPERTY(Qt3DCore::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged) |
21 | Q_PROPERTY(QVector3D minExtent READ minExtent NOTIFY minExtentChanged QT3D_PROPERTY_REVISION(2, 13)) |
22 | Q_PROPERTY(QVector3D maxExtent READ maxExtent NOTIFY maxExtentChanged QT3D_PROPERTY_REVISION(2, 13)) |
23 | public: |
24 | explicit QGeometry(Qt3DCore::QNode *parent = nullptr); |
25 | ~QGeometry(); |
26 | |
27 | QList<QAttribute *> attributes() const; |
28 | Q_INVOKABLE void addAttribute(Qt3DCore::QAttribute *attribute); |
29 | Q_INVOKABLE void removeAttribute(Qt3DCore::QAttribute *attribute); |
30 | |
31 | QAttribute *boundingVolumePositionAttribute() const; |
32 | QVector3D minExtent() const; |
33 | QVector3D maxExtent() const; |
34 | |
35 | public Q_SLOTS: |
36 | void setBoundingVolumePositionAttribute(QAttribute *boundingVolumePositionAttribute); |
37 | |
38 | Q_SIGNALS: |
39 | void boundingVolumePositionAttributeChanged(QAttribute *boundingVolumePositionAttribute); |
40 | QT3D_REVISION(2, 13) void minExtentChanged(const QVector3D &minExtent); |
41 | QT3D_REVISION(2, 13) void maxExtentChanged(const QVector3D &maxExtent); |
42 | protected: |
43 | explicit QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
44 | |
45 | private: |
46 | Q_DECLARE_PRIVATE(QGeometry) |
47 | }; |
48 | |
49 | } // namespace Qt3DCore |
50 | |
51 | QT_END_NAMESPACE |
52 | |
53 | #endif // QT3DCORE_QGEOMETRY_H |
54 | |