Qt3DAnimation::QAbstractClipAnimator Class
class Qt3DAnimation::QAbstractClipAnimatorQAbstractClipAnimator est la classe de base des types offrant des fonctionnalités de lecture d'animations. En savoir plus...
| En-tête : | #include <qabstractclipanimator.h> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake : | QT += 3danimation |
| En QML : | AbstractClipAnimator |
| Hérite de : | Qt3DCore::QComponent |
| Hérité par : | Qt3DAnimation::QBlendedClipAnimator et Qt3DAnimation::QClipAnimator |
| Statut : | Aperçu technologique |
Cette classe est en préversion technologique et est susceptible d'être modifiée.
Types publics
| enum | Loops { Infinite } |
Propriétés
|
|
Fonctions publiques
| Qt3DAnimation::QChannelMapper * | channelMapper() const |
| Qt3DAnimation::QClock * | clock() const |
| bool | isRunning() const |
| int | loopCount() const |
| float | normalizedTime() const |
Emplacements publics
| 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() |
Signaux
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) |
| void | clockChanged(Qt3DAnimation::QClock *clock) |
| void | loopCountChanged(int loops) |
| void | normalizedTimeChanged(float index) |
| void | runningChanged(bool running) |
Description détaillée
Les sous-classes de QAbstractClipAnimator peuvent être agrégées par une QEntity afin de fournir des capacités d'animation. Les composants d'animation fournissent une interface permettant de contrôler l'animation (par exemple, démarrage, arrêt). Chaque type d’animateur nécessite une forme de données d’animation, telles qu’un « QAbstractAnimationClip », ainsi qu’un « QChannelMapper » qui décrit comment les canaux du clip d’animation doivent être mappés sur les propriétés des objets que vous souhaitez animer.
Les sous-classes suivantes sont disponibles :
Documentation sur les types de membres
enum QAbstractClipAnimator::Loops
Indique le nombre de fois que l'animation doit être lue.
| Constante | Valeur | Description |
|---|---|---|
Qt3DAnimation::QAbstractClipAnimator::Infinite | -1 | La boucle se répète en continu jusqu'à ce qu'elle soit explicitement arrêtée. |
Documentation de la propriété
channelMapper : Qt3DAnimation::QChannelMapper*
Cette propriété contient le ChannelMapper qui détermine la manière dont les canaux du clip d'animation sont mappés sur les propriétés des objets cibles.
Fonctions d'accès :
| Qt3DAnimation::QChannelMapper * | channelMapper() const |
| void | setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper) |
Signal de notification :
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) |
clock : Qt3DAnimation::QClock*
L'horloge contrôle la vitesse à laquelle une animation est lue.
Fonctions d'accès :
| Qt3DAnimation::QClock * | clock() const |
| void | setClock(Qt3DAnimation::QClock *clock) |
Signal de notification :
| void | clockChanged(Qt3DAnimation::QClock *clock) |
loops : int
Indique le nombre de fois où l'animation doit être lue.
La valeur par défaut est 1 : l'animation sera lue une seule fois, puis s'arrêtera.
Si la valeur est définie sur « QAbstractClipAnimator::Infinite », l'animation se répète en boucle jusqu'à ce qu'elle soit explicitement arrêtée.
Fonctions d'accès :
| int | loopCount() const |
| void | setLoopCount(int loops) |
Signal de notification :
| void | loopCountChanged(int loops) |
normalizedTime : float
Cette propriété contient la durée normalisée des clips.
Fonctions d'accès :
| float | normalizedTime() const |
| void | setNormalizedTime(float timeFraction) |
Signal de notification :
| void | normalizedTimeChanged(float index) |
running : bool
Cette propriété contient une valeur booléenne indiquant si l'animation est en cours d'exécution.
Fonctions d'accès :
| bool | isRunning() const |
| void | setRunning(bool running) |
Signal de notification :
| void | runningChanged(bool running) |
Documentation des fonctions membres
bool QAbstractClipAnimator::isRunning() const
Renvoie une valeur booléenne indiquant si l'animation est en cours d'exécution.
Remarque : fonctiongetter pour la propriété « running ».
int QAbstractClipAnimator::loopCount() const
Renvoie le nombre de fois où l'animation doit être lue.
La valeur par défaut est 1 : l'animation sera lue une seule fois, puis s'arrêtera.
Si la valeur est définie sur « QAbstractClipAnimator::Infinite », l'animation se répète en boucle jusqu'à ce qu'elle soit explicitement arrêtée.
Remarque : fonctiongetter pour la propriété loops.
Voir aussi ` setLoopCount()`.
[slot] void QAbstractClipAnimator::start()
Lance l'animation.
[slot] void QAbstractClipAnimator::stop()
Arrête l'animation.
© 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.