QGyroscopeReading Class

QGyroscopeReading 类表示陀螺仪传感器的一个读数。更多

头文件: #include <QGyroscopeReading>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
继承: QSensorReading

属性

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

公共功能

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

详细说明

QGyroscopeReading 单位

读数包含 3 个值,以每秒度数为单位,定义了设备绕 x、y 和 z 轴的运动。与QRotationReading 不同,这些值代表的是当前的角速度,而不是固定的旋转角度。测量单位为每秒度数。

属性文档

[read-only] x : const qreal

该属性表示绕 x 轴的角速度。

以每秒度数计量。

访问函数:

qreal x() const

另请参阅 QGyroscopeReading Units

[read-only] y : const qreal

此属性表示绕 Y 轴的角速度。

以每秒度数计量。

访问函数:

qreal y() const

另请参阅 QGyroscopeReading Units

[read-only] z : const qreal

该属性表示绕 Z 轴的角速度。

以每秒度数计量。

访问函数:

qreal z() const

另请参阅 QGyroscopeReading Units

成员函数文档

void QGyroscopeReading::setX(qreal x)

将绕 x 轴的角速度设置为x

另请参见 x() 。

void QGyroscopeReading::setY(qreal y)

将绕 Y 轴的角速度设置为y

另请参见 y() 。

void QGyroscopeReading::setZ(qreal z)

将绕 Z 轴的角速度设置为z

另请参见 z() 。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.