Класс QMorphPhongMaterial
класс Qt3DExtras::QMorphPhongMaterialКласс QMorphPhongMaterial предоставляет стандартную реализацию эффекта освещения Phong. Подробнее...
| Заголовок: | #include <QMorphPhongMaterial> |
| CMake: | find_package(Qt6 COMPONENTS 3dextras REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| С тех пор: | Qt 5.7 |
| Наследует: | Qt3DRender::QMaterial |
Свойства
|
Открытые функции
| QMorphPhongMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QMorphPhongMaterial() |
| QColor | ambient() const |
| QColor | diffuse() const |
| float | interpolator() const |
| float | shininess() const |
| QColor | specular() const |
Открытые слоты
| void | setAmbient(const QColor &ambient) |
| void | setDiffuse(const QColor &diffuse) |
| void | setInterpolator(float interpolator) |
| void | setShininess(float shininess) |
| void | setSpecular(const QColor &specular) |
Сигналы
| void | ambientChanged(const QColor &ambient) |
| void | diffuseChanged(const QColor &diffuse) |
| void | interpolatorChanged(float interpolator) |
| void | shininessChanged(float shininess) |
| void | specularChanged(const QColor &specular) |
Подробное описание
Эффект освещения Phong основан на сочетании 3 компонентов освещения: ambient, diffuse и specular. Относительные значения этих компонентов контролируются с помощью коэффициентов отражения, которые моделируются как RGB-тройки:
- Ambient — цвет, излучаемый объектом без других источников света.
- Diffuse — цвет, излучаемый для отражений от шероховатых поверхностей с источниками света.
- Specular — цвет, излучаемый для отражений от блестящих поверхностей с источниками света.
- Блеск поверхности контролируется свойством float.
Этот материал использует эффект с одним проходом отрисовки и выполняет освещение по фрагменту. Представлены методы для OpenGL 2, OpenGL 3 или выше, а также OpenGL ES 2.
Документация по свойствам
ambient : QColor
Содержит цвет ambient.
Функции доступа:
| QColor | ambient() const |
| void | setAmbient(const QColor &ambient) |
Сигнал уведомления:
| void | ambientChanged(const QColor &ambient) |
diffuse : QColor
Содержит цвет diffuse.
Функции доступа:
| QColor | diffuse() const |
| void | setDiffuse(const QColor &diffuse) |
Сигнал уведомления:
| void | diffuseChanged(const QColor &diffuse) |
interpolator : float
Содержит метод интерполяции эффекта освещения Phong.
Функции доступа:
| float | interpolator() const |
| void | setInterpolator(float interpolator) |
Сигнал уведомления:
| void | interpolatorChanged(float interpolator) |
shininess : float
Содержит показатель блеска.
Функции доступа:
| float | shininess() const |
| void | setShininess(float shininess) |
Сигнал уведомления:
| void | shininessChanged(float shininess) |
specular : QColor
Содержит цвет specular.
Функции доступа:
| QColor | specular() const |
| void | setSpecular(const QColor &specular) |
Сигнал уведомления:
| void | specularChanged(const QColor &specular) |
Документация по членам-функциям
QMorphPhongMaterial::QMorphPhongMaterial(Qt3DCore::QNode *parent = nullptr)
Создает новый экземпляр QMorphPhongMaterial с родительским объектом parent.
[virtual] QMorphPhongMaterial::~QMorphPhongMaterial()
Удаляет QMorphPhongMaterial.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.1/qt3dextras-qmorphphongmaterial.html