summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/animation/backend/animationclip.cpp (renamed from src/animation/backend/animationcliploader.cpp)30
-rw-r--r--src/animation/backend/animationclip_p.h (renamed from src/animation/backend/animationcliploader_p.h)6
-rw-r--r--src/animation/backend/animationutils.cpp10
-rw-r--r--src/animation/backend/animationutils_p.h12
-rw-r--r--src/animation/backend/backend.pri8
-rw-r--r--src/animation/backend/buildblendtreesjob.cpp2
-rw-r--r--src/animation/backend/clipanimator.cpp2
-rw-r--r--src/animation/backend/clipblendvalue.cpp2
-rw-r--r--src/animation/backend/evaluateblendclipanimatorjob.cpp2
-rw-r--r--src/animation/backend/evaluateclipanimatorjob.cpp2
-rw-r--r--src/animation/backend/findrunningclipanimatorsjob.cpp2
-rw-r--r--src/animation/backend/handle_types_p.h4
-rw-r--r--src/animation/backend/handler_p.h2
-rw-r--r--src/animation/backend/loadanimationclipjob.cpp4
-rw-r--r--src/animation/backend/managers_p.h6
-rw-r--r--src/animation/frontend/frontend.pri2
-rw-r--r--src/animation/frontend/qanimationaspect.cpp2
-rw-r--r--tests/auto/animation/animation.pro2
-rw-r--r--tests/auto/animation/animationclip/animationclip.pro (renamed from tests/auto/animation/animationcliploader/animationcliploader.pro)4
-rw-r--r--tests/auto/animation/animationclip/tst_animationclip.cpp (renamed from tests/auto/animation/animationcliploader/tst_animationcliploader.cpp)20
-rw-r--r--tests/auto/animation/animationutils/tst_animationutils.cpp52
-rw-r--r--tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp4
-rw-r--r--tests/auto/animation/qclipanimator/tst_qclipanimator.cpp2
23 files changed, 91 insertions, 91 deletions
diff --git a/src/animation/backend/animationcliploader.cpp b/src/animation/backend/animationclip.cpp
index 36390a284..6a3c3c15b 100644
--- a/src/animation/backend/animationcliploader.cpp
+++ b/src/animation/backend/animationclip.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "animationcliploader_p.h"
+#include "animationclip_p.h"
#include <Qt3DAnimation/qanimationclip.h>
#include <Qt3DAnimation/qanimationcliploader.h>
#include <Qt3DAnimation/private/qanimationclip_p.h>
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DAnimation {
namespace Animation {
-AnimationClipLoader::AnimationClipLoader()
+AnimationClip::AnimationClip()
: BackendNode(ReadWrite)
, m_source()
, m_status(QAnimationClipLoader::NotReady)
@@ -66,7 +66,7 @@ AnimationClipLoader::AnimationClipLoader()
{
}
-void AnimationClipLoader::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change)
+void AnimationClip::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change)
{
const auto loaderTypedChange = qSharedPointerDynamicCast<Qt3DCore::QNodeCreatedChange<QAnimationClipLoaderData>>(change);
if (loaderTypedChange) {
@@ -89,7 +89,7 @@ void AnimationClipLoader::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeB
}
}
-void AnimationClipLoader::cleanup()
+void AnimationClip::cleanup()
{
setEnabled(false);
m_handler = nullptr;
@@ -103,7 +103,7 @@ void AnimationClipLoader::cleanup()
clearData();
}
-void AnimationClipLoader::setStatus(QAnimationClipLoader::Status status)
+void AnimationClip::setStatus(QAnimationClipLoader::Status status)
{
if (status != m_status) {
m_status = status;
@@ -115,7 +115,7 @@ void AnimationClipLoader::setStatus(QAnimationClipLoader::Status status)
}
}
-void AnimationClipLoader::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
+void AnimationClip::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
{
switch (e->type()) {
case Qt3DCore::PropertyUpdated: {
@@ -143,7 +143,7 @@ void AnimationClipLoader::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
\internal
Called by LoadAnimationClipJob on the threadpool
*/
-void AnimationClipLoader::loadAnimation()
+void AnimationClip::loadAnimation()
{
qCDebug(Jobs) << Q_FUNC_INFO << m_source;
clearData();
@@ -179,7 +179,7 @@ void AnimationClipLoader::loadAnimation()
qCDebug(Jobs) << "Loaded animation data:" << *this;
}
-void AnimationClipLoader::loadAnimationFromUrl()
+void AnimationClip::loadAnimationFromUrl()
{
// TODO: Handle remote files
QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(m_source);
@@ -215,7 +215,7 @@ void AnimationClipLoader::loadAnimationFromUrl()
}
}
-void AnimationClipLoader::loadAnimationFromData()
+void AnimationClip::loadAnimationFromData()
{
// Reformat data from QAnimationClipData to backend format
m_channels.resize(m_clipData.channelCount());
@@ -224,7 +224,7 @@ void AnimationClipLoader::loadAnimationFromData()
m_channels[i++].setFromQChannel(frontendChannel);
}
-void AnimationClipLoader::setDuration(float duration)
+void AnimationClip::setDuration(float duration)
{
if (qFuzzyCompare(duration, m_duration))
return;
@@ -239,7 +239,7 @@ void AnimationClipLoader::setDuration(float duration)
notifyObservers(e);
}
-int AnimationClipLoader::channelIndex(const QString &channelName) const
+int AnimationClip::channelIndex(const QString &channelName) const
{
const int channelCount = m_channels.size();
for (int i = 0; i < channelCount; ++i) {
@@ -259,7 +259,7 @@ int AnimationClipLoader::channelIndex(const QString &channelName) const
for the first group, so the first channel of the second group occurs
at index 3.
*/
-int AnimationClipLoader::channelComponentBaseIndex(int channelIndex) const
+int AnimationClip::channelComponentBaseIndex(int channelIndex) const
{
int index = 0;
for (int i = 0; i < channelIndex; ++i)
@@ -267,13 +267,13 @@ int AnimationClipLoader::channelComponentBaseIndex(int channelIndex) const
return index;
}
-void AnimationClipLoader::clearData()
+void AnimationClip::clearData()
{
m_name.clear();
m_channels.clear();
}
-float AnimationClipLoader::findDuration()
+float AnimationClip::findDuration()
{
// Iterate over the contained fcurves and find the longest one
double tMax = 0.0;
@@ -287,7 +287,7 @@ float AnimationClipLoader::findDuration()
return tMax;
}
-int AnimationClipLoader::findChannelComponentCount()
+int AnimationClip::findChannelComponentCount()
{
int channelCount = 0;
for (const Channel &channel : qAsConst(m_channels))
diff --git a/src/animation/backend/animationcliploader_p.h b/src/animation/backend/animationclip_p.h
index b9f21615c..286ec38c0 100644
--- a/src/animation/backend/animationcliploader_p.h
+++ b/src/animation/backend/animationclip_p.h
@@ -61,10 +61,10 @@ namespace Animation {
class Handler;
-class Q_AUTOTEST_EXPORT AnimationClipLoader : public BackendNode
+class Q_AUTOTEST_EXPORT AnimationClip : public BackendNode
{
public:
- AnimationClipLoader();
+ AnimationClip();
void cleanup();
void setSource(const QUrl &source) { m_source = source; }
@@ -118,7 +118,7 @@ private:
};
#ifndef QT_NO_DEBUG_STREAM
-inline QDebug operator<<(QDebug dbg, const AnimationClipLoader &animationClip)
+inline QDebug operator<<(QDebug dbg, const AnimationClip &animationClip)
{
QDebugStateSaver saver(dbg);
dbg << "QNodeId =" << animationClip.peerId() << endl
diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp
index f0f2c3bbb..c9c7c29d4 100644
--- a/src/animation/backend/animationutils.cpp
+++ b/src/animation/backend/animationutils.cpp
@@ -84,7 +84,7 @@ int componentsForType(int type)
return componentCount;
}
-ClipEvaluationData evaluationDataForClip(AnimationClipLoader *clip,
+ClipEvaluationData evaluationDataForClip(AnimationClip *clip,
const AnimatorEvaluationData &animatorData)
{
// global time values expected in seconds
@@ -185,7 +185,7 @@ ComponentIndices channelComponentsToIndicesHelper(const Channel &channel,
return indices;
}
-ClipResults evaluateClipAtLocalTime(AnimationClipLoader *clip, float localTime)
+ClipResults evaluateClipAtLocalTime(AnimationClip *clip, float localTime)
{
QVector<float> channelResults;
Q_ASSERT(clip);
@@ -203,7 +203,7 @@ ClipResults evaluateClipAtLocalTime(AnimationClipLoader *clip, float localTime)
return channelResults;
}
-ClipResults evaluateClipAtPhase(AnimationClipLoader *clip, float phase)
+ClipResults evaluateClipAtPhase(AnimationClip *clip, float phase)
{
// Calculate the clip local time from the phase and clip duration
const double localTime = phase * clip->duration();
@@ -293,7 +293,7 @@ QVector<Qt3DCore::QSceneChangePtr> preparePropertyChanges(Qt3DCore::QNodeId anim
//TODO: Remove this and use new implementation below for both the unblended
// and blended animation cases.
QVector<MappingData> buildPropertyMappings(Handler *handler,
- const AnimationClipLoader *clip,
+ const AnimationClip *clip,
const ChannelMapper *mapper)
{
QVector<MappingData> mappingDataVec;
@@ -468,7 +468,7 @@ QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler,
ComponentIndices generateClipFormatIndices(const QVector<ChannelNameAndType> &targetChannels,
const QVector<ComponentIndices> &targetIndices,
- const AnimationClipLoader *clip)
+ const AnimationClip *clip)
{
Q_ASSERT(targetChannels.size() == targetIndices.size());
diff --git a/src/animation/backend/animationutils_p.h b/src/animation/backend/animationutils_p.h
index 178e69b9b..f8fcbafa7 100644
--- a/src/animation/backend/animationutils_p.h
+++ b/src/animation/backend/animationutils_p.h
@@ -60,7 +60,7 @@ namespace Animation {
struct Channel;
class BlendedClipAnimator;
class Handler;
-class AnimationClipLoader;
+class AnimationClip;
class ChannelMapper;
class ChannelMapping;
@@ -128,7 +128,7 @@ Q_AUTOTEST_EXPORT
int componentsForType(int type);
Q_AUTOTEST_EXPORT
-ClipEvaluationData evaluationDataForClip(AnimationClipLoader *clip,
+ClipEvaluationData evaluationDataForClip(AnimationClip *clip,
const AnimatorEvaluationData &animatorData);
Q_AUTOTEST_EXPORT
@@ -143,11 +143,11 @@ ComponentIndices channelComponentsToIndicesHelper(const Channel &channelGroup,
const QVector<char> &suffixes);
Q_AUTOTEST_EXPORT
-ClipResults evaluateClipAtLocalTime(AnimationClipLoader *clip,
+ClipResults evaluateClipAtLocalTime(AnimationClip *clip,
float localTime);
Q_AUTOTEST_EXPORT
-ClipResults evaluateClipAtPhase(AnimationClipLoader *clip,
+ClipResults evaluateClipAtPhase(AnimationClip *clip,
float phase);
Q_AUTOTEST_EXPORT
@@ -158,7 +158,7 @@ QVector<Qt3DCore::QSceneChangePtr> preparePropertyChanges(Qt3DCore::QNodeId anim
Q_AUTOTEST_EXPORT
QVector<MappingData> buildPropertyMappings(Handler *handler,
- const AnimationClipLoader *clip,
+ const AnimationClip *clip,
const ChannelMapper *mapper);
Q_AUTOTEST_EXPORT
@@ -190,7 +190,7 @@ QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler,
Q_AUTOTEST_EXPORT
ComponentIndices generateClipFormatIndices(const QVector<ChannelNameAndType> &targetChannels,
const QVector<ComponentIndices> &targetIndices,
- const AnimationClipLoader *clip);
+ const AnimationClip *clip);
Q_AUTOTEST_EXPORT
ClipResults formatClipResults(const ClipResults &rawClipResults,
diff --git a/src/animation/backend/backend.pri b/src/animation/backend/backend.pri
index ec87ee2a2..2bc72e1d3 100644
--- a/src/animation/backend/backend.pri
+++ b/src/animation/backend/backend.pri
@@ -23,10 +23,10 @@ HEADERS += \
$$PWD/animationutils_p.h \
$$PWD/buildblendtreesjob_p.h \
$$PWD/evaluateblendclipanimatorjob_p.h \
- $$PWD/animationcliploader_p.h \
$$PWD/lerpclipblend_p.h \
$$PWD/additiveclipblend_p.h \
- $$PWD/clipblendvalue_p.h
+ $$PWD/clipblendvalue_p.h \
+ $$PWD/animationclip_p.h
SOURCES += \
$$PWD/handler.cpp \
@@ -47,7 +47,7 @@ SOURCES += \
$$PWD/animationutils.cpp \
$$PWD/buildblendtreesjob.cpp \
$$PWD/evaluateblendclipanimatorjob.cpp \
- $$PWD/animationcliploader.cpp \
$$PWD/lerpclipblend.cpp \
$$PWD/additiveclipblend.cpp \
- $$PWD/clipblendvalue.cpp
+ $$PWD/clipblendvalue.cpp \
+ $$PWD/animationclip.cpp
diff --git a/src/animation/backend/buildblendtreesjob.cpp b/src/animation/backend/buildblendtreesjob.cpp
index d2fd5c03e..ac95808bc 100644
--- a/src/animation/backend/buildblendtreesjob.cpp
+++ b/src/animation/backend/buildblendtreesjob.cpp
@@ -95,7 +95,7 @@ void BuildBlendTreesJob::run()
Q_ASSERT(valueNode);
const Qt3DCore::QNodeId clipId = valueNode->clipId();
- const AnimationClipLoader *clip = m_handler->animationClipLoaderManager()->lookupResource(clipId);
+ const AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(clipId);
Q_ASSERT(clip);
const ComponentIndices formatIndices
diff --git a/src/animation/backend/clipanimator.cpp b/src/animation/backend/clipanimator.cpp
index 8ba759a36..65fd0f57f 100644
--- a/src/animation/backend/clipanimator.cpp
+++ b/src/animation/backend/clipanimator.cpp
@@ -37,7 +37,7 @@
#include "clipanimator_p.h"
#include <Qt3DAnimation/qclipanimator.h>
#include <Qt3DAnimation/private/qclipanimator_p.h>
-#include <Qt3DAnimation/private/animationcliploader_p.h>
+#include <Qt3DAnimation/private/animationclip_p.h>
#include <Qt3DAnimation/private/managers_p.h>
#include <Qt3DAnimation/private/animationlogging_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
diff --git a/src/animation/backend/clipblendvalue.cpp b/src/animation/backend/clipblendvalue.cpp
index 8a9262faa..2d4ed99d2 100644
--- a/src/animation/backend/clipblendvalue.cpp
+++ b/src/animation/backend/clipblendvalue.cpp
@@ -84,7 +84,7 @@ double ClipBlendValue::duration() const
{
if (m_clipId.isNull())
return 0.0;
- AnimationClipLoader *clip = m_handler->animationClipLoaderManager()->lookupResource(m_clipId);
+ AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(m_clipId);
Q_ASSERT(clip);
return clip->duration();
}
diff --git a/src/animation/backend/evaluateblendclipanimatorjob.cpp b/src/animation/backend/evaluateblendclipanimatorjob.cpp
index 08e6689ca..df4466d1c 100644
--- a/src/animation/backend/evaluateblendclipanimatorjob.cpp
+++ b/src/animation/backend/evaluateblendclipanimatorjob.cpp
@@ -91,7 +91,7 @@ void EvaluateBlendClipAnimatorJob::run()
for (const auto valueNodeId : valueNodeIdsToEvaluate) {
ClipBlendValue *valueNode = static_cast<ClipBlendValue *>(blendNodeManager->lookupNode(valueNodeId));
Q_ASSERT(valueNode);
- AnimationClipLoader *clip = clipLoaderManager->lookupResource(valueNode->clipId());
+ AnimationClip *clip = clipLoaderManager->lookupResource(valueNode->clipId());
Q_ASSERT(clip);
ClipResults rawClipResults = evaluateClipAtPhase(clip, phase);
diff --git a/src/animation/backend/evaluateclipanimatorjob.cpp b/src/animation/backend/evaluateclipanimatorjob.cpp
index b8cad20cb..e89405d63 100644
--- a/src/animation/backend/evaluateclipanimatorjob.cpp
+++ b/src/animation/backend/evaluateclipanimatorjob.cpp
@@ -63,7 +63,7 @@ void EvaluateClipAnimatorJob::run()
Q_ASSERT(clipAnimator);
// Evaluate the fcurves
- AnimationClipLoader *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId());
+ AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId());
Q_ASSERT(clip);
// Prepare for evaluation (convert global time to local time ....)
const AnimatorEvaluationData animatorEvaluationData = evaluationDataForAnimator(clipAnimator, globalTime);
diff --git a/src/animation/backend/findrunningclipanimatorsjob.cpp b/src/animation/backend/findrunningclipanimatorsjob.cpp
index d5599c0fe..80739a02b 100644
--- a/src/animation/backend/findrunningclipanimatorsjob.cpp
+++ b/src/animation/backend/findrunningclipanimatorsjob.cpp
@@ -73,7 +73,7 @@ void FindRunningClipAnimatorsJob::run()
// TODO: Should be possible to parallelise this with the fcurve evaluation as
// sending the property change events doesn't happen until after evaluation
if (canRun) {
- const AnimationClipLoader *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId());
+ const AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId());
const ChannelMapper *mapper = m_handler->channelMapperManager()->lookupResource(clipAnimator->mapperId());
Q_ASSERT(clip && mapper);
const QVector<MappingData> mappingData = buildPropertyMappings(m_handler, clip, mapper);
diff --git a/src/animation/backend/handle_types_p.h b/src/animation/backend/handle_types_p.h
index f5093783b..f6f77eb20 100644
--- a/src/animation/backend/handle_types_p.h
+++ b/src/animation/backend/handle_types_p.h
@@ -58,13 +58,13 @@ QT_BEGIN_NAMESPACE
namespace Qt3DAnimation {
namespace Animation {
-class AnimationClipLoader;
+class AnimationClip;
class ClipAnimator;
class BlendedClipAnimator;
class ChannelMapping;
class ChannelMapper;
-typedef Qt3DCore::QHandle<AnimationClipLoader, 16> HAnimationClip;
+typedef Qt3DCore::QHandle<AnimationClip, 16> HAnimationClip;
typedef Qt3DCore::QHandle<ClipAnimator, 16> HClipAnimator;
typedef Qt3DCore::QHandle<BlendedClipAnimator, 12> HBlendedClipAnimator;
typedef Qt3DCore::QHandle<ChannelMapping, 16> HChannelMapping;
diff --git a/src/animation/backend/handler_p.h b/src/animation/backend/handler_p.h
index dcabf6088..52892f9d0 100644
--- a/src/animation/backend/handler_p.h
+++ b/src/animation/backend/handler_p.h
@@ -63,7 +63,7 @@ class tst_Handler;
namespace Qt3DAnimation {
namespace Animation {
-class AnimationClipLoader;
+class AnimationClip;
class AnimationClipLoaderManager;
class ClipAnimator;
class ClipAnimatorManager;
diff --git a/src/animation/backend/loadanimationclipjob.cpp b/src/animation/backend/loadanimationclipjob.cpp
index 152b60a58..c0201e0e9 100644
--- a/src/animation/backend/loadanimationclipjob.cpp
+++ b/src/animation/backend/loadanimationclipjob.cpp
@@ -36,7 +36,7 @@
#include "loadanimationclipjob_p.h"
-#include <Qt3DAnimation/private/animationcliploader_p.h>
+#include <Qt3DAnimation/private/animationclip_p.h>
#include <Qt3DAnimation/private/handler_p.h>
#include <Qt3DAnimation/private/managers_p.h>
#include <Qt3DAnimation/private/job_common_p.h>
@@ -71,7 +71,7 @@ void LoadAnimationClipJob::run()
Q_ASSERT(m_handler);
AnimationClipLoaderManager *animationClipManager = m_handler->animationClipLoaderManager();
for (const auto animationClipHandle : qAsConst(m_animationClipHandles)) {
- AnimationClipLoader *animationClip = animationClipManager->data(animationClipHandle);
+ AnimationClip *animationClip = animationClipManager->data(animationClipHandle);
animationClip->loadAnimation();
}
diff --git a/src/animation/backend/managers_p.h b/src/animation/backend/managers_p.h
index 1680dc7bf..f99ed0698 100644
--- a/src/animation/backend/managers_p.h
+++ b/src/animation/backend/managers_p.h
@@ -53,7 +53,7 @@
#include <QtGlobal>
#include <Qt3DAnimation/private/handle_types_p.h>
-#include <Qt3DAnimation/private/animationcliploader_p.h>
+#include <Qt3DAnimation/private/animationclip_p.h>
#include <Qt3DAnimation/private/blendedclipanimator_p.h>
#include <Qt3DAnimation/private/clipanimator_p.h>
#include <Qt3DAnimation/private/channelmapping_p.h>
@@ -68,7 +68,7 @@ namespace Animation {
class ClipBlendNode;
class AnimationClipLoaderManager : public Qt3DCore::QResourceManager<
- AnimationClipLoader,
+ AnimationClip,
Qt3DCore::QNodeId,
16,
Qt3DCore::ArrayAllocatingPolicy>
@@ -135,7 +135,7 @@ private:
} // namespace Animation
} // namespace Qt3DAnimation
-Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::AnimationClipLoader, Q_REQUIRES_CLEANUP)
+Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::AnimationClip, Q_REQUIRES_CLEANUP)
Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ClipAnimator, Q_REQUIRES_CLEANUP)
Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::BlendedClipAnimator, Q_REQUIRES_CLEANUP)
Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ChannelMapping, Q_REQUIRES_CLEANUP)
diff --git a/src/animation/frontend/frontend.pri b/src/animation/frontend/frontend.pri
index 129bb9782..9ea438395 100644
--- a/src/animation/frontend/frontend.pri
+++ b/src/animation/frontend/frontend.pri
@@ -32,7 +32,7 @@ HEADERS += \
$$PWD/qvertexblendanimation.h \
$$PWD/qvertexblendanimation_p.h \
$$PWD/qanimationcliploader.h \
- $$PWD/qanimationcliploader_p.h \
+ $$PWD/qanimationclip_p.h \
$$PWD/qlerpclipblend.h \
$$PWD/qlerpclipblend_p.h \
$$PWD/qadditiveclipblend.h \
diff --git a/src/animation/frontend/qanimationaspect.cpp b/src/animation/frontend/qanimationaspect.cpp
index 4270531f6..00f97d5b6 100644
--- a/src/animation/frontend/qanimationaspect.cpp
+++ b/src/animation/frontend/qanimationaspect.cpp
@@ -94,7 +94,7 @@ QAnimationAspect::QAnimationAspect(QAnimationAspectPrivate &dd, QObject *parent)
qRegisterMetaType<Qt3DAnimation::QChannelMapper*>();
registerBackendType<QAbstractAnimationClip>(
- QSharedPointer<Animation::NodeFunctor<Animation::AnimationClipLoader, Animation::AnimationClipLoaderManager>>::create(d->m_handler.data(),
+ QSharedPointer<Animation::NodeFunctor<Animation::AnimationClip, Animation::AnimationClipLoaderManager>>::create(d->m_handler.data(),
d->m_handler->animationClipLoaderManager()));
registerBackendType<QClipAnimator>(
QSharedPointer<Animation::NodeFunctor<Animation::ClipAnimator, Animation::ClipAnimatorManager>>::create(d->m_handler.data(),
diff --git a/tests/auto/animation/animation.pro b/tests/auto/animation/animation.pro
index eeb9a70af..969f477e7 100644
--- a/tests/auto/animation/animation.pro
+++ b/tests/auto/animation/animation.pro
@@ -11,7 +11,7 @@ SUBDIRS += \
qtConfig(private_tests) {
SUBDIRS += \
- animationcliploader \
+ animationclip \
fcurve \
functionrangefinder \
bezierevaluator \
diff --git a/tests/auto/animation/animationcliploader/animationcliploader.pro b/tests/auto/animation/animationclip/animationclip.pro
index b1bc6dbcc..09d9f2523 100644
--- a/tests/auto/animation/animationcliploader/animationcliploader.pro
+++ b/tests/auto/animation/animationclip/animationclip.pro
@@ -1,12 +1,12 @@
TEMPLATE = app
-TARGET = tst_animationcliploader
+TARGET = tst_animationclip
QT += core-private 3dcore 3dcore-private 3danimation 3danimation-private testlib
CONFIG += testcase
SOURCES += \
- tst_animationcliploader.cpp
+ tst_animationclip.cpp
include(../../core/common/common.pri)
diff --git a/tests/auto/animation/animationcliploader/tst_animationcliploader.cpp b/tests/auto/animation/animationclip/tst_animationclip.cpp
index 09798e7d6..96a004804 100644
--- a/tests/auto/animation/animationcliploader/tst_animationcliploader.cpp
+++ b/tests/auto/animation/animationclip/tst_animationclip.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
#include <QtTest/QTest>
-#include <Qt3DAnimation/private/animationcliploader_p.h>
+#include <Qt3DAnimation/private/animationclip_p.h>
#include <Qt3DAnimation/qanimationcliploader.h>
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
@@ -37,7 +37,7 @@
#include <qbackendnodetester.h>
#include <testpostmanarbiter.h>
-class tst_AnimationClipLoader: public Qt3DCore::QBackendNodeTester
+class tst_AnimationClip : public Qt3DCore::QBackendNodeTester
{
Q_OBJECT
@@ -45,7 +45,7 @@ private Q_SLOTS:
void checkPeerPropertyMirroring()
{
// GIVEN
- Qt3DAnimation::Animation::AnimationClipLoader backendClip;
+ Qt3DAnimation::Animation::AnimationClip backendClip;
Qt3DAnimation::Animation::Handler handler;
backendClip.setHandler(&handler);
Qt3DAnimation::QAnimationClipLoader clip;
@@ -64,7 +64,7 @@ private Q_SLOTS:
void checkInitialAndCleanedUpState()
{
// GIVEN
- Qt3DAnimation::Animation::AnimationClipLoader backendClip;
+ Qt3DAnimation::Animation::AnimationClip backendClip;
Qt3DAnimation::Animation::Handler handler;
backendClip.setHandler(&handler);
@@ -94,10 +94,10 @@ private Q_SLOTS:
void checkPropertyChanges()
{
// GIVEN
- Qt3DAnimation::Animation::AnimationClipLoader backendClip;
+ Qt3DAnimation::Animation::AnimationClip backendClip;
Qt3DAnimation::Animation::Handler handler;
backendClip.setHandler(&handler);
- backendClip.setDataType(Qt3DAnimation::Animation::AnimationClipLoader::File);
+ backendClip.setDataType(Qt3DAnimation::Animation::AnimationClip::File);
Qt3DCore::QPropertyUpdatedChangePtr updateChange;
// WHEN
@@ -124,7 +124,7 @@ private Q_SLOTS:
{
// GIVEN
TestArbiter arbiter;
- Qt3DAnimation::Animation::AnimationClipLoader backendClip;
+ Qt3DAnimation::Animation::AnimationClip backendClip;
backendClip.setEnabled(true);
Qt3DCore::QBackendNodePrivate::get(&backendClip)->setArbiter(&arbiter);
@@ -156,7 +156,7 @@ private Q_SLOTS:
{
// GIVEN
TestArbiter arbiter;
- Qt3DAnimation::Animation::AnimationClipLoader backendClip;
+ Qt3DAnimation::Animation::AnimationClip backendClip;
backendClip.setEnabled(true);
Qt3DCore::QBackendNodePrivate::get(&backendClip)->setArbiter(&arbiter);
@@ -185,6 +185,6 @@ private Q_SLOTS:
}
};
-QTEST_APPLESS_MAIN(tst_AnimationClipLoader)
+QTEST_APPLESS_MAIN(tst_AnimationClip)
-#include "tst_animationcliploader.moc"
+#include "tst_animationclip.moc"
diff --git a/tests/auto/animation/animationutils/tst_animationutils.cpp b/tests/auto/animation/animationutils/tst_animationutils.cpp
index 282ceb829..ac4fb6fa0 100644
--- a/tests/auto/animation/animationutils/tst_animationutils.cpp
+++ b/tests/auto/animation/animationutils/tst_animationutils.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
#include <QtTest/QTest>
-#include <Qt3DAnimation/private/animationcliploader_p.h>
+#include <Qt3DAnimation/private/animationclip_p.h>
#include <Qt3DAnimation/private/animationutils_p.h>
#include <Qt3DAnimation/private/blendedclipanimator_p.h>
#include <Qt3DAnimation/private/channelmapper_p.h>
@@ -51,7 +51,7 @@ using namespace Qt3DAnimation::Animation;
Q_DECLARE_METATYPE(Qt3DAnimation::Animation::Handler*)
Q_DECLARE_METATYPE(QVector<ChannelMapping *>)
Q_DECLARE_METATYPE(ChannelMapper *)
-Q_DECLARE_METATYPE(AnimationClipLoader *)
+Q_DECLARE_METATYPE(AnimationClip *)
Q_DECLARE_METATYPE(QVector<MappingData>)
Q_DECLARE_METATYPE(QVector<Qt3DCore::QPropertyUpdatedChangePtr>)
Q_DECLARE_METATYPE(Channel)
@@ -157,13 +157,13 @@ public:
return channelMapper;
}
- AnimationClipLoader *createAnimationClipLoader(Handler *handler,
+ AnimationClip *createAnimationClipLoader(Handler *handler,
const QUrl &source)
{
auto clipId = Qt3DCore::QNodeId::createId();
- AnimationClipLoader *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId);
+ AnimationClip *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId);
setPeerId(clip, clipId);
- clip->setDataType(AnimationClipLoader::File);
+ clip->setDataType(AnimationClip::File);
clip->setSource(source);
clip->loadAnimation();
return clip;
@@ -243,7 +243,7 @@ private Q_SLOTS:
QTest::addColumn<Handler *>("handler");
QTest::addColumn<QVector<ChannelMapping *>>("channelMappings");
QTest::addColumn<ChannelMapper *>("channelMapper");
- QTest::addColumn<AnimationClipLoader *>("clip");
+ QTest::addColumn<AnimationClip *>("clip");
QTest::addColumn<QVector<MappingData>>("expectedMappingData");
auto handler = new Handler;
@@ -283,7 +283,7 @@ private Q_SLOTS:
QFETCH(Handler *, handler);
QFETCH(QVector<ChannelMapping *>, channelMappings);
QFETCH(ChannelMapper *, channelMapper);
- QFETCH(AnimationClipLoader *, clip);
+ QFETCH(AnimationClip *, clip);
QFETCH(QVector<MappingData>, expectedMappingData);
// WHEN
@@ -1079,12 +1079,12 @@ private Q_SLOTS:
void checkEvaluateClipAtLocalTime_data()
{
QTest::addColumn<Handler *>("handler");
- QTest::addColumn<AnimationClipLoader *>("clip");
+ QTest::addColumn<AnimationClip *>("clip");
QTest::addColumn<float>("localTime");
QTest::addColumn<ClipResults>("expectedResults");
Handler *handler;
- AnimationClipLoader *clip;
+ AnimationClip *clip;
float localTime;
ClipResults expectedResults;
@@ -1163,7 +1163,7 @@ private Q_SLOTS:
{
// GIVEN
QFETCH(Handler *, handler);
- QFETCH(AnimationClipLoader *, clip);
+ QFETCH(AnimationClip *, clip);
QFETCH(float, localTime);
QFETCH(ClipResults, expectedResults);
@@ -1186,12 +1186,12 @@ private Q_SLOTS:
void checkEvaluateClipAtPhase_data()
{
QTest::addColumn<Handler *>("handler");
- QTest::addColumn<AnimationClipLoader *>("clip");
+ QTest::addColumn<AnimationClip *>("clip");
QTest::addColumn<float>("phase");
QTest::addColumn<ClipResults>("expectedResults");
Handler *handler;
- AnimationClipLoader *clip;
+ AnimationClip *clip;
float phase;
ClipResults expectedResults;
@@ -1270,7 +1270,7 @@ private Q_SLOTS:
{
// GIVEN
QFETCH(Handler *, handler);
- QFETCH(AnimationClipLoader *, clip);
+ QFETCH(AnimationClip *, clip);
QFETCH(float, phase);
QFETCH(ClipResults, expectedResults);
@@ -1580,12 +1580,12 @@ private Q_SLOTS:
void checkEvaluationDataForClip_data()
{
QTest::addColumn<Handler *>("handler");
- QTest::addColumn<AnimationClipLoader *>("clip");
+ QTest::addColumn<AnimationClip *>("clip");
QTest::addColumn<AnimatorEvaluationData>("animatorData");
QTest::addColumn<ClipEvaluationData>("expectedClipData");
Handler *handler;
- AnimationClipLoader *clip;
+ AnimationClip *clip;
AnimatorEvaluationData animatorData;
ClipEvaluationData clipData;
@@ -1678,7 +1678,7 @@ private Q_SLOTS:
{
// GIVEN
QFETCH(Handler *, handler);
- QFETCH(AnimationClipLoader *, clip);
+ QFETCH(AnimationClip *, clip);
QFETCH(AnimatorEvaluationData, animatorData);
QFETCH(ClipEvaluationData, expectedClipData);
@@ -2349,7 +2349,7 @@ private Q_SLOTS:
{
QTest::addColumn<QVector<ChannelNameAndType>>("targetChannels");
QTest::addColumn<QVector<ComponentIndices>>("targetIndices");
- QTest::addColumn<AnimationClipLoader *>("clip");
+ QTest::addColumn<AnimationClip *>("clip");
QTest::addColumn<ComponentIndices>("expectedResults");
{
@@ -2367,8 +2367,8 @@ private Q_SLOTS:
targetIndices.push_back({ 10 });
targetIndices.push_back({ 11 });
- auto *clip = new AnimationClipLoader();
- clip->setDataType(AnimationClipLoader::File);
+ auto *clip = new AnimationClip();
+ clip->setDataType(AnimationClip::File);
clip->setSource(QUrl("qrc:/clip3.json"));
clip->loadAnimation();
@@ -2397,8 +2397,8 @@ private Q_SLOTS:
targetIndices.push_back({ 10 });
targetIndices.push_back({ 11 });
- auto *clip = new AnimationClipLoader();
- clip->setDataType(AnimationClipLoader::File);
+ auto *clip = new AnimationClip();
+ clip->setDataType(AnimationClip::File);
clip->setSource(QUrl("qrc:/clip3.json"));
clip->loadAnimation();
@@ -2427,8 +2427,8 @@ private Q_SLOTS:
targetIndices.push_back({ 10 });
targetIndices.push_back({ 11 });
- auto *clip = new AnimationClipLoader();
- clip->setDataType(AnimationClipLoader::File);
+ auto *clip = new AnimationClip();
+ clip->setDataType(AnimationClip::File);
clip->setSource(QUrl("qrc:/clip3.json"));
clip->loadAnimation();
@@ -2457,8 +2457,8 @@ private Q_SLOTS:
targetIndices.push_back({ 10 });
targetIndices.push_back({ 11 });
- auto *clip = new AnimationClipLoader();
- clip->setDataType(AnimationClipLoader::File);
+ auto *clip = new AnimationClip();
+ clip->setDataType(AnimationClip::File);
clip->setSource(QUrl("qrc:/clip3.json"));
clip->loadAnimation();
@@ -2478,7 +2478,7 @@ private Q_SLOTS:
// GIVEN
QFETCH(QVector<ChannelNameAndType>, targetChannels);
QFETCH(QVector<ComponentIndices>, targetIndices);
- QFETCH(AnimationClipLoader *, clip);
+ QFETCH(AnimationClip *, clip);
QFETCH(ComponentIndices, expectedResults);
// WHEN
diff --git a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
index eba5c600e..6fe2846b8 100644
--- a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
+++ b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
@@ -46,11 +46,11 @@ class tst_ClipBlendValue : public Qt3DCore::QBackendNodeTester
{
Q_OBJECT
public:
- AnimationClipLoader *createAnimationClipLoader(Handler *handler,
+ AnimationClip *createAnimationClipLoader(Handler *handler,
double duration)
{
auto clipId = Qt3DCore::QNodeId::createId();
- AnimationClipLoader *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId);
+ AnimationClip *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId);
setPeerId(clip, clipId);
clip->setDuration(duration);
return clip;
diff --git a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
index 1177be72a..1ed4b8f13 100644
--- a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
+++ b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
@@ -31,7 +31,7 @@
#include <Qt3DAnimation/qanimationcliploader.h>
#include <Qt3DAnimation/qchannelmapper.h>
#include <Qt3DAnimation/qclipanimator.h>
-#include <Qt3DAnimation/private/qanimationcliploader_p.h>
+#include <Qt3DAnimation/private/qanimationclip_p.h>
#include <Qt3DAnimation/private/qclipanimator_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qnodecreatedchange.h>