Sur cette page

Qt3DAnimation::QLerpClipBlend Class

class Qt3DAnimation::QLerpClipBlend

Effectue une interpolation linéaire de deux clips d'animation sur la base d'un facteur normalisé. Plus d'informations...

En-tête : #include <QLerpClipBlend>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake : QT += 3danimation
En QML : LerpClipBlend
Hérite : Qt3DAnimation::QAbstractClipBlendNode
Statut : Déclassé

Propriétés

Fonctions publiques

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

Emplacements publics

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

Signaux

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

Description détaillée

QLerpClipBlend peut être utile pour créer des effets d'animation avancés basés sur des clips d'animation individuels. Par exemple, pour un joueur, le lerp blending peut être utilisé pour combiner un clip d'animation de marche avec un clip d'animation de blessure basé sur un facteur de fusion qui augmente au fur et à mesure que le joueur est blessé. Cela permettrait d'avoir un joueur marchant sans blessure avec un facteur de fusion == 0, un joueur complètement blessé avec un facteur de fusion == 1, et un joueur marchant partiellement et blessé avec un facteur de fusion == 0,5.

Voir aussi QBlendedClipAnimator.

Documentation sur les propriétés

blendFactor : float

Spécifie le facteur de fusion entre 0 et 1 pour contrôler la fusion de deux clips d'animation.

Fonctions d'accès :

float blendFactor() const
void setBlendFactor(float blendFactor)

Signal de notification :

void blendFactorChanged(float blendFactor)

endClip : Qt3DAnimation::QAbstractClipBlendNode*

Contient le sous-arbre qui doit être utilisé comme clip de départ pour ce nœud de mélange lerp. Il s'agit du clip renvoyé par ce nœud de mélange lorsque la valeur de blendFactor est égale à 1.

Fonctions d'accès :

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

Signal de notification :

void endClipChanged(Qt3DAnimation::QAbstractClipBlendNode *endClip)

startClip : Qt3DAnimation::QAbstractClipBlendNode*

Contient le sous-arbre qui doit être utilisé comme clip de départ pour ce nœud de mélange lerp. Il s'agit du clip renvoyé par ce nœud de mélange lorsque la valeur de blendFactor est égale à 0.

Fonctions d'accès :

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

Signal de notification :

void startClipChanged(Qt3DAnimation::QAbstractClipBlendNode *startClip)

© 2026 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.