Follow formatting NUI
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Position.cs
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using Tizen.NUI.Binding;
20 using System.ComponentModel;
21
22 namespace Tizen.NUI
23 {
24
25     /// <summary>
26     /// Position is a three-dimensional vector.
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     [Tizen.NUI.Binding.TypeConverter(typeof(PositionTypeConverter))]
30     public class Position : Disposable, ICloneable
31     {
32
33         /// <summary>
34         /// The constructor.
35         /// </summary>
36         /// <remarks>
37         /// Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting. <br />
38         /// For example, the followings are possible. <br />
39         /// view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost. <br />
40         /// view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default. <br />
41         /// </remarks>
42         /// <since_tizen> 3 </since_tizen>
43         public Position() : this(Interop.Vector3.new_Vector3__SWIG_0(), true)
44         {
45             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46         }
47
48         /// <summary>
49         /// The constructor.
50         /// </summary>
51         /// <param name="x">The x component.</param>
52         /// <param name="y">The y component.</param>
53         /// <param name="z">The z component(optional).</param>
54         /// <remarks>
55         /// Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting. <br />
56         /// For example, the followings are possible. <br />
57         /// view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost. <br />
58         /// view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default. <br />
59         /// </remarks>
60         /// <since_tizen> 3 </since_tizen>
61         public Position(float x, float y, float z = 0.0f) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true)
62         {
63             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64         }
65
66         /// <summary>
67         /// The constructor.
68         /// </summary>
69         /// <param name="position2d">Position2D to create this vector from.</param>
70         /// <since_tizen> 3 </since_tizen>
71         public Position(Position2D position2d) : this(Interop.Vector3.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true)
72         {
73             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74         }
75
76         internal Position(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
77         {
78         }
79
80         /// <summary>
81         /// ParentOrigin constants. It's 0.0.
82         /// </summary>
83         /// <since_tizen> 3 </since_tizen>
84         public static float ParentOriginTop
85         {
86             get
87             {
88                 float ret = Interop.NDalicParentOrigin.ParentOriginTop_get();
89                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90                 return ret;
91             }
92         }
93
94         /// <summary>
95         /// ParentOrigin constants. It's 1.0.
96         /// </summary>
97         /// <since_tizen> 3 </since_tizen>
98         public static float ParentOriginBottom
99         {
100             get
101             {
102                 float ret = Interop.NDalicParentOrigin.ParentOriginBottom_get();
103                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104                 return ret;
105             }
106         }
107
108         /// <summary>
109         /// ParentOrigin constants. It's 0.0.
110         /// </summary>
111         /// <since_tizen> 3 </since_tizen>
112         public static float ParentOriginLeft
113         {
114             get
115             {
116                 float ret = Interop.NDalicParentOrigin.ParentOriginLeft_get();
117                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118                 return ret;
119             }
120         }
121
122         /// <summary>
123         /// ParentOrigin constants. It's 1.0.
124         /// </summary>
125         /// <since_tizen> 3 </since_tizen>
126         public static float ParentOriginRight
127         {
128             get
129             {
130                 float ret = Interop.NDalicParentOrigin.ParentOriginRight_get();
131                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132                 return ret;
133             }
134         }
135
136         /// <summary>
137         /// ParentOrigin constants. It's 0.5.
138         /// </summary>
139         /// <since_tizen> 3 </since_tizen>
140         public static float ParentOriginMiddle
141         {
142             get
143             {
144                 float ret = Interop.NDalicParentOrigin.ParentOriginMiddle_get();
145                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146                 return ret;
147             }
148         }
149
150         /// <summary>
151         /// ParentOrigin constants: 0.0, 0.0, 0.5.
152         /// </summary>
153         /// <since_tizen> 3 </since_tizen>
154         public static Position ParentOriginTopLeft
155         {
156             get
157             {
158                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopLeft_get();
159                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
160                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161                 return ret;
162             }
163         }
164
165         /// <summary>
166         /// ParentOrigin constants: 0.5, 0.0, 0.5.
167         /// </summary>
168         /// <since_tizen> 3 </since_tizen>
169         public static Position ParentOriginTopCenter
170         {
171             get
172             {
173                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopCenter_get();
174                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
175                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176                 return ret;
177             }
178         }
179
180         /// <summary>
181         /// ParentOrigin constants: 1.0, 0.0, 0.5.
182         /// </summary>
183         /// <since_tizen> 3 </since_tizen>
184         public static Position ParentOriginTopRight
185         {
186             get
187             {
188                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopRight_get();
189                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
190                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191                 return ret;
192             }
193         }
194
195         /// <summary>
196         /// ParentOrigin constants: 0.0, 0.5, 0.5.
197         /// </summary>
198         /// <since_tizen> 3 </since_tizen>
199         public static Position ParentOriginCenterLeft
200         {
201             get
202             {
203                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterLeft_get();
204                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
205                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206                 return ret;
207             }
208         }
209
210         /// <summary>
211         /// ParentOrigin constants: 0.0, 0.5, 0.5
212         /// </summary>
213         /// <since_tizen> 3 </since_tizen>
214         public static Position ParentOriginCenter
215         {
216             get
217             {
218                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenter_get();
219                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
220                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221                 return ret;
222             }
223         }
224
225         /// <summary>
226         /// ParentOrigin constants: 1.0, 0.5, 0.5.
227         /// </summary>
228         /// <since_tizen> 3 </since_tizen>
229         public static Position ParentOriginCenterRight
230         {
231             get
232             {
233                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterRight_get();
234                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
235                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236                 return ret;
237             }
238         }
239
240         /// <summary>
241         /// ParentOrigin constants: 0.0f, 1.0f, 0.5f.
242         /// </summary>
243         /// <since_tizen> 3 </since_tizen>
244         public static Position ParentOriginBottomLeft
245         {
246             get
247             {
248                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomLeft_get();
249                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
250                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251                 return ret;
252             }
253         }
254
255         /// <summary>
256         /// ParentOrigin constants: 0.5, 1.0, 0.5.
257         /// </summary>
258         /// <since_tizen> 3 </since_tizen>
259         public static Position ParentOriginBottomCenter
260         {
261             get
262             {
263                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomCenter_get();
264                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
265                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266                 return ret;
267             }
268         }
269
270         /// <summary>
271         /// ParentOrigin constants: 1.0, 1.0, 0.5.
272         /// </summary>
273         /// <since_tizen> 3 </since_tizen>
274         public static Position ParentOriginBottomRight
275         {
276             get
277             {
278                 global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomRight_get();
279                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
280                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281                 return ret;
282             }
283         }
284
285         /// <summary>
286         /// PivotPoint constants: 0.0.
287         /// </summary>
288         /// <since_tizen> 3 </since_tizen>
289         public static float PivotPointTop
290         {
291             get
292             {
293                 float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
294                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295                 return ret;
296             }
297         }
298
299         /// <summary>
300         /// PivotPoint constants: 1.0.
301         /// </summary>
302         /// <since_tizen> 3 </since_tizen>
303         public static float PivotPointBottom
304         {
305             get
306             {
307                 float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
308                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309                 return ret;
310             }
311         }
312
313         /// <summary>
314         /// PivotPoint constants: 0.0.
315         /// </summary>
316         /// <since_tizen> 3 </since_tizen>
317         public static float PivotPointLeft
318         {
319             get
320             {
321                 float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
322                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323                 return ret;
324             }
325         }
326
327         /// <summary>
328         /// PivotPoint constants: 1.0.
329         /// </summary>
330         /// <since_tizen> 3 </since_tizen>
331         public static float PivotPointRight
332         {
333             get
334             {
335                 float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
336                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337                 return ret;
338             }
339         }
340
341         /// <summary>
342         /// PivotPoint constants: 0.0.
343         /// </summary>
344         /// <since_tizen> 3 </since_tizen>
345         public static float PivotPointMiddle
346         {
347             get
348             {
349                 float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
350                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351                 return ret;
352             }
353         }
354
355         /// <summary>
356         /// PivotPoint constants: 0.0, 0.0, 0.5.
357         /// </summary>
358         /// <since_tizen> 3 </since_tizen>
359         public static Position PivotPointTopLeft
360         {
361             get
362             {
363                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
364                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
365                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366                 return ret;
367             }
368         }
369
370         /// <summary>
371         /// PivotPoint constants: 0.5, 0.0, 0.5.
372         /// </summary>
373         /// <since_tizen> 3 </since_tizen>
374         public static Position PivotPointTopCenter
375         {
376             get
377             {
378                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
379                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
380                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381                 return ret;
382             }
383         }
384
385         /// <summary>
386         /// PivotPoint constants: 1.0, 0.0, 0.5.
387         /// </summary>
388         /// <since_tizen> 3 </since_tizen>
389         public static Position PivotPointTopRight
390         {
391             get
392             {
393                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
394                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
395                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396                 return ret;
397             }
398         }
399
400         /// <summary>
401         /// PivotPoint constants: 0.0, 0.5, 0.5.
402         /// </summary>
403         /// <since_tizen> 3 </since_tizen>
404         public static Position PivotPointCenterLeft
405         {
406             get
407             {
408                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
409                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
410                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
411                 return ret;
412             }
413         }
414
415         /// <summary>
416         /// PivotPoint constants: 0.5, 0.5, 0.5.
417         /// </summary>
418         /// <since_tizen> 3 </since_tizen>
419         public static Position PivotPointCenter
420         {
421             get
422             {
423                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
424                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
425                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426                 return ret;
427             }
428         }
429
430         /// <summary>
431         /// PivotPoint constants: 1.0, 0.5, 0.5.
432         /// </summary>
433         /// <since_tizen> 3 </since_tizen>
434         public static Position PivotPointCenterRight
435         {
436             get
437             {
438                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
439                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
440                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
441                 return ret;
442             }
443         }
444
445         /// <summary>
446         /// PivotPoint constants: 0.0, 1.0, 0.5.
447         /// </summary>
448         /// <since_tizen> 3 </since_tizen>
449         public static Position PivotPointBottomLeft
450         {
451             get
452             {
453                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
454                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
455                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
456                 return ret;
457             }
458         }
459
460         /// <summary>
461         /// PivotPoint constants: 0.5, 1.0, 0.5
462         /// </summary>
463         /// <since_tizen> 3 </since_tizen>
464         public static Position PivotPointBottomCenter
465         {
466             get
467             {
468                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
469                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
470                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
471                 return ret;
472             }
473         }
474
475         /// <summary>
476         /// PivotPoint constants: 1.0, 1.0, 0.5.
477         /// </summary>
478         /// <since_tizen> 3 </since_tizen>
479         public static Position PivotPointBottomRight
480         {
481             get
482             {
483                 global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
484                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
485                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
486                 return ret;
487             }
488         }
489
490         /// <summary>
491         /// Constant ( 1.0f, 1.0f, 1.0f ).
492         /// </summary>
493         /// <since_tizen> 3 </since_tizen>
494         public static Position One
495         {
496             get
497             {
498                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ONE_get();
499                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
500                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501                 return ret;
502             }
503         }
504
505         /// <summary>
506         /// Constant ( 0.0f, 0.0f, 0.0f ).
507         /// </summary>
508         /// <since_tizen> 3 </since_tizen>
509         public static Position Zero
510         {
511             get
512             {
513                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZERO_get();
514                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
515                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516                 return ret;
517             }
518         }
519
520         /// <summary>
521         /// The x component.
522         /// </summary>
523         /// <since_tizen> 3 </since_tizen>
524         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor")]
525         public float X
526         {
527             set
528             {
529                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor");
530
531                 Interop.Vector3.Vector3_X_set(swigCPtr, value);
532                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533
534                 callback?.Invoke(X, Y, Z);
535             }
536             get
537             {
538                 float ret = Interop.Vector3.Vector3_X_get(swigCPtr);
539                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
540                 return ret;
541             }
542         }
543
544         /// <summary>
545         /// The y component.
546         /// </summary>
547         /// <since_tizen> 3 </since_tizen>
548         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor")]
549         public float Y
550         {
551             set
552             {
553                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor");
554
555                 Interop.Vector3.Vector3_Y_set(swigCPtr, value);
556                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
557
558                 callback?.Invoke(X, Y, Z);
559             }
560             get
561             {
562                 float ret = Interop.Vector3.Vector3_Y_get(swigCPtr);
563                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
564                 return ret;
565             }
566         }
567
568         /// <summary>
569         /// The z component.
570         /// </summary>
571         /// <since_tizen> 3 </since_tizen>
572         [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor")]
573         public float Z
574         {
575             set
576             {
577                 Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Position(...) constructor");
578
579                 Interop.Vector3.Vector3_Z_set(swigCPtr, value);
580                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581
582                 callback?.Invoke(X, Y, Z);
583             }
584             get
585             {
586                 float ret = Interop.Vector3.Vector3_Z_get(swigCPtr);
587                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
588                 return ret;
589             }
590         }
591
592         internal static Position XAxis
593         {
594             get
595             {
596                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_XAXIS_get();
597                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
598                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
599                 return ret;
600             }
601         }
602
603         internal static Position YAxis
604         {
605             get
606             {
607                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_YAXIS_get();
608                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
609                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
610                 return ret;
611             }
612         }
613
614         internal static Position ZAxis
615         {
616             get
617             {
618                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_ZAXIS_get();
619                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
620                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
621                 return ret;
622             }
623         }
624
625         internal static Position NegativeXAxis
626         {
627             get
628             {
629                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_XAXIS_get();
630                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
631                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632                 return ret;
633             }
634         }
635
636         internal static Position NegativeYAxis
637         {
638             get
639             {
640                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_YAXIS_get();
641                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
642                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643                 return ret;
644             }
645         }
646
647         internal static Position NegativeZAxis
648         {
649             get
650             {
651                 global::System.IntPtr cPtr = Interop.Vector3.Vector3_NEGATIVE_ZAXIS_get();
652                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
653                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
654                 return ret;
655             }
656         }
657
658         /// <summary>
659         /// The const array subscript operator overload. Should be 0, 1, or 2.
660         /// </summary>
661         /// <param name="index">The subscript index.</param>
662         /// <returns>The float at the given index.</returns>
663         /// <since_tizen> 3 </since_tizen>
664         public float this[uint index]
665         {
666             get
667             {
668                 return ValueOfIndex(index);
669             }
670         }
671
672
673         /// <summary>
674         /// An addition operator.
675         /// </summary>
676         /// <param name="arg1">The vector to add.</param>
677         /// <param name="arg2">The vector to add.</param>
678         /// <returns>The vector containing the result of the addition.</returns>
679         /// <since_tizen> 3 </since_tizen>
680         public static Position operator +(Position arg1, Position arg2)
681         {
682             return arg1.Add(arg2);
683         }
684
685         /// <summary>
686         /// The subtraction operator.
687         /// </summary>
688         /// <param name="arg1">The vector to subtract.</param>
689         /// <param name="arg2">The vector to subtract.</param>
690         /// <returns>The vector containing the result of the subtraction.</returns>
691         /// <since_tizen> 3 </since_tizen>
692         public static Position operator -(Position arg1, Position arg2)
693         {
694             return arg1.Subtract(arg2);
695         }
696
697         /// <summary>
698         /// The unary negation operator.
699         /// </summary>
700         /// <param name="arg1">The vector to negate.</param>
701         /// <returns>The vector containg the negation.</returns>
702         /// <since_tizen> 3 </since_tizen>
703         public static Position operator -(Position arg1)
704         {
705             return arg1.Subtract();
706         }
707
708         /// <summary>
709         /// The multiplication operator.
710         /// </summary>
711         /// <param name="arg1">The vector to multiply.</param>
712         /// <param name="arg2">The vector to multiply.</param>
713         /// <returns>The vector containing the result of the multiplication.</returns>
714         /// <since_tizen> 3 </since_tizen>
715         public static Position operator *(Position arg1, Position arg2)
716         {
717             return arg1.Multiply(arg2);
718         }
719
720         /// <summary>
721         /// The multiplication operator.
722         /// </summary>
723         /// <param name="arg1">The vector to multiply</param>
724         /// <param name="arg2">The float value to scale the vector.</param>
725         /// <returns>The vector containing the result of scaling.</returns>
726         /// <since_tizen> 3 </since_tizen>
727         public static Position operator *(Position arg1, float arg2)
728         {
729             return arg1.Multiply(arg2);
730         }
731
732         /// <summary>
733         /// The division operator.
734         /// </summary>
735         /// <param name="arg1">The vector to divide.</param>
736         /// <param name="arg2">The vector to divide.</param>
737         /// <returns>The vector containing the result of the division.</returns>
738         /// <since_tizen> 3 </since_tizen>
739         public static Position operator /(Position arg1, Position arg2)
740         {
741             return arg1.Divide(arg2);
742         }
743
744         /// <summary>
745         /// The division operator.
746         /// </summary>
747         /// <param name="arg1">The vector to divide.</param>
748         /// <param name="arg2">The float value to scale the vector by.</param>
749         /// <returns>The vector containing the result of scaling.</returns>
750         /// <since_tizen> 3 </since_tizen>
751         public static Position operator /(Position arg1, float arg2)
752         {
753             return arg1.Divide(arg2);
754         }
755
756         /// <summary>
757         /// Converts a position instance to a Vector3 instance.
758         /// </summary>
759         /// <since_tizen> 3 </since_tizen>
760         public static implicit operator Vector3(Position Position)
761         {
762             return new Vector3(Position.X, Position.Y, Position.Z);
763         }
764
765         /// <summary>
766         /// Converts a Vector3 instance to a position instance.
767         /// </summary>
768         /// <since_tizen> 3 </since_tizen>
769         public static implicit operator Position(Vector3 vec)
770         {
771             return new Position(vec.X, vec.Y, vec.Z);
772         }
773
774         /// <summary>
775         /// Implicit type cast operator, Position2D to Position
776         /// </summary>
777         /// <param name="position2d">The object of Position2D type.</param>
778         /// <since_tizen> none </since_tizen>
779         /// This will be public opened in tizen_next by ACR.
780         [EditorBrowsable(EditorBrowsableState.Never)]
781         public static implicit operator Position(Position2D position2d)
782         {
783             return new Position(position2d.X, position2d.Y, 0);
784         }
785
786         /// <summary>
787         /// Determines whether the specified object is equal to the current object.
788         /// </summary>
789         /// <param name="obj">The object to compare with the current object.</param>
790         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
791         public override bool Equals(System.Object obj)
792         {
793             Position position = obj as Position;
794             bool equal = false;
795             if (X == position?.X && Y == position?.Y && Z == position?.Z)
796             {
797                 equal = true;
798             }
799             return equal;
800         }
801
802         /// <summary>
803         /// Gets the the hash code of this Position.
804         /// </summary>
805         /// <returns>The Hash Code.</returns>
806         /// <since_tizen> 6 </since_tizen>
807         public override int GetHashCode()
808         {
809             return swigCPtr.Handle.GetHashCode();
810         }
811
812         /// <summary>
813         /// Compares if rhs is equal to.
814         /// </summary>
815         /// <param name="rhs">The vector to compare.</param>
816         /// <returns>Returns true if the two vectors are equal, otherwise false.</returns>
817         /// <since_tizen> 3 </since_tizen>
818         public bool EqualTo(Position rhs)
819         {
820             bool ret = Interop.Vector3.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs));
821             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822             return ret;
823         }
824
825         /// <summary>
826         /// Compares if rhs is not equal to.
827         /// </summary>
828         /// <param name="rhs">The vector to compare.</param>
829         /// <returns>Returns true if the two vectors are not equal, otherwise false.</returns>
830         /// <since_tizen> 3 </since_tizen>
831         public bool NotEqualTo(Position rhs)
832         {
833             bool ret = Interop.Vector3.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs));
834             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
835             return ret;
836         }
837
838         /// <inheritdoc/>
839         [EditorBrowsable(EditorBrowsableState.Never)]
840         public object Clone() => new Position(X, Y, Z);
841
842         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)
843         {
844             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
845         }
846
847         internal static Position GetPositionFromPtr(global::System.IntPtr cPtr)
848         {
849             Position ret = new Position(cPtr, false);
850             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
851             return ret;
852         }
853
854         /// This will not be public opened.
855         [EditorBrowsable(EditorBrowsableState.Never)]
856         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
857         {
858             Interop.Vector3.delete_Vector3(swigCPtr);
859         }
860
861
862         private Position Add(Position rhs)
863         {
864             Position ret = new Position(Interop.Vector3.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true);
865             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866             return ret;
867         }
868
869         private Position Subtract(Position rhs)
870         {
871             Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
872             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
873             return ret;
874         }
875
876         private Position Multiply(Position rhs)
877         {
878             Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
879             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
880             return ret;
881         }
882
883         private Position Multiply(float rhs)
884         {
885             Position ret = new Position(Interop.Vector3.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
886             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
887             return ret;
888         }
889
890         private Position Divide(Position rhs)
891         {
892             Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
893             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
894             return ret;
895         }
896
897         private Position Divide(float rhs)
898         {
899             Position ret = new Position(Interop.Vector3.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
900             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
901             return ret;
902         }
903
904         private Position Subtract()
905         {
906             Position ret = new Position(Interop.Vector3.Vector3_Subtract__SWIG_1(swigCPtr), true);
907             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
908             return ret;
909         }
910
911         private float ValueOfIndex(uint index)
912         {
913             float ret = Interop.Vector3.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
914             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915             return ret;
916         }
917
918         internal delegate void PositionChangedCallback(float x, float y, float z);
919
920         internal Position(PositionChangedCallback cb, float x, float y, float z) : this(Interop.Vector3.new_Vector3__SWIG_1(x, y, z), true)
921         {
922             callback = cb;
923             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
924         }
925
926         private PositionChangedCallback callback = null;
927     }
928 }