Qt3DExtras::QPhongMaterial Class
class Qt3DExtras::QPhongMaterialLa clase QPhongMaterial proporciona una implementación por defecto del efecto de iluminación phong. Más...
| Cabecera: | #include <QPhongMaterial> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras)target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| Hereda: | Qt3DRender::QMaterial |
| Status: | Obsoleto |
Esta clase está obsoleta. Desaconsejamos su uso en código nuevo.
Propiedades
Funciones públicas
| QPhongMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QPhongMaterial() |
| QColor | ambient() const |
| QColor | diffuse() const |
| float | shininess() const |
| QColor | specular() const |
Ranuras públicas
| void | setAmbient(const QColor &ambient) |
| void | setDiffuse(const QColor &diffuse) |
| void | setShininess(float shininess) |
| void | setSpecular(const QColor &specular) |
Señales
| void | ambientChanged(const QColor &ambient) |
| void | diffuseChanged(const QColor &diffuse) |
| void | shininessChanged(float shininess) |
| void | specularChanged(const QColor &specular) |
Descripción detallada
Esta clase está obsoleta; utilice QDiffuseSpecularMaterial en su lugar.
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) |
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] QPhongMaterial::QPhongMaterial(Qt3DCore::QNode *parent = nullptr)
Construye una nueva instancia de QPhongMaterial con el objeto padre parent.
[virtual noexcept] QPhongMaterial::~QPhongMaterial()
Destruye el QPhongMaterial.
© 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.