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_SKIN_JOINTS_COMPONENT_H) || defined(IMPLEMENT_MANAGER) 17 #define API_3D_ECS_COMPONENTS_SKIN_JOINTS_COMPONENT_H 18 19 #if !defined(IMPLEMENT_MANAGER) 20 #include <3d/namespace.h> 21 #include <3d/shaders/common/3d_dm_structures_common.h> 22 #include <core/ecs/component_struct_macros.h> 23 #include <core/ecs/entity.h> 24 #include <core/ecs/intf_component_manager.h> 25 26 CORE3D_BEGIN_NAMESPACE() 27 #endif 28 /** Contains the entities which are the joints in the skinned entities hierarchy. SkinComponent points the ISkin 29 * resources containing joint names and the inverse bind matrices of the joints. JointMatricesComponent contains the 30 * joint matrices of the joint entities in this skin hierarchy. 31 */ 32 BEGIN_COMPONENT(ISkinJointsComponentManager, SkinJointsComponent) 33 34 /** Number of valid entries in jointEntries array. 35 */ 36 DEFINE_PROPERTY(size_t, count, "Number of Joints", 0, 0) 37 38 /** Entities which are part of this skin hierarchy. 39 SkinningSystem fills this and it's expected to be read-only afterwards. 40 */ 41 DEFINE_ARRAY_PROPERTY( 42 CORE_NS::Entity, CORE_DEFAULT_MATERIAL_MAX_JOINT_COUNT, jointEntities, "Joint Entities", 0, ARRAY_VALUE()) 43 44 END_COMPONENT(ISkinJointsComponentManager, SkinJointsComponent, "e1a12201-a395-4579-b755-995c3c21d141") 45 #if !defined(IMPLEMENT_MANAGER) 46 CORE3D_END_NAMESPACE() 47 #endif 48 49 #endif 50