summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/fcurve_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation/backend/fcurve_p.h')
-rw-r--r--src/animation/backend/fcurve_p.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/animation/backend/fcurve_p.h b/src/animation/backend/fcurve_p.h
index def33941e..7ab1593d1 100644
--- a/src/animation/backend/fcurve_p.h
+++ b/src/animation/backend/fcurve_p.h
@@ -50,6 +50,10 @@
#include "keyframe_p.h"
#include "functionrangefinder_p.h"
+
+#include <Qt3DAnimation/qchannel.h>
+#include <Qt3DAnimation/qchannelcomponent.h>
+#include <Qt3DAnimation/qkeyframe.h>
#include <QtCore/qvector.h>
#ifndef QT_NO_DEBUG_STREAM
@@ -81,6 +85,7 @@ public:
float evaluateAtTime(float localTime) const;
void read(const QJsonObject &json);
+ void setFromQChannelComponent(const QChannelComponent &qcc);
private:
QVector<float> m_localTimes;
@@ -106,41 +111,43 @@ inline QDebug operator<<(QDebug dbg, const FCurve &fcurve)
}
#endif
-struct Channel
+struct ChannelComponent
{
QString name;
FCurve fcurve;
void read(const QJsonObject &json);
+ void setFromQChannelComponent(const QChannelComponent &qcc);
};
#ifndef QT_NO_DEBUG_STREAM
-inline QDebug operator<<(QDebug dbg, const Channel &channel)
+inline QDebug operator<<(QDebug dbg, const ChannelComponent &channelComponent)
{
QDebugStateSaver saver(dbg);
- dbg << "Channel Name: " << channel.name << endl
- << "Fcurve:" << channel.fcurve << endl;
+ dbg << "Channel Component Name: " << channelComponent.name << endl
+ << "FCurve:" << channelComponent.fcurve << endl;
return dbg;
}
#endif
-struct ChannelGroup
+struct Channel
{
QString name;
- QVector<Channel> channels;
+ QVector<ChannelComponent> channelComponents;
void read(const QJsonObject &json);
+ void setFromQChannel(const QChannel &qch);
};
#ifndef QT_NO_DEBUG_STREAM
-inline QDebug operator<<(QDebug dbg, const ChannelGroup &channelGroup)
+inline QDebug operator<<(QDebug dbg, const Channel &channel)
{
QDebugStateSaver saver(dbg);
- dbg << "Name: " << channelGroup.name << endl
- << "Channels:" << channelGroup.channels.size() << endl;
+ dbg << "Channel Name: " << channel.name << endl
+ << "Channels:" << channel.channelComponents.size() << endl;
- for (const auto channel : qAsConst(channelGroup.channels)) {
- dbg << channel;
+ for (const auto &channelComponent : qAsConst(channel.channelComponents)) {
+ dbg << channelComponent;
}
return dbg;
}