| 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 QT3DEXTRAS_QCUBOIDGEOMETRY_H |
| 5 | #define |
| 6 | |
| 7 | #include <Qt3DExtras/qt3dextras_global.h> |
| 8 | #include <Qt3DCore/qgeometry.h> |
| 9 | #include <QtCore/QSize> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | namespace Qt3DCore { |
| 14 | |
| 15 | class QAttribute; |
| 16 | |
| 17 | } // Qt3DCore |
| 18 | |
| 19 | namespace Qt3DExtras { |
| 20 | |
| 21 | class ; |
| 22 | |
| 23 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DCore::QGeometry |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | Q_PROPERTY(float xExtent READ xExtent WRITE setXExtent NOTIFY xExtentChanged) |
| 27 | Q_PROPERTY(float yExtent READ yExtent WRITE setYExtent NOTIFY yExtentChanged) |
| 28 | Q_PROPERTY(float zExtent READ zExtent WRITE setZExtent NOTIFY zExtentChanged) |
| 29 | Q_PROPERTY(QSize xyMeshResolution READ xyMeshResolution WRITE setXYMeshResolution NOTIFY xyMeshResolutionChanged) |
| 30 | Q_PROPERTY(QSize yzMeshResolution READ yzMeshResolution WRITE setYZMeshResolution NOTIFY yzMeshResolutionChanged) |
| 31 | Q_PROPERTY(QSize xzMeshResolution READ xzMeshResolution WRITE setXZMeshResolution NOTIFY xzMeshResolutionChanged) |
| 32 | Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT) |
| 33 | Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT) |
| 34 | Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT) |
| 35 | Q_PROPERTY(Qt3DCore::QAttribute *tangentAttribute READ tangentAttribute CONSTANT) |
| 36 | Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT) |
| 37 | |
| 38 | public: |
| 39 | explicit (QNode *parent = nullptr); |
| 40 | (); |
| 41 | |
| 42 | void (); |
| 43 | void (); |
| 44 | |
| 45 | float () const; |
| 46 | float () const; |
| 47 | float () const; |
| 48 | QSize () const; |
| 49 | QSize () const; |
| 50 | QSize () const; |
| 51 | |
| 52 | Qt3DCore::QAttribute *() const; |
| 53 | Qt3DCore::QAttribute *() const; |
| 54 | Qt3DCore::QAttribute *() const; |
| 55 | Qt3DCore::QAttribute *() const; |
| 56 | Qt3DCore::QAttribute *() const; |
| 57 | |
| 58 | public Q_SLOTS: |
| 59 | void (float xExtent); |
| 60 | void (float yExtent); |
| 61 | void (float zExtent); |
| 62 | void (const QSize &resolution); |
| 63 | void (const QSize &resolution); |
| 64 | void (const QSize &resolution); |
| 65 | |
| 66 | Q_SIGNALS: |
| 67 | void (float xExtent); |
| 68 | void (float yExtent); |
| 69 | void (float zExtent); |
| 70 | |
| 71 | void (const QSize &yzMeshResolution); |
| 72 | void (const QSize &xzMeshResolution); |
| 73 | void (const QSize &xyMeshResolution); |
| 74 | |
| 75 | protected: |
| 76 | (QCuboidGeometryPrivate &dd, QNode *parent = nullptr); |
| 77 | |
| 78 | private: |
| 79 | Q_DECLARE_PRIVATE(QCuboidGeometry) |
| 80 | }; |
| 81 | |
| 82 | } // Qt3DExtras |
| 83 | |
| 84 | QT_END_NAMESPACE |
| 85 | |
| 86 | #endif // QT3DEXTRAS_QCUBOIDGEOMETRY_H |
| 87 | |