Clean up the code to build successfully on macOS
[platform/core/uifw/dali-core.git] / dali / public-api / actors / camera-actor.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/public-api/actors/camera-actor.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/actors/camera-actor-impl.h>
23
24 namespace Dali
25 {
26 CameraActor CameraActor::New()
27 {
28   Internal::CameraActorPtr internal = Internal::CameraActor::New(Size::ZERO);
29
30   return CameraActor(internal.Get());
31 }
32
33 CameraActor CameraActor::New(const Size& size)
34 {
35   Internal::CameraActorPtr internal = Internal::CameraActor::New(size);
36
37   return CameraActor(internal.Get());
38 }
39
40 CameraActor::CameraActor(Internal::CameraActor* internal)
41 : Actor(internal)
42 {
43 }
44
45 CameraActor CameraActor::DownCast(BaseHandle handle)
46 {
47   return CameraActor(dynamic_cast<Dali::Internal::CameraActor*>(handle.GetObjectPtr()));
48 }
49
50 CameraActor::CameraActor()
51 {
52 }
53
54 CameraActor::~CameraActor()
55 {
56 }
57
58 CameraActor::CameraActor(const CameraActor& copy)
59 : Actor(copy)
60 {
61 }
62
63 CameraActor& CameraActor::operator=(const CameraActor& rhs)
64 {
65   BaseHandle::operator=(rhs);
66   return *this;
67 }
68
69 void CameraActor::SetType(Dali::Camera::Type type)
70 {
71   GetImplementation(*this).SetType(type);
72 }
73
74 Dali::Camera::Type CameraActor::GetType() const
75 {
76   return GetImplementation(*this).GetType();
77 }
78
79 void CameraActor::SetProjectionMode(Dali::Camera::ProjectionMode mode)
80 {
81   GetImplementation(*this).SetProjectionMode(mode);
82 }
83
84 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
85 {
86   return GetImplementation(*this).GetProjectionMode();
87 }
88
89 void CameraActor::SetFieldOfView(float fieldOfView)
90 {
91   GetImplementation(*this).SetFieldOfView(fieldOfView);
92 }
93
94 float CameraActor::GetFieldOfView()
95 {
96   return GetImplementation(*this).GetFieldOfView();
97 }
98
99 void CameraActor::SetAspectRatio(float aspectRatio)
100 {
101   GetImplementation(*this).SetAspectRatio(aspectRatio);
102 }
103
104 float CameraActor::GetAspectRatio()
105 {
106   return GetImplementation(*this).GetAspectRatio();
107 }
108
109 void CameraActor::SetNearClippingPlane(float nearClippingPlane)
110 {
111   GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
112 }
113
114 float CameraActor::GetNearClippingPlane()
115 {
116   return GetImplementation(*this).GetNearClippingPlane();
117 }
118
119 void CameraActor::SetFarClippingPlane(float farClippingPlane)
120 {
121   GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
122 }
123
124 float CameraActor::GetFarClippingPlane()
125 {
126   return GetImplementation(*this).GetFarClippingPlane();
127 }
128
129 void CameraActor::SetTargetPosition(const Vector3& targetPosition)
130 {
131   GetImplementation(*this).SetTarget(targetPosition);
132 }
133
134 Vector3 CameraActor::GetTargetPosition() const
135 {
136   return GetImplementation(*this).GetTarget();
137 }
138
139 void CameraActor::SetInvertYAxis(bool invertYAxis)
140 {
141   GetImplementation(*this).SetInvertYAxis(invertYAxis);
142 }
143
144 bool CameraActor::GetInvertYAxis()
145 {
146   return GetImplementation(*this).GetInvertYAxis();
147 }
148
149 void CameraActor::SetPerspectiveProjection(const Size& size)
150 {
151   GetImplementation(*this).SetPerspectiveProjection(size);
152 }
153
154 void CameraActor::SetOrthographicProjection(const Vector2& size)
155 {
156   GetImplementation(*this).SetOrthographicProjection(size);
157 }
158
159 void CameraActor::SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
160 {
161   GetImplementation(*this).SetOrthographicProjection(left, right, top, bottom, near, far);
162 }
163
164 } // namespace Dali