Home · All Classes · All Functions ·

QRotationReading Class Reference

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

    #include <QRotationReading>

Inherits QSensorReading.


Properties


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


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. The rotations should not be confused with relative rotations such as yaw and pitch. These rotations are of the devices axes relative to the external reference points that define the reference co-ordinate axes: X, Y and Z in the diagram.

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

Visual representation of the rotation angles.

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.


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().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0