本页内容

QuaternionAnimation QML Type

四元数的PropertyAnimation 。更多内容...

Import Statement: import QtQuick3D
Inherits:

PropertyAnimation

属性

详细说明

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

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

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

注意:请避免 混合使用基于四元数和欧拉角的属性。from 和 to 值应完全通过四元数或三个欧拉角来指定。

另请参阅 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归一化线性插值。

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