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_MANAGERS_P_H
5#define QT3DANIMATION_ANIMATION_MANAGERS_P_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 <QtGlobal>
19#include <Qt3DAnimation/private/handle_types_p.h>
20#include <Qt3DAnimation/private/animationclip_p.h>
21#include <Qt3DAnimation/private/clock_p.h>
22#include <Qt3DAnimation/private/blendedclipanimator_p.h>
23#include <Qt3DAnimation/private/clipanimator_p.h>
24#include <Qt3DAnimation/private/channelmapping_p.h>
25#include <Qt3DAnimation/private/channelmapper_p.h>
26#include <Qt3DAnimation/private/skeleton_p.h>
27#include <Qt3DCore/private/qresourcemanager_p.h>
28
29QT_BEGIN_NAMESPACE
30
31namespace Qt3DAnimation {
32namespace Animation {
33
34class ClipBlendNode;
35
36class AnimationClipLoaderManager : public Qt3DCore::QResourceManager<
37 AnimationClip,
38 Qt3DCore::QNodeId>
39{
40public:
41 AnimationClipLoaderManager() {}
42};
43
44class ClockManager : public Qt3DCore::QResourceManager<
45 Clock,
46 Qt3DCore::QNodeId>
47{
48public:
49 ClockManager() {}
50};
51
52class ClipAnimatorManager : public Qt3DCore::QResourceManager<
53 ClipAnimator,
54 Qt3DCore::QNodeId>
55{
56public:
57 ClipAnimatorManager() {}
58};
59
60class BlendedClipAnimatorManager : public Qt3DCore::QResourceManager<
61 BlendedClipAnimator,
62 Qt3DCore::QNodeId>
63{
64public:
65 BlendedClipAnimatorManager() {}
66};
67
68class ChannelMappingManager : public Qt3DCore::QResourceManager<
69 ChannelMapping,
70 Qt3DCore::QNodeId>
71{
72public:
73 ChannelMappingManager() {}
74};
75
76class ChannelMapperManager : public Qt3DCore::QResourceManager<
77 ChannelMapper,
78 Qt3DCore::QNodeId>
79{
80public:
81 ChannelMapperManager() {}
82};
83
84class Q_AUTOTEST_EXPORT ClipBlendNodeManager
85{
86public:
87 ClipBlendNodeManager();
88 ~ClipBlendNodeManager();
89
90 bool containsNode(Qt3DCore::QNodeId id) const;
91 void appendNode(Qt3DCore::QNodeId id, ClipBlendNode *node);
92 ClipBlendNode *lookupNode(Qt3DCore::QNodeId id) const;
93 void releaseNode(Qt3DCore::QNodeId id);
94
95private:
96 QHash<Qt3DCore::QNodeId, ClipBlendNode *> m_nodes;
97};
98
99class SkeletonManager : public Qt3DCore::QResourceManager<
100 Skeleton,
101 Qt3DCore::QNodeId>
102{
103public:
104 SkeletonManager() {}
105};
106
107} // namespace Animation
108} // namespace Qt3DAnimation
109
110Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::AnimationClip, Q_REQUIRES_CLEANUP)
111Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ClipAnimator, Q_REQUIRES_CLEANUP)
112Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::BlendedClipAnimator, Q_REQUIRES_CLEANUP)
113Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ChannelMapping, Q_REQUIRES_CLEANUP)
114Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ChannelMapper, Q_REQUIRES_CLEANUP)
115Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::Skeleton, Q_REQUIRES_CLEANUP)
116
117QT_END_NAMESPACE
118
119#endif // QT3DANIMATION_ANIMATION_MANAGERS_P_H
120

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