Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QRotationReading Class

The QRotationReading class represents one reading from the rotation sensor. More...

 #include <QRotationReading>

Inherits: QSensorReading.

QRotationReading is instantiated by QML element RotationReading

Properties

  • x : const qreal
  • y : const qreal
  • z : const qreal

Public Functions

void setX(qreal x)
void setY(qreal y)
void setZ(qreal z)
qreal x() const
qreal y() const
qreal z() const

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QRotationReading class represents one reading from the rotation sensor.

QRotationReading Units

The rotation reading contains 3 angles, measured in degrees that define the orientation of the device in three-dimensional space. These angles are similar to yaw, pitch and roll but are defined using only right hand rotation with axes as defined by the right hand cartesian coordinate system.

The three angles are applied to the device in the following order.

  • Right-handed rotation z (-180, 180]. Starting from the y-axis and incrementing in the counter-clockwise direction.
  • Right-handed rotation x [-90, 90]. Starting from the new (once-rotated) y-axis and incrementing towards the z-axis.
  • Right-handed rotation y (-180, 180]. Starting from the new (twice-rotated) z-axis and incrementing towards the x-axis.

Here is a visualization showing the order in which angles are applied.

The 0 point for the z angle is defined as a fixed, external entity and is device-specific. While magnetic North is typically used as this reference point it may not be. Do not attempt to compare values for the z angle between devices or even on the same device if it has moved a significant distance.

If the device cannot detect a fixed, external entity the z angle will always be 0 and the QRotationSensor::hasZ property will be set to false.

The 0 point for the x and y angles are defined as when the x and y axes of the device are oriented towards the horizon. Here is an example of how the x value will change with device movement.

Here is an example of how the y value will change with device movement.

Note that when x is 90 or -90, values for z and y achieve rotation around the same axis (due to the order of operations). In this case the y rotation will be 0.

Property Documentation

x : const qreal

This property holds the rotation around the x axis.

Measured as degrees.

Access functions:

qreal x() const

See also QRotationReading Units.

y : const qreal

This property holds the rotation around the y axis.

Measured as degrees.

Access functions:

qreal y() const

See also QRotationReading Units.

z : const qreal

This property holds the rotation around the z axis.

Measured as degrees.

Access functions:

qreal z() const

See also QRotationReading Units.

Member Function Documentation

void QRotationReading::setX(qreal x)

Sets the rotation around the x axis to x.

See also x().

void QRotationReading::setY(qreal y)

Sets the rotation around the y axis to y.

See also y().

void QRotationReading::setZ(qreal z)

Sets the rotation around the z axis to z.

See also z().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web