summaryrefslogtreecommitdiffstats
path: root/src/animation/frontend/qchannel.cpp
diff options
context:
space:
mode:
authorJuan Jose Casafranca <juan.casafranca@kdab.com>2019-02-09 18:12:00 +0100
committerJuan José Casafranca <juan.casafranca@kdab.com>2019-02-22 09:45:14 +0000
commit22c66fa9f7a460f077fede22f285c84276ce3883 (patch)
tree4279a2705fe60d344500d50ef29f9e8baf41f8cd /src/animation/frontend/qchannel.cpp
parenta075f064f0d8a0bb9d467a813ef2eacf39453ec2 (diff)
Use slerp for animating rotation channels
Change-Id: Ic6aa6fd1c1a1e7757dba9466b59d20834b56e246 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/frontend/qchannel.cpp')
-rw-r--r--src/animation/frontend/qchannel.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/animation/frontend/qchannel.cpp b/src/animation/frontend/qchannel.cpp
index 801ad385b..eab7f0df4 100644
--- a/src/animation/frontend/qchannel.cpp
+++ b/src/animation/frontend/qchannel.cpp
@@ -53,6 +53,16 @@ public:
int m_jointIndex = -1;
};
+/*!
+ \class QChannel
+ \inmodule Qt3DAnimation
+ \brief Defines a channel for a QAnimationClipData.
+ The animation system interpolates each channel component independently
+ except in the case the QChannel is called "Rotation" (case sensitive),
+ it has four QChannelComponents and the same number of keyframes for
+ each QChannelComponent. In that case the interpolation will be performed
+ using SLERP.
+*/
QChannel::QChannel()
: d(new QChannelPrivate)
{
@@ -138,14 +148,12 @@ QChannel::const_iterator QChannel::end() const Q_DECL_NOTHROW
bool operator==(const QChannel &lhs, const QChannel &rhs) Q_DECL_NOTHROW
{
- return lhs.d->m_name == rhs.d->m_name &&
- lhs.d->m_channelComponents == rhs.d->m_channelComponents;
+ return lhs.d->m_name == rhs.d->m_name && lhs.d->m_channelComponents == rhs.d->m_channelComponents;
}
bool operator!=(const QChannel &lhs, const QChannel &rhs) Q_DECL_NOTHROW
{
- return lhs.d->m_name != rhs.d->m_name ||
- lhs.d->m_channelComponents != rhs.d->m_channelComponents;
+ return lhs.d->m_name != rhs.d->m_name || lhs.d->m_channelComponents != rhs.d->m_channelComponents;
}
} // namespace Qt3DAnimation