Qt3DRender::QDepthTest Class
class Qt3DRender::QDepthTestLa classe QDepthTest confronta il valore di profondità dello shader dei frammenti con la profondità di un campione su cui si sta scrivendo. Per saperne di più...
| Intestazione: | #include <qdepthtest.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| In QML: | DepthTest |
| Eredita da: | Qt3DRender::QRenderState |
| Stato: | Obsoleto |
Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.
Tipi pubblici
| enum | DepthFunction { Never, Always, Less, LessOrEqual, Equal, …, NotEqual } |
Proprietà
- depthFunction : DepthFunction
Funzioni pubbliche
| QDepthTest(Qt3DCore::QNode *parent = nullptr) | |
| Qt3DRender::QDepthTest::DepthFunction | depthFunction() const |
Slot pubblici
| void | setDepthFunction(Qt3DRender::QDepthTest::DepthFunction depthFunction) |
Segnali
| void | depthFunctionChanged(Qt3DRender::QDepthTest::DepthFunction depthFunction) |
Descrizione dettagliata
La classe QDepthTest viene utilizzata per abilitare il test di profondità con una determinata funzione di test di profondità. Il test di profondità consente di scrivere i valori di colore dei frammenti quando il test viene superato e di scartare i frammenti che non superano il test. Il test di profondità utilizza la funzione di profondità per confrontare il valore di profondità dei frammenti con quello del buffer z. Se la superficie sottostante non dispone di un buffer z, QDepthTest non esegue alcuna operazione.
Vedi anche QAlphaTest e QStencilTest.
Documentazione sui tipi dei membri
enum QDepthTest::DepthFunction
Enumerazione dei valori della funzione di profondità
| Costante | Valore | Descrizione |
|---|---|---|
Qt3DRender::QDepthTest::Never | 0x0200 | Non superare mai il test di profondità |
Qt3DRender::QDepthTest::Always | 0x0207 | Supera sempre il test di profondità |
Qt3DRender::QDepthTest::Less | 0x0201 | Supera il test di profondità se la profondità del frammento è inferiore al valore del buffer z |
Qt3DRender::QDepthTest::LessOrEqual | 0x0203 | Supera il test di profondità se la profondità del frammento è minore o uguale al valore dello z-buffer |
Qt3DRender::QDepthTest::Equal | 0x0202 | Supera il test di profondità se la profondità del frammento è uguale al valore dello z-buffer |
Qt3DRender::QDepthTest::GreaterOrEqual | 0x0206 | Supera il test di profondità se la profondità del frammento è maggiore o uguale al valore del buffer z |
Qt3DRender::QDepthTest::Greater | 0x0204 | Supera il test di profondità se la profondità del frammento è maggiore del valore dello z-buffer |
Qt3DRender::QDepthTest::NotEqual | 0x0205 | Supera il test di profondità se la profondità del frammento non è uguale al valore del buffer Z |
Documentazione delle proprietà
depthFunction : DepthFunction
Contiene la funzione attualmente utilizzata dal test di profondità. Il valore predefinito è Never.
Funzioni di accesso:
| Qt3DRender::QDepthTest::DepthFunction | depthFunction() const |
| void | setDepthFunction(Qt3DRender::QDepthTest::DepthFunction depthFunction) |
Segnale di notifica:
| void | depthFunctionChanged(Qt3DRender::QDepthTest::DepthFunction depthFunction) |
Documentazione delle funzioni membro
[explicit] QDepthTest::QDepthTest(Qt3DCore::QNode *parent = nullptr)
Il costruttore crea una nuova istanza di ` QDepthTest::QDepthTest ` con il valore specificato in ` parent`.
© 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.