IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

InstanceRepeater QML Type

Instantiates components based on an instance table.

This type was introduced in Qt 6.4.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

InstanceRepeater QML Type

  • Import Statement: import QtQuick3D.Helpers

  • Since:: Qt 6.4

  • Inherits:: Repeater3D

Detailed Description

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 position, scale, and 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.

For example:

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

See Also

See also InstanceModel

Property Documentation

 

instancingTable : Instancing

This property specifies the instance table used by the repeater.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+