InstanceRepeater QML Type
Instancie des composants à partir d'une table d'instances. En savoir plus...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.4 |
| Inherits: |
Propriétés
- instancingTable : Instancing
Description détaillée
Le type InstanceRepeater sert à créer un certain nombre d’objets à partir d’une table d’ Instancing. Il s’agit d’un sous-type d’ Repeater3D qui utilise une table d’instanciation à la place d’un modèle de données, et applique automatiquement les méthodes position, scale et rotation.
Un cas d’utilisation consiste à mettre en œuvre l’ picking en créant des objets factices invisibles qui correspondent aux instances rendues. Pour améliorer les performances, les objets factices peuvent être créés avec une géométrie plus simple que celle des modèles instanciés.
Par exemple :
InstanceRepeater {
instancingTable: myInstanceTable
Model {
source: "#Cube"
pickable: true
property int instanceIndex: index // expose the index, so we can identify the instance
opacity: 0
}
}Voir également InstanceModel.
Documentation sur les propriétés
instancingTable : Instancing
Cette propriété définit la table d'instances utilisée par le répéteur.
© 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.