QAbstractClipAnimator is the base class for types providing animation playback capabilities. 更多...
头: | #include <QAbstractClipAnimator> |
CMake: |
find_package(Qt6 COMPONENTS 3danimation REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
qmake: | QT += 3danimation |
Since: | Qt 5.9 |
实例化: | AbstractClipAnimator |
继承: | Qt3DCore::QComponent |
继承者: | Qt3DAnimation::QBlendedClipAnimator and Qt3DAnimation::QClipAnimator |
enum | 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 ) |
Subclasses of QAbstractClipAnimator can be aggregated by a QEntity to provide animation capabilities. The animator components provide an interface for controlling the animation (e.g. start, stop). Each animator type requires some form of animation data such as a QAbstractAnimationClip as well as a QChannelMapper which describes how the channels in the animation clip should be mapped onto the properties of the objects you wish to animate.
The following subclasses are available:
Holds the number of times the animation should play.
常量 | 值 | 描述 |
---|---|---|
Qt3DAnimation::QAbstractClipAnimator::Infinite
|
-1
|
This will repeat the loop continuously until it is explicitly stopped. |
This property holds the ChannelMapper that controls how the channels in the animation clip map onto the properties of the target objects.
访问函数:
Qt3DAnimation::QChannelMapper * | channelMapper () const |
void | setChannelMapper (Qt3DAnimation::QChannelMapper * channelMapper ) |
通知程序信号:
void | channelMapperChanged (Qt3DAnimation::QChannelMapper * channelMapper ) |
The clock controls the speed with which an animation is played.
访问函数:
Qt3DAnimation::QClock * | clock () const |
void | setClock (Qt3DAnimation::QClock * clock ) |
通知程序信号:
void | clockChanged (Qt3DAnimation::QClock * clock ) |
Holds the number of times the animation should play.
The value is 1 by default: the animation will be played once and then stop.
若设为 QAbstractClipAnimator::Infinite , the animation will continuously repeat until it is explicitly stopped.
访问函数:
int | loopCount () const |
void | setLoopCount (int loops ) |
通知程序信号:
void | loopCountChanged (int loops ) |
This property holds the clips normalized time.
访问函数:
float | normalizedTime () const |
void | setNormalizedTime (float timeFraction ) |
通知程序信号:
void | normalizedTimeChanged (float index ) |
This property holds a boolean indicating whether the animation is currently running.
访问函数:
bool | isRunning () const |
void | setRunning (bool running ) |
通知程序信号:
void | runningChanged (bool running ) |
[slot]
void
QAbstractClipAnimator::
start
()
Starts the animation.
[slot]
void
QAbstractClipAnimator::
stop
()
Stops the animation.
Returns a boolean indicating whether the animation is currently running.
注意: getter 函数对于特性 running .
Returns the number of times the animation should play.
The value is 1 by default: the animation will play through once and then stop.
若设为 QAbstractClipAnimator::Infinite , the animation will continuously repeat until it is explicitly stopped.
注意: getter 函数对于特性 loops .
另请参阅 setLoopCount ().