Qt3DAnimation::QVertexBlendAnimation Class
class Qt3DAnimation::QVertexBlendAnimationUna classe che implementa l'animazione di morphing con fusione dei vertici. Per saperne di più...
| Intestazione: | #include <qvertexblendanimation.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake: | QT += 3danimation |
| In QML: | VertexBlendAnimation |
| Eredita da: | Qt3DAnimation::QAbstractAnimation |
| Stato: | Anteprima tecnologica |
Questa classe è in anteprima tecnologica ed è soggetta a modifiche.
Proprietà
- interpolator : float
- target : Qt3DRender::QGeometryRenderer*
- targetName : QString
- targetPositions : QList<float>
Funzioni pubbliche
| 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 |
Slot pubblici
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
| void | setTargetName(const QString name) |
| void | setTargetPositions(const QList<float> &targetPositions) |
Segnali
| void | interpolatorChanged(float interpolator) |
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
| void | targetNameChanged(const QString &name) |
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Descrizione dettagliata
Una classe Qt3DAnimation::QVertexBlendAnimation implementa l'animazione di morphing con fusione dei vertici verso un obiettivo QGeometryRenderer. La classe QVertexBlendAnimation imposta l'QAttributes e corretto dall'morph targets all'obiettivo QGeometryRenderer::geometry e calcola l'interpolatore per la posizione corrente. A differenza di quanto avviene con QMorphingAnimation, dove la fusione è controllata dai pesi di fusione, la fusione avviene tra obiettivi di morphing sequenziali. La fusione effettiva tra gli attributi deve essere implementata nel materiale. Qt3DAnimation::QMorphPhongMaterial implementa un materiale con supporto al morphing per il modello di illuminazione Phong. La fusione avviene tra 2 attributi: «base» e «target». I nomi degli attributi base e target sono ricavati dai nomi dei target di morphing, dove l’attributo base mantiene il nome che già possiede e al nome dell’attributo target viene aggiunto il suffisso ‘Target’. L’interpolatore può essere impostato come ‘ QParameter ’ del materiale utilizzato. Tutti i target di morphing nell’animazione devono contenere attributi con gli stessi nomi di quelli presenti nella geometria di base.
Documentazione delle proprietà
[read-only] interpolator : float
Contiene l'interpolatore tra gli attributi di base e quelli di destinazione.
Funzioni di accesso:
| float | interpolator() const |
Segnale di notifica:
| void | interpolatorChanged(float interpolator) |
target : Qt3DRender::QGeometryRenderer*
Contiene l'oggetto QGeometryRenderer di destinazione a cui viene applicata l'animazione di morphing.
Funzioni di accesso:
| Qt3DRender::QGeometryRenderer * | target() const |
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
Segnale di notifica:
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
targetName : QString
Contiene il nome della geometria di destinazione. Si tratta di una proprietà di comodità che semplifica l'abbinamento della geometria di destinazione all'animazione di morphing. Il nome è solitamente lo stesso dell'entità padre del QGeometryRenderer di destinazione, ma non è obbligatorio che lo sia.
Funzioni di accesso:
| QString | targetName() const |
| void | setTargetName(const QString name) |
Segnale di notifica:
| void | targetNameChanged(const QString &name) |
targetPositions : QList<float>
Contiene i valori di posizione del morph target. Ogni posizione nell'elenco specifica la posizione del morph target corrispondente con lo stesso indice. I valori devono essere in ordine crescente. I valori possono essere positivi o negativi e non hanno alcuna unità predefinita.
Funzioni di accesso:
| QList<float> | targetPositions() const |
| void | setTargetPositions(const QList<float> &targetPositions) |
Segnale di notifica:
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Documentazione delle funzioni membro
[explicit] QVertexBlendAnimation::QVertexBlendAnimation(QObject *parent = nullptr)
Crea una nuova istanza di `QVertexBlendAnimation` con ` parent`.
void QVertexBlendAnimation::addMorphTarget(Qt3DAnimation::QMorphTarget *target)
Aggiungi il nuovo morph “ target ” alla fine dell’animazione.
QList<Qt3DAnimation::QMorphTarget *> QVertexBlendAnimation::morphTargetList()
Restituisce l'elenco dei target di morphing.
void QVertexBlendAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *target)
Rimuovi il morph “ target ” dall’animazione.
void QVertexBlendAnimation::setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets)
Imposta "morph targets " su "animazione". I vecchi target vengono cancellati.
© 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.