Merge "PreFocusChange disconnect error issue" into tizen
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Rotation.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// Rotation Class
16     /// </summary>
17     public class Rotation : global::System.IDisposable
18     {
19         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20         protected bool swigCMemOwn;
21
22         internal Rotation(global::System.IntPtr cPtr, bool cMemoryOwn)
23         {
24             swigCMemOwn = cMemoryOwn;
25             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26         }
27
28         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rotation obj)
29         {
30             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31         }
32
33         ~Rotation()
34         {
35             DisposeQueue.Instance.Add(this);
36         }
37
38         public virtual void Dispose()
39         {
40             if (!Stage.IsInstalled())
41             {
42                 DisposeQueue.Instance.Add(this);
43                 return;
44             }
45
46             lock (this)
47             {
48                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
49                 {
50                     if (swigCMemOwn)
51                     {
52                         swigCMemOwn = false;
53                         NDalicPINVOKE.delete_Rotation(swigCPtr);
54                     }
55                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56                 }
57                 global::System.GC.SuppressFinalize(this);
58             }
59         }
60
61         /// <summary>
62         /// Addition operator.
63         /// </summary>
64         /// <param name="arg1">First Rotation</param>
65         /// <param name="arg2">Second Rotation</param>
66         /// <returns>A Rotation containing the result of the Addition</returns>
67         public static Rotation operator +(Rotation arg1, Rotation arg2)
68         {
69             return arg1.Add(arg2);
70         }
71
72         /// <summary>
73         /// Subtraction operator.
74         /// </summary>
75         /// <param name="arg1">First Rotation</param>
76         /// <param name="arg2">Second Rotation</param>
77         /// <returns>A Rotation containing the result of the subtract</returns>
78         public static Rotation operator -(Rotation arg1, Rotation arg2)
79         {
80             return arg1.Subtract(arg2);
81         }
82
83         /// <summary>
84         /// Unary Negation operator.
85         /// </summary>
86         /// <param name="arg1">First Rotation</param>
87         /// <returns>A Rotation containing the negated result</returns>
88         public static Rotation operator -(Rotation arg1)
89         {
90             return arg1.Subtract();
91         }
92
93         /// <summary>
94         /// Multiplication operator.
95         /// </summary>
96         /// <param name="arg1">First Rotation</param>
97         /// <param name="arg2">Second Rotation</param>
98         /// <returns>A Rotation containing the result of the Multiplication</returns>
99         public static Rotation operator *(Rotation arg1, Rotation arg2)
100         {
101             return arg1.Multiply(arg2);
102         }
103
104         /// <summary>
105         /// Multiplication operator.
106         /// </summary>
107         /// <param name="arg1">Rotation</param>
108         /// <param name="arg2">The vector to multiply</param>
109         /// <returns>A Rotation containing the result of the multiplication</returns>
110         public static Vector3 operator *(Rotation arg1, Vector3 arg2)
111         {
112             return arg1.Multiply(arg2);
113         }
114
115         /// <summary>
116         /// Scale operator.
117         /// </summary>
118         /// <param name="arg1">Rotation</param>
119         /// <param name="arg2">A value to scale by</param>
120         /// <returns>A Rotation containing the result of the scaling</returns>
121         public static Rotation operator *(Rotation arg1, float arg2)
122         {
123             return arg1.Multiply(arg2);
124         }
125
126         /// <summary>
127         /// Division operator.
128         /// </summary>
129         /// <param name="arg1">First Rotation</param>
130         /// <param name="arg2">Second Rotation</param>
131         /// <returns>A Rotation containing the result of the scaling</returns>
132         public static Rotation operator /(Rotation arg1, Rotation arg2)
133         {
134             return arg1.Divide(arg2);
135         }
136
137         /// <summary>
138         /// Scale operator.
139         /// </summary>
140         /// <param name="arg1">Rotation</param>
141         /// <param name="arg2">A value to scale by</param>
142         /// <returns>A Rotation containing the result of the scaling</returns>
143         public static Rotation operator /(Rotation arg1, float arg2)
144         {
145             return arg1.Divide(arg2);
146         }
147
148         /// <summary>
149         /// Default Constructor.
150         /// </summary>
151         public Rotation() : this(NDalicPINVOKE.new_Rotation__SWIG_0(), true)
152         {
153             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154         }
155
156         /// <summary>
157         /// Constructor from an axis and angle.
158         /// </summary>
159         /// <param name="angle">The angle around the axis</param>
160         /// <param name="axis">The vector of the axis</param>
161         public Rotation(Radian angle, Vector3 axis) : this(NDalicPINVOKE.new_Rotation__SWIG_1(Radian.getCPtr(angle), Vector3.getCPtr(axis)), true)
162         {
163             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164         }
165
166         /// <summary>
167         /// (0.0f,0.0f,0.0f,1.0f)
168         /// </summary>
169         public static Rotation IDENTITY
170         {
171             get
172             {
173                 global::System.IntPtr cPtr = NDalicPINVOKE.Rotation_IDENTITY_get();
174                 Rotation ret = (cPtr == global::System.IntPtr.Zero) ? null : new Rotation(cPtr, false);
175                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176                 return ret;
177             }
178         }
179
180         /// <summary>
181         /// Helper to check if this is an identity quaternion.
182         /// </summary>
183         /// <returns>True if this is identity quaternion</returns>
184         public bool IsIdentity()
185         {
186             bool ret = NDalicPINVOKE.Rotation_IsIdentity(swigCPtr);
187             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188             return ret;
189         }
190
191         /// <summary>
192         /// Converts the quaternion to an axis/angle pair.
193         /// </summary>
194         /// <param name="axis">the result of axis</param>
195         /// <param name="angle">the result of angle Angle in radians</param>
196         /// <returns>True if converted correctly</returns>
197         public bool GetAxisAngle(Vector3 axis, Radian angle)
198         {
199             bool ret = NDalicPINVOKE.Rotation_GetAxisAngle(swigCPtr, Vector3.getCPtr(axis), Radian.getCPtr(angle));
200             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201             return ret;
202         }
203
204         private Rotation Add(Rotation other)
205         {
206             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Add(swigCPtr, Rotation.getCPtr(other)), true);
207             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208             return ret;
209         }
210
211         private Rotation Subtract(Rotation other)
212         {
213             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Subtract__SWIG_0(swigCPtr, Rotation.getCPtr(other)), true);
214             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215             return ret;
216         }
217
218         private Rotation Multiply(Rotation other)
219         {
220             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Multiply__SWIG_0(swigCPtr, Rotation.getCPtr(other)), true);
221             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222             return ret;
223         }
224
225         private Vector3 Multiply(Vector3 other)
226         {
227             Vector3 ret = new Vector3(NDalicPINVOKE.Rotation_Multiply__SWIG_1(swigCPtr, Vector3.getCPtr(other)), true);
228             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229             return ret;
230         }
231
232         private Rotation Divide(Rotation other)
233         {
234             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Divide__SWIG_0(swigCPtr, Rotation.getCPtr(other)), true);
235             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236             return ret;
237         }
238
239         private Rotation Multiply(float scale)
240         {
241             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Multiply__SWIG_2(swigCPtr, scale), true);
242             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243             return ret;
244         }
245
246         private Rotation Divide(float scale)
247         {
248             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Divide__SWIG_1(swigCPtr, scale), true);
249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250             return ret;
251         }
252
253         private Rotation Subtract()
254         {
255             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Subtract__SWIG_1(swigCPtr), true);
256             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257             return ret;
258         }
259
260         private Rotation AddAssign(Rotation other)
261         {
262             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_AddAssign(swigCPtr, Rotation.getCPtr(other)), false);
263             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264             return ret;
265         }
266
267         private Rotation SubtractAssign(Rotation other)
268         {
269             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_SubtractAssign(swigCPtr, Rotation.getCPtr(other)), false);
270             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271             return ret;
272         }
273
274         private Rotation MultiplyAssign(Rotation other)
275         {
276             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_MultiplyAssign__SWIG_0(swigCPtr, Rotation.getCPtr(other)), false);
277             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278             return ret;
279         }
280
281         private Rotation MultiplyAssign(float scale)
282         {
283             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_MultiplyAssign__SWIG_1(swigCPtr, scale), false);
284             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285             return ret;
286         }
287
288         private Rotation DivideAssign(float scale)
289         {
290             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_DivideAssign(swigCPtr, scale), false);
291             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292             return ret;
293         }
294
295         private bool EqualTo(Rotation rhs)
296         {
297             bool ret = NDalicPINVOKE.Rotation_EqualTo(swigCPtr, Rotation.getCPtr(rhs));
298             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299             return ret;
300         }
301
302         private bool NotEqualTo(Rotation rhs)
303         {
304             bool ret = NDalicPINVOKE.Rotation_NotEqualTo(swigCPtr, Rotation.getCPtr(rhs));
305             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306             return ret;
307         }
308
309         /// <summary>
310         /// Returns the length of the rotation
311         /// </summary>
312         /// <returns>The length of the rotation</returns>
313         public float Length()
314         {
315             float ret = NDalicPINVOKE.Rotation_Length(swigCPtr);
316             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317             return ret;
318         }
319
320         /// <summary>
321         /// Returns the squared length of the rotation
322         /// </summary>
323         /// <returns>The squared length of the rotation</returns>
324         public float LengthSquared()
325         {
326             float ret = NDalicPINVOKE.Rotation_LengthSquared(swigCPtr);
327             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328             return ret;
329         }
330
331         /// <summary>
332         /// Normalizes this to unit length.
333         /// </summary>
334         public void Normalize()
335         {
336             NDalicPINVOKE.Rotation_Normalize(swigCPtr);
337             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338         }
339
340         /// <summary>
341         /// Normalized.
342         /// </summary>
343         /// <returns>A normalized version of this rotation</returns>
344         public Rotation Normalized()
345         {
346             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Normalized(swigCPtr), true);
347             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348             return ret;
349         }
350
351         /// <summary>
352         /// Conjugates this rotation.
353         /// </summary>
354         public void Conjugate()
355         {
356             NDalicPINVOKE.Rotation_Conjugate(swigCPtr);
357             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
358         }
359
360         /// <summary>
361         /// Inverts this rotation.
362         /// </summary>
363         public void Invert()
364         {
365             NDalicPINVOKE.Rotation_Invert(swigCPtr);
366             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367         }
368
369         /// <summary>
370         /// Performs the logarithm of a rotation
371         /// </summary>
372         /// <returns>A rotation representing the logarithm</returns>
373         public Rotation Log()
374         {
375             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Log(swigCPtr), true);
376             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377             return ret;
378         }
379
380         /// <summary>
381         /// Performs an exponent
382         /// </summary>
383         /// <returns>A rotation representing the exponent</returns>
384         public Rotation Exp()
385         {
386             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Exp(swigCPtr), true);
387             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388             return ret;
389         }
390
391         /// <summary>
392         /// Returns the dot product of two rotations.
393         /// </summary>
394         /// <param name="q1">The first rotation</param>
395         /// <param name="q2">The second rotation</param>
396         /// <returns>The dot product of the two rotations</returns>
397         public static float Dot(Rotation q1, Rotation q2)
398         {
399             float ret = NDalicPINVOKE.Rotation_Dot(Rotation.getCPtr(q1), Rotation.getCPtr(q2));
400             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401             return ret;
402         }
403
404         /// <summary>
405         /// Linear Interpolation (using a straight line between the two rotations).
406         /// </summary>
407         /// <param name="q1">The start rotation</param>
408         /// <param name="q2">The end rotation</param>
409         /// <param name="t">A progress value between 0 and 1</param>
410         /// <returns>The interpolated rotation</returns>
411         public static Rotation Lerp(Rotation q1, Rotation q2, float t)
412         {
413             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Lerp(Rotation.getCPtr(q1), Rotation.getCPtr(q2), t), true);
414             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415             return ret;
416         }
417
418         /// <summary>
419         /// Spherical Linear Interpolation (using the shortest arc of a great circle between the two rotations).
420         /// </summary>
421         /// <param name="q1">The start rotation</param>
422         /// <param name="q2">The end rotation</param>
423         /// <param name="progress">A progress value between 0 and 1</param>
424         /// <returns>The interpolated rotation</returns>
425         public static Rotation Slerp(Rotation q1, Rotation q2, float progress)
426         {
427             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Slerp(Rotation.getCPtr(q1), Rotation.getCPtr(q2), progress), true);
428             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429             return ret;
430         }
431
432         /// <summary>
433         /// This version of Slerp, used by Squad, does not check for theta > 90.
434         /// </summary>
435         /// <param name="q1">The start rotation</param>
436         /// <param name="q2">The end rotation</param>
437         /// <param name="t">A progress value between 0 and 1</param>
438         /// <returns>The interpolated rotation</returns>
439         public static Rotation SlerpNoInvert(Rotation q1, Rotation q2, float t)
440         {
441             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_SlerpNoInvert(Rotation.getCPtr(q1), Rotation.getCPtr(q2), t), true);
442             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
443             return ret;
444         }
445
446         /// <summary>
447         /// Spherical Cubic Interpolation.
448         /// </summary>
449         /// <param name="start">The start rotation</param>
450         /// <param name="end">The end rotation</param>
451         /// <param name="ctrl1">The control rotation for q1</param>
452         /// <param name="ctrl2">The control rotation for q2</param>
453         /// <param name="t">A progress value between 0 and 1</param>
454         /// <returns>The interpolated rotation</returns>
455         public static Rotation Squad(Rotation start, Rotation end, Rotation ctrl1, Rotation ctrl2, float t)
456         {
457             Rotation ret = new Rotation(NDalicPINVOKE.Rotation_Squad(Rotation.getCPtr(start), Rotation.getCPtr(end), Rotation.getCPtr(ctrl1), Rotation.getCPtr(ctrl2), t), true);
458             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
459             return ret;
460         }
461
462         /// <summary>
463         /// Returns the shortest angle between two rotations in Radians.
464         /// </summary>
465         /// <param name="q1">The first rotation</param>
466         /// <param name="q2">The second rotation</param>
467         /// <returns>The angle between the two rotation</returns>
468         public static float AngleBetween(Rotation q1, Rotation q2)
469         {
470             float ret = NDalicPINVOKE.Rotation_AngleBetween(Rotation.getCPtr(q1), Rotation.getCPtr(q2));
471             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472             return ret;
473         }
474
475     }
476
477 }