Qt3DAnimation::QAnimationClipLoader Class
class Qt3DAnimation::QAnimationClipLoader启用从文件加载关键帧动画数据。更多
头文件: | #include <QAnimationClipLoader> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
qmake: | QT += 3danimation |
继承: | Qt3DAnimation::QAbstractAnimationClip |
状态: | 已废弃 |
公共类型
enum | Status { NotReady, Ready, Error } |
属性
公共功能
公共插槽
void | setSource(const QUrl &source) |
信号
void | sourceChanged(const QUrl &source) |
void | statusChanged(Qt3DAnimation::QAnimationClipLoader::Status status) |
成员类型文档
enum QAnimationClipLoader::Status
该枚举用于标识动画剪辑的状态。
常量 | 值 | 说明 |
---|---|---|
Qt3DAnimation::QAnimationClipLoader::NotReady | 0 | 尚未加载片段 |
Qt3DAnimation::QAnimationClipLoader::Ready | 1 | 已成功加载片段 |
Qt3DAnimation::QAnimationClipLoader::Error | 2 | 加载片段时发生错误 |
属性文档
source : QUrl
保存加载动画片段的源 URL。目前支持 glTF2 和本地Qt 3D json 动画文件格式。
如果文件中包含多个动画,则可以通过源 URL 上的查询参数来选择加载哪个动画。可接受的查询参数有 animationIndex 和 animationName。如果同时指定了这两个参数,animationName 将被忽略。
如果文件只包含一个动画,则无需指定 animationIndex 或 animationName。我们只需使用一个可用的动画。
访问函数
QUrl | source() const |
void | setSource(const QUrl &source) |
通知信号
void | sourceChanged(const QUrl &source) |
[read-only]
status : const Status
此属性包含动画片段的状态。
访问功能:
Qt3DAnimation::QAnimationClipLoader::Status | status() const |
Notifier 信号:
void | statusChanged(Qt3DAnimation::QAnimationClipLoader::Status status) |
成员函数 文档
Qt3DAnimation::QAnimationClipLoader::Status QAnimationClipLoader::status() const
返回动画片段的状态。
注: 属性状态的获取函数。
© 2025 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.