QVertexBlendAnimation¶
A class implementing vertex-blend morphing animation. More…
Synopsis¶
Functions¶
def
addMorphTarget
(target)def
interpolator
()def
morphTargetList
()def
removeMorphTarget
(target)def
setMorphTargets
(targets)def
target
()def
targetName
()def
targetPositions
()
Slots¶
def
setTarget
(target)def
setTargetName
(name)def
setTargetPositions
(targetPositions)
Signals¶
def
interpolatorChanged
(interpolator)def
targetChanged
(target)def
targetNameChanged
(name)def
targetPositionsChanged
(targetPositions)
Detailed Description¶
A
QVertexBlendAnimation
class implements vertex-blend morphing animation to a targetQGeometryRenderer
. TheQVertexBlendAnimation
sets the correctQAttributes
from themorph targets
to the targetgeometry
and calculates interpolator for the current position. Unlike withQMorphingAnimation
, where the blending is controller with blend weights, the blending occurs between sequential morph targets. The actual blending between the attributes must be implemented in the material. Qt3DAnimation::QMorphPhongMaterial implements material with morphing support for phong lighting model. The blending happens between 2 attributes - ‘base’ and ‘target’. The names for the base and target attributes are taken from the morph target names, where the base attribute retains the name it already has and the target attribute name gets ‘Target’ appended to the name. The interpolator can be set as aQParameter
to the used material. All morph targets in the animation should contain the attributes with same names as those in the base geometry.
-
class
PySide2.Qt3DAnimation.
QVertexBlendAnimation
([parent=None])¶ - param parent
Construct a new
QVertexBlendAnimation
withparent
.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
addMorphTarget
(target)¶ - Parameters
target –
PySide2.Qt3DAnimation.QMorphTarget
Add new morph
target
at the end of the animation.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
interpolator
()¶ - Return type
float
Holds the interpolator between base and target attributes.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
interpolatorChanged
(interpolator)¶ - Parameters
interpolator – float
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
morphTargetList
()¶ - Return type
Return morph target list.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
removeMorphTarget
(target)¶ - Parameters
target –
PySide2.Qt3DAnimation.QMorphTarget
Remove morph
target
from the animation.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
setMorphTargets
(targets)¶ - Parameters
targets –
Set morph
targets
to animation. Old targets are cleared.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
setTarget
(target)¶ - Parameters
target –
PySide2.Qt3DRender.QGeometryRenderer
Holds the target QGeometryRenderer the morphing animation is applied to.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
setTargetName
(name)¶ - Parameters
name – str
Holds the name of the target geometry. This is a convenience property making it easier to match the target geometry to the morphing animation. The name is usually same as the name of the parent entity of the target QGeometryRenderer, but does not have to be.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
setTargetPositions
(targetPositions)¶ - Parameters
targetPositions –
Holds the position values of the morph target. Each position in the list specifies the position of the corresponding morph target with the same index. The values must be in an ascending order. Values can be positive or negative and do not have any predefined unit.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
target
()¶ - Return type
Holds the target QGeometryRenderer the morphing animation is applied to.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
targetChanged
(target)¶ - Parameters
target –
PySide2.Qt3DRender.QGeometryRenderer
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
targetName
()¶ - Return type
str
Holds the name of the target geometry. This is a convenience property making it easier to match the target geometry to the morphing animation. The name is usually same as the name of the parent entity of the target QGeometryRenderer, but does not have to be.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
targetNameChanged
(name)¶ - Parameters
name – str
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
targetPositions
()¶ - Return type
Holds the position values of the morph target. Each position in the list specifies the position of the corresponding morph target with the same index. The values must be in an ascending order. Values can be positive or negative and do not have any predefined unit.
-
PySide2.Qt3DAnimation.QVertexBlendAnimation.
targetPositionsChanged
(targetPositions)¶ - Parameters
targetPositions –
© 2020 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.