2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
18 #include <dali/public-api/actors/camera-actor.h>
21 #include <dali/internal/event/actors/camera-actor-impl.h>
26 CameraActor CameraActor::New()
28 Internal::CameraActorPtr internal = Internal::CameraActor::New( Size::ZERO );
30 return CameraActor(internal.Get());
34 CameraActor CameraActor::New( const Size& size )
36 Internal::CameraActorPtr internal = Internal::CameraActor::New( size );
38 return CameraActor(internal.Get());
41 CameraActor::CameraActor(Internal::CameraActor* internal)
46 CameraActor CameraActor::DownCast( BaseHandle handle )
48 return CameraActor( dynamic_cast<Dali::Internal::CameraActor*>(handle.GetObjectPtr()) );
51 CameraActor::CameraActor()
55 CameraActor::~CameraActor()
59 void CameraActor::SetType( Dali::Camera::Type type )
61 GetImplementation(*this).SetType(type);
64 Dali::Camera::Type CameraActor::GetType() const
66 return GetImplementation(*this).GetType();
69 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
71 GetImplementation(*this).SetProjectionMode( mode );
74 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
76 return GetImplementation(*this).GetProjectionMode();
79 void CameraActor::SetFieldOfView( float fieldOfView )
81 GetImplementation(*this).SetFieldOfView(fieldOfView);
84 float CameraActor::GetFieldOfView( )
86 return GetImplementation(*this).GetFieldOfView();
89 void CameraActor::SetAspectRatio( float aspectRatio )
91 GetImplementation(*this).SetAspectRatio(aspectRatio);
94 float CameraActor::GetAspectRatio( )
96 return GetImplementation(*this).GetAspectRatio();
99 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
101 GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
104 float CameraActor::GetNearClippingPlane( )
106 return GetImplementation(*this).GetNearClippingPlane();
109 void CameraActor::SetFarClippingPlane( float farClippingPlane )
111 GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
114 float CameraActor::GetFarClippingPlane( )
116 return GetImplementation(*this).GetFarClippingPlane();
119 void CameraActor::SetTargetPosition( const Vector3& targetPosition )
121 GetImplementation(*this).SetTargetPosition(targetPosition);
124 Vector3 CameraActor::GetTargetPosition() const
126 return GetImplementation(*this).GetTargetPosition();
129 void CameraActor::SetInvertYAxis(bool invertYAxis)
131 GetImplementation(*this).SetInvertYAxis(invertYAxis);
134 bool CameraActor::GetInvertYAxis()
136 return GetImplementation(*this).GetInvertYAxis();
139 void CameraActor::SetPerspectiveProjection( const Size& size )
141 GetImplementation(*this).SetPerspectiveProjection( size );
144 void CameraActor::SetOrthographicProjection( const Vector2& size )
146 GetImplementation(*this).SetOrthographicProjection( size );
149 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
151 GetImplementation(*this).SetOrthographicProjection( left, right, top, bottom, near, far );