1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DANIMATION_ANIMATION_CLIPBLENDVALUE_H
5#define QT3DANIMATION_ANIMATION_CLIPBLENDVALUE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DAnimation/private/clipblendnode_p.h>
19
20QT_BEGIN_NAMESPACE
21
22namespace Qt3DAnimation {
23namespace Animation {
24
25class Q_AUTOTEST_EXPORT ClipBlendValue : public ClipBlendNode
26{
27public:
28 ClipBlendValue();
29 ~ClipBlendValue();
30
31 inline Qt3DCore::QNodeId clipId() const { return m_clipId; }
32 void setClipId(Qt3DCore::QNodeId clipId) { m_clipId = clipId; } // For unit tests
33
34 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
35
36 inline QList<Qt3DCore::QNodeId> allDependencyIds() const override
37 {
38 return currentDependencyIds();
39 }
40
41 inline QList<Qt3DCore::QNodeId> currentDependencyIds() const override
42 {
43 return {};
44 }
45
46 double duration() const override;
47
48 void setClipFormat(Qt3DCore::QNodeId animatorId, const ClipFormat &formatIndices);
49 ClipFormat &clipFormat(Qt3DCore::QNodeId animatorId);
50 const ClipFormat &clipFormat(Qt3DCore::QNodeId animatorId) const;
51
52protected:
53 ClipResults doBlend(const QList<ClipResults> &blendData) const override;
54
55private:
56 Qt3DCore::QNodeId m_clipId;
57
58 QList<Qt3DCore::QNodeId> m_animatorIds;
59 QList<ClipFormat> m_clipFormats;
60};
61
62} // namespace Animation
63} // namespace Qt3DAnimation
64
65
66QT_END_NAMESPACE
67
68#endif // QT3DANIMATION_ANIMATION_CLIPBLENDVALUE_H
69

source code of qt3d/src/animation/backend/clipblendvalue_p.h