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

source code of qt3d/src/extras/defaults/qmorphphongmaterial.h