Qt3DRender::QCullFace Class
class Qt3DRender::QCullFaceLa classe QCullFace specifica se è abilitato il culling delle facce anteriori o posteriori. Per saperne di più...
| Intestazione: | #include <qcullface.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| In QML: | CullFace |
| Eredita da: | Qt3DRender::QRenderState |
| Stato: | Obsoleta |
Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.
Tipi pubblici
| enum | CullingMode { NoCulling, Front, Back, FrontAndBack } |
Proprietà
- mode : CullingMode
Funzioni pubbliche
Slot pubblici
| void | setMode(Qt3DRender::QCullFace::CullingMode mode) |
Segnali
| void | modeChanged(Qt3DRender::QCullFace::CullingMode mode) |
Descrizione dettagliata
QCullFace stabilisce se vengono eliminati i faccetti anteriori o posteriori. I faccetti includono triangoli, quadrilateri, poligoni e rettangoli.
Può essere aggiunto chiamando il metodo addRenderState() su un oggetto QRenderPass:
// using namespace Qt3DRender;
QRenderPass *renderPass = new QRenderPass();
// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);
// Add the render state to the render pass
renderPass->addRenderState(cullFront);oppure chiamando il metodo addRenderState() su un oggetto ` QRenderStateSet`:
// using namespace Qt3DRender;
QRenderStateSet *renderStateSet = new QRenderStateSet();
// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);
// Add the render state to the render pass
renderStateSet->addRenderState(cullFront);Vedi anche QFrontFace.
Documentazione sui tipi di membro
enum QCullFace::CullingMode
Questa enumerazione specifica i valori relativi alla modalità di culling.
| Costante | Valore | Descrizione |
|---|---|---|
Qt3DRender::QCullFace::NoCulling | 0x0 | Il culling è disabilitato |
Qt3DRender::QCullFace::Front | 0x0404 | Il culling è abilitato per i poligoni rivolti verso la parte anteriore |
Qt3DRender::QCullFace::Back | 0x0405 | Il culling è abilitato per i poligoni rivolti verso il retro |
Qt3DRender::QCullFace::FrontAndBack | 0x0408 | Il culling è abilitato per tutti i poligoni; vengono disegnati punti e linee |
Documentazione delle proprietà
mode : CullingMode
Contiene la modalità di culling utilizzata da QCullFace. L'impostazione predefinita è QCullFace. Indietro.
Funzioni di accesso:
| Qt3DRender::QCullFace::CullingMode | mode() const |
| void | setMode(Qt3DRender::QCullFace::CullingMode mode) |
Segnale di notifica:
| void | modeChanged(Qt3DRender::QCullFace::CullingMode mode) |
Documentazione delle funzioni membro
[explicit] QCullFace::QCullFace(Qt3DCore::QNode *parent = nullptr)
Crea una nuova istanza di ` QCullFace::QCullFace ` con ` parent ` come genitore.
© 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.