QLerpClipBlend Class

class Qt3DAnimation::QLerpClipBlend

Performs a linear interpolation of two animation clips based on a normalized factor. More...

Header: #include <QLerpClipBlend>
CMake: find_package(Qt6 COMPONENTS 3danimation REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
Since: Qt 5.9
Instantiated By: LerpClipBlend
Inherits: Qt3DAnimation::QAbstractClipBlendNode

Properties

Public Functions

float blendFactor() const
Qt3DAnimation::QAbstractClipBlendNode * endClip() const
Qt3DAnimation::QAbstractClipBlendNode * startClip() const

Public Slots

void setBlendFactor(float blendFactor)
void setEndClip(Qt3DAnimation::QAbstractClipBlendNode *endClip)
void setStartClip(Qt3DAnimation::QAbstractClipBlendNode *startClip)

Signals

void blendFactorChanged(float blendFactor)
void endClipChanged(Qt3DAnimation::QAbstractClipBlendNode *endClip)
void startClipChanged(Qt3DAnimation::QAbstractClipBlendNode *startClip)

Detailed Description

QLerpClipBlend can be useful to create advanced animation effects based on individual animation clips. For instance, given a player character, lerp blending could be used to combine a walking animation clip with an injured animation clip based on a blend factor that increases the more the player gets injured. This would then allow with blend factor == 0 to have a non injured walking player, with blend factor == 1 a fully injured player, with blend factor == 0.5 a partially walking and injured player.

See also QBlendedClipAnimator.

Property Documentation

blendFactor : float

Specifies the blending factor between 0 and 1 to control the blending of two animation clips.

Access functions:

float blendFactor() const
void setBlendFactor(float blendFactor)

Notifier signal:

void blendFactorChanged(float blendFactor)

endClip : Qt3DAnimation::QAbstractClipBlendNode*

Holds the sub-tree that should be used as the start clip for this lerp blend node. That is, the clip returned by this blend node when the blendFactor is set to a value of 1.

Access functions:

Qt3DAnimation::QAbstractClipBlendNode * endClip() const
void setEndClip(Qt3DAnimation::QAbstractClipBlendNode *endClip)

Notifier signal:

void endClipChanged(Qt3DAnimation::QAbstractClipBlendNode *endClip)

startClip : Qt3DAnimation::QAbstractClipBlendNode*

Holds the sub-tree that should be used as the start clip for this lerp blend node. That is, the clip returned by this blend node when the blendFactor is set to a value of 0.

Access functions:

Qt3DAnimation::QAbstractClipBlendNode * startClip() const
void setStartClip(Qt3DAnimation::QAbstractClipBlendNode *startClip)

Notifier signal:

void startClipChanged(Qt3DAnimation::QAbstractClipBlendNode *startClip)

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.0/qt3danimation-qlerpclipblend.html