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

Layer QML Type

Layer provides a way of filtering which entities will be rendered.

This type was introduced in Qt 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Layer QML Type

  • Import Statement: import Qt3D.Render 2.4

  • Since:: Qt 5.5

  • Inherits:: Component3D

  • Instantiates:: QLayer

Detailed Description

Layer works in conjunction with the LayerFilter in the FrameGraph.

A Layer can be applied to a subtree of entities by setting the recursive property to true.

 
Sélectionnez
import Qt3D.Core 2.0
import Qt3D.Render 2.0

Entity {
    id: root

    components: RenderSettings {
        // FrameGraph
        Viewport {
            ClearBuffers {
                buffers: ClearBuffers.ColorDepthBuffer
                CameraSelector {
                    camera: mainCamera
                    LayerFilter {
                        layers: [layer1]
                    }
                }
            }
        }
    }

    // Scene
    Camera { id: mainCamera }

    Layer {
        id: layer1
        recursive: true
    }

    GeometryRenderer { id: mesh }

    Entity {
        id: renderableEntity
        components: [ mesh, layer1 ]
    }
}

See Also

See also LayerFilter

Property Documentation

 

recursive : bool

Specifies if the layer is also applied to the entity subtree.

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