Sur cette page

Qt3DAnimation::QMorphTarget Class

class Qt3DAnimation::QMorphTarget

Classe fournissant des cibles de morphing pour l'animation par blend shapes. En savoir plus...

En-tête : #include <qmorphtarget.h>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake : QT += 3danimation
En QML : MorphTarget
Hérite de : QObject
Statut : Aperçu technologique

Cette classe est en avant-première technologique et est susceptible d'être modifiée.

Propriétés

Fonctions publiques

QMorphTarget(QObject *parent = nullptr)
void addAttribute(Qt3DCore::QAttribute *attribute)
QList<Qt3DCore::QAttribute *> attributeList() const
QStringList attributeNames() const
void removeAttribute(Qt3DCore::QAttribute *attribute)
void setAttributes(const QList<Qt3DCore::QAttribute *> &attributes)

Signaux

void attributeNamesChanged(const QStringList &attributeNames)

Membres publics statiques

Qt3DAnimation::QMorphTarget *fromGeometry(Qt3DCore::QGeometry *geometry, const QStringList &attributes)

Description détaillée

Une classe « Qt3DAnimation::QMorphTarget » est une classe utilitaire qui fournit une liste d’ QAttributes, que l’ QMorphingAnimation utilise pour animer la géométrie. Un QMorphTarget peut également être créé à partir d’ Qt3DCore::QGeometry existants.

Documentation des propriétés

[read-only] attributeNames : QStringList

Contient une liste des noms d'attributs présents dans la cible de morphing.

Fonctions d'accès :

QStringList attributeNames() const

Signal de notification :

void attributeNamesChanged(const QStringList &attributeNames)

Documentation des fonctions membres

[explicit] QMorphTarget::QMorphTarget(QObject *parent = nullptr)

Crée un objet `QMorphTarget` à partir de l'parent` fournie.

void QMorphTarget::addAttribute(Qt3DCore::QAttribute *attribute)

Ajoute un attribut « attribute » à la cible de morphing. Un attribut portant le même nom ne doit pas avoir été ajouté auparavant à la cible de morphing.

QList<Qt3DCore::QAttribute *> QMorphTarget::attributeList() const

Renvoie une liste des attributs contenus dans la cible de morphing.

[static invokable] Qt3DAnimation::QMorphTarget *QMorphTarget::fromGeometry(Qt3DCore::QGeometry *geometry, const QStringList &attributes)

Renvoie une cible de morphing basée sur l'attributes, dans l'geometry fourni.

Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.

void QMorphTarget::removeAttribute(Qt3DCore::QAttribute *attribute)

Supprime une « attribute » de la cible de morphing.

void QMorphTarget::setAttributes(const QList<Qt3DCore::QAttribute *> &attributes)

Définit la cible de morphing sur « attributes ». Les anciens attributs sont effacés.

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