1 | // Copyright (C) 2017 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_QDIFFUSESPECULARMATERIAL_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(QVariant diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged) |
22 | Q_PROPERTY(QVariant specular READ specular WRITE setSpecular NOTIFY specularChanged) |
23 | Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged) |
24 | Q_PROPERTY(QVariant normal READ normal WRITE setNormal NOTIFY normalChanged) |
25 | Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged) |
26 | Q_PROPERTY(bool alphaBlending READ isAlphaBlendingEnabled WRITE setAlphaBlendingEnabled NOTIFY alphaBlendingEnabledChanged) |
27 | |
28 | public: |
29 | explicit (Qt3DCore::QNode *parent = nullptr); |
30 | (); |
31 | |
32 | QColor () const; |
33 | QVariant () const; |
34 | QVariant () const; |
35 | float () const; |
36 | QVariant () const; |
37 | float () const; |
38 | bool () const; |
39 | |
40 | public Q_SLOTS: |
41 | void (const QColor &ambient); |
42 | void (const QVariant &diffuse); |
43 | void (const QVariant &specular); |
44 | void (float shininess); |
45 | void (const QVariant &normal); |
46 | void (float textureScale); |
47 | void (bool enabled); |
48 | |
49 | Q_SIGNALS: |
50 | void (const QColor &ambient); |
51 | void (const QVariant &diffuse); |
52 | void (const QVariant &specular); |
53 | void (float shininess); |
54 | void (const QVariant &normal); |
55 | void (float textureScale); |
56 | void (bool enabled); |
57 | |
58 | private: |
59 | Q_DECLARE_PRIVATE(QDiffuseSpecularMaterial) |
60 | }; |
61 | |
62 | } // namespace Qt3DExtras |
63 | |
64 | QT_END_NAMESPACE |
65 | |
66 | #endif // QT3DEXTRAS_QDIFFUSESPECULARMATERIAL_H |
67 | |