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