Qt3DAnimation::QVertexBlendAnimation Class
class Qt3DAnimation::QVertexBlendAnimationClasse mettant en œuvre l'animation de morphing par mélange de sommets. Plus d'informations...
| En-tête : | #include <QVertexBlendAnimation> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3danimation)target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake : | QT += 3danimation |
| En QML : | VertexBlendAnimation |
| Hérite : | Qt3DAnimation::QAbstractAnimation |
| Statut : | Déclassé |
Propriétés
- interpolator : float
- target : Qt3DRender::QGeometryRenderer*
- targetName : QString
- targetPositions : QList<float>
Fonctions publiques
| QVertexBlendAnimation(QObject *parent = nullptr) | |
| void | addMorphTarget(Qt3DAnimation::QMorphTarget *target) |
| float | interpolator() const |
| QList<Qt3DAnimation::QMorphTarget *> | morphTargetList() |
| void | removeMorphTarget(Qt3DAnimation::QMorphTarget *target) |
| void | setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets) |
| Qt3DRender::QGeometryRenderer * | target() const |
| QString | targetName() const |
| QList<float> | targetPositions() const |
Emplacements publics
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
| void | setTargetName(const QString name) |
| void | setTargetPositions(const QList<float> &targetPositions) |
Signaux
| void | interpolatorChanged(float interpolator) |
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
| void | targetNameChanged(const QString &name) |
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Description détaillée
Une classe Qt3DAnimation::QVertexBlendAnimation implémente l'animation de morphing par vertex-blend vers une cible QGeometryRenderer. La QVertexBlendAnimation définit le bon QAttributes de morph targets à la cible QGeometryRenderer::geometry et calcule l'interpolateur pour la position actuelle. Contrairement à QMorphingAnimation, où le mélange est contrôlé par des poids de mélange, le mélange se produit entre des cibles de morphisme séquentielles. Le mélange réel entre les attributs doit être implémenté dans le matériau. Qt3DAnimation::QMorphPhongMaterial implémente un matériau prenant en charge le morphing pour le modèle d'éclairage phong. Le mélange s'effectue entre deux attributs : "base" et "target". Les noms des attributs base et cible sont tirés des noms des cibles de morphing, l'attribut base conservant le nom qu'il porte déjà et le nom de l'attribut cible étant complété par "Target". L'interpolateur peut être défini comme QParameter pour le matériau utilisé. Toutes les cibles morphologiques de l'animation doivent contenir les attributs portant les mêmes noms que ceux de la géométrie de base.
Documentation sur les propriétés
[read-only] interpolator : float
Contient l'interpolateur entre les attributs de base et les attributs cibles.
Fonctions d'accès :
| float | interpolator() const |
Signal de notification :
| void | interpolatorChanged(float interpolator) |
target : Qt3DRender::QGeometryRenderer*
Détient le QGeometryRenderer cible auquel l'animation de morphing est appliquée.
Fonctions d'accès :
| Qt3DRender::QGeometryRenderer * | target() const |
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
Signal de notification :
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
targetName : QString
Contient le nom de la géométrie cible. Il s'agit d'une propriété de commodité qui facilite la correspondance entre la géométrie cible et l'animation de morphing. Le nom est généralement identique au nom de l'entité parent du QGeometryRenderer cible, mais ce n'est pas obligatoire.
Fonctions d'accès :
| QString | targetName() const |
| void | setTargetName(const QString name) |
Signal de notification :
| void | targetNameChanged(const QString &name) |
targetPositions : QList<float>
Contient les valeurs de position de la cible morphologique. Chaque position de la liste spécifie la position de la cible morphologique correspondante avec le même index. Les valeurs doivent être classées par ordre croissant. Les valeurs peuvent être positives ou négatives et n'ont pas d'unité prédéfinie.
Fonctions d'accès :
| QList<float> | targetPositions() const |
| void | setTargetPositions(const QList<float> &targetPositions) |
Signal Notificateur :
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Member Function Documentation
[explicit] QVertexBlendAnimation::QVertexBlendAnimation(QObject *parent = nullptr)
Construire une nouvelle QVertexBlendAnimation avec parent.
void QVertexBlendAnimation::addMorphTarget(Qt3DAnimation::QMorphTarget *target)
Ajouter un nouveau morph target à la fin de l'animation.
QList<Qt3DAnimation::QMorphTarget *> QVertexBlendAnimation::morphTargetList()
Renvoi de la liste des cibles morphologiques.
void QVertexBlendAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *target)
Supprimez le morph target de l'animation.
void QVertexBlendAnimation::setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets)
Régler le morph targets sur l'animation. Les anciennes cibles sont effacées.
© 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.