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 void CameraActor::SetType( Dali::Camera::Type type )
62 GetImplementation(*this).SetType(type);
65 Dali::Camera::Type CameraActor::GetType() const
67 return GetImplementation(*this).GetType();
70 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
72 GetImplementation(*this).SetProjectionMode( mode );
75 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
77 return GetImplementation(*this).GetProjectionMode();
80 void CameraActor::SetFieldOfView( float fieldOfView )
82 GetImplementation(*this).SetFieldOfView(fieldOfView);
85 float CameraActor::GetFieldOfView( )
87 return GetImplementation(*this).GetFieldOfView();
90 void CameraActor::SetAspectRatio( float aspectRatio )
92 GetImplementation(*this).SetAspectRatio(aspectRatio);
95 float CameraActor::GetAspectRatio( )
97 return GetImplementation(*this).GetAspectRatio();
100 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
102 GetImplementation(*this).SetNearClippingPlane(nearClippingPlane);
105 float CameraActor::GetNearClippingPlane( )
107 return GetImplementation(*this).GetNearClippingPlane();
110 void CameraActor::SetFarClippingPlane( float farClippingPlane )
112 GetImplementation(*this).SetFarClippingPlane(farClippingPlane);
115 float CameraActor::GetFarClippingPlane( )
117 return GetImplementation(*this).GetFarClippingPlane();
120 void CameraActor::SetTargetPosition( const Vector3& targetPosition )
122 GetImplementation(*this).SetTargetPosition(targetPosition);
125 Vector3 CameraActor::GetTargetPosition() const
127 return GetImplementation(*this).GetTargetPosition();
130 void CameraActor::SetInvertYAxis(bool invertYAxis)
132 GetImplementation(*this).SetInvertYAxis(invertYAxis);
135 bool CameraActor::GetInvertYAxis()
137 return GetImplementation(*this).GetInvertYAxis();
140 void CameraActor::SetPerspectiveProjection( const Size& size )
142 GetImplementation(*this).SetPerspectiveProjection( size );
145 void CameraActor::SetOrthographicProjection( const Vector2& size )
147 GetImplementation(*this).SetOrthographicProjection( size );
150 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
152 GetImplementation(*this).SetOrthographicProjection( left, right, top, bottom, near, far );