Qt3DExtras::QPhongAlphaMaterial Class
class Qt3DExtras::QPhongAlphaMaterialLa clase QPhongAlphaMaterial proporciona una implementación por defecto del efecto de iluminación phong con alpha. Más...
| Cabecera: | #include <QPhongAlphaMaterial> |
| 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
| QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QPhongAlphaMaterial() |
| float | alpha() const |
| QColor | ambient() const |
| Qt3DRender::QBlendEquation::BlendFunction | blendFunctionArg() const |
| Qt3DRender::QBlendEquationArguments::Blending | destinationAlphaArg() const |
| Qt3DRender::QBlendEquationArguments::Blending | destinationRgbArg() const |
| QColor | diffuse() const |
| float | shininess() const |
| Qt3DRender::QBlendEquationArguments::Blending | sourceAlphaArg() const |
| Qt3DRender::QBlendEquationArguments::Blending | sourceRgbArg() const |
| QColor | specular() const |
Ranuras públicas
| void | setAlpha(float alpha) |
| void | setAmbient(const QColor &ambient) |
| void | setBlendFunctionArg(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg) |
| void | setDestinationAlphaArg(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg) |
| void | setDestinationRgbArg(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg) |
| void | setDiffuse(const QColor &diffuse) |
| void | setShininess(float shininess) |
| void | setSourceAlphaArg(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg) |
| void | setSourceRgbArg(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg) |
| void | setSpecular(const QColor &specular) |
Señales
| void | alphaChanged(float alpha) |
| void | ambientChanged(const QColor &ambient) |
| void | blendFunctionArgChanged(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg) |
| void | destinationAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg) |
| void | destinationRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg) |
| void | diffuseChanged(const QColor &diffuse) |
| void | shininessChanged(float shininess) |
| void | sourceAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg) |
| void | sourceRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg) |
| 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.
- Alfa es la transparencia de la superficie entre 0 (totalmente transparente) y 1 (opaca).
Este material utiliza un efecto con un enfoque de una sola pasada de render 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
alpha : float
Mantiene el componente alfa del objeto que varía entre 0 y 1.
El valor por defecto es 0.5f.
Funciones de acceso:
| float | alpha() const |
| void | setAlpha(float alpha) |
Señal notificadora:
| void | alphaChanged(float alpha) |
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) |
blendFunctionArg : Qt3DRender::QBlendEquation::BlendFunction
Contiene el argumento de la función de ecuación de mezcla.
Funciones de acceso:
| Qt3DRender::QBlendEquation::BlendFunction | blendFunctionArg() const |
| void | setBlendFunctionArg(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg) |
Señal del notificador:
| void | blendFunctionArgChanged(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg) |
Véase también Qt3DRender::QBlendEquation::BlendFunction.
destinationAlphaArg : Qt3DRender::QBlendEquationArguments::Blending
Contiene el argumento de mezcla alfa de destino de la ecuación de mezcla.
Funciones de acceso:
| Qt3DRender::QBlendEquationArguments::Blending | destinationAlphaArg() const |
| void | setDestinationAlphaArg(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg) |
Señal notificadora:
| void | destinationAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg) |
Véase también Qt3DRender::QBlendEquationArguments::Blending.
destinationRgbArg : Qt3DRender::QBlendEquationArguments::Blending
Contiene el argumento de mezcla RGB de destino de la ecuación de mezcla.
Funciones de acceso:
| Qt3DRender::QBlendEquationArguments::Blending | destinationRgbArg() const |
| void | setDestinationRgbArg(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg) |
Señal notificadora:
| void | destinationRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg) |
Véase también Qt3DRender::QBlendEquationArguments::Blending.
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) |
sourceAlphaArg : Qt3DRender::QBlendEquationArguments::Blending
Contiene el argumento de mezcla alfa fuente de la ecuación de mezcla.
Funciones de acceso:
| Qt3DRender::QBlendEquationArguments::Blending | sourceAlphaArg() const |
| void | setSourceAlphaArg(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg) |
Señal notificadora:
| void | sourceAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg) |
Véase también Qt3DRender::QBlendEquationArguments::Blending.
sourceRgbArg : Qt3DRender::QBlendEquationArguments::Blending
Contiene el argumento de mezcla RGB fuente de la ecuación de mezcla.
Funciones de acceso:
| Qt3DRender::QBlendEquationArguments::Blending | sourceRgbArg() const |
| void | setSourceRgbArg(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg) |
Señal notificadora:
| void | sourceRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg) |
Véase también Qt3DRender::QBlendEquationArguments::Blending.
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] QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr)
Construye una nueva instancia de QPhongAlphaMaterial con el objeto padre parent.
[virtual noexcept] QPhongAlphaMaterial::~QPhongAlphaMaterial()
Destruye el QPhongAlphaMaterial.
© 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.