内容表

上一话题

Qt3DAnimation.QAnimationClipLoader

下一话题

Qt3DAnimation.QAnimationGroup

Qt3DAnimation.QAnimationController

A controller class for animations. 更多

Inheritance diagram of PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController

概要

函数

详细描述

QAnimationController class controls the selection and playback of animations. The class can be used to find all animations from QEntity tree and create QAnimationGroups 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.

class PySide2.Qt3DAnimation.Qt3DAnimation. QAnimationController ( [ parent=None ] )
param parent

QObject

构造新 QAnimationController with parent .

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. activeAnimationGroup ( )
返回类型

int

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. activeAnimationGroupChanged ( index )
参数

index int

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. addAnimationGroup ( animationGroups )
参数

animationGroups QAnimationGroup

添加给定 animationGroup to the controller.

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. animationGroupList ( )
返回类型

Returns the list of animation groups the conroller is currently holding.

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. entity ( )
返回类型

QEntity

另请参阅

setEntity()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. entityChanged ( entity )
参数

entity QEntity

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. getAnimationIndex ( name )
参数

name – unicode

返回类型

int

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

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. getGroup ( index )
参数

index int

返回类型

QAnimationGroup

返回 AnimationGroup 采用给定 index .

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. position ( )
返回类型

float

另请参阅

setPosition()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. positionChanged ( position )
参数

position float

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. positionOffset ( )
返回类型

float

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. positionOffsetChanged ( offset )
参数

offset float

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. positionScale ( )
返回类型

float

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. positionScaleChanged ( scale )
参数

scale float

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. recursive ( )
返回类型

bool

另请参阅

setRecursive()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. recursiveChanged ( recursive )
参数

recursive bool

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. removeAnimationGroup ( animationGroups )
参数

animationGroups QAnimationGroup

移除给定 animationGroup from the controller.

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setActiveAnimationGroup ( index )
参数

index int

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setAnimationGroups ( animationGroups )
参数

animationGroups

设置 animationGroups for the controller. Old groups are cleared.

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setEntity ( entity )
参数

entity QEntity

另请参阅

entity()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setPosition ( position )
参数

position float

另请参阅

position()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setPositionOffset ( offset )
参数

offset float

另请参阅

positionOffset()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setPositionScale ( scale )
参数

scale float

另请参阅

positionScale()

PySide2.Qt3DAnimation.Qt3DAnimation.QAnimationController. setRecursive ( recursive )
参数

recursive bool

另请参阅

recursive()