Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / public-api / actors / camera-actor.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18 #include <dali/public-api/actors/camera-actor.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/internal/event/actors/camera-actor-impl.h>
22
23 namespace Dali
24 {
25
26 CameraActor CameraActor::New()
27 {
28   Internal::CameraActorPtr internal = Internal::CameraActor::New( Size::ZERO );
29
30   return CameraActor(internal.Get());
31 }
32
33
34 CameraActor CameraActor::New( const Size& size )
35 {
36   Internal::CameraActorPtr internal = Internal::CameraActor::New( size );
37
38   return CameraActor(internal.Get());
39 }
40
41 CameraActor::CameraActor(Internal::CameraActor* internal)
42 : Actor(internal)
43 {
44 }
45
46 CameraActor CameraActor::DownCast( BaseHandle handle )
47 {
48   return CameraActor( dynamic_cast<Dali::Internal::CameraActor*>(handle.GetObjectPtr()) );
49 }
50
51 CameraActor::CameraActor()
52 {
53 }
54
55 CameraActor::~CameraActor()
56 {
57 }
58
59 void CameraActor::SetType( Dali::Camera::Type type )
60 {
61   GetImplementation(*this).SetType(type);
62 }
63
64 Dali::Camera::Type CameraActor::GetType() const
65 {
66   return GetImplementation(*this).GetType();
67 }
68
69 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
70 {
71   GetImplementation(*this).SetProjectionMode( mode );
72 }
73
74 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
75 {
76   return GetImplementation(*this).GetProjectionMode();
77 }
78
79 void CameraActor::SetFieldOfView( float fieldOfView )
80 {
81   GetImplementation(*this).SetFieldOfView(fieldOfView);
82 }
83
84 float CameraActor::GetFieldOfView( )
85 {
86   return GetImplementation(*this).GetFieldOfView();
87 }
88
89 void CameraActor::SetAspectRatio( float aspectRatio )
90 {
91   GetImplementation(*this).SetAspectRatio(aspectRatio);
92 }
93
94 float CameraActor::GetAspectRatio( )
95 {
96   return GetImplementation(*this).GetAspectRatio();
97 }
98
99 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
100 {
101   GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
102 }
103
104 float CameraActor::GetNearClippingPlane( )
105 {
106   return GetImplementation(*this).GetNearClippingPlane();
107 }
108
109 void CameraActor::SetFarClippingPlane( float farClippingPlane )
110 {
111   GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
112 }
113
114 float CameraActor::GetFarClippingPlane( )
115 {
116   return GetImplementation(*this).GetFarClippingPlane();
117 }
118
119 void CameraActor::SetTargetPosition( const Vector3& targetPosition )
120 {
121   GetImplementation(*this).SetTargetPosition(targetPosition);
122 }
123
124 Vector3 CameraActor::GetTargetPosition() const
125 {
126   return GetImplementation(*this).GetTargetPosition();
127 }
128
129 void CameraActor::SetInvertYAxis(bool invertYAxis)
130 {
131   GetImplementation(*this).SetInvertYAxis(invertYAxis);
132 }
133
134 bool CameraActor::GetInvertYAxis()
135 {
136   return GetImplementation(*this).GetInvertYAxis();
137 }
138
139 void CameraActor::SetPerspectiveProjection( const Size& size )
140 {
141   GetImplementation(*this).SetPerspectiveProjection( size );
142 }
143
144 void CameraActor::SetOrthographicProjection( const Vector2& size )
145 {
146   GetImplementation(*this).SetOrthographicProjection( size );
147 }
148
149 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
150 {
151   GetImplementation(*this).SetOrthographicProjection( left, right, top, bottom, near, far );
152 }
153
154 } // namespace Dali