2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/actors/camera-actor.h>
22 #include <dali/internal/event/actors/camera-actor-impl.h>
27 CameraActor CameraActor::New()
29 Internal::CameraActorPtr internal = Internal::CameraActor::New( Size::ZERO );
31 return CameraActor(internal.Get());
35 CameraActor CameraActor::New( const Size& size )
37 Internal::CameraActorPtr internal = Internal::CameraActor::New( size );
39 return CameraActor(internal.Get());
42 CameraActor::CameraActor(Internal::CameraActor* internal)
47 CameraActor CameraActor::DownCast( BaseHandle handle )
49 return CameraActor( dynamic_cast<Dali::Internal::CameraActor*>(handle.GetObjectPtr()) );
52 CameraActor::CameraActor()
56 CameraActor::~CameraActor()
60 CameraActor::CameraActor(const CameraActor& copy)
65 CameraActor& CameraActor::operator=(const CameraActor& rhs)
67 BaseHandle::operator=(rhs);
71 void CameraActor::SetType( Dali::Camera::Type type )
73 GetImplementation(*this).SetType(type);
76 Dali::Camera::Type CameraActor::GetType() const
78 return GetImplementation(*this).GetType();
81 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
83 GetImplementation(*this).SetProjectionMode( mode );
86 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
88 return GetImplementation(*this).GetProjectionMode();
91 void CameraActor::SetFieldOfView( float fieldOfView )
93 GetImplementation(*this).SetFieldOfView(fieldOfView);
96 float CameraActor::GetFieldOfView( )
98 return GetImplementation(*this).GetFieldOfView();
101 void CameraActor::SetAspectRatio( float aspectRatio )
103 GetImplementation(*this).SetAspectRatio(aspectRatio);
106 float CameraActor::GetAspectRatio( )
108 return GetImplementation(*this).GetAspectRatio();
111 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
113 GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
116 float CameraActor::GetNearClippingPlane( )
118 return GetImplementation(*this).GetNearClippingPlane();
121 void CameraActor::SetFarClippingPlane( float farClippingPlane )
123 GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
126 float CameraActor::GetFarClippingPlane( )
128 return GetImplementation(*this).GetFarClippingPlane();
131 void CameraActor::SetTargetPosition( const Vector3& targetPosition )
133 GetImplementation(*this).SetTargetPosition(targetPosition);
136 Vector3 CameraActor::GetTargetPosition() const
138 return GetImplementation(*this).GetTargetPosition();
141 void CameraActor::SetInvertYAxis(bool invertYAxis)
143 GetImplementation(*this).SetInvertYAxis(invertYAxis);
146 bool CameraActor::GetInvertYAxis()
148 return GetImplementation(*this).GetInvertYAxis();
151 void CameraActor::SetPerspectiveProjection( const Size& size )
153 GetImplementation(*this).SetPerspectiveProjection( size );
156 void CameraActor::SetOrthographicProjection( const Vector2& size )
158 GetImplementation(*this).SetOrthographicProjection( size );
161 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
163 GetImplementation(*this).SetOrthographicProjection( left, right, top, bottom, near, far );