Instantiates components based on an instance table. 更多...
import 语句: | import QtQuick3D.Helpers |
Since: | Qt 6.4 |
继承: |
The InstanceRepeater type is used to create a number of objects based on an
Instancing
table. It is a
Repeater3D
subtype that takes an Instancing table instead of a data model, and automatically applies
位置
,
scale
,和
rotation
.
One use case is to implement picking by creating invisible dummy objects that match the rendered instances. To improve performance, the dummy objects can be created with a simpler geometry than the instanced models.
例如:
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 |
This property specifies the instance table used by the repeater.