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_QNORMALDIFFUSEMAPMATERIAL_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(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged) |
29 | Q_PROPERTY(Qt3DRender::QAbstractTexture *normal READ normal WRITE setNormal NOTIFY normalChanged) |
30 | Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged) |
31 | Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged) |
32 | |
33 | public: |
34 | explicit (Qt3DCore::QNode *parent = nullptr); |
35 | (); |
36 | |
37 | QColor () const; |
38 | QColor () const; |
39 | Qt3DRender::QAbstractTexture *() const; |
40 | Qt3DRender::QAbstractTexture *() const; |
41 | float () const; |
42 | float () const; |
43 | |
44 | public Q_SLOTS: |
45 | void (const QColor &ambient); |
46 | void (const QColor &specular); |
47 | void (Qt3DRender::QAbstractTexture *diffuse); |
48 | void (Qt3DRender::QAbstractTexture *normal); |
49 | void (float shininess); |
50 | void (float textureScale); |
51 | |
52 | Q_SIGNALS: |
53 | void (const QColor &ambient); |
54 | void (Qt3DRender::QAbstractTexture *diffuse); |
55 | void (Qt3DRender::QAbstractTexture *normal); |
56 | void (const QColor &specular); |
57 | void (float shininess); |
58 | void (float textureScale); |
59 | |
60 | protected: |
61 | (QNormalDiffuseMapMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
62 | |
63 | private: |
64 | Q_DECLARE_PRIVATE(QNormalDiffuseMapMaterial) |
65 | }; |
66 | |
67 | } // Qt3DExtras |
68 | |
69 | QT_END_NAMESPACE |
70 | |
71 | #endif // QT3DEXTRAS_QNORMALDIFFUSEMAPMATERIAL_H |
72 | |