Qt3DRender::QAlphaTest Class
class Qt3DRender::QAlphaTestLa classe QAlphaTest definisce il test di riferimento alfa. Maggiori informazioni...
| Intestazione: | #include <qalphatest.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| In QML: | AlphaTest |
| Eredita da: | Qt3DRender::QRenderState |
| Stato: | Obsoleto |
Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.
Tipi pubblici
| enum | AlphaFunction { Never, Always, Less, LessOrEqual, Equal, …, NotEqual } |
Proprietà
- alphaFunction : AlphaFunction
- referenceValue : float
Funzioni pubbliche
| Qt3DRender::QAlphaTest::AlphaFunction | alphaFunction() const |
| float | referenceValue() const |
Slot pubblici
| void | setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction) |
| void | setReferenceValue(float referenceValue) |
Segnali
| void | alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction) |
| void | referenceValueChanged(float referenceValue) |
Descrizione dettagliata
Come spiega la documentazione di OpenGL, l'alpha test scarta un frammento in base al risultato di un confronto tra il valore alfa del frammento in entrata e un valore di riferimento costante.
Documentazione sui tipi dei membri
enum QAlphaTest::AlphaFunction
Enumerazione dei valori della funzione alfa
| Costante | Valore | Descrizione |
|---|---|---|
Qt3DRender::QAlphaTest::Never | 0x0200 | Non superare mai il test alfa |
Qt3DRender::QAlphaTest::Always | 0x0207 | Supera sempre il test alfa |
Qt3DRender::QAlphaTest::Less | 0x0201 | Supera il test alfa se il valore alfa del frammento è inferiore al valore di riferimento |
Qt3DRender::QAlphaTest::LessOrEqual | 0x0203 | Supera il test alfa se il frammento alfa è minore o uguale al valore di riferimento |
Qt3DRender::QAlphaTest::Equal | 0x0202 | Supera il test alfa se il frammento alfa è uguale al valore di riferimento |
Qt3DRender::QAlphaTest::GreaterOrEqual | 0x0206 | Supera il test alfa se il valore alfa del frammento è maggiore o uguale al valore di riferimento |
Qt3DRender::QAlphaTest::Greater | 0x0204 | Il test alfa è superato se il valore alfa del frammento è maggiore del valore di riferimento |
Qt3DRender::QAlphaTest::NotEqual | 0x0205 | Il test alfa è superato se il valore alfa del frammento non è uguale al valore di riferimento |
Documentazione delle proprietà
alphaFunction : AlphaFunction
Contiene la funzione alfa utilizzata dal test alfa. Il valore predefinito è "Mai".
Funzioni di accesso:
| Qt3DRender::QAlphaTest::AlphaFunction | alphaFunction() const |
| void | setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction) |
Segnale di notifica:
| void | alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction) |
referenceValue : float
Contiene il valore di riferimento utilizzato dal test alfa. Il valore predefinito è 0,0. Se specificato, il valore viene limitato tra 0 e 1.
Funzioni di accesso:
| float | referenceValue() const |
| void | setReferenceValue(float referenceValue) |
Segnale di notifica:
| 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.