1 #ifndef DALI_CAMERA_ACTOR_DEVEL_H
2 #define DALI_CAMERA_ACTOR_DEVEL_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/public-api/actors/camera-actor.h>
25 namespace DevelCameraActor
28 * @brief Enumeration for projection direction.
30 enum ProjectionDirection
32 VERTICAL, ///< Field of view direction based on vertial.
33 HORIZONTAL, ///< Field of view direction based on horizontal.
41 * @brief Orthographic Size of this camera.
42 * If ProjectionDirection is Vertical, OrthographicSize is height/2 of viewing cube of Orthographic projection.
43 * If ProjectionDirection is Horizontal, OrthographicSize is width/2 of viewing cube of Orthographic projection.
44 * Remained Width or Height of viewing cube is internally computed by using aspect ratio.
46 * @details Name "orthographicSize", type Property::FLOAT, animatable, constraint-input
47 * @note Default is 400.0f
49 ORTHOGRAPHIC_SIZE = CameraActor::Property::INVERT_Y_AXIS + 1,
52 * @brief Determine basic direction of projection relative properties.
53 * It will be used when we need to calculate some values relative with aspect ratio automatically.
55 * For example, if aspect ratio is 4:3 and set fieldOfView as 60 degree.
56 * - ProjectionDirection::VERTICAL : basic direction is vertical. so, FoV of horizontal direction become ~75.2 degree
57 * - ProjectionDirection::HORIZONTAL : basic direction is horizontal. so, FoV of vertical direction become ~46.8 degree
59 * Another example, if aspect ratio is 4:3 and set orthographicSize as 400.0f.
60 * - ProjectionDirection::VERTICAL : basic direction is vertical. so, topPlaneDistance become 400.0f, rightPlaneDistance value become 533.3f.
61 * - ProjectionDirection::HORIZONTAL : basic direction is horizontal. so, topPlaneDistance become 300.0f, rightPlaneDistance value become 400.0f.
63 * @details Type Property::INT
64 * @note This property doesn't change FieldOfView and OrthographicSize value automatically. So result scene might be changed.
65 * @note Default is ProjectionDirection::VERTICAL.
70 * @brief Defines reflection plane for the camera
71 * @details Type Property::VECTOR4
77 } // Namespace Property
80 * @brief Request to rotate window after MVP matrix is multiplied.
81 * It is used in case that the target buffer orientation is different from the window orientation.
82 * @param [in] camera Dali::CameraActor that will be rotated.
83 * @param [in] rotationAngle The rotation angle (0, 90, 180, and 270. See Dali::WindowOrientation.)
85 DALI_CORE_API void RotateProjection(Dali::CameraActor camera, int32_t rotationAngle);
87 } // namespace DevelCameraActor
90 #endif // DALI_CAMERA_ACTOR_DEVEL_H