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 | |
29 | QT_BEGIN_NAMESPACE |
30 | |
31 | namespace Qt3DAnimation { |
32 | namespace Animation { |
33 | |
34 | class ClipBlendNode; |
35 | |
36 | class AnimationClipLoaderManager : public Qt3DCore::QResourceManager< |
37 | AnimationClip, |
38 | Qt3DCore::QNodeId> |
39 | { |
40 | public: |
41 | AnimationClipLoaderManager() {} |
42 | }; |
43 | |
44 | class ClockManager : public Qt3DCore::QResourceManager< |
45 | Clock, |
46 | Qt3DCore::QNodeId> |
47 | { |
48 | public: |
49 | ClockManager() {} |
50 | }; |
51 | |
52 | class ClipAnimatorManager : public Qt3DCore::QResourceManager< |
53 | ClipAnimator, |
54 | Qt3DCore::QNodeId> |
55 | { |
56 | public: |
57 | ClipAnimatorManager() {} |
58 | }; |
59 | |
60 | class BlendedClipAnimatorManager : public Qt3DCore::QResourceManager< |
61 | BlendedClipAnimator, |
62 | Qt3DCore::QNodeId> |
63 | { |
64 | public: |
65 | BlendedClipAnimatorManager() {} |
66 | }; |
67 | |
68 | class ChannelMappingManager : public Qt3DCore::QResourceManager< |
69 | ChannelMapping, |
70 | Qt3DCore::QNodeId> |
71 | { |
72 | public: |
73 | ChannelMappingManager() {} |
74 | }; |
75 | |
76 | class ChannelMapperManager : public Qt3DCore::QResourceManager< |
77 | ChannelMapper, |
78 | Qt3DCore::QNodeId> |
79 | { |
80 | public: |
81 | ChannelMapperManager() {} |
82 | }; |
83 | |
84 | class Q_AUTOTEST_EXPORT ClipBlendNodeManager |
85 | { |
86 | public: |
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 | |
95 | private: |
96 | QHash<Qt3DCore::QNodeId, ClipBlendNode *> m_nodes; |
97 | }; |
98 | |
99 | class SkeletonManager : public Qt3DCore::QResourceManager< |
100 | Skeleton, |
101 | Qt3DCore::QNodeId> |
102 | { |
103 | public: |
104 | SkeletonManager() {} |
105 | }; |
106 | |
107 | } // namespace Animation |
108 | } // namespace Qt3DAnimation |
109 | |
110 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::AnimationClip, Q_REQUIRES_CLEANUP) |
111 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ClipAnimator, Q_REQUIRES_CLEANUP) |
112 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::BlendedClipAnimator, Q_REQUIRES_CLEANUP) |
113 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ChannelMapping, Q_REQUIRES_CLEANUP) |
114 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::ChannelMapper, Q_REQUIRES_CLEANUP) |
115 | Q_DECLARE_RESOURCE_INFO(Qt3DAnimation::Animation::Skeleton, Q_REQUIRES_CLEANUP) |
116 | |
117 | QT_END_NAMESPACE |
118 | |
119 | #endif // QT3DANIMATION_ANIMATION_MANAGERS_P_H |
120 | |