| 1 | // Copyright (C) 2014 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_QDIFFUSEMAPMATERIAL_H |
| 5 | #define |
| 6 | |
| 7 | #include <Qt3DExtras/qt3dextras_global.h> |
| 8 | #include <Qt3DRender/qmaterial.h> |
| 9 | #include <QtGui/QColor> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | namespace Qt3DRender { |
| 14 | |
| 15 | class QAbstractTexture; |
| 16 | |
| 17 | } // namespace Qt3DRender |
| 18 | |
| 19 | namespace Qt3DExtras { |
| 20 | |
| 21 | class ; |
| 22 | |
| 23 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DRender::QMaterial |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) |
| 27 | Q_PROPERTY(QColor specular READ specular WRITE setSpecular NOTIFY specularChanged) |
| 28 | Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged) |
| 29 | Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged) |
| 30 | Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged) |
| 31 | |
| 32 | public: |
| 33 | explicit (Qt3DCore::QNode *parent = nullptr); |
| 34 | (); |
| 35 | |
| 36 | QColor () const; |
| 37 | QColor () const; |
| 38 | float () const; |
| 39 | Qt3DRender::QAbstractTexture *() const; |
| 40 | float () const; |
| 41 | |
| 42 | public Q_SLOTS: |
| 43 | void (const QColor &color); |
| 44 | void (const QColor &specular); |
| 45 | void (float shininess); |
| 46 | void (Qt3DRender::QAbstractTexture *diffuse); |
| 47 | void (float textureScale); |
| 48 | |
| 49 | Q_SIGNALS: |
| 50 | void (const QColor &ambient); |
| 51 | void (Qt3DRender::QAbstractTexture *diffuse); |
| 52 | void (const QColor &specular); |
| 53 | void (float shininess); |
| 54 | void (float textureScale); |
| 55 | |
| 56 | private: |
| 57 | Q_DECLARE_PRIVATE(QDiffuseMapMaterial) |
| 58 | }; |
| 59 | |
| 60 | } // Qt3DExtras |
| 61 | |
| 62 | QT_END_NAMESPACE |
| 63 | |
| 64 | #endif // QT3DEXTRASQDIFFUSEMAPMATERIAL_H |
| 65 | |