InstanceRepeater QML Type
根据实例表实例化组件。更多...
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.4 |
| Inherits: |
属性
- instancingTable : Instancing
详细说明
InstanceRepeater 类型用于基于Instancing 表创建多个对象。它是Repeater3D 的子类型,采用Instancing表而非数据模型,并自动应用position 、scale 和rotation 。
一种用例是通过创建与渲染实例匹配的不可见虚拟对象来实现picking 。为了提高性能,这些虚拟对象可以采用比实例化模型更简单的几何结构进行创建。
例如:
InstanceRepeater {
instancingTable: myInstanceTable
Model {
source: "#Cube"
pickable: true
property int instanceIndex: index // expose the index, so we can identify the instance
opacity: 0
}
}另请参阅 InstanceModel 。
属性文档
instancingTable : Instancing
此属性指定了重复器所使用的实例表。
© 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.