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

InstanceRange QML Type

Specifies a range for RandomInstancing.

This type was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

InstanceRange QML Type

  • Import Statement: import QtQuick3D.Helpers

  • Since:: Qt 6.2

  • Inherits:: Object3D

Detailed Description

The InstanceRange QML type is used to specify the range of variation for RandomInstancing attributes.

Property Documentation

 

from : Variant

This property specifies the lower bound of the range. The type needs to match the type of the attribute that this range is applied to.

proportional : bool

This property determines whether the components of the attribute vary proportionally or independently. The default value is true, meaning that all components are independent.

For example, the following defines a scaling range that preserves the aspect ratio of the model:

 
Sélectionnez
InstanceRange {
    from: Qt.vector3d(1, 1, 1)
    to: Qt.vector3d(5, 5, 5)
    proportional: true
}

This defines a greyscale color range:

 
Sélectionnez
InstanceRange {
    from: "black"
    to: "white"
    proportional: true
}

While the following defines a range that covers all colors

 
Sélectionnez
InstanceRange {
    from: "black"
    to: "white"
}

to : Variant

This property specifies the upper bound of the range. The type needs to match the type of the attribute that this range is applied to.

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