Nesta página

Qt3DExtras::QPhongAlphaMaterial Class

class Qt3DExtras::QPhongAlphaMaterial

A classe QPhongAlphaMaterial oferece uma implementação padrão do efeito de iluminação Phong com canal alfa. Mais...

Cabeçalho: #include <qphongalphamaterial.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
Herdado de: Qt3DRender::QMaterial
Status: Obsoleta

Esta classe está obsoleta. Recomendamos enfaticamente que não seja usada em código novo.

Propriedades

Funções 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

Slots públicos

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)

Sinais

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)

Descrição detalhada

Esta classe está obsoleta; use QDiffuseSpecularMaterial em seu lugar.

O efeito de iluminação Phong baseia-se na combinação de três componentes de iluminação: ambiente, difuso e especular. As intensidades relativas desses componentes são controladas por meio de seus coeficientes de refletividade, que são modelados como tripletos RGB:

  • A luz ambiente é a cor emitida por um objeto sem nenhuma outra fonte de luz.
  • A difusa é a cor emitida por reflexos em superfícies rugosas sob a ação das luzes.
  • A cor especular é a emitida pelas reflexões em superfícies brilhantes sob a luz.
  • O brilho de uma superfície é controlado por uma propriedade do tipo float.
  • Alfa é a transparência da superfície entre 0 (totalmente transparente) e 1 (opaca).

Este material utiliza um efeito com uma abordagem de passagem única de renderização e realiza iluminação por fragmento. São fornecidas técnicas para OpenGL 2, OpenGL 3 ou superior, bem como para OpenGL ES 2.

Documentação das propriedades

alpha : float

Contém o componente alfa do objeto, que varia entre 0 e 1.

O valor padrão é 0,5f.

Funções de acesso:

float alpha() const
void setAlpha(float alpha)

Sinal do notificador:

void alphaChanged(float alpha)

ambient : QColor

Armazena a cor do ambiente.

Funções de acesso:

QColor ambient() const
void setAmbient(const QColor &ambient)

Sinal do notificador:

void ambientChanged(const QColor &ambient)

blendFunctionArg : Qt3DRender::QBlendEquation::BlendFunction

Armazena o argumento da função da equação de mistura.

Funções de acesso:

Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg() const
void setBlendFunctionArg(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)

Sinal de notificação:

void blendFunctionArgChanged(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)

Veja também Qt3DRender::QBlendEquation::BlendFunction.

destinationAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

Armazena o argumento de mistura alfa de destino da equação de mistura.

Funções de acesso:

Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg() const
void setDestinationAlphaArg(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)

Sinal do notificador:

void destinationAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)

Veja também Qt3DRender::QBlendEquationArguments::Blending.

destinationRgbArg : Qt3DRender::QBlendEquationArguments::Blending

Armazena o argumento de mistura RGB de destino da equação de mistura.

Funções de acesso:

Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg() const
void setDestinationRgbArg(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)

Sinal do notificador:

void destinationRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)

Veja também Qt3DRender::QBlendEquationArguments::Blending.

diffuse : QColor

Contém a cor difusa.

Funções de acesso:

QColor diffuse() const
void setDiffuse(const QColor &diffuse)

Sinal do notificador:

void diffuseChanged(const QColor &diffuse)

shininess : float

Armazena o expoente de brilho.

Funções de acesso:

float shininess() const
void setShininess(float shininess)

Sinal do Notifier:

void shininessChanged(float shininess)

sourceAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

Armazena o argumento de mistura alfa da fonte da equação de mistura.

Funções de acesso:

Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg() const
void setSourceAlphaArg(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)

Sinal do Notifier:

void sourceAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)

Veja também Qt3DRender::QBlendEquationArguments::Blending.

sourceRgbArg : Qt3DRender::QBlendEquationArguments::Blending

Armazena o argumento de mistura RGB da equação de mistura.

Funções de acesso:

Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg() const
void setSourceRgbArg(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)

Sinal de notificação:

void sourceRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)

Veja também Qt3DRender::QBlendEquationArguments::Blending.

specular : QColor

Contém a cor especular.

Funções de acesso:

QColor specular() const
void setSpecular(const QColor &specular)

Sinal do Notifier:

void specularChanged(const QColor &specular)

Documentação das funções de membro

[explicit] QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr)

Cria uma nova instância de QPhongAlphaMaterial com o objeto pai parent.

[virtual noexcept] QPhongAlphaMaterial::~QPhongAlphaMaterial()

Destrói o “ 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.