QAnimationClipLoader Class

( Qt3DAnimation::QAnimationClipLoader )

Enables loading key frame animation data from a file. 更多...

头: #include <QAnimationClipLoader>
qmake: QT += 3danimation
继承: Qt3DAnimation::QAbstractAnimationClip

公共类型

enum Status { NotReady, Ready, Error }

特性

公共函数

QAnimationClipLoader (Qt3DCore::QNode * parent = nullptr)
QAnimationClipLoader (const QUrl & source , Qt3DCore::QNode * parent = nullptr)
virtual ~QAnimationClipLoader ()
QUrl source () const
Qt3DAnimation::QAnimationClipLoader::Status status () const

公共槽

void setSource (const QUrl & source )

信号

void sourceChanged (const QUrl & source )
void statusChanged (Qt3DAnimation::QAnimationClipLoader::Status status )

静态公共成员

const QMetaObject staticMetaObject

保护函数

QAnimationClipLoader (Qt3DAnimation::QAnimationClipLoaderPrivate & dd , Qt3DCore::QNode * parent = nullptr)

详细描述

Enables loading key frame animation data from a file.

成员类型文档编制

enum QAnimationClipLoader:: Status

This enum identifies the status of animation clip.

常量 描述
Qt3DAnimation::QAnimationClipLoader::NotReady 0 The clip has not been loaded yet
Qt3DAnimation::QAnimationClipLoader::Ready 1 The clip was successfully loaded
Qt3DAnimation::QAnimationClipLoader::Error 2 An error occurred while loading the clip

特性文档编制

source : QUrl

Holds the source URL from which to load the animation clip. Currently glTF2 and the native Qt 3D json animation file formats are supported.

In the case where a file contains multiple animations, it is possible to select which animation should be loaded by way of query parameters on the source url. The accepted query parameters are animationIndex and animationName. If both are specified, animationName is ignored.

If a file contains only a single animation, there is no need to specify the animationIndex or animationName. We simply use the one available animation.

访问函数:

QUrl source () const
void setSource (const QUrl & source )

通知程序信号:

void sourceChanged (const QUrl & source )

status : const Status

This property contains the status of the animation clip.

访问函数:

Qt3DAnimation::QAnimationClipLoader::Status status () const

通知程序信号:

void statusChanged (Qt3DAnimation::QAnimationClipLoader::Status status )

成员函数文档编制

QAnimationClipLoader:: QAnimationClipLoader ( Qt3DCore::QNode * parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

QAnimationClipLoader:: QAnimationClipLoader (const QUrl & source , Qt3DCore::QNode * parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

[protected] QAnimationClipLoader:: QAnimationClipLoader ( Qt3DAnimation::QAnimationClipLoaderPrivate & dd , Qt3DCore::QNode * parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

[虚拟] QAnimationClipLoader:: ~QAnimationClipLoader ()

Destroys the instance of QAnimationClipLoader. The destructor is virtual.

Qt3DAnimation::QAnimationClipLoader::Status QAnimationClipLoader:: status () const

Returns the status of the animation clip.

注意: getter 函数对于特性 status .