Sur cette page

Qt3DRender::QNoPicking Class

class Qt3DRender::QNoPicking

Lorsqu'un nœud Qt3DRender::QNoPicking est présent dans une branche de FrameGraph, cela empêche l'aspect de rendu d'effectuer la sélection de prélèvement pour la branche donnée. Plus...

En-tête : #include <QNoPicking>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake : QT += 3drender
En QML : NoPicking
Hérite : Qt3DRender::QFrameGraphNode
Statut : Déclassé

Description détaillée

Lorsqu'il est désactivé, un nœud Qt3DRender::QNoPicking n'empêche pas la cueillette. L'activation de la propriété enabled est donc un moyen de rendre un nœud Qt3DRender::QNoPicking actif ou inactif.

Lors de l'utilisation de plusieurs sous-vues dans le FrameGraph, QNoPicking peut être utile pour éviter les conflits de prélèvement entre des sous-vues qui se chevauchent ou des sous-vues non visuelles. Il peut également être utilisé comme une optimisation pour éviter le travail inutile pour les fenêtres cachées ou pour les sections des scènes qui ne nécessitent pas de prélèvement.

Qt3DRender::QViewport *viewport = new Qt3DRender::QViewport();
Qt3DRender::QCameraSelector *cameraSelector = new Qt3DRender::QCameraSelector(viewport);
Qt3DRender::QNoPicking *noPicking = new Qt3DRender::QNoPicking(cameraSelector);

Qt3DRender::QClearBuffers *clearBuffers = new Qt3DRender::QClearBuffers(noPicking);
clearBuffers->setBuffers(Qt3DRender::QClearBuffers::ColorDepthBuffer);

Qt3DRender::QRenderPassFilter *mainPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....
Qt3DRender::QRenderPassFilter *previewPass = new Qt3DRender::QRenderPassFilter(cameraSelector);
....

Voir aussi Qt3DRender::QObjectPicker, Qt3DRender::QRayCaster, et Qt3DRender::QScreenRayCaster.

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