Nesta página

Qt3DRender::QAlphaTest Class

class Qt3DRender::QAlphaTest

A classe QAlphaTest define o teste de referência alfa. Mais...

Cabeçalho: #include <qalphatest.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
No QML: AlphaTest
Herdado de: Qt3DRender::QRenderState
Status: Obsoleta

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

Tipos públicos

enum AlphaFunction { Never, Always, Less, LessOrEqual, Equal, …, NotEqual }

Propriedades

Funções públicas

Qt3DRender::QAlphaTest::AlphaFunction alphaFunction() const
float referenceValue() const

Slots públicos

void setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)
void setReferenceValue(float referenceValue)

Sinais

void alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)
void referenceValueChanged(float referenceValue)

Descrição detalhada

Conforme explica a documentação do OpenGL: o teste alfa descarta um fragmento com base no resultado de uma comparação entre o valor alfa do fragmento recebido e um valor de referência constante.

Documentação do tipo de membro

enum QAlphaTest::AlphaFunction

Enumeração dos valores da função alfa

ConstanteValorDescrição
Qt3DRender::QAlphaTest::Never0x0200Nunca passa no teste alfa
Qt3DRender::QAlphaTest::Always0x0207Sempre passar no teste alfa
Qt3DRender::QAlphaTest::Less0x0201É aprovado no teste alfa se o alfa do fragmento for menor que o valor de referência
Qt3DRender::QAlphaTest::LessOrEqual0x0203É aprovado no teste alfa se o alfa do fragmento for menor ou igual ao valor de referência
Qt3DRender::QAlphaTest::Equal0x0202Ser aprovado no teste alfa se o alfa do fragmento for igual ao valor de referência
Qt3DRender::QAlphaTest::GreaterOrEqual0x0206Ser aprovado no teste alfa se o valor alfa do fragmento for maior ou igual ao valor de referência
Qt3DRender::QAlphaTest::Greater0x0204O teste alfa é aprovado se o valor alfa do fragmento for maior que o valor de referência
Qt3DRender::QAlphaTest::NotEqual0x0205O teste alfa é aprovado se o valor alfa do fragmento não for igual ao valor de referência

Documentação da propriedade

alphaFunction : AlphaFunction

Armazena a função alfa utilizada pelo teste alfa. O valor padrão é “Nunca”.

Funções de acesso:

Qt3DRender::QAlphaTest::AlphaFunction alphaFunction() const
void setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)

Sinal do notificador:

void alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)

referenceValue : float

Armazena o valor de referência utilizado pelo teste alfa. O valor padrão é 0,0. Quando definido, o valor é limitado entre 0 e 1.

Funções de acesso:

float referenceValue() const
void setReferenceValue(float referenceValue)

Sinal do notificador:

void referenceValueChanged(float referenceValue)

© 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.