QMorphingAnimation

A class implementing blend-shape morphing animation. More

Inheritance diagram of PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation

Synopsis

Functions

Detailed Description

A QMorphingAnimation class implements blend-shape morphing animation to a target QGeometryRenderer . The QMorphingAnimation sets the correct QAttributes from the morph targets to the target geometry and calculates interpolator for the current position. 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 a QParameter to the used material. All morph targets in the animation should contain the attributes with same names as those in the base geometry.

class PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation([parent=None])
Parameters

parentPySide6.QtCore.QObject

Construct a new QMorphingAnimation with parent.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.Method

This enumeration specifies the morphing method.

Constant

Description

Qt3DAnimation.QMorphingAnimation.Normalized

The blending should use the normalized formula; V’ = Vbase * (1.0 - sum(Wi)) + sum[Vi * Wi]

Qt3DAnimation.QMorphingAnimation.Relative

The blending should use the relative formula; V’ = Vbase + sum[Vi * Wi]

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.addMorphTarget(target)
Parameters

targetPySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget

Add new morph target at the end of the animation.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.easing()
Return type

PySide6.QtCore.QEasingCurve

See also

setEasing()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.easingChanged(easing)
Parameters

easingPySide6.QtCore.QEasingCurve

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.getWeights(positionIndex)
Parameters

positionIndex – int

Return type

Return morph weights at positionIndex.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.interpolator()
Return type

float

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.interpolatorChanged(interpolator)
Parameters

interpolator – float

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.method()
Return type

Method

See also

setMethod()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.methodChanged(method)
Parameters

methodMethod

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.morphTargetList()
Return type

Return morph target list.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.removeMorphTarget(target)
Parameters

targetPySide6.Qt3DAnimation.Qt3DAnimation.QMorphTarget

Remove morph target from the animation.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setEasing(easing)
Parameters

easingPySide6.QtCore.QEasingCurve

See also

easing()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setMethod(method)
Parameters

methodMethod

See also

method()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setMorphTargets(targets)
Parameters

targets

Set morph targets to animation. Old targets are cleared.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setTarget(target)
Parameters

targetPySide6.Qt3DRender.Qt3DRender.QGeometryRenderer

See also

target()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setTargetName(name)
Parameters

name – str

See also

targetName()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setTargetPositions(targetPositions)
Parameters

targetPositions

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.setWeights(positionIndex, weights)
Parameters
  • positionIndex – int

  • weights

Sets morph weights at positionIndex.

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.target()
Return type

PySide6.Qt3DRender.Qt3DRender.QGeometryRenderer

See also

setTarget()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.targetChanged(target)
Parameters

targetPySide6.Qt3DRender.Qt3DRender.QGeometryRenderer

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.targetName()
Return type

str

See also

setTargetName()

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.targetNameChanged(name)
Parameters

name – str

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.targetPositions()
Return type

PySide6.Qt3DAnimation.Qt3DAnimation.QMorphingAnimation.targetPositionsChanged(targetPositions)
Parameters

targetPositions