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(PLUGIN_API_DOTFIELD_COMPONENT_H) || defined(IMPLEMENT_MANAGER) 17 #define PLUGIN_API_DOTFIELD_COMPONENT_H 18 19 #if !defined(IMPLEMENT_MANAGER) 20 #include <cstdint> 21 #include <core/ecs/intf_component_manager.h> 22 #include <core/ecs/component_struct_macros.h> 23 #include <core/property/property_types.h> 24 #include <base/math/vector.h> 25 26 namespace Dotfield { 27 #endif 28 BEGIN_COMPONENT(IDotfieldComponentManager, DotfieldComponent) 29 DEFINE_PROPERTY(BASE_NS::Math::Vec2, size, "Dimensions of the field.", 0, ARRAY_VALUE(64.f, 64.f)) 30 DEFINE_PROPERTY(float, pointScale, "Point scale", 0, VALUE(60.f)) 31 DEFINE_PROPERTY(BASE_NS::Math::Vec2, touchPosition, "Touch position", 0, ARRAY_VALUE(0.f, 0.f)) 32 DEFINE_PROPERTY(BASE_NS::Math::Vec3, touchDirection, "Touch direction", 0, ARRAY_VALUE(0.f, 0.f, 0.f)) 33 DEFINE_PROPERTY(float, touchRadius, "Touch radius", 0, VALUE(0.f)) 34 DEFINE_PROPERTY(uint32_t, color0, "Color 0", 0, VALUE(0u)) 35 DEFINE_PROPERTY(uint32_t, color1, "Color 1", 0, VALUE(0u)) 36 DEFINE_PROPERTY(uint32_t, color2, "Color 2", 0, VALUE(0u)) 37 DEFINE_PROPERTY(uint32_t, color3, "Color 3", 0, VALUE(0u)) 38 END_COMPONENT(IDotfieldComponentManager, DotfieldComponent, "b1711202-59ed-4735-a795-8b13e7f0af4d") 39 #if !defined(IMPLEMENT_MANAGER) 40 } // namespace Dotfield 41 #endif 42 #endif // PLUGIN_API_DOTFIELD_COMPONENT_H 43