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

SubtreeEnabler QML Type

Enables or disables entire subtrees of frame graph nodes.

This type was introduced in Qt 5.14.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

SubtreeEnabler QML Type

  • Import Statement: import Qt3D.Render 2.4

  • Since:: Qt 5.14

  • Inherits:: FrameGraphNode

  • Instantiates:: QSubtreeEnabler

Detailed Description

While FrameGraphNodes 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. SubtreeEnabler is a convenience node that makes this use case trivial, allowing all of its children to be controlled by a single switch.

For example, the following simplified frame graph includes a subtree for debug rendering that can easily be enabled only when debugging.

 
Sélectionnez
RenderSurfaceSelector {
    ClearBuffers {
        Viewport {
            CameraSelector {}
        }
    }

    SubtreeEnabler {
        enabled: showDebugView
        Viewport {
            CameraSelector {
                RenderPassFilter {}
            }
        }
    }
}

SubtreeEnabler is enabled by default.

Property Documentation

 

enablement : enumeration

Controls whether subtree enablement is persistent or transient.

Constant

Description

Persistent

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

SingleShot

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.

Method Documentation

 

void requestUpdate()

Requests that the subtree be enabled.

A conveninence 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+