用於 Qt3D 動畫的抽象基類。 更多...
| 頭: | #include <QAbstractAnimation> |
| qmake: | QT += 3danimation |
| Since: | Qt 5.9 |
| 實例化: | AbstractAnimation |
| 繼承: | QObject |
| 繼承者: |
Qt3DAnimation::QKeyframeAnimation , Qt3DAnimation::QMorphingAnimation ,和 Qt3DAnimation::QVertexBlendAnimation |
該類在 Qt 5.9 引入。
| enum | AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation } |
| QString | animationName () const |
| QAbstractAnimation::AnimationType | animationType () const |
| float | duration () const |
| float | position () const |
| void | setAnimationName (const QString & name ) |
| void | setPosition (float position ) |
| void | animationNameChanged (const QString & name ) |
| void | durationChanged (float duration ) |
| void | positionChanged (float position ) |
| void | setDuration (float duration ) |
Qt3DAnimation::QAbstractAnimation is an abstract base class for all animations. Qt3DAnimation::QAbstractAnimation can not be directly instantiated, but rather through its subclasses. QAbstractAnimation specifies common properties for all Qt3D animations, such as animation name and type, current position and animation duration, while leaving the actual animating for the subclasses.
此枚舉指定動畫的類型
| 常量 | 值 | 描述 |
|---|---|---|
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation
|
1
|
Simple keyframe animation implementation for QTransform |
Qt3DAnimation::QAbstractAnimation::MorphingAnimation
|
2
|
融閤形狀變形動畫 |
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation
|
3
|
Vertex-blend animation |
保持動畫名稱。
訪問函數:
| QString | animationName () const |
| void | setAnimationName (const QString & name ) |
通知程序信號:
| void | animationNameChanged (const QString & name ) |
保持動畫類型。
訪問函數:
| QAbstractAnimation::AnimationType | animationType () const |
保持動畫持續時間。
訪問函數:
| float | duration () const |
通知程序信號:
| void | durationChanged (float duration ) |
保持動畫當前位置。
訪問函數:
| float | position () const |
| void | setPosition (float position ) |
通知程序信號:
| void | positionChanged (float position ) |
[protected]
void
QAbstractAnimation::
setDuration
(
float
duration
)
設置 duration 為動畫。
另請參閱 duration ().