Auf dieser Seite

Qt3DAnimation::QAbstractClipAnimator Class

class Qt3DAnimation::QAbstractClipAnimator

QAbstractClipAnimator ist die Basisklasse für Typen, die Funktionen zur Wiedergabe von Animationen bereitstellen. Mehr...

Header: #include <qabstractclipanimator.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
In QML: AbstractClipAnimator
Erbt von: Qt3DCore::QComponent
Vererbt an:

Qt3DAnimation::QBlendedClipAnimator und Qt3DAnimation::QClipAnimator

Status: Technologievorschau

Diese Klasse befindet sich in der Technologievorschau und kann sich noch ändern.

Öffentliche Typen

enum Loops { Infinite }

Eigenschaften

Öffentliche Funktionen

Qt3DAnimation::QChannelMapper *channelMapper() const
Qt3DAnimation::QClock *clock() const
bool isRunning() const
int loopCount() const
float normalizedTime() const

Öffentliche Slots

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()

Signale

void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper)
void clockChanged(Qt3DAnimation::QClock *clock)
void loopCountChanged(int loops)
void normalizedTimeChanged(float index)
void runningChanged(bool running)

Detaillierte Beschreibung

Unterklassen von `QAbstractClipAnimator` können von einer `QEntity` aggregiert werden, um Animationsfunktionen bereitzustellen. Die Animator-Komponenten bieten eine Schnittstelle zur Steuerung der Animation (z. B. Start, Stopp). Jeder Animator-Typ benötigt eine Form von Animationsdaten, wie z. B. einen „ QAbstractAnimationClip “, sowie eine „ QChannelMapper “, die beschreibt, wie die Kanäle im Animationsclip auf die Eigenschaften der Objekte abgebildet werden sollen, die Sie animieren möchten.

Die folgenden Unterklassen stehen zur Verfügung:

Dokumentation zu den Mitgliedstypen

enum QAbstractClipAnimator::Loops

Gibt an, wie oft die Animation abgespielt werden soll.

KonstanteWertBeschreibung
Qt3DAnimation::QAbstractClipAnimator::Infinite-1Dadurch wird die Schleife kontinuierlich wiederholt, bis sie explizit gestoppt wird.

Eigenschaftsdokumentation

channelMapper : Qt3DAnimation::QChannelMapper*

Diese Eigenschaft enthält den ChannelMapper, der steuert, wie die Kanäle im Animationsclip den Eigenschaften der Zielobjekte zugeordnet werden.

Zugriffsfunktionen:

Qt3DAnimation::QChannelMapper *channelMapper() const
void setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper)

Notifier-Signal:

void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper)

clock : Qt3DAnimation::QClock*

Die Uhr steuert die Geschwindigkeit, mit der eine Animation abgespielt wird.

Zugriffsfunktionen:

Qt3DAnimation::QClock *clock() const
void setClock(Qt3DAnimation::QClock *clock)

Benachrichtigungssignal:

void clockChanged(Qt3DAnimation::QClock *clock)

loops : int

Gibt an, wie oft die Animation abgespielt werden soll.

Der Standardwert ist 1: Die Animation wird einmal abgespielt und dann beendet.

Bei der Einstellung „ QAbstractClipAnimator::Infinite “ wird die Animation so lange wiederholt, bis sie explizit gestoppt wird.

Zugriffsfunktionen:

int loopCount() const
void setLoopCount(int loops)

Notifier-Signal:

void loopCountChanged(int loops)

normalizedTime : float

Diese Eigenschaft enthält die normalisierte Zeit der Clips.

Zugriffsfunktionen:

float normalizedTime() const
void setNormalizedTime(float timeFraction)

Benachrichtigungssignal:

void normalizedTimeChanged(float index)

running : bool

Diese Eigenschaft enthält einen booleschen Wert, der angibt, ob die Animation gerade läuft.

Zugriffsfunktionen:

bool isRunning() const
void setRunning(bool running)

Notifier-Signal:

void runningChanged(bool running)

Dokumentation der Member-Funktionen

bool QAbstractClipAnimator::isRunning() const

Gibt einen booleschen Wert zurück, der angibt, ob die Animation gerade läuft.

Hinweis: Getter -Funktion für die Eigenschaft „ running “.

int QAbstractClipAnimator::loopCount() const

Gibt an, wie oft die Animation abgespielt werden soll.

Der Standardwert ist 1: Die Animation wird einmal abgespielt und dann angehalten.

Bei der Einstellung „ QAbstractClipAnimator::Infinite “ wird die Animation so lange wiederholt, bis sie explizit gestoppt wird.

Hinweis: Getter -Funktion für die Eigenschaft „ loops “.

Siehe auch „ setLoopCount()“.

[slot] void QAbstractClipAnimator::start()

Startet die Animation.

[slot] void QAbstractClipAnimator::stop()

Hält die Animation an.

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