AnimationController QML Type

动画控制器类型。更多

Import Statement: import Qt3D.Animation 2.9
In C++: QAnimationController
Status: Deprecated

属性

方法

详细说明

AnimationController 类型控制动画的选择和播放。该类型可用于从实体树中查找所有动画,并从同名动画中创建AnimationGroups 。用户可通过设置活动动画来选择当前由动画控制器控制的动画组。在使用positionScalepositionOffset 值缩放和偏移所提供的位置值后,动画位置就会传播到该组。

注意: 动画控制器没有内部计时器,而是由用户负责及时更新位置属性。

属性文档

activeAnimationGroup : int

保存当前激活的动画组。


animationGroups : list<AnimationGroup>

显示控制器中的动画组列表。


entity : Entity

持有从实体收集和分组的动画。如果控制器中已包含动画,则会将其清除。


position : real

保存动画的当前位置。设置位置后,该位置将按positionScale/positionOffset 缩放和偏移,并传播到活动动画组。


positionOffset : real

保持动画的位置偏移。


positionScale : real

保持动画的位置缩放。


recursive : bool

设置从实体收集动画时是否递归搜索实体树。如果设置为 true,则也会从实体的子实体中搜索动画。如果设置为 false,则只搜索传递给控制器的实体。


方法文档

int getAnimationIndex(name)

返回name 动画的索引。如果未找到带有给定名称的AnimationGroup ,则返回-1。


AnimationGroup getGroup(index)

Returns theAnimationGroup with the givenindex.


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