InstanceRepeater QML Type

Instanziiert Komponenten basierend auf einer Instanztabelle. Mehr...

Import Statement: import QtQuick3D.Helpers
Since: Qt 6.4
Inherits:

Repeater3D

Eigenschaften

Detaillierte Beschreibung

Der Typ InstanceRepeater wird verwendet, um eine Reihe von Objekten auf der Grundlage einer Instancing Tabelle zu erstellen. Es handelt sich um einen Repeater3D Untertyp, der eine Instanztabelle anstelle eines Datenmodells annimmt und automatisch position, scale und rotation anwendet.

Ein Anwendungsfall ist die Implementierung von picking durch die Erstellung unsichtbarer Dummy-Objekte, die mit den gerenderten Instanzen übereinstimmen. Um die Leistung zu verbessern, können die Dummy-Objekte mit einer einfacheren Geometrie als die Instanzmodelle erstellt werden.

Ein Beispiel:

InstanceRepeater {
    instancingTable: myInstanceTable
    Model {
        source: "#Cube"
        pickable: true
        property int instanceIndex: index // expose the index, so we can identify the instance
        opacity: 0
    }
}

Siehe auch InstanceModel.

Eigenschaft Dokumentation

instancingTable : Instancing

Diese Eigenschaft gibt die vom Repeater verwendete Instanztabelle an.


© 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.