QAbstractClipAnimator 类
class Qt3DAnimation::QAbstractClipAnimatorQAbstractClipAnimator 是提供动画播放功能的类型的基类。 更多...
| 头文件 | #include <QAbstractClipAnimator> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) | 
| qmake | QT += 3danimation | 
| 由以下实例化 | AbstractClipAnimator | 
| 继承自 | Qt3DCore::QComponent | 
| 继承自 | Qt3DAnimation::QBlendedClipAnimator 和 Qt3DAnimation::QClipAnimator | 
公共类型
| 枚举 | Loops { Infinite } | 
属性
| 
 | 
 | 
公共函数
| Qt3DAnimation::QChannelMapper * | channelMapper() const | 
| Qt3DAnimation::QClock * | clock() const | 
| bool | isRunning() const | 
| int | loopCount() const | 
| float | normalizedTime() const | 
公共槽
| void | setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper) | 
| void | setClock(Qt3DAnimation::QClock *clock) | 
| void | setLoopCount(int loops) | 
| void | setNormalizedTime(float timeFraction) | 
| void | setRunning(bool running) | 
| void | start() | 
| void | stop() | 
信号
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) | 
| void | clockChanged(Qt3DAnimation::QClock *clock) | 
| void | loopCountChanged(int loops) | 
| void | normalizedTimeChanged(float index) | 
| void | runningChanged(bool running) | 
详细说明
QAbstractClipAnimator的子类可以被QEntity集成,以提供动画功能。动画组件提供了一个控制动画的接口(例如开始、停止)。每种动画类型都需要某种形式的动画数据,例如QAbstractAnimationClip,以及一个QChannelMapper,它描述了动画剪辑中的通道应该如何映射到您希望动画化的对象的属性。
以下是可以使用的子类:
成员类型文档
枚举 QAbstractClipAnimator::Loops
存储动画应播放的次数。
| 常数 | 值 | 说明 | 
|---|---|---|
| Qt3DAnimation::QAbstractClipAnimator::Infinite | -1 | 这将连续重复播放循环,直到显式停止。 | 
属性文档
channelMapper : Qt3DAnimation::QChannelMapper*
此属性持有ChannelMapper,它控制动画剪辑中的通道如何映射到目标对象的属性。
访问函数
| Qt3DAnimation::QChannelMapper * | channelMapper() const | 
| void | setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper) | 
通知信号
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) | 
clock : Qt3DAnimation::QClock*
时钟控制动画播放的速度。
访问函数
| Qt3DAnimation::QClock * | clock() const | 
| void | setClock(Qt3DAnimation::QClock *clock) | 
通知信号
| void | clockChanged(Qt3DAnimation::QClock *clock) | 
loops : int
存储动画应播放的次数。
默认值为1:动画将播放一次然后停止。
如果设置为QAbstractClipAnimator::Infinite,动画将连续重复,直到显式停止。
访问函数
| int | loopCount() const | 
| void | setLoopCount(int loops) | 
通知信号
| void | loopCountChanged(int loops) | 
normalizedTime : float
此属性包含剪辑的归一化时间。
访问函数
| float | normalizedTime() const | 
| void | setNormalizedTime(float timeFraction) | 
通知信号
| void | normalizedTimeChanged(float index) | 
running : bool
此属性包含一个布尔值,表示动画是否正在运行。
访问函数
| bool | isRunning() const | 
| void | setRunning(bool running) | 
通知信号
| void | runningChanged(bool running) | 
成员函数文档
bool QAbstractClipAnimator::isRunning() const
返回一个布尔值,表示动画是否正在运行。
注意:该属性running的获取函数。
int QAbstractClipAnimator::loopCount() const
返回动画应播放的次数。
默认值为1:动画将播放一次,然后停止。
如果设置为QAbstractClipAnimator::Infinite,动画将连续重复,直到显式停止。
注意:该属性loops的获取函数。
另请参阅:setLoopCount()。
[slot] void QAbstractClipAnimator::start()
开始动画。
[slot] void QAbstractClipAnimator::stop()
停止动画。
© 2024 The Qt Company Ltd. 本文档中包含的文档贡献者是各自版权的所有者。本提供的文档是根据-Free Software Foundation发布的-GNU自由文档许可版1.3的条款许可的。Qt和相关标志是芬兰和/或世界上其他国家的The Qt Company Ltd.的商标。所有其他商标均为其各自所有者财产。