QLerpClipBlend Class

( Qt3DAnimation::QLerpClipBlend )

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

頭: #include <QLerpClipBlend>
qmake: QT += 3danimation
Since: Qt 5.9
實例化: LerpBlend
繼承: Qt3DAnimation::QAbstractClipBlendNode

特性

公共函數

QLerpClipBlend (Qt3DCore::QNode * parent = nullptr)
~QLerpClipBlend ()
float blendFactor () const
Qt3DAnimation::QAbstractClipBlendNode * endClip () const
Qt3DAnimation::QAbstractClipBlendNode * startClip () const

公共槽

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

信號

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

保護函數

QLerpClipBlend (QLerpClipBlendPrivate & dd , Qt3DCore::QNode * parent = nullptr)

額外繼承成員

詳細描述

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

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.

另請參閱 QBlendedClipAnimator .

特性文檔編製

blendFactor : float

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

訪問函數:

float blendFactor () const
void setBlendFactor (float blendFactor )

通知程序信號:

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.

訪問函數:

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

通知程序信號:

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.

訪問函數:

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

通知程序信號:

void startClipChanged (Qt3DAnimation::QAbstractClipBlendNode * startClip )

成員函數文檔編製

QLerpClipBlend:: QLerpClipBlend ( Qt3DCore::QNode * parent = nullptr)

Default constructs an instance of QLerpClipBlend.

[protected] QLerpClipBlend:: QLerpClipBlend ( QLerpClipBlendPrivate & dd , Qt3DCore::QNode * parent = nullptr)

Copy constructor.

QLerpClipBlend:: ~QLerpClipBlend ()

Destroys the instance of QLerpClipBlend.