IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QSubtreeEnabler Class

Enables or disables entire subtrees of framegraph nodes.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QSubtreeEnabler Class▲

  • Header: QSubtreeEnabler

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3drender)

    target_link_libraries(mytarget PRIVATE Qt6::3drender)

  • qmake: QT += 3drender

  • Inherited By:

  • Instantiated By: qml-qt3d-render-subtreeenabler.xml

  • Inherits: Qt3DRender::QFrameGraphNode

Detailed Description▲

While QFrameGraphNodes can be individually enabled and disabled via the enabled property, this can become tedious when an entire path needs to be turned on or off. QSubtreeEnabler is a convenience node that makes this use case trivial, allowing all of its children to be controlled by a single switch.

QSubtreeEnabler is enabled by default.

Member Type Documentation▲

 

enum QSubtreeEnabler::Enablement▲

Specifies whether subtree enablement is persistent or transient.

Constant

Value

Description

Qt3DRender::QSubtreeEnabler::Persistent

0

The value of enabled is persistent. This is the default.

Qt3DRender::QSubtreeEnabler::SingleShot

1

The value of enabled will last for a single frame and then be reset to false. This might be used for a subtree drawing to an FBO, for example, to only update the FBO when the relevant portions of the scene changed.

Property Documentation▲

 

enablement : Enablement▲

Controls whether subtree enablement is persistent or transient.

Access functions:

  • enablement() const

  • void setEnablement( enablement)

Notifier signal:

  • void enablementChanged( enablement)

Member Function Documentation▲

 

void QSubtreeEnabler::requestUpdate()▲

Requests that the subtree be enabled.

A convenience method intended to be used with SingleShot enablement.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+