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

AxisAccumulator QML Type

QML frontend for the Qt3DInput::QAxisAccumulator C++ class.

This type was introduced in Qt 5.8.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

AxisAccumulator QML Type

  • Import Statement: import Qt3D.Input 2.4

  • Since:: Qt 5.8

  • Instantiates:: QAxisAccumulator

Detailed Description

An Axis reports the current position of an axis on an input device. When the axis is returned to its neutral position the value of that axis returns to 0. Often, it is required to have the input from an axis control a variable in other ways, for example treating the value from the Axis as a velocity (first derivative with respect to time) or as an acceleration (second derivative with respect to time). This can be done with user code or with a FrameAction but those approached are not ideal as they add more work to the main thread and are inherently imperative. The AxisAccumulator class allows for this common task to be performed on the Qt 3D backend and be specified in a declarative manner.

Property Documentation

 

sourceAxis : Axis

The Axis for which the accumulator should integrate axis values.

sourceAxisType : SourceAxisType

The sourceAxisType property specifies how the accumulator treats the values from the source axis.

[read-only] value : real

The amount to scale the axis value by when accumulating. This can be thought of as the maximum velocity or acceleration the axis can control.

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