AxisAccumulator QML Type
Qt3DInput::QAxisAccumulator C++ 类的 QML 前端。更多内容...
| Import Statement: | import Qt3D.Input 2.12 |
| In C++: | QAxisAccumulator |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- sourceAxis : Axis
- sourceAxisType : SourceAxisType
- value : real
详细说明
Axis 用于报告输入设备上某个轴的当前位置。 当轴返回至中性位置时,该轴的值将恢复为 0。通常,需要让来自轴的输入以其他方式控制变量,例如将轴的值视为速度(对时间的第一次导数)或加速度(对时间的第二次导数)。 虽然可以通过用户代码或FrameAction 实现,但这些方法并不理想,因为它们会给主线程增加更多负担,且本质上属于命令式编程。AxisAccumulator类允许在Qt 3D 后端以声明式方式实现这一常见任务。
属性文档
sourceAxis : Axis
累加器应沿该轴对轴值进行积分。该轴
sourceAxisType : SourceAxisType
sourceAxisType 属性指定累加器如何处理来自源轴的值。
value : real [read-only]
在累加时,用于缩放轴值的倍数。这可以理解为该轴所能控制的最大速度或加速度。
© 2026 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.