AnimationController QML Type

A controller type for animations. 更多...

import 语句: import Qt3D.Animation 2.12
Since: Qt 5.9
实例化: QAnimationController

特性

方法

详细描述

AnimationController type controls the selection and playback of animations. The type can be used to find all animations from Entity tree and create AnimationGroups from the animations with the same name. The user can select which animation group is currently controlled with the animation controller by setting the active animation. The animation position is then propagated to that group after scaling and offsetting the provided position value with the positionScale and positionOffset 值。

注意: that the animation controller doesn't have internal timer, but instead the user is responsible for updating the position property in timely manner.

特性文档编制

activeAnimationGroup : int

Holds the currectly active animation group.

animationGroups : list < AnimationGroup >

Holds the list of animation groups in the controller.

entity : Entity

Holds the entity animations are gathered and grouped from. If the controller already holds animations, they are cleared.

position : real

Holds the current position of the animation. When the position is set, it is scaled and offset with positionScale / positionOffset and propagated to the active animation group.

positionOffset : real

Holds the position offset of the animation.

positionScale : real

Holds the position scale of the animation.

recursive : bool

Holds whether the recursively search the entity tree when gathering animations from the entity. If set to true, the animations are searched also from the child entities of the entity. If set to false, only the entity passed to the controller is searched.


方法文档编制

int getAnimationIndex ( name )

Returns the index of the animation with name . Returns -1 if no AnimationGroup with the given name is found.

AnimationGroup getGroup ( index )

返回 AnimationGroup 采用给定 index .