Sur cette page

Layer QML Type

La couche permet de filtrer les entités qui seront affichées. En savoir plus...

Import Statement: import Qt3D.Render 2.12
In C++: QLayer
Inherits:

Component3D

Status: Deprecated

Ce type est obsolète. Nous vous déconseillons fortement de l'utiliser dans du nouveau code.

Propriétés

Description détaillée

La couche fonctionne en conjonction avec l'LayerFilter e dans le FrameGraph.

Un Layer peut être appliqué à une sous-arborescence d'entités en définissant la propriété « recursive » sur « true ».

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 ]
    }
}

Voir aussi « LayerFilter ».

Documentation sur les propriétés

recursive : bool

Indique si le calque s'applique également à la sous-arborescence de l'entité.

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