Qt3DAnimation::QLerpClipBlend Class
class Qt3DAnimation::QLerpClipBlendEffectue une interpolation linéaire entre deux clips d'animation en fonction d'un facteur normalisé. En savoir plus...
| En-tête : | #include <qlerpclipblend.h> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake : | QT += 3danimation |
| En QML : | LerpClipBlend |
| Hérite de : | Qt3DAnimation::QAbstractClipBlendNode |
| Statut : | Aperçu technologique |
Cette classe est en avant-première technologique et est susceptible d'être modifiée.
Propriétés
- blendFactor : float
- endClip : Qt3DAnimation::QAbstractClipBlendNode*
- startClip : Qt3DAnimation::QAbstractClipBlendNode*
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 s'avérer utile pour créer des effets d'animation avancés à partir de clips d'animation individuels. Par exemple, pour un personnage joueur, le mélange par interpolation (lerp) pourrait être utilisé pour combiner un clip d'animation de marche avec un clip d'animation de blessure, en fonction d'un facteur de mélange qui augmente à mesure que le joueur est blessé. Cela permettrait alors, avec un facteur de mélange == 0, d'avoir un joueur marchant non blessé ; avec un facteur de mélange == 1, un joueur entièrement blessé ; et avec un facteur de mélange == 0,5, un joueur marchant partiellement et blessé.
Voir également QBlendedClipAnimator.
Documentation sur les propriétés
blendFactor : float
Définit le facteur de fusion compris entre 0 et 1 permettant de 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 la sous-arborescence qui doit servir de clip de départ pour ce nœud de fusion par interpolation. Autrement dit, il s'agit du clip renvoyé par ce nœud de fusion lorsque le paramètre « blendFactor » est défini sur la valeur 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 la sous-arborescence qui doit servir de clip de départ pour ce nœud de fusion par interpolation. Autrement dit, il s'agit du clip renvoyé par ce nœud de fusion lorsque le paramètre « blendFactor » est défini sur la valeur 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.