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_PHYSICAL_CAMERA_COMPONENT_H) || defined(IMPLEMENT_MANAGER) 17 #define API_3D_ECS_COMPONENTS_PHYSICAL_CAMERA_COMPONENT_H 18 19 #if !defined(IMPLEMENT_MANAGER) 20 #include <3d/namespace.h> 21 #include <core/ecs/component_struct_macros.h> 22 #include <core/ecs/intf_component_manager.h> 23 24 CORE3D_BEGIN_NAMESPACE() 25 #endif 26 BEGIN_COMPONENT(IPhysicalCameraComponentManager, PhysicalCameraComponent) 27 /** Defines the size of the aperture */ 28 DEFINE_PROPERTY(float, aperture, "Aperture", 0, VALUE(16.f)) 29 /** Defines the shutter speed */ 30 DEFINE_PROPERTY(float, shutterSpeed, "Shutter Speed", 0, VALUE(1.0f / 125.0f)) 31 /** Sensitivity is similar to ISO value in photography, 32 * If the ISO value is high (film is more sensitive to the light), the image is brighter. 33 * Lower ISO values mean that the film is less sensitive and produces a darker image. 34 */ 35 DEFINE_PROPERTY(float, sensitivity, "Sensitivity", 0, VALUE(100.f)) 36 END_COMPONENT(IPhysicalCameraComponentManager, PhysicalCameraComponent, "4badb6a5-77c6-49ca-a5c3-f788f8ad5534") 37 #if !defined(IMPLEMENT_MANAGER) 38 CORE3D_END_NAMESPACE() 39 #endif 40 41 #endif 42