Qt3DAnimation::QVertexBlendAnimation Class
class Qt3DAnimation::QVertexBlendAnimationUna clase que implementa la animación de morphing por mezcla de vértices. Más...
| Cabecera: | #include <QVertexBlendAnimation> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation)target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake: | QT += 3danimation |
| En QML: | VertexBlendAnimation |
| Hereda: | Qt3DAnimation::QAbstractAnimation |
| Status: | Obsoleto |
Propiedades
- interpolator : float
- target : Qt3DRender::QGeometryRenderer*
- targetName : QString
- targetPositions : QList<float>
Funciones públicas
| 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 |
Ranuras públicas
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
| void | setTargetName(const QString name) |
| void | setTargetPositions(const QList<float> &targetPositions) |
Señales
| void | interpolatorChanged(float interpolator) |
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
| void | targetNameChanged(const QString &name) |
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Descripción detallada
Una clase Qt3DAnimation::QVertexBlendAnimation implementa animación de morphing de vertex-blend a un objetivo QGeometryRenderer. El QVertexBlendAnimation establece el QAttributes correcto desde el morph targets al objetivo QGeometryRenderer::geometry y calcula el interpolador para la posición actual. A diferencia de QMorphingAnimation, donde la mezcla es controlada con pesos de mezcla, la mezcla ocurre entre objetivos morph secuenciales. La mezcla real entre los atributos debe ser implementada en el material. Qt3DAnimation::QMorphPhongMaterial implementa un material con soporte de morphing para el modelo de iluminación phong. La mezcla se realiza entre 2 atributos - 'base' y 'target'. Los nombres de los atributos base y destino se toman de los nombres de destino morph, donde el atributo base mantiene el nombre que ya tiene y el nombre del atributo destino tiene 'Target' añadido al nombre. El interpolador puede establecerse como QParameter para el material utilizado. Todos los objetivos morph de la animación deben contener los atributos con los mismos nombres que los de la geometría base.
Documentación de propiedades
[read-only] interpolator : float
Contiene el interpolador entre los atributos base y destino.
Funciones de acceso:
| float | interpolator() const |
Señal notificadora:
| void | interpolatorChanged(float interpolator) |
target : Qt3DRender::QGeometryRenderer*
Contiene el QGeometryRenderer de destino al que se aplica la animación morphing.
Funciones de acceso:
| Qt3DRender::QGeometryRenderer * | target() const |
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
Señal notificadora:
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
targetName : QString
Contiene el nombre de la geometría objetivo. Esta es una propiedad de conveniencia que hace más fácil hacer coincidir la geometría objetivo con la animación morphing. El nombre suele ser el mismo que el de la entidad padre del QGeometryRenderer objetivo, pero no tiene por qué serlo.
Funciones de acceso:
| QString | targetName() const |
| void | setTargetName(const QString name) |
Señal notificadora:
| void | targetNameChanged(const QString &name) |
targetPositions : QList<float>
Contiene los valores de posición del objetivo morph. Cada posición de la lista especifica la posición del objetivo morph correspondiente con el mismo índice. Los valores deben estar en orden ascendente. Los valores pueden ser positivos o negativos y no tienen ninguna unidad predefinida.
Funciones de acceso:
| QList<float> | targetPositions() const |
| void | setTargetPositions(const QList<float> &targetPositions) |
Señal del notificador:
| void | targetPositionsChanged(const QList<float> &targetPositions) |
Documentación de la función miembro
[explicit] QVertexBlendAnimation::QVertexBlendAnimation(QObject *parent = nullptr)
Construye una nueva QVertexBlendAnimation con parent.
void QVertexBlendAnimation::addMorphTarget(Qt3DAnimation::QMorphTarget *target)
Añadir nuevo morph target al final de la animación.
QList<Qt3DAnimation::QMorphTarget *> QVertexBlendAnimation::morphTargetList()
Devuelve la lista de objetivos morph.
void QVertexBlendAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *target)
Elimina el morph target de la animación.
void QVertexBlendAnimation::setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets)
Establecer morph targets a la animación. Los objetivos antiguos se borran.
© 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.