QuaternionAnimation QML Type

四元数的PropertyAnimation更多

Import Statement: import QtQuick3D
Inherits:

PropertyAnimation

属性

详细说明

一个专门的PropertyAnimation ,用于定义两个quaternions 之间的动画。

默认情况下使用球形线性插值。通过设置type 属性,可以将其更改为速度更快但精度更低的归一化线性插值。

除了在fromto 属性中直接指定四元数外,还可以在fromXRotation,toXRotation,fromYRotation,toYRotation,fromZRotation,toZRotation 属性中提供以度为单位的欧拉角。

注意: 避免将基于四元数的属性和基于欧拉角的属性混用。我们希望通过四元数或三个欧拉角来完全指定从值和到值。

另请参阅 Qt Quick,QQuaternion,QQuaternion::slerp() 和QQuaternion::nlerp()中的动画和转换

属性文档

from : quaternion

该属性用于保存动画的起始值。


fromXRotation : real

该属性以度数为单位保存 X 轴动画的起始值。


fromYRotation : real

该属性用于保存 Y 轴动画的起始值(以度为单位的欧拉角)。


fromZRotation : real

该属性用于保存 Z 轴动画的起始值(以度为单位的欧拉角)。


to : quaternion

此属性用于保存动画的结束值。


toXRotation : real

该属性用于保存 X 轴动画的结束值(以度为单位的欧拉角)。


toYRotation : real

此属性以度数为单位保存 Y 轴动画的结束值。


toZRotation : real

该属性以度为单位保存 Z 轴动画的欧拉角结束值。


type : enumeration

该属性定义插值模式。

常数说明
QuaternionAnimation.Slerp球形线性插值
QuaternionAnimation.Nlerp归一化线性插值

© 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.