1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #if !defined(API_3D_ECS_COMPONENTS_ANIMATION_OUTPUT_COMPONENT_H) || defined(IMPLEMENT_MANAGER)
17 #define API_3D_ECS_COMPONENTS_ANIMATION_OUTPUT_COMPONENT_H
18 
19 #if !defined(IMPLEMENT_MANAGER)
20 #include <3d/namespace.h>
21 #include <base/containers/vector.h>
22 #include <core/ecs/component_struct_macros.h>
23 #include <core/ecs/intf_component_manager.h>
24 #include <core/namespace.h>
25 
26 CORE3D_BEGIN_NAMESPACE()
27 #endif
28 
29 /**
30  * Animation output component represents animation keyframe data.
31  */
32 BEGIN_COMPONENT(IAnimationOutputComponentManager, AnimationOutputComponent)
33     /** Type hash of the keyframe data. If the property targetted by AnimationTrack
34      * doesn't match with this type information (PropertyTypeDecl::compareHash), the track will be skipped. */
35     DEFINE_PROPERTY(uint64_t, type, "Keyframe Datatype Hash", 0, )
36     /** Keyframe data. Data is stored as byte array but actual data type is specified in AnimationOutputComponent::type.
37      */
38     DEFINE_PROPERTY(BASE_NS::vector<uint8_t>, data, "Keyframe Data", 0, )
39 
40 END_COMPONENT(IAnimationOutputComponentManager, AnimationOutputComponent, "aefd2f02-9178-46d1-8ef2-81a262f0a212")
41 #if !defined(IMPLEMENT_MANAGER)
42 CORE3D_END_NAMESPACE()
43 #endif
44 #endif // API_3D_ECS_COMPONENTS_ANIMATION_OUTPUT_COMPONENT_H
45