1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
2 // PROPRIETARY/CONFIDENTIAL
3 // This software is the confidential and proprietary
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
5 // not disclose such Confidential Information and shall use it only in
6 // accordance with the terms of the license agreement you entered into with
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
8 // suitability of the software, either express or implied, including but not
9 // limited to the implied warranties of merchantability, fitness for a
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any
11 // damages suffered by licensee as a result of using, modifying or distributing
12 // this software or its derivatives.
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
20 // http://www.apache.org/licenses/LICENSE-2.0
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
30 // Some have been manually changed
35 public class CameraActor : Actor
37 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
39 internal CameraActor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn)
41 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
44 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CameraActor obj)
46 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
51 DisposeQueue.Instance.Add(this);
54 public override void Dispose()
56 if (!Stage.IsInstalled())
58 DisposeQueue.Instance.Add(this);
64 if (swigCPtr.Handle != global::System.IntPtr.Zero)
69 NDalicPINVOKE.delete_CameraActor(swigCPtr);
71 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
73 global::System.GC.SuppressFinalize(this);
79 internal class Property : global::System.IDisposable
81 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
82 protected bool swigCMemOwn;
84 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
86 swigCMemOwn = cMemoryOwn;
87 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
90 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
92 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
100 public virtual void Dispose()
104 if (swigCPtr.Handle != global::System.IntPtr.Zero)
109 NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
111 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
113 global::System.GC.SuppressFinalize(this);
117 internal Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true)
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 internal static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get();
123 internal static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get();
124 internal static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get();
125 internal static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get();
126 internal static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get();
127 internal static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get();
128 internal static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get();
129 internal static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get();
130 internal static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get();
131 internal static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get();
132 internal static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get();
133 internal static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get();
134 internal static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get();
135 internal static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get();
139 public CameraActor() : this(NDalicPINVOKE.CameraActor_New__SWIG_0(), true)
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 public CameraActor(Size2D size) : this(NDalicPINVOKE.CameraActor_New__SWIG_1(Size2D.getCPtr(size)), true)
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149 public new static CameraActor DownCast(BaseHandle handle)
151 CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 internal CameraActor(CameraActor copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(CameraActor.getCPtr(copy)), true)
158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 internal CameraActor Assign(CameraActor rhs)
163 CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_Assign(swigCPtr, CameraActor.getCPtr(rhs)), false);
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 internal void SetType(CameraType type)
170 NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 internal CameraType GetType()
176 CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 internal void SetProjectionMode(ProjectionMode mode)
183 NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 internal ProjectionMode GetProjectionMode()
189 ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 internal void SetFieldOfView(float fieldOfView)
196 NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 internal float GetFieldOfView()
202 float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 internal void SetAspectRatio(float aspectRatio)
209 NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 internal float GetAspectRatio()
215 float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 internal void SetNearClippingPlane(float nearClippingPlane)
222 NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 internal float GetNearClippingPlane()
228 float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 internal void SetFarClippingPlane(float farClippingPlane)
235 NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239 internal float GetFarClippingPlane()
241 float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 internal void SetTargetPosition(Vector3 targetPosition)
248 NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 internal Vector3 GetTargetPosition()
254 Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259 internal void SetInvertYAxis(bool invertYAxis)
261 NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265 internal bool GetInvertYAxis()
267 bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 internal void SetPerspectiveProjection(Vector2 size)
274 NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 internal void SetOrthographicProjection(Vector2 size)
280 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size));
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284 internal void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
286 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far);
287 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 GetProperty(CameraActor.Property.TYPE).Get(out temp);
300 SetProperty(CameraActor.Property.TYPE, new Tizen.NUI.PropertyValue(value));
303 public string ProjectionMode
308 GetProperty(CameraActor.Property.PROJECTION_MODE).Get(out temp);
313 SetProperty(CameraActor.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(value));
316 public float FieldOfView
321 GetProperty(CameraActor.Property.FIELD_OF_VIEW).Get(ref temp);
326 SetProperty(CameraActor.Property.FIELD_OF_VIEW, new Tizen.NUI.PropertyValue(value));
329 public float AspectRatio
334 GetProperty(CameraActor.Property.ASPECT_RATIO).Get(ref temp);
339 SetProperty(CameraActor.Property.ASPECT_RATIO, new Tizen.NUI.PropertyValue(value));
342 public float NearPlaneDistance
347 GetProperty(CameraActor.Property.NEAR_PLANE_DISTANCE).Get(ref temp);
352 SetProperty(CameraActor.Property.NEAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
355 public float FarPlaneDistance
360 GetProperty(CameraActor.Property.FAR_PLANE_DISTANCE).Get(ref temp);
365 SetProperty(CameraActor.Property.FAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
368 public float LeftPlaneDistance
373 GetProperty(CameraActor.Property.LEFT_PLANE_DISTANCE).Get(ref temp);
378 SetProperty(CameraActor.Property.LEFT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
381 public float RightPlaneDistance
386 GetProperty(CameraActor.Property.RIGHT_PLANE_DISTANCE).Get(ref temp);
391 SetProperty(CameraActor.Property.RIGHT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
394 public float TopPlaneDistance
399 GetProperty(CameraActor.Property.TOP_PLANE_DISTANCE).Get(ref temp);
404 SetProperty(CameraActor.Property.TOP_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
407 public float BottomPlaneDistance
412 GetProperty(CameraActor.Property.BOTTOM_PLANE_DISTANCE).Get(ref temp);
417 SetProperty(CameraActor.Property.BOTTOM_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
420 public Position TargetPosition
424 Position temp = new Position(0.0f, 0.0f, 0.0f);
425 GetProperty(CameraActor.Property.TARGET_POSITION).Get(temp);
430 SetProperty(CameraActor.Property.TARGET_POSITION, new Tizen.NUI.PropertyValue(value));
433 internal Matrix ProjectionMatrix
437 Matrix temp = new Matrix();
438 GetProperty(CameraActor.Property.PROJECTION_MATRIX).Get(temp);
443 internal Matrix ViewMatrix
447 Matrix temp = new Matrix();
448 GetProperty(CameraActor.Property.VIEW_MATRIX).Get(temp);
452 public bool InvertYAxis
457 GetProperty(CameraActor.Property.INVERT_Y_AXIS).Get(ref temp);
462 SetProperty(CameraActor.Property.INVERT_Y_AXIS, new Tizen.NUI.PropertyValue(value));
468 public enum CameraType
474 public enum ProjectionMode
476 PerspectiveProjection,
477 OrthographicProjection