dali 1.2.28 version upgrade
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / CameraActor.cs
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.
13
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
15 //
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
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
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.
27 //
28
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
30 // Some have been manually changed
31
32 namespace Tizen.NUI
33 {
34
35     public class CameraActor : Actor
36     {
37         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
38
39         internal CameraActor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn)
40         {
41             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42         }
43
44         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CameraActor obj)
45         {
46             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
47         }
48
49         ~CameraActor()
50         {
51             DisposeQueue.Instance.Add(this);
52         }
53
54         public override void Dispose()
55         {
56             if (!Stage.IsInstalled())
57             {
58                 DisposeQueue.Instance.Add(this);
59                 return;
60             }
61
62             lock (this)
63             {
64                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
65                 {
66                     if (swigCMemOwn)
67                     {
68                         swigCMemOwn = false;
69                         NDalicPINVOKE.delete_CameraActor(swigCPtr);
70                     }
71                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
72                 }
73                 global::System.GC.SuppressFinalize(this);
74                 base.Dispose();
75             }
76         }
77
78
79         internal class Property : global::System.IDisposable
80         {
81             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
82             protected bool swigCMemOwn;
83
84             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
85             {
86                 swigCMemOwn = cMemoryOwn;
87                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
88             }
89
90             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
91             {
92                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
93             }
94
95             ~Property()
96             {
97                 Dispose();
98             }
99
100             public virtual void Dispose()
101             {
102                 lock (this)
103                 {
104                     if (swigCPtr.Handle != global::System.IntPtr.Zero)
105                     {
106                         if (swigCMemOwn)
107                         {
108                             swigCMemOwn = false;
109                             NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
110                         }
111                         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
112                     }
113                     global::System.GC.SuppressFinalize(this);
114                 }
115             }
116
117             internal Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true)
118             {
119                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120             }
121
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();
136
137         }
138
139         public CameraActor() : this(NDalicPINVOKE.CameraActor_New__SWIG_0(), true)
140         {
141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142
143         }
144         public CameraActor(Size2D size) : this(NDalicPINVOKE.CameraActor_New__SWIG_1(Size2D.getCPtr(size)), true)
145         {
146             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147
148         }
149         public new static CameraActor DownCast(BaseHandle handle)
150         {
151             CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
152             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153             return ret;
154         }
155
156         internal CameraActor(CameraActor copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(CameraActor.getCPtr(copy)), true)
157         {
158             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159         }
160
161         internal CameraActor Assign(CameraActor rhs)
162         {
163             CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_Assign(swigCPtr, CameraActor.getCPtr(rhs)), false);
164             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165             return ret;
166         }
167
168         internal void SetType(CameraType type)
169         {
170             NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
171             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172         }
173
174         internal CameraType GetType()
175         {
176             CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
177             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178             return ret;
179         }
180
181         internal void SetProjectionMode(ProjectionMode mode)
182         {
183             NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
184             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185         }
186
187         internal ProjectionMode GetProjectionMode()
188         {
189             ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
190             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191             return ret;
192         }
193
194         internal void SetFieldOfView(float fieldOfView)
195         {
196             NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
197             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198         }
199
200         internal float GetFieldOfView()
201         {
202             float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204             return ret;
205         }
206
207         internal void SetAspectRatio(float aspectRatio)
208         {
209             NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
210             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211         }
212
213         internal float GetAspectRatio()
214         {
215             float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217             return ret;
218         }
219
220         internal void SetNearClippingPlane(float nearClippingPlane)
221         {
222             NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224         }
225
226         internal float GetNearClippingPlane()
227         {
228             float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230             return ret;
231         }
232
233         internal void SetFarClippingPlane(float farClippingPlane)
234         {
235             NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
236             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237         }
238
239         internal float GetFarClippingPlane()
240         {
241             float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
242             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243             return ret;
244         }
245
246         internal void SetTargetPosition(Vector3 targetPosition)
247         {
248             NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250         }
251
252         internal Vector3 GetTargetPosition()
253         {
254             Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
255             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256             return ret;
257         }
258
259         internal void SetInvertYAxis(bool invertYAxis)
260         {
261             NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
262             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263         }
264
265         internal bool GetInvertYAxis()
266         {
267             bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
268             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269             return ret;
270         }
271
272         internal void SetPerspectiveProjection(Vector2 size)
273         {
274             NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
275             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276         }
277
278         internal void SetOrthographicProjection(Vector2 size)
279         {
280             NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size));
281             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282         }
283
284         internal void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
285         {
286             NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far);
287             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288         }
289
290         public string Type
291         {
292             get
293             {
294                 string temp;
295                 GetProperty(CameraActor.Property.TYPE).Get(out temp);
296                 return temp;
297             }
298             set
299             {
300                 SetProperty(CameraActor.Property.TYPE, new Tizen.NUI.PropertyValue(value));
301             }
302         }
303         public string ProjectionMode
304         {
305             get
306             {
307                 string temp;
308                 GetProperty(CameraActor.Property.PROJECTION_MODE).Get(out temp);
309                 return temp;
310             }
311             set
312             {
313                 SetProperty(CameraActor.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(value));
314             }
315         }
316         public float FieldOfView
317         {
318             get
319             {
320                 float temp = 0.0f;
321                 GetProperty(CameraActor.Property.FIELD_OF_VIEW).Get(ref temp);
322                 return temp;
323             }
324             set
325             {
326                 SetProperty(CameraActor.Property.FIELD_OF_VIEW, new Tizen.NUI.PropertyValue(value));
327             }
328         }
329         public float AspectRatio
330         {
331             get
332             {
333                 float temp = 0.0f;
334                 GetProperty(CameraActor.Property.ASPECT_RATIO).Get(ref temp);
335                 return temp;
336             }
337             set
338             {
339                 SetProperty(CameraActor.Property.ASPECT_RATIO, new Tizen.NUI.PropertyValue(value));
340             }
341         }
342         public float NearPlaneDistance
343         {
344             get
345             {
346                 float temp = 0.0f;
347                 GetProperty(CameraActor.Property.NEAR_PLANE_DISTANCE).Get(ref temp);
348                 return temp;
349             }
350             set
351             {
352                 SetProperty(CameraActor.Property.NEAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
353             }
354         }
355         public float FarPlaneDistance
356         {
357             get
358             {
359                 float temp = 0.0f;
360                 GetProperty(CameraActor.Property.FAR_PLANE_DISTANCE).Get(ref temp);
361                 return temp;
362             }
363             set
364             {
365                 SetProperty(CameraActor.Property.FAR_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
366             }
367         }
368         public float LeftPlaneDistance
369         {
370             get
371             {
372                 float temp = 0.0f;
373                 GetProperty(CameraActor.Property.LEFT_PLANE_DISTANCE).Get(ref temp);
374                 return temp;
375             }
376             set
377             {
378                 SetProperty(CameraActor.Property.LEFT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
379             }
380         }
381         public float RightPlaneDistance
382         {
383             get
384             {
385                 float temp = 0.0f;
386                 GetProperty(CameraActor.Property.RIGHT_PLANE_DISTANCE).Get(ref temp);
387                 return temp;
388             }
389             set
390             {
391                 SetProperty(CameraActor.Property.RIGHT_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
392             }
393         }
394         public float TopPlaneDistance
395         {
396             get
397             {
398                 float temp = 0.0f;
399                 GetProperty(CameraActor.Property.TOP_PLANE_DISTANCE).Get(ref temp);
400                 return temp;
401             }
402             set
403             {
404                 SetProperty(CameraActor.Property.TOP_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
405             }
406         }
407         public float BottomPlaneDistance
408         {
409             get
410             {
411                 float temp = 0.0f;
412                 GetProperty(CameraActor.Property.BOTTOM_PLANE_DISTANCE).Get(ref temp);
413                 return temp;
414             }
415             set
416             {
417                 SetProperty(CameraActor.Property.BOTTOM_PLANE_DISTANCE, new Tizen.NUI.PropertyValue(value));
418             }
419         }
420         public Position TargetPosition
421         {
422             get
423             {
424                 Position temp = new Position(0.0f, 0.0f, 0.0f);
425                 GetProperty(CameraActor.Property.TARGET_POSITION).Get(temp);
426                 return temp;
427             }
428             set
429             {
430                 SetProperty(CameraActor.Property.TARGET_POSITION, new Tizen.NUI.PropertyValue(value));
431             }
432         }
433         internal Matrix ProjectionMatrix
434         {
435             get
436             {
437                 Matrix temp = new Matrix();
438                 GetProperty(CameraActor.Property.PROJECTION_MATRIX).Get(temp);
439                 return temp;
440             }
441         }
442
443         internal Matrix ViewMatrix
444         {
445             get
446             {
447                 Matrix temp = new Matrix();
448                 GetProperty(CameraActor.Property.VIEW_MATRIX).Get(temp);
449                 return temp;
450             }
451         }
452         public bool InvertYAxis
453         {
454             get
455             {
456                 bool temp = false;
457                 GetProperty(CameraActor.Property.INVERT_Y_AXIS).Get(ref temp);
458                 return temp;
459             }
460             set
461             {
462                 SetProperty(CameraActor.Property.INVERT_Y_AXIS, new Tizen.NUI.PropertyValue(value));
463             }
464         }
465
466     }
467
468     public enum CameraType
469     {
470         FreeLook,
471         LookAtTarget
472     }
473
474     public enum ProjectionMode
475     {
476         PerspectiveProjection,
477         OrthographicProjection
478     }
479
480 }