cff3f9b59316d5b80f5c560e518dc47ab672f55e
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Position.cs
1 /*
2  * Copyright (c) 2017 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 namespace Tizen.NUI
19 {
20
21     /// <summary>
22     /// Position is a three dimensional vector.
23     /// </summary>
24     public class Position : global::System.IDisposable
25     {
26         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27         protected bool swigCMemOwn;
28
29         internal Position(global::System.IntPtr cPtr, bool cMemoryOwn)
30         {
31             swigCMemOwn = cMemoryOwn;
32             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33         }
34
35         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)
36         {
37             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38         }
39
40         //A Flag to check who called Dispose(). (By User or DisposeQueue)
41         private bool isDisposeQueued = false;
42         //A Flat to check if it is already disposed.
43         protected bool disposed = false;
44
45         ~Position()
46         {
47             if(!isDisposeQueued)
48             {
49                 isDisposeQueued = true;
50                 DisposeQueue.Instance.Add(this);
51             }
52         }
53
54         public void Dispose()
55         {
56             //Throw excpetion if Dispose() is called in separate thread.
57             if (!Window.IsInstalled())
58             {
59                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
60             }
61
62             if (isDisposeQueued)
63             {
64                 Dispose(DisposeTypes.Implicit);
65             }
66             else
67             {
68                 Dispose(DisposeTypes.Explicit);
69                 System.GC.SuppressFinalize(this);
70             }
71         }
72
73         protected virtual void Dispose(DisposeTypes type)
74         {
75             if (disposed)
76             {
77                 return;
78             }
79
80             if(type == DisposeTypes.Explicit)
81             {
82                 //Called by User
83                 //Release your own managed resources here.
84                 //You should release all of your own disposable objects here.
85             }
86
87             //Release your own unmanaged resources here.
88             //You should not access any managed member here except static instance.
89             //because the execution order of Finalizes is non-deterministic.
90
91             if (swigCPtr.Handle != global::System.IntPtr.Zero)
92             {
93                 if (swigCMemOwn)
94                 {
95                     swigCMemOwn = false;
96                     NDalicPINVOKE.delete_Vector3(swigCPtr);
97                 }
98                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
99             }
100             disposed = true;
101         }
102
103
104         /// <summary>
105         /// Addition operator.
106         /// </summary>
107         /// <param name="arg1">Vector to add</param>
108         /// <param name="arg2">Vector to add</param>
109         /// <returns>A vector containing the result of the addition</returns>
110         public static Position operator +(Position arg1, Position arg2)
111         {
112             return arg1.Add(arg2);
113         }
114
115         /// <summary>
116         /// Subtraction operator.
117         /// </summary>
118         /// <param name="arg1">Vector to subtract</param>
119         /// <param name="arg2">Vector to subtract</param>
120         /// <returns>A vector containing the result of the subtraction</returns>
121         public static Position operator -(Position arg1, Position arg2)
122         {
123             return arg1.Subtract(arg2);
124         }
125
126         /// <summary>
127         /// Unary negation operator.
128         /// </summary>
129         /// <param name="arg1">Vector to netate</param>
130         /// <returns>A vector containg the negation</returns>
131         public static Position operator -(Position arg1)
132         {
133             return arg1.Subtract();
134         }
135
136         /// <summary>
137         /// Multiplication operator.
138         /// </summary>
139         /// <param name="arg1">The vector to multiply</param>
140         /// <param name="arg2">The vector to multiply</param>
141         /// <returns>A vector containing the result of the multiplication</returns>
142         public static Position operator *(Position arg1, Position arg2)
143         {
144             return arg1.Multiply(arg2);
145         }
146
147         /// <summary>
148         /// Multiplication operator.
149         /// </summary>
150         /// <param name="arg1">The vector to multiply</param>
151         /// <param name="arg2">The float value to scale the vector</param>
152         /// <returns>A vector containing the result of the scaling</returns>
153         public static Position operator *(Position arg1, float arg2)
154         {
155             return arg1.Multiply(arg2);
156         }
157
158         /// <summary>
159         /// Division operator.
160         /// </summary>
161         /// <param name="arg1">The vector to divide</param>
162         /// <param name="arg2">The vector to divide</param>
163         /// <returns>A vector containing the result of the division</returns>
164         public static Position operator /(Position arg1, Position arg2)
165         {
166             return arg1.Divide(arg2);
167         }
168
169         /// <summary>
170         /// Division operator.
171         /// </summary>
172         /// <param name="arg1">The vector to divide</param>
173         /// <param name="arg2">The float value to scale the vector by</param>
174         /// <returns>A vector containing the result of the scaling</returns>
175         public static Position operator /(Position arg1, float arg2)
176         {
177             return arg1.Divide(arg2);
178         }
179
180
181         /// <summary>
182         /// Const array subscript operator overload. Should be 0, 1 or 2.
183         /// </summary>
184         /// <param name="index">Subscript index</param>
185         /// <returns>The float at the given index</returns>
186         public float this[uint index]
187         {
188             get
189             {
190                 return ValueOfIndex(index);
191             }
192         }
193
194         /// <summary>
195         /// </summary>
196         internal static Position GetPositionFromPtr(global::System.IntPtr cPtr)
197         {
198             Position ret = new Position(cPtr, false);
199             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200             return ret;
201         }
202
203
204         /// <summary>
205         /// Constructor
206         /// </summary>
207         public Position() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)
208         {
209             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210         }
211
212         /// <summary>
213         /// Constructor
214         /// </summary>
215         /// <param name="x">x component</param>
216         /// <param name="y">y component</param>
217         /// <param name="z">z component</param>
218         public Position(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
219         {
220             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221         }
222
223         /// <summary>
224         /// Constructor
225         /// </summary>
226         /// <param name="position2d">Position2D to create this vector from</param>
227         public Position(Position2D position2d) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Position2D.getCPtr(position2d)), true)
228         {
229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230         }
231
232
233
234         private Position Add(Position rhs)
235         {
236             Position ret = new Position(NDalicPINVOKE.Vector3_Add(swigCPtr, Position.getCPtr(rhs)), true);
237             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238             return ret;
239         }
240
241         private Position Subtract(Position rhs)
242         {
243             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
244             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245             return ret;
246         }
247
248         private Position Multiply(Position rhs)
249         {
250             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
251             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252             return ret;
253         }
254
255         private Position Multiply(float rhs)
256         {
257             Position ret = new Position(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
258             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
259             return ret;
260         }
261
262         private Position Divide(Position rhs)
263         {
264             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Position.getCPtr(rhs)), true);
265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266             return ret;
267         }
268
269         private Position Divide(float rhs)
270         {
271             Position ret = new Position(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
272             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273             return ret;
274         }
275
276         private Position Subtract()
277         {
278             Position ret = new Position(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true);
279             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280             return ret;
281         }
282
283         private float ValueOfIndex(uint index)
284         {
285             float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
286             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287             return ret;
288         }
289
290         /// <summary>
291         /// Compare if rhs is equal to
292         /// </summary>
293         /// <param name="rhs">The vector to compare</param>
294         /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
295         public bool EqualTo(Position rhs)
296         {
297             bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Position.getCPtr(rhs));
298             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299             return ret;
300         }
301
302         /// <summary>
303         /// Compare if rhs is not equal to
304         /// </summary>
305         /// <param name="rhs">The vector to compare</param>
306         /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
307         public bool NotEqualTo(Position rhs)
308         {
309             bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Position.getCPtr(rhs));
310             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311             return ret;
312         }
313
314
315         /// <summary>
316         /// x component
317         /// </summary>
318         public float X
319         {
320             set
321             {
322                 NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
323                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324             }
325             get
326             {
327                 float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);
328                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329                 return ret;
330             }
331         }
332
333         /// <summary>
334         /// y component
335         /// </summary>
336         public float Y
337         {
338             set
339             {
340                 NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
341                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342             }
343             get
344             {
345                 float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);
346                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347                 return ret;
348             }
349         }
350
351         /// <summary>
352         /// z component
353         /// </summary>
354         public float Z
355         {
356             set
357             {
358                 NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
359                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360             }
361             get
362             {
363                 float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);
364                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365                 return ret;
366             }
367         }
368
369         /// <summary>
370         /// ParentOrigin constants. It's 0.0.
371         /// </summary>
372         public static float ParentOriginTop
373         {
374             get
375             {
376                 float ret = NDalicPINVOKE.ParentOriginTop_get();
377                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378                 return ret;
379             }
380         }
381
382         /// <summary>
383         /// ParentOrigin constants. It's 1.0.
384         /// </summary>
385         public static float ParentOriginBottom
386         {
387             get
388             {
389                 float ret = NDalicPINVOKE.ParentOriginBottom_get();
390                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
391                 return ret;
392             }
393         }
394
395         /// <summary>
396         /// ParentOrigin constants. It's 0.0.
397         /// </summary>
398         public static float ParentOriginLeft
399         {
400             get
401             {
402                 float ret = NDalicPINVOKE.ParentOriginLeft_get();
403                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
404                 return ret;
405             }
406         }
407
408         /// <summary>
409         /// ParentOrigin constants. It's 1.0.
410         /// </summary>
411         public static float ParentOriginRight
412         {
413             get
414             {
415                 float ret = NDalicPINVOKE.ParentOriginRight_get();
416                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417                 return ret;
418             }
419         }
420
421         /// <summary>
422         /// ParentOrigin constants. It's 0.5.
423         /// </summary>
424         public static float ParentOriginMiddle
425         {
426             get
427             {
428                 float ret = NDalicPINVOKE.ParentOriginMiddle_get();
429                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
430                 return ret;
431             }
432         }
433
434         /// <summary>
435         /// ParentOrigin constants: 0.0, 0.0, 0.5
436         /// </summary>
437         public static Position ParentOriginTopLeft
438         {
439             get
440             {
441                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get();
442                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
443                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444                 return ret;
445             }
446         }
447
448         /// <summary>
449         /// ParentOrigin constants: 0.5, 0.0, 0.5
450         /// </summary>
451         public static Position ParentOriginTopCenter
452         {
453             get
454             {
455                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get();
456                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
457                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
458                 return ret;
459             }
460         }
461
462         /// <summary>
463         /// ParentOrigin constants: 1.0, 0.0, 0.5
464         /// </summary>
465         public static Position ParentOriginTopRight
466         {
467             get
468             {
469                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get();
470                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
471                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472                 return ret;
473             }
474         }
475
476         /// <summary>
477         /// ParentOrigin constants: 0.0, 0.5, 0.5
478         /// </summary>
479         public static Position ParentOriginCenterLeft
480         {
481             get
482             {
483                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_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         /// ParentOrigin constants: 0.0, 0.5, 0.5
492         /// </summary>
493         public static Position ParentOriginCenter
494         {
495             get
496             {
497                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get();
498                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
499                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
500                 return ret;
501             }
502         }
503
504         /// <summary>
505         /// ParentOrigin constants: 1.0, 0.5, 0.5
506         /// </summary>
507         public static Position ParentOriginCenterRight
508         {
509             get
510             {
511                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get();
512                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
513                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
514                 return ret;
515             }
516         }
517
518         /// <summary>
519         /// ParentOrigin constants: 0.0f, 1.0f, 0.5f
520         /// </summary>
521         public static Position ParentOriginBottomLeft
522         {
523             get
524             {
525                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get();
526                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
527                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528                 return ret;
529             }
530         }
531
532         /// <summary>
533         /// ParentOrigin constants: 0.5, 1.0, 0.5
534         /// </summary>
535         public static Position ParentOriginBottomCenter
536         {
537             get
538             {
539                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get();
540                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
541                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542                 return ret;
543             }
544         }
545
546         /// <summary>
547         /// ParentOrigin constants: 1.0, 1.0, 0.5
548         /// </summary>
549         public static Position ParentOriginBottomRight
550         {
551             get
552             {
553                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get();
554                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
555                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556                 return ret;
557             }
558         }
559
560         /// <summary>
561         /// AnchorPoint constants: 0.0
562         /// </summary>
563         public static float AnchorPointTop
564         {
565             get
566             {
567                 float ret = NDalicPINVOKE.AnchorPointTop_get();
568                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
569                 return ret;
570             }
571         }
572
573         /// <summary>
574         /// AnchorPoint constants: 1.0
575         /// </summary>
576         public static float AnchorPointBottom
577         {
578             get
579             {
580                 float ret = NDalicPINVOKE.AnchorPointBottom_get();
581                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
582                 return ret;
583             }
584         }
585
586         /// <summary>
587         /// AnchorPoint constants: 0.0
588         /// </summary>
589         public static float AnchorPointLeft
590         {
591             get
592             {
593                 float ret = NDalicPINVOKE.AnchorPointLeft_get();
594                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595                 return ret;
596             }
597         }
598
599         /// <summary>
600         /// AnchorPoint constants: 1.0
601         /// </summary>
602         public static float AnchorPointRight
603         {
604             get
605             {
606                 float ret = NDalicPINVOKE.AnchorPointRight_get();
607                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
608                 return ret;
609             }
610         }
611
612         /// <summary>
613         /// AnchorPoint constants: 0.0
614         /// </summary>
615         public static float AnchorPointMiddle
616         {
617             get
618             {
619                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();
620                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
621                 return ret;
622             }
623         }
624
625         /// <summary>
626         /// AnchorPoint constants: 0.0, 0.0, 0.5
627         /// </summary>
628         public static Position AnchorPointTopLeft
629         {
630             get
631             {
632                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();
633                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
634                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635                 return ret;
636             }
637         }
638
639         /// <summary>
640         /// AnchorPoint constants: 0.5, 0.0, 0.5
641         /// </summary>
642         public static Position AnchorPointTopCenter
643         {
644             get
645             {
646                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();
647                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
648                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
649                 return ret;
650             }
651         }
652
653         /// <summary>
654         /// AnchorPoint constants: 1.0, 0.0, 0.5
655         /// </summary>
656         public static Position AnchorPointTopRight
657         {
658             get
659             {
660                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();
661                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
662                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663                 return ret;
664             }
665         }
666
667         /// <summary>
668         /// AnchorPoint constants: 0.0, 0.5, 0.5
669         /// </summary>
670         public static Position AnchorPointCenterLeft
671         {
672             get
673             {
674                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();
675                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
676                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
677                 return ret;
678             }
679         }
680
681         /// <summary>
682         /// AnchorPoint constants: 0.5, 0.5, 0.5
683         /// </summary>
684         public static Position AnchorPointCenter
685         {
686             get
687             {
688                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();
689                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
690                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691                 return ret;
692             }
693         }
694
695         /// <summary>
696         /// AnchorPoint constants: 1.0, 0.5, 0.5
697         /// </summary>
698         public static Position AnchorPointCenterRight
699         {
700             get
701             {
702                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();
703                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
704                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
705                 return ret;
706             }
707         }
708
709         /// <summary>
710         /// AnchorPoint constants: 0.0, 1.0, 0.5
711         /// </summary>
712         public static Position AnchorPointBottomLeft
713         {
714             get
715             {
716                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();
717                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
718                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
719                 return ret;
720             }
721         }
722
723         /// <summary>
724         /// AnchorPoint constants: 0.5, 1.0, 0.5
725         /// </summary>
726         public static Position AnchorPointBottomCenter
727         {
728             get
729             {
730                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();
731                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
732                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
733                 return ret;
734             }
735         }
736
737         /// <summary>
738         /// AnchorPoint constants: 1.0, 1.0, 0.5
739         /// </summary>
740         public static Position AnchorPointBottomRight
741         {
742             get
743             {
744                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();
745                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
746                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
747                 return ret;
748             }
749         }
750
751         /// <summary>
752         /// Constant ( 1.0f, 1.0f, 1.0f )
753         /// </summary>
754         public static Position One
755         {
756             get
757             {
758                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ONE_get();
759                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
760                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
761                 return ret;
762             }
763         }
764
765         internal static Position XAxis
766         {
767             get
768             {
769                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_XAXIS_get();
770                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
771                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772                 return ret;
773             }
774         }
775
776         internal static Position YAxis
777         {
778             get
779             {
780                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_YAXIS_get();
781                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
782                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
783                 return ret;
784             }
785         }
786
787         internal static Position ZAxis
788         {
789             get
790             {
791                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZAXIS_get();
792                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
793                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794                 return ret;
795             }
796         }
797
798         internal static Position NegativeXAxis
799         {
800             get
801             {
802                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_XAXIS_get();
803                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
804                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
805                 return ret;
806             }
807         }
808
809         internal static Position NegativeYAxis
810         {
811             get
812             {
813                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_YAXIS_get();
814                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
815                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816                 return ret;
817             }
818         }
819
820         internal static Position NegativeZAxis
821         {
822             get
823             {
824                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_NEGATIVE_ZAXIS_get();
825                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
826                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
827                 return ret;
828             }
829         }
830
831         /// <summary>
832         /// Constant ( 0.0f, 0.0f, 0.0f )
833         /// </summary>
834         public static Position Zero
835         {
836             get
837             {
838                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get();
839                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
840                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
841                 return ret;
842             }
843         }
844
845         /// <summary>
846         /// Convert a position instance to a vector3 instance.
847         /// </summary>
848         public static implicit operator Vector3(Position Position)
849         {
850             return new Vector3(Position.X, Position.Y, Position.Z);
851         }
852
853         /// <summary>
854         /// Convert a vector3 instance to a position instance.
855         /// </summary>
856         public static implicit operator Position(Vector3 vec)
857         {
858             return new Position(vec.X, vec.Y, vec.Z);
859         }
860     }
861 }