InstanceRepeater QML Type
根据实例表实例化组件。更多
Import Statement: | import QtQuick3D.Helpers |
Since: | Qt 6.4 |
Inherits: |
属性
- instancingTable : Instancing
详细说明
InstanceRepeater 类型用于根据Instancing 表创建大量对象。它是Repeater3D 的子类型,使用实例表代替数据模型,并自动应用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 |
该属性指定中继器使用的实例表。
© 2025 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.