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