1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 internal class Camera : Animatable
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn)
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Camera obj)
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
44 protected override void Dispose(DisposeTypes type)
51 if (type == DisposeTypes.Explicit)
54 //Release your own managed resources here.
55 //You should release all of your own disposable objects here.
59 //Release your own unmanaged resources here.
60 //You should not access any managed member here except static instance.
61 //because the execution order of Finalizes is non-deterministic.
63 if (swigCPtr.Handle != global::System.IntPtr.Zero)
68 NDalicPINVOKE.delete_CameraActor(swigCPtr);
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
78 public class Property : global::System.IDisposable
80 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
81 protected bool swigCMemOwn;
83 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
85 swigCMemOwn = cMemoryOwn;
86 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
89 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
91 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
94 //A Flag to check who called Dispose(). (By User or DisposeQueue)
95 private bool isDisposeQueued = false;
96 //A Flat to check if it is already disposed.
97 protected bool disposed = false;
101 if (!isDisposeQueued)
103 isDisposeQueued = true;
104 DisposeQueue.Instance.Add(this);
108 public void Dispose()
110 //Throw excpetion if Dispose() is called in separate thread.
111 if (!Window.IsInstalled())
113 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
118 Dispose(DisposeTypes.Implicit);
122 Dispose(DisposeTypes.Explicit);
123 System.GC.SuppressFinalize(this);
127 protected virtual void Dispose(DisposeTypes type)
134 if (type == DisposeTypes.Explicit)
137 //Release your own managed resources here.
138 //You should release all of your own disposable objects here.
142 //Release your own unmanaged resources here.
143 //You should not access any managed member here except static instance.
144 //because the execution order of Finalizes is non-deterministic.
146 if (swigCPtr.Handle != global::System.IntPtr.Zero)
151 NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
153 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
160 public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true)
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get();
166 public static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get();
167 public static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get();
168 public static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get();
169 public static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get();
170 public static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get();
171 public static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get();
172 public static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get();
173 public static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get();
174 public static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get();
175 public static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get();
176 public static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get();
177 public static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get();
178 public static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get();
182 public Camera() : this(NDalicPINVOKE.CameraActor_New__SWIG_0(), true)
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public Camera(Vector2 size) : this(NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true)
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 public new static Camera DownCast(BaseHandle handle)
194 Camera ret = new Camera(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public Camera(Camera copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(Camera.getCPtr(copy)), true)
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 public Camera Assign(Camera rhs)
206 Camera ret = new Camera(NDalicPINVOKE.CameraActor_Assign(swigCPtr, Camera.getCPtr(rhs)), false);
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211 public void SetType(CameraType type)
213 NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 public CameraType GetType()
219 CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 public void SetProjectionMode(ProjectionMode mode)
226 NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230 public ProjectionMode GetProjectionMode()
232 ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 public void SetFieldOfView(float fieldOfView)
239 NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
240 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243 public float GetFieldOfView()
245 float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
246 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250 public void SetAspectRatio(float aspectRatio)
252 NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
253 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 public float GetAspectRatio()
258 float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
259 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263 public void SetNearClippingPlane(float nearClippingPlane)
265 NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
266 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269 public float GetNearClippingPlane()
271 float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 public void SetFarClippingPlane(float farClippingPlane)
278 NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
279 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282 public float GetFarClippingPlane()
284 float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
285 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
289 public void SetTargetPosition(Vector3 targetPosition)
291 NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 public Vector3 GetTargetPosition()
297 Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 public void SetInvertYAxis(bool invertYAxis)
304 NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308 public bool GetInvertYAxis()
310 bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
315 public void SetPerspectiveProjection(Vector2 size)
317 NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321 public void SetOrthographicProjection(Vector2 size)
323 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size));
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327 public void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
329 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far);
330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338 GetProperty(Camera.Property.TYPE).Get(out temp);
343 SetProperty(Camera.Property.TYPE, new Tizen.NUI.PropertyValue(value));
346 public string ProjectionMode
351 GetProperty(Camera.Property.PROJECTION_MODE).Get(out temp);
356 SetProperty(Camera.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(value));
359 public float FieldOfView
364 GetProperty(Camera.Property.FIELD_OF_VIEW).Get(ref temp);
369 SetProperty(Camera.Property.FIELD_OF_VIEW, new Tizen.NUI.PropertyValue(value));
372 public float AspectRatio
377 GetProperty(Camera.Property.ASPECT_RATIO).Get(ref temp);
382 SetProperty(Camera.Property.ASPECT_RATIO, new Tizen.NUI.PropertyValue(value));
385 public float NearPlaneDistance
390 GetProperty(Camera.Property.NEAR_PLANE_DISTANCE).Get(ref temp);
395 SetProperty(Camera.Property.NEAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
398 public float FarPlaneDistance
403 GetProperty(Camera.Property.FAR_PLANE_DISTANCE).Get(ref temp);
408 SetProperty(Camera.Property.FAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
411 public float LeftPlaneDistance
416 GetProperty(Camera.Property.LEFT_PLANE_DISTANCE).Get(ref temp);
421 SetProperty(Camera.Property.LEFT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
424 public float RightPlaneDistance
429 GetProperty(Camera.Property.RIGHT_PLANE_DISTANCE).Get(ref temp);
434 SetProperty(Camera.Property.RIGHT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
437 public float TopPlaneDistance
442 GetProperty(Camera.Property.TOP_PLANE_DISTANCE).Get(ref temp);
447 SetProperty(Camera.Property.TOP_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
450 public float BottomPlaneDistance
455 GetProperty(Camera.Property.BOTTOM_PLANE_DISTANCE).Get(ref temp);
460 SetProperty(Camera.Property.BOTTOM_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
463 public Vector3 TargetPosition
467 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
468 GetProperty(Camera.Property.TARGET_POSITION).Get(temp);
473 SetProperty(Camera.Property.TARGET_POSITION, new Tizen.NUI.PropertyValue(value));
476 internal Matrix ProjectionMatrix
480 Matrix temp = new Matrix();
481 GetProperty(Camera.Property.PROJECTION_MATRIX).Get(temp);
485 internal Matrix ViewMatrix
489 Matrix temp = new Matrix();
490 GetProperty(Camera.Property.VIEW_MATRIX).Get(temp);
494 public bool InvertYAxis
499 GetProperty(Camera.Property.INVERT_Y_AXIS).Get(ref temp);
504 SetProperty(Camera.Property.INVERT_Y_AXIS, new Tizen.NUI.PropertyValue(value));