本页内容

Qt3DAnimation::QClipAnimator Class

class Qt3DAnimation::QClipAnimator

QClipAnimator 是一个提供简单动画播放功能的组件。更多内容...

标题: #include <qclipanimator.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
在 QML 中: ClipAnimator
继承自: Qt3DAnimation::QAbstractClipAnimator
状态: 技术预览

该类处于技术预览阶段,内容可能会有变动。

属性

  • clip : Qt3DAnimation::QAbstractAnimationClip*

公共函数

Qt3DAnimation::QAbstractAnimationClip *clip() const

公共槽位

void setClip(Qt3DAnimation::QAbstractAnimationClip *clip)

信号

void clipChanged(Qt3DAnimation::QAbstractAnimationClip *clip)

详细说明

QClipAnimator 的实例可由 QEntity 聚合,以添加播放动画片段以及将计算出的动画值应用到 QObject 属性的功能。

动画关键帧数据通过 clip 属性提供。可以通过QAnimationClip 通过编程方式创建,也可以通过QAnimationClipLoader 从文件中加载。

为了应用从动画片段数据通道中播放的值,剪辑动画器需要将一个QChannelMapper 对象赋值给 channelMapper 属性。

用于控制动画器的属性由QAbstractClipAnimator 基类提供。

另请参阅 Qt3DAnimation::QAbstractClipAnimator 、Qt3DAnimation::QAbstractAnimationClip 、Qt3DAnimation::QChannelMapper 和Qt3DAnimation::QBlendedClipAnimator 。

属性文档

clip : Qt3DAnimation::QAbstractAnimationClip*

该属性存储了包含待播放关键帧数据的动画片段。关键帧数据可以使用QAnimationClip 或QAnimationClipLoader 进行指定。

访问函数:

Qt3DAnimation::QAbstractAnimationClip *clip() const
void setClip(Qt3DAnimation::QAbstractAnimationClip *clip)

通知器信号:

void clipChanged(Qt3DAnimation::QAbstractAnimationClip *clip)

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