diff options
Diffstat (limited to 'src/animation/frontend')
-rw-r--r-- | src/animation/frontend/qmorphinganimation.cpp | 8 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.cpp | 22 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.h | 14 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget_p.h | 2 | ||||
-rw-r--r-- | src/animation/frontend/qvertexblendanimation.cpp | 12 |
5 files changed, 29 insertions, 29 deletions
diff --git a/src/animation/frontend/qmorphinganimation.cpp b/src/animation/frontend/qmorphinganimation.cpp index c73a6abd7..5b16668f9 100644 --- a/src/animation/frontend/qmorphinganimation.cpp +++ b/src/animation/frontend/qmorphinganimation.cpp @@ -50,7 +50,7 @@ namespace Qt3DAnimation { A Qt3DAnimation::QMorphingAnimation class implements blend-shape morphing animation to a target \l {Qt3DRender::QGeometryRenderer}{QGeometryRenderer}. The QMorphingAnimation - sets the correct \l {Qt3DRender::QAttribute}{QAttributes} from the + sets the correct \l {Qt3DCore::QAttribute}{QAttributes} from the \l {Qt3DAnimation::QMorphTarget}{morph targets} to the target \l {Qt3DRender::QGeometryRenderer::geometry} {QGeometryRenderer::geometry} and calculates interpolator for the current position. The actual blending between the attributes must @@ -248,16 +248,16 @@ void QMorphingAnimationPrivate::updateAnimation(float position) void QMorphingAnimationPrivate::setTargetInterpolated(int morphTarget) { QMorphTarget *target = m_morphTargets[morphTarget]; - Qt3DRender::QGeometry *geometry = m_target->geometry(); + Qt3DCore::QGeometry *geometry = m_target->geometry(); // remove attributes from previous frame if (m_currentTarget && (target != m_currentTarget)) { - const QVector<Qt3DRender::QAttribute *> targetAttributes = m_currentTarget->attributeList(); + const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); for (int i = 0; i < targetAttributes.size(); ++i) geometry->removeAttribute(targetAttributes.at(i)); } - const QVector<Qt3DRender::QAttribute *> targetAttributes = target->attributeList(); + const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); // add attributes from current frame to the geometry if (target != m_currentTarget) { diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp index da068d477..1edaf2445 100644 --- a/src/animation/frontend/qmorphtarget.cpp +++ b/src/animation/frontend/qmorphtarget.cpp @@ -49,9 +49,9 @@ namespace Qt3DAnimation { \inherits QObject A Qt3DAnimation::QMorphTarget class is a convenience class, which provides a list - of \l {Qt3DRender::QAttribute} {QAttributes}, which the QMorphingAnimation uses + of \l {Qt3DCore::QAttribute} {QAttributes}, which the QMorphingAnimation uses to animate geometry. A QMorphTarget can also be created based on existing - \l Qt3DRender::QGeometry. + \l Qt3DCore::QGeometry. */ /*! @@ -99,7 +99,7 @@ QMorphTargetPrivate::QMorphTargetPrivate() void QMorphTargetPrivate::updateAttributeNames() { m_attributeNames.clear(); - for (const Qt3DRender::QAttribute *attr : qAsConst(m_targetAttributes)) + for (const Qt3DCore::QAttribute *attr : qAsConst(m_targetAttributes)) m_attributeNames.push_back(attr->name()); } @@ -115,7 +115,7 @@ QMorphTarget::QMorphTarget(QObject *parent) /*! Returns a list of attributes contained in the morph target. */ -QVector<Qt3DRender::QAttribute *> QMorphTarget::attributeList() const +QVector<Qt3DCore::QAttribute *> QMorphTarget::attributeList() const { Q_D(const QMorphTarget); return d->m_targetAttributes; @@ -130,12 +130,12 @@ QStringList QMorphTarget::attributeNames() const /*! Sets \a attributes to the morph target. Old attributes are cleared. */ -void QMorphTarget::setAttributes(const QVector<Qt3DRender::QAttribute *> &attributes) +void QMorphTarget::setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes) { Q_D(QMorphTarget); d->m_targetAttributes = attributes; d->m_attributeNames.clear(); - for (const Qt3DRender::QAttribute *attr : attributes) + for (const Qt3DCore::QAttribute *attr : attributes) d->m_attributeNames.push_back(attr->name()); emit attributeNamesChanged(d->m_attributeNames); @@ -145,10 +145,10 @@ void QMorphTarget::setAttributes(const QVector<Qt3DRender::QAttribute *> &attrib Adds an \a attribute the morph target. An attribute with the same name must not have been added previously to the morph target. */ -void QMorphTarget::addAttribute(Qt3DRender::QAttribute *attribute) +void QMorphTarget::addAttribute(Qt3DCore::QAttribute *attribute) { Q_D(QMorphTarget); - for (const Qt3DRender::QAttribute *attr : qAsConst(d->m_targetAttributes)) { + for (const Qt3DCore::QAttribute *attr : qAsConst(d->m_targetAttributes)) { if (attr->name() == attribute->name()) return; } @@ -160,7 +160,7 @@ void QMorphTarget::addAttribute(Qt3DRender::QAttribute *attribute) /*! Removes an \a attribute from the morph target. */ -void QMorphTarget::removeAttribute(Qt3DRender::QAttribute *attribute) +void QMorphTarget::removeAttribute(Qt3DCore::QAttribute *attribute) { Q_D(QMorphTarget); if (d->m_targetAttributes.contains(attribute)) { @@ -173,11 +173,11 @@ void QMorphTarget::removeAttribute(Qt3DRender::QAttribute *attribute) /*! Returns a morph target based on the \a attributes in the given \a geometry. */ -QMorphTarget *QMorphTarget::fromGeometry(Qt3DRender::QGeometry *geometry, const QStringList &attributes) +QMorphTarget *QMorphTarget::fromGeometry(Qt3DCore::QGeometry *geometry, const QStringList &attributes) { QMorphTarget *target = new QMorphTarget(); const auto geometryAttributes = geometry->attributes(); - for (Qt3DRender::QAttribute *attr : geometryAttributes) { + for (Qt3DCore::QAttribute *attr : geometryAttributes) { if (attributes.contains(attr->name())) target->addAttribute(attr); } diff --git a/src/animation/frontend/qmorphtarget.h b/src/animation/frontend/qmorphtarget.h index ec9761c64..210a3be41 100644 --- a/src/animation/frontend/qmorphtarget.h +++ b/src/animation/frontend/qmorphtarget.h @@ -37,8 +37,8 @@ #ifndef QT3DANIMATION_QMORPHTARGET_H #define QT3DANIMATION_QMORPHTARGET_H -#include <Qt3DRender/qattribute.h> -#include <Qt3DRender/qgeometry.h> +#include <Qt3DCore/qattribute.h> +#include <Qt3DCore/qgeometry.h> #include <QtCore/qstringlist.h> @@ -58,14 +58,14 @@ class Q_3DANIMATIONSHARED_EXPORT QMorphTarget : public QObject public: explicit QMorphTarget(QObject *parent = nullptr); - QVector<Qt3DRender::QAttribute *> attributeList() const; + QVector<Qt3DCore::QAttribute *> attributeList() const; QStringList attributeNames() const; - void setAttributes(const QVector<Qt3DRender::QAttribute *> &attributes); - void addAttribute(Qt3DRender::QAttribute *attribute); - void removeAttribute(Qt3DRender::QAttribute *attribute); + void setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes); + void addAttribute(Qt3DCore::QAttribute *attribute); + void removeAttribute(Qt3DCore::QAttribute *attribute); - Q_INVOKABLE static QMorphTarget *fromGeometry(Qt3DRender::QGeometry *geometry, + Q_INVOKABLE static QMorphTarget *fromGeometry(Qt3DCore::QGeometry *geometry, const QStringList &attributes); Q_SIGNALS: diff --git a/src/animation/frontend/qmorphtarget_p.h b/src/animation/frontend/qmorphtarget_p.h index 1fc3734ae..3214043f4 100644 --- a/src/animation/frontend/qmorphtarget_p.h +++ b/src/animation/frontend/qmorphtarget_p.h @@ -64,7 +64,7 @@ public: void updateAttributeNames(); QStringList m_attributeNames; - QVector<Qt3DRender::QAttribute *> m_targetAttributes; + QVector<Qt3DCore::QAttribute *> m_targetAttributes; Q_DECLARE_PUBLIC(QMorphTarget) }; diff --git a/src/animation/frontend/qvertexblendanimation.cpp b/src/animation/frontend/qvertexblendanimation.cpp index 143b9553a..77ba9a301 100644 --- a/src/animation/frontend/qvertexblendanimation.cpp +++ b/src/animation/frontend/qvertexblendanimation.cpp @@ -51,7 +51,7 @@ namespace Qt3DAnimation { A Qt3DAnimation::QVertexBlendAnimation class implements vertex-blend morphing animation to a target \l {Qt3DRender::QGeometryRenderer}{QGeometryRenderer}. The QVertexBlendAnimation - sets the correct \l {Qt3DRender::QAttribute}{QAttributes} from the + sets the correct \l {Qt3DCore::QAttribute}{QAttributes} from the \l {Qt3DAnimation::QMorphTarget}{morph targets} to the target \l {Qt3DRender::QGeometryRenderer::geometry} {QGeometryRenderer::geometry} and calculates interpolator for the current position. Unlike with QMorphingAnimation, where the blending is @@ -189,21 +189,21 @@ void QVertexBlendAnimationPrivate::updateAnimation(float position) base = m_morphTargets.at(target0); target = m_morphTargets.at(target1); - Qt3DRender::QGeometry *geometry = m_target->geometry(); + Qt3DCore::QGeometry *geometry = m_target->geometry(); // remove attributes from previous frame if (m_currentBase && m_currentTarget && (base != m_currentBase || target != m_currentTarget)) { - const QVector<Qt3DRender::QAttribute *> baseAttributes = m_currentBase->attributeList(); - const QVector<Qt3DRender::QAttribute *> targetAttributes = m_currentTarget->attributeList(); + const QVector<Qt3DCore::QAttribute *> baseAttributes = m_currentBase->attributeList(); + const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); for (int i = 0; i < baseAttributes.size(); ++i) { geometry->removeAttribute(baseAttributes.at(i)); geometry->removeAttribute(targetAttributes.at(i)); } } - const QVector<Qt3DRender::QAttribute *> baseAttributes = base->attributeList(); - const QVector<Qt3DRender::QAttribute *> targetAttributes = target->attributeList(); + const QVector<Qt3DCore::QAttribute *> baseAttributes = base->attributeList(); + const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); const QStringList attributeNames = base->attributeNames(); // add attributes from current frame to the geometry |