InstanceRepeater QML Type
Instancia componentes com base em uma tabela de instâncias. Mais...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.4 |
| Inherits: |
Propriedades
- instancingTable : Instancing
Descrição detalhada
O tipo InstanceRepeater é usado para criar vários objetos com base em uma tabela de instância ( Instancing ). Trata-se de um subtipo de Repeater3D que utiliza uma tabela de instância em vez de um modelo de dados e aplica automaticamente position, scale e rotation.
Um caso de uso é implementar o “ picking ” (preenchimento com objetos) criando objetos fictícios invisíveis que correspondam às instâncias renderizadas. Para melhorar o desempenho, os objetos fictícios podem ser criados com uma geometria mais simples do que os modelos instanciados.
Por exemplo:
InstanceRepeater {
instancingTable: myInstanceTable
Model {
source: "#Cube"
pickable: true
property int instanceIndex: index // expose the index, so we can identify the instance
opacity: 0
}
}Veja também InstanceModel.
Documentação de propriedades
instancingTable : Instancing
Essa propriedade especifica a tabela de instâncias utilizada pelo repetidor.
© 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.