Qt3DExtras::QMorphPhongMaterial Class
class Qt3DExtras::QMorphPhongMaterialLa clase QMorphPhongMaterial proporciona una implementación por defecto del efecto de iluminación phong. Más...
| Cabecera: | #include <QMorphPhongMaterial> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras)target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| Hereda: | Qt3DRender::QMaterial |
| Status: | Obsoleto |
Propiedades
|
Funciones públicas
| QMorphPhongMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QMorphPhongMaterial() |
| QColor | ambient() const |
| QColor | diffuse() const |
| float | interpolator() const |
| float | shininess() const |
| QColor | specular() const |
Ranuras públicas
| void | setAmbient(const QColor &ambient) |
| void | setDiffuse(const QColor &diffuse) |
| void | setInterpolator(float interpolator) |
| void | setShininess(float shininess) |
| void | setSpecular(const QColor &specular) |
Señales
| void | ambientChanged(const QColor &ambient) |
| void | diffuseChanged(const QColor &diffuse) |
| void | interpolatorChanged(float interpolator) |
| void | shininessChanged(float shininess) |
| void | specularChanged(const QColor &specular) |
Descripción detallada
El efecto de iluminación phong se basa en la combinación de 3 componentes de iluminación: ambiental, difusa y especular. La intensidad relativa de estos componentes se controla mediante sus coeficientes de reflectividad, que se modelan como tripletes RGB:
- Ambiente es el color que emite un objeto sin ninguna otra fuente de luz.
- Difuso es el color emitido por los reflejos de la superficie con las luces.
- Especular es el color que se emite para los reflejos brillantes de la superficie con las luces.
- El brillo de una superficie se controla mediante una propiedad float.
Este material utiliza un efecto con un enfoque de una sola pasada de renderizado y realiza la iluminación por fragmento. Se proporcionan técnicas para OpenGL 2, OpenGL 3 o superior así como OpenGL ES 2.
Documentación de propiedades
ambient : QColor
Mantiene el color ambiente.
Funciones de acceso:
| QColor | ambient() const |
| void | setAmbient(const QColor &ambient) |
Señal de aviso:
| void | ambientChanged(const QColor &ambient) |
diffuse : QColor
Mantiene el color difuso.
Funciones de acceso:
| QColor | diffuse() const |
| void | setDiffuse(const QColor &diffuse) |
Señal de aviso:
| void | diffuseChanged(const QColor &diffuse) |
interpolator : float
Contiene el método de interpolación del efecto de iluminación Phong.
Funciones de acceso:
| float | interpolator() const |
| void | setInterpolator(float interpolator) |
Señal de aviso:
| void | interpolatorChanged(float interpolator) |
shininess : float
Contiene el exponente del brillo.
Funciones de acceso:
| float | shininess() const |
| void | setShininess(float shininess) |
Señal del notificador:
| void | shininessChanged(float shininess) |
specular : QColor
Mantiene el color especular.
Funciones de acceso:
| QColor | specular() const |
| void | setSpecular(const QColor &specular) |
Señal del notificador:
| void | specularChanged(const QColor &specular) |
Documentación de la función miembro
[explicit] QMorphPhongMaterial::QMorphPhongMaterial(Qt3DCore::QNode *parent = nullptr)
Construye una nueva instancia de QMorphPhongMaterial con el objeto padre parent.
[virtual noexcept] QMorphPhongMaterial::~QMorphPhongMaterial()
Destruye el QMorphPhongMaterial.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.