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 CameraActor& CameraActor::operator=(BaseHandle::NullType* rhs)
73 DALI_ASSERT_ALWAYS( (rhs == NULL) && "Can only assign NULL pointer to handle");
78 void CameraActor::SetType( Dali::Camera::Type type )
80 GetImplementation(*this).SetType(type);
83 Dali::Camera::Type CameraActor::GetType() const
85 return GetImplementation(*this).GetType();
88 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
90 GetImplementation(*this).SetProjectionMode( mode );
93 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
95 return GetImplementation(*this).GetProjectionMode();
98 void CameraActor::SetFieldOfView( float fieldOfView )
100 GetImplementation(*this).SetFieldOfView(fieldOfView);
103 float CameraActor::GetFieldOfView( )
105 return GetImplementation(*this).GetFieldOfView();
108 void CameraActor::SetAspectRatio( float aspectRatio )
110 GetImplementation(*this).SetAspectRatio(aspectRatio);
113 float CameraActor::GetAspectRatio( )
115 return GetImplementation(*this).GetAspectRatio();
118 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
120 GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
123 float CameraActor::GetNearClippingPlane( )
125 return GetImplementation(*this).GetNearClippingPlane();
128 void CameraActor::SetFarClippingPlane( float farClippingPlane )
130 GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
133 float CameraActor::GetFarClippingPlane( )
135 return GetImplementation(*this).GetFarClippingPlane();
138 void CameraActor::SetTargetPosition( const Vector3& targetPosition )
140 GetImplementation(*this).SetTargetPosition(targetPosition);
143 Vector3 CameraActor::GetTargetPosition() const
145 return GetImplementation(*this).GetTargetPosition();
148 void CameraActor::SetInvertYAxis(bool invertYAxis)
150 GetImplementation(*this).SetInvertYAxis(invertYAxis);
153 bool CameraActor::GetInvertYAxis()
155 return GetImplementation(*this).GetInvertYAxis();
158 void CameraActor::SetPerspectiveProjection( const Size& size )
160 GetImplementation(*this).SetPerspectiveProjection( size );
163 void CameraActor::SetOrthographicProjection( const Vector2& size )
165 GetImplementation(*this).SetOrthographicProjection( size );
168 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
170 GetImplementation(*this).SetOrthographicProjection( left, right, top, bottom, near, far );