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_QNORMALDIFFUSESPECULARMAPMATERIAL_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 Qt3DExtras { |
14 | |
15 | class ; |
16 | |
17 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DRender::QMaterial |
18 | { |
19 | Q_OBJECT |
20 | Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) |
21 | Q_PROPERTY(Qt3DRender::QAbstractTexture *diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged) |
22 | Q_PROPERTY(Qt3DRender::QAbstractTexture *normal READ normal WRITE setNormal NOTIFY normalChanged) |
23 | Q_PROPERTY(Qt3DRender::QAbstractTexture *specular READ specular WRITE setSpecular NOTIFY specularChanged) |
24 | Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged) |
25 | Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged) |
26 | |
27 | public: |
28 | explicit (Qt3DCore::QNode *parent = nullptr); |
29 | (); |
30 | |
31 | QColor () const; |
32 | Qt3DRender::QAbstractTexture *() const; |
33 | Qt3DRender::QAbstractTexture *() const; |
34 | Qt3DRender::QAbstractTexture *() const; |
35 | float () const; |
36 | float () const; |
37 | |
38 | public Q_SLOTS: |
39 | void (const QColor &ambient); |
40 | void (Qt3DRender::QAbstractTexture *diffuse); |
41 | void (Qt3DRender::QAbstractTexture *normal); |
42 | void (Qt3DRender::QAbstractTexture *specular); |
43 | void (float shininess); |
44 | void (float textureScale); |
45 | |
46 | Q_SIGNALS: |
47 | void (const QColor &ambient); |
48 | void (Qt3DRender::QAbstractTexture *diffuse); |
49 | void (Qt3DRender::QAbstractTexture *normal); |
50 | void (Qt3DRender::QAbstractTexture *specular); |
51 | void (float shininess); |
52 | void (float textureScale); |
53 | |
54 | protected: |
55 | (QNormalDiffuseSpecularMapMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
56 | |
57 | private: |
58 | Q_DECLARE_PRIVATE(QNormalDiffuseSpecularMapMaterial) |
59 | }; |
60 | |
61 | } // namespace Qt3DExtras |
62 | |
63 | QT_END_NAMESPACE |
64 | |
65 | #endif // QT3DEXTRAS_QNORMALDIFFUSESPECULARMAPMATERIAL_H |
66 | |